GNGiseldo Neo and Alana NeoBooks

Library

Language Models with Python

An Objective Approach · by Giseldo Neo and Alana Neo

Language Models with Python

From the token to the Transformer: tokenization, embeddings, attention, the GPT model, training, inference, fine-tuning and evaluation, with Python examples.

Read the book

Contents

  1. 1. Introduction to LLMs
  2. 2. Setting Up the Development Environment
  3. 3. Mathematical Foundations
  4. 4. Tokenization and Vocabularies
  5. 5. Vector Representation: Embeddings and Positional Encoding
  6. 6. The Attention Mechanism (Self-Attention)
  7. 7. Multi-Head Attention and Linear Projections
  8. 8. The Transformer Block Architecture
  9. 9. Assembling the Complete Model (GPT Style)
  10. 10. The Training Loop and Optimization
  11. 11. Inference Strategies and Text Generation
  12. 12. Fine-Tuning and Customization
  13. 13. Evaluation, Checkpoints, and Scale
  14. 14. Limitations, Ethics, and Responsible Use
  15. 15. The Future of LLMs
  16. 16. Glossary