Contents
Map

03 · Foundation Models

Summary & Key Terms

View as:

Summary & Key Terms - Foundation Models

What We Learned

  • Tokenization turns text into IDs; vocabulary choices affect length, cost and failure modes.
  • A transformer combines embeddings, position, attention and feed-forward layers to predict tokens.
  • Causal masking supports parallel training; generation still proceeds token by token.
  • Encoder, decoder, MoE and hybrid designs trade capability against compute and memory.
  • Choose models using task evaluations; test hallucination, context loss and sycophancy.

Key Acronyms, Concepts & Jargon

TermShort meaning
LLMLarge Language Model: a model that learns patterns in token sequences.
BPEByte Pair Encoding: builds tokens by repeatedly merging frequent adjacent pairs.
Token / context windowA model input unit / the token budget available to a request.
Temperature / top-pControls sampling sharpness / limits sampling to a probability mass.
Q/K/VQuery, Key, Value: attention matches queries to keys and combines values.
RoPERotary Position Embeddings: rotations that encode token position in attention.
ALiBiAttention with Linear Biases: a distance penalty added to attention scores instead of position embeddings.
LN / Pre-LNLayer Normalization / normalizing before each sublayer (modern) rather than after the residual add (original Post-LN).
RMSNorm / FFNRoot Mean Square Normalization / Feed-Forward Network: normalize activations / transform each token.
SwiGLUSwish-Gated Linear Unit: the gated FFN activation used by most modern LLMs.
QK-normNormalizes queries and keys before the dot product to keep attention logits bounded in large runs.
AttnResAttention Residuals: replace the fixed residual sum with learned attention over earlier layers' outputs.
MHA / MQA / GQAMulti-Head / Multi-Query / Grouped-Query Attention: independent / shared / grouped K/V heads.
SWASliding Window Attention: each token attends only to the nearest W tokens.
FlashAttentionExact attention computed with less intermediate memory and data movement.
MoEMixture of Experts: routes tokens to a subset of expert networks.
MLA / SSMMulti-head Latent Attention / State-Space Model: compressed attention state / recurrent sequence state.
Hallucination / sycophancyUnsupported output / agreeing with the user over correctness.
Lost in the middleReduced use of relevant information buried inside a long context.

Back to module overview

⚡AI-assisted content - always verify, always explore multiple perspectives·