Chapter 6: NLP — from embeddings to LLMs
Natural language is the hardest kind of data: text has no native numeric structure, words depend on context, and meaning is defined by the whole sequence. This chapter walks from the start: how to turn text into numbers (embeddings), how attention lets a model see full context at once (Transformer), how BERT differs from GPT, how RAG works, and why LoRA makes fine-tuning practical. PyTorch + Hugging Face are the hands-on stack.