Advanced LLM Engineering
A deep-dive walkthrough of what is under the hood of large language models and how that knowledge changes the way you build with them β covering transformer architecture, self-attention and multi-head attention, positional encoding, tokenization algorithms, context window management, the KV cache, temperature/top-K/top-P sampling, quantization, distillation, fine-tuning vs. RAG, LoRA and QLoRA, small language models, open-weight vs. proprietary models, multimodal LLMs, and model routing and fallback β with C# code for the mechanics, back-of-envelope calculators, and interview-style questions.
Table of Contents
Introduction
Transformer Architecture
Self-Attention and Multi-Head Attention
Positional Encoding
Tokenization Algorithms
Context Window Management
KV Cache
Temperature, Top-K, and Top-P Sampling
Model Quantization
Model Distillation
Fine-Tuning vs. RAG
LoRA and QLoRA
Small Language Models (SLMs)
Open-Weight vs.β¦