Free course · by Debugshala, Indore
LLM Fundamentals Tutorial
9 free lessons, in the order we teach them in class: start at lesson 1 and work down. Every lesson has an analogy, a diagram, code you can run or copy, a quick quiz and an FAQ.
- 9Lessons
- 1Modules
- ~2 hReading time
- FreeAlways
01Generative AI Foundations
- What is an LLM? How Large Language Models Actually WorkLearn what an LLM is: tokens, next-token prediction, training vs inference, context windows and temperature, with a runnable bigram text generator in Python.
- Tokenization Explained: How LLMs Split Text into TokensLearn how LLM tokenization works: subwords, byte-pair encoding, token IDs and why Hindi costs more tokens. Train a tiny BPE tokenizer in Python.
- Embeddings Explained: How AI Turns Meaning into VectorsEmbeddings explained simply: words and sentences as vectors, cosine similarity in numpy, a bag-of-words baseline and how semantic search ranks results.
- Transformers and Attention Explained: How LLMs Read ContextUnderstand the transformer behind every LLM: queries, keys and values, the causal mask, multi-head attention and transformer blocks, with numpy code.
- How LLMs Are Trained: Pretraining, SFT and RLHF ExplainedSee how LLMs are trained in stages: pretraining, supervised fine-tuning, RLHF and DPO, and reasoning RL, with the loss behind each stage in Python.
- Mixture of Experts (MoE) Explained: How Sparse LLMs WorkMixture of experts explained: how a router picks experts, total vs active parameters, load balancing, and why MoE LLMs still need lots of memory.
- LLM Generation Parameters: Temperature, Top-p, Top-k GuideA practical guide to LLM generation parameters: temperature, top-k, top-p, min-p, penalties, max tokens and stop sequences, with settings by task.
- LLM Decoding Strategies: Greedy, Beam Search and SamplingCompare LLM decoding strategies: greedy decoding, beam search, sampling, constrained and speculative decoding, with runnable Python toy examples.
- How to Run LLMs Locally: Ollama, llama.cpp and LM StudioRun LLMs locally step by step with Ollama, LM Studio or llama.cpp. Check speed and memory for your laptop and call a local model from Python.