Cheatsheet 01 — LLM Terminology

Fast-recall glossary of the terms you must define instantly in an interview. Grouped by area. Full treatment: Phase 1.

Core model concepts

TermOne-line definition
TokenSub-word unit the model reads/writes (~4 chars / ~0.75 words in English).
TokenizerMaps text ↔ token IDs (BPE/SentencePiece).
ParametersThe learned weights; "7B" = 7 billion.
Context windowMax tokens (input + output) the model can attend to at once.
EmbeddingA vector representing text meaning; powers retrieval.
LogitsRaw per-token scores before softmax → probabilities.
VocabularyThe set of tokens the model knows.
Pre-trainingNext-token prediction on huge corpora (the base model).
Fine-tuningFurther training to shape behavior (not facts).
AlignmentMaking a model helpful/harmless/honest (SFT → RLHF/DPO).

Inference mechanics

TermOne-line definition
PrefillProcessing the whole prompt in parallel (compute-bound).
DecodeGenerating tokens one at a time (memory-bandwidth-bound).
KV-cacheCached keys/values per token so decode doesn't recompute attention.
AutoregressiveEach token is generated conditioned on all previous tokens.
TTFTTime To First Token (latency of prefill).
TPOT / ITLTime Per Output Token / inter-token latency (decode speed).
ThroughputTokens/sec across all requests (a server metric).
Greedy / samplingPick the top token vs sample from the distribution.

Generation parameters

TermOne-line definition
TemperatureRandomness; 0 = deterministic, higher = more diverse.
Top-p (nucleus)Sample from the smallest set of tokens summing to prob p.
Top-kSample from the k most likely tokens.
Max tokensCap on output length.
Stop sequencesStrings that end generation.
Frequency/presence penaltyDiscourage repetition / encourage new topics.
SeedFix randomness for reproducibility (where supported).

Capabilities & features

TermOne-line definition
In-context learningLearning a task from examples in the prompt (no training).
Few-shot / zero-shotWith / without examples in the prompt.
Chain-of-thought (CoT)Prompting the model to reason step-by-step.
Reasoning modelA model trained to "think" before answering (extra reasoning tokens).
Tool / function callingModel emits a structured call the app executes.
Structured outputModel output constrained to a schema (JSON).
MultimodalHandles text + images/audio/video.
RAGRetrieval-Augmented Generation — answer from retrieved docs.
AgentAn LLM in a loop that calls tools to accomplish a goal.

Architecture & training

TermOne-line definition
TransformerThe attention-based architecture under all LLMs.
AttentionMechanism letting each token weigh all others.
MoE (Mixture-of-Experts)Routes tokens to a few expert sub-nets (active < total params).
Active vs total paramsParams used per token vs total (MoE distinction).
QuantizationStoring weights in fewer bits (FP16→INT8/INT4) to save memory.
LoRA / QLoRALow-rank adapter fine-tuning / on a quantized base.
SFT / RLHF / DPOSupervised fine-tune / RL from human feedback / direct preference opt.
DistillationTrain a small "student" to mimic a big "teacher."
HallucinationConfident but false/unsupported output.

Serving & ops

TermOne-line definition
vLLM / TGI / SGLangHigh-throughput serving engines.
PagedAttentionKV-cache memory management (OS-style paging) → high throughput.
Continuous batchingAdd/remove requests from a batch each step → high GPU use.
Prefix/prompt cachingReuse computation for shared prompt prefixes.
Speculative decoding / MTPDraft model proposes tokens, big model verifies → lower latency.
Gateway / proxyLayer that routes/meters/fallbacks across providers.
p50/p95/p99Latency percentiles (tail latency matters most).

Quick "interview definitions" (say these crisply)

  • Why is decode slow? It's sequential and memory-bandwidth-bound — each token reloads the whole model + KV-cache from VRAM. (tok/s ≈ memory bandwidth ÷ model size in bytes.)
  • Why does context cost grow? KV-cache memory scales with context length × layers × heads — long context = more VRAM.
  • RAG vs fine-tuning? RAG adds knowledge (facts/context); fine-tuning shapes behavior (format/style/skill).
  • Why is structured output not enough for correctness? Constrained decoding guarantees valid JSON, not correct content.

Next: 02 — Model Card Reading · Full: Phase 1