Название: Generative AI in C++: Coding Transformers and LLMs Автор: David Spuler Издательство: Yoryck AI Pty Ltd. Год: March 30, 2024 Страниц: 1206 Язык: английский Формат: pdf, epub, mobi Размер: 10.1 MB
Do you know C++ but not AI? Do you dream of writing your own AI engine in C++? From beginner to advanced, this book covers the internals of AI engines in C++, with real source code examples and research paper citations.
As a programmer, your job is to harness the power of your AI platform and offer it up to your many users in top-level features. Whether your AI project is about writing sports content or auto-diagnosing X-ray images, your work as an AI developer is based on fundamentally the same architecture. And to do this at a scale that matches the capability of your workhorse models, you need a programming language to match its power. I'll give you three guesses which one I recommend.
C++ is on the inside of all AI engines. Whereas Python is often on the outside wrapping around the various models, C++ is always closer to the machine and its hardware. PyTorch and Tensorflow have lots of Python code on the top layers, but the grunt work underneath runs in highly optimized C++ code. The main advantage of C++ is that it is super-fast, and has low-level capabilities, that makes its operations close to those of the hardware instructions. This is a perfect match, because AI engines need to run blazingly fast, with hardware-acceleration integrations direct to the GPU to handle literally billions of arithmetic calculations. And yet, C++ is also a high-level programming language with support for advanced features like classes and modularity, so it's great for programmer productivity.
Key Features:
Transformer components in C++ Faster and smarter AI Play with an AI engine on your desktop Cutting-edge research optimizations Just C++ code without all the math
Contents:
Part I: AI Projects in C++ 1. Introduction to AI in C++ 2. Transformers & LLMs 3. AI Phones 4. AI on Your Desktop 5. Design Choices & Architectures 6. Training, Fine-Tuning & RAG 7. Deployment Architecture
Part II: Basic C++ Optimizations 8. Bitwise Operations 9. Floating Point Arithmetic 10. Arithmetic Optimizations 11. Compile-Time Optimizations 12. Pointer Arithmetic 13. Algorithm Speedups 14. Memory Optimizations
Part III: Parallel C++ Optimizations 15. Loop Vectorization 16. Hardware Acceleration 17. AVX Intrinsics 18. Parallel Data Structures
Part IV: Transformer Components in C++ 19. Encoders & Decoders 20. Attention 21. Activation Functions 22. Vector Algorithms 23. Tensors 24. Normalization 25. Softmax 26. Decoding Algorithms 27. Tokenizer and Vocabulary
Part V: Optimizing Transformers in C++ 28. Deslugging AI Engines 29. Caching Optimizations 30. Vectorization 31. Kernel Fusion 32. Quantization 33. Pruning 34. MatMul/GEMM 35. Lookup Tables & Precomputation 36. AI Memory Optimizations
Part VI: Enterprise AI in C++ 37. Tuning, Profiling & Benchmarking 38. Platform Portability 39. Quality 40. Reliability 41. Self-Testing Code 42. Debugging
Part VII: Research on AI Optimization 43. Overview of AI Research 44. Advanced Quantization 45. Knowledge Distillation 46. Structured Pruning 47. Early Exit and Layer Pruning 48. Width Pruning 49. Length Pruning 50. Adaptive Inference 51. Zero-Multiplication Models 52. Logarithmic Models 53. Arithmetic Optimization Research 54. Ensemble Multi-Model Architectures 55. Advanced Number Systems 56. Neural Architecture Search Appendix 1: C++ Slug Catalog
Скачать Generative AI in C++: Coding Transformers and LLMs
|