LLM Engineering
A 16-week, lab-led live course from tokens and attention to shipped LLM apps: training, fine-tuning, serving, RAG, agents and evals.
Curriculum
TEN-01Tokens, Logits & Sampling4 lessons · 20 h
- Text to token ids
- Scores to probabilities
- Temperature, top-k and top-p
- Token cost across languages
TEN-02Attention & the Transformer4 lessons · 20 h
- Self-attention and causal mask
- Residual blocks
- RoPE and grouped-query attention
- Counting every parameter
TEN-03Pretraining & Scaling4 lessons · 20 h
- Data pipelines
- Training step and compute
- Chinchilla scaling
- Memory needed per parameter
TEN-04Fine-tuning & Alignment5 lessons · 20 h
- Chat templates
- Supervised fine-tuning
- LoRA and QLoRA on one GPU
- Preference tuning with DPO
- When fine-tuning is the wrong tool
TEN-05Inference & Serving5 lessons · 20 h
- Prefill vs decode
- KV-cache arithmetic
- Memory-bandwidth ceiling
- Quantization
- Continuous batching and speculative decoding
TEN-06Prompting, Structured Output & Tools3 lessons · 20 h
- Versioned prompts
- JSON schemas with validation
- Tool-calling loop
TEN-07RAG & Agents5 lessons · 20 h
- Chunking and hybrid search
- Reranking and citations
- Recall@k measurement
- Agent step limits and approval gates
- Prompt-injection defences
TEN-08Evals, Safety & Capstone5 lessons · 20 h
- Eval harnesses
- LLM-as-judge and its biases
- Production metrics
- Risks specific to LLM apps
- End-to-end capstone with weekly review
What's included
Questions
Do I need prior experience?
This course is set at intermediate level. The first module starts from the basics, so you only need the time and a laptop or phone with a stable connection.
What if I miss a live class?
Every live class is recorded and posted within 24 hours. You keep access to the recordings for 12 months.
When are the classes?
The next cohort starts soon (date to be announced) and runs for 16 weeks, ~10 hrs per week. The full timetable and class link appear in My courses before the first class.
Which language is the course taught in?
English.
How do I pay?
Online through UPI, cards, net banking or wallets, processed by Razorpay. You get a receipt by email and the course appears in My courses right away.
Q01What is a token, and why does tokenisation matter?TokensBasic
Models read text as subword tokens, usually produced by byte-pair encoding. Cost, context limits and latency are all counted in tokens.
Some languages, including Hindi, need more tokens per word than English, so the same message costs more. Tokenisation also explains quirks with spelling, counting letters and arithmetic.
Q02What do temperature, top-k and top-p do?SamplingBasic
Temperature scales the logits before softmax: low values make output more deterministic, high values more varied.
Top-k keeps only the k most likely tokens. Top-p keeps the smallest set of tokens whose probabilities add up to p. Use low temperature for extraction and classification, higher for creative writing.
Q03Explain self-attention.TransformerIntermediate
Each token is projected into a query, key and value. Attention scores are Q·Kᵀ divided by √dₖ, passed through softmax, and used to take a weighted sum of the values.
In decoder models a causal mask stops a token attending to later tokens. Multiple heads learn different relationships. Cost grows with the square of sequence length.
Q04What is the KV cache, and why does it matter?InferenceIntermediate
During generation, the keys and values for earlier tokens are stored so each new token only computes its own, instead of recomputing the whole sequence.
Its memory grows with layers × KV heads × head size × sequence length × batch size × 2, and it often limits batch size and context length. Grouped-query attention shrinks it by sharing keys and values across heads.
Q05When do you use prompting, RAG or fine-tuning?DesignIntermediate
Start with prompting. Use RAG when the model needs knowledge that changes, is private, or must be cited.
Fine-tune to change behaviour, format or style, or to get a smaller model to do a narrow task cheaply. Fine-tuning is a poor way to add fresh facts.
Q06How does LoRA work?Fine-tuningIntermediate
The base model's weights are frozen. For chosen layers, usually the attention projections, LoRA learns a low-rank update ΔW = B·A with rank r much smaller than the layer size.
This cuts trainable parameters and optimiser memory dramatically, and the update can be merged back into the weights for serving. QLoRA also stores the base model in 4-bit to fit larger models on one GPU.
Q07What is the difference between prefill and decode, and why is decode memory-bandwidth bound?ServingAdvanced
Prefill processes the whole prompt in parallel and is limited by compute. Decode produces one token at a time, and each step must read all the weights and the KV cache from memory, so it is limited by memory bandwidth.
Batching many requests shares each weight read across users. Track time to first token for prefill and time per output token for decode.
Q08How do you evaluate an LLM application?EvaluationAdvanced
Build an eval set from real user queries with expected answers or grading criteria. Use automatic checks where you can: exact match, schema validity, retrieval recall@k.
For open answers, use an LLM judge calibrated against human labels, and watch for its biases toward position, length and its own outputs. Run evals on every prompt or model change, and keep monitoring in production.
Q09What do scaling laws such as Chinchilla tell us?TrainingAdvanced
For a fixed compute budget, loss is lowest when parameters and training tokens grow together, roughly 20 tokens per parameter for compute-optimal training.
Many teams now deliberately train smaller models on far more tokens than that, because a smaller model is cheaper to serve.
Also on its own page: LLM Engineering interview questions