BC Skills Academy

LLM Architecture & Transformers — Study Guide

An illustrated, end-to-end study guide for the LLM Architecture & Transformers certification. Four modules take you from raw text to generated tokens: inputs (tokenization, embeddings, positional encoding), the attention mechanism, the transformer block and stack, and decoding plus scaling. Rich with Mermaid diagrams, comparison tables, formulas, and worked numeric examples.

Key facts

Course outline

  1. Inputs: Tokenization, Embeddings & Positional Encoding — How raw text becomes the position-aware vectors a transformer consumes.
    • From Text to Tokens: BPE & Subword Tokenization
    • Embeddings & Weight Tying
    • Positional Encoding: Sinusoidal, Learned, RoPE & ALiBi
    • Putting the Input Pipeline Together
  2. The Attention Mechanism — Scaled dot-product attention, causal masking, multi-head, and the long-context toolkit.
    • Scaled Dot-Product Attention, Step by Step
    • Causal Masking & Autoregression
    • Multi-Head Attention
    • Long Context: Complexity, FlashAttention, KV-Cache & GQA
  3. The Transformer Block & Stack — Residuals, normalization, the feed-forward network, and stacking N blocks into a decoder.
    • Residual Connections & the Residual Stream
    • Normalization: LayerNorm vs RMSNorm, Pre- vs Post-Norm
    • The Feed-Forward Network: GELU & SwiGLU
    • The Decoder-Only Stack of N Blocks
  4. From Logits to Text & Scaling — Logits, softmax, sampling strategies, precision, scaling laws and mixture-of-experts.
    • Logits, Softmax & Sampling
    • Numerical Precision: fp16, bf16 & fp8
    • Scaling Laws & Mixture-of-Experts
    • Failure Modes & The Full Forward Pass