Icon
TechX
🧠
AdvancedPro Track · $199/yr

LLM From Scratch: Tokenizers, Attention & Transformers

Construct an autoregressive large language model from mathematical foundations: BPE tokenization, multi-head causal self-attention, RMSNorm, PyTorch training loops, and nucleus sampling.

Estimated: ~24 hours
5 interactive modules
Pass mark: 80% for certificate

Skills & Topics Covered

PyTorchTransformersAttentionTokenizersDeep Learning
Portfolio Project

MicroGPT: Complete Autoregressive Transformer from Scratch

A complete PyTorch decoder-only transformer language model built from raw tensors: custom BPE tokenizer, multi-head causal attention, SwiGLU MLP, training loss loop, and temperature text generation.

Track Syllabus

5 Modules
Module 1·~35 minutes

Byte-Pair Encoding & Text Tokenization

Build a subword tokenizer from scratch using Byte-Pair Encoding (BPE), vocabulary merges, and special tokens.

5 steps
Module 2·~40 minutes

Scaled Dot-Product & Causal Multi-Head Attention

Code self-attention from scratch with Queries, Keys, Values, causal triangular masking, and multi-head projection.

6 steps
Module 3·~40 minutes

Transformer Blocks, Normalization & Positional Encodings

Assemble transformer blocks with RMSNorm, residual connections, SwiGLU feed-forward networks, and Rotary Positional Embeddings (RoPE).

5 steps
Module 4·~40 minutes

Training Loops, Loss & Autoregressive Sampling

Train language models with Cross-Entropy loss, optimize with AdamW, and sample text with temperature, top-k, and nucleus top-p.

4 steps
Module 5·~50 minutes

Capstone: Build the MicroGPT Autoregressive Transformer

Construct a complete decoder-only transformer model in PyTorch from scratch with custom tokenizer and text generator.

3 steps
Official Credential

TechX Pro LLM From Scratch Certificate

Upon passing the module knowledge checks with an 80%+ score and submitting the capstone project, you earn this verified credential. Add it directly to your LinkedIn profile with 1 click and showcase it on your public TechX portfolio.

Sign In & Unlock Pro Pass

Requires TechX Pro Pass ($199/yr) or Summer 2027 Engineering Pod enrollment