Home / Topics

01

LLM Fundamentals

How large language models actually work, from tokens to fine-tuning.

Guides

01

Tokens and embeddings

What a model really sees, why token counts matter for cost and latency, and how text becomes vectors.

8 min
02

Transformers and attention

Self-attention step by step, multi-head attention, the decoder-only architecture and the KV cache.

12 min
03

Training, fine-tuning and alignment

Pre-training, supervised fine-tuning, RLHF and DPO, LoRA, and how to choose between prompting, RAG and fine-tuning.

10 min

Interview questions

All 13 with answers →
  1. What is a token, and why do LLMs use subword tokenization instead of words or characters?
  2. Explain scaled dot-product attention. Why divide by √d_k?
  3. What is the KV cache and what problem does it solve?
  4. Why is attention O(n²), and what are common ways to handle long context?
  5. What's the difference between MHA, MQA and GQA?