Glossary
English ↔ Spanish, with the definition that actually matters and where to see it running.
A note about the project: class and function names are in English on purpose (
Linear,LayerNorm,backward,parameters), identical to PyTorch's, so that what you learn here transfers literally. The explanations, the comments and the local variable names are in Spanish — so the Spanish term is given here too, because you will meet it in the source listings.
A
Activation · activación The output of a layer. Also, the non-linear function (ReLU, GELU, tanh). Without it, stacking layers is pointless: a product of matrices is a matrix. → mininn/tensor.py
Attention · atención The mechanism by which each token looks at the previous ones and takes from them what it needs, based on content. → Stage 05
Autograd · automatic differentiation Computing derivatives automatically by walking the operation graph backwards. → mininn/tensor.py
B
Backpropagation · retropropagación Computing every gradient in one backward pass. → Stage 03
Batch · lote A group of examples processed together.
bf16 · bfloat16 16-bit floating point with the same range as fp32 (same exponent bits, fewer mantissa bits). Preferred over fp16 because it does not overflow.
BPE · Byte Pair Encoding A tokenization algorithm: repeatedly merge the most frequent pair of symbols. It discovers morphology with nobody teaching it any. → Stage 01
C
Causal mask · máscara causal Preventing a token from seeing the future. Forget it and the model cheats. → Stage 05
Context window · contexto / ventana de contexto The maximum number of tokens the model can look at in one go. Whatever falls outside does not exist for it. → docs/01
Cross-entropy · entropía cruzada The loss of every language model: -log P(correct token).
D
Decoding · decodificación The phase of generating token by token. Sequential and memory-bound.
DPO · Direct Preference Optimization Aligning with human preferences without a reward model or reinforcement learning. → Stage 10
Dropout Switching off neurons at random during training to avoid overfitting. → Stage 07.3
E
Embedding The vector of numbers associated with a token. Language's front door into the numerical world. → Stage 04.2
Epoch · época One complete pass over the training data.
F
Fine-tuning Continuing to train an already-trained model, with specific data. → Stage 09
FlashAttention Computing attention in blocks inside fast memory, without materializing the T×T matrix. Exact, not approximate. → docs/04
FLOP · floating point operation One floating point operation. 6·N·D = the cost of training.
G
GELU The smooth activation that almost every transformer uses.
GQA · Grouped Query Attention Several query heads share keys and values. Reduces the KV cache ~8×. → docs/04
Gradient · gradiente A vector of partial derivatives. It says which way to move each parameter.
Gradient descent · descenso de gradiente w ← w - lr · ∇L. The engine of all of it. → Stage 00
H
Hallucination · alucinación Confidently stating something false. It is not a bug: it is the consequence of being trained to produce plausible text, not true text. → docs/05
Head · cabeza One of the attentions running in parallel. Each can look for a different thing. → Stage 05
I
Induction head · cabeza de inducción An emergent circuit that detects "A B … A" and predicts "B". It is the mechanism behind in-context learning. → Stage 06.3
Inference · inferencia Running the model to get an answer. The weights do not change.
K
KV cache · KV-cache Storing the already-computed keys and values so the past does not get recomputed. Speeds generation up 10-50×. → Stage 08.2
L
Layer · capa A transformation block with its own parameters.
LayerNorm · layer normalization Normalizes each vector to mean 0 and standard deviation 1. Makes deep networks trainable. → mininn/nn.py
Learning rate · tasa de aprendizaje The step size. The most critical hyperparameter. → Stage 00.2
Logit The raw score before the softmax. An unnormalized log-probability.
LoRA · Low-Rank Adaptation Training two small matrices instead of all the weights. Fine-tuning with 1% of the memory. → Stage 09.2
Loss · pérdida (perdida in the code) A number measuring how wrong the model is.
M
Memory bandwidth · ancho de banda de memoria GB/s the GPU can read. It is the real limit when generating text, not compute power. → docs/04
MLP · multi-layer perceptron / feed-forward The "thinking" half of a transformer block. Where most of the factual knowledge lives.
Momentum Accumulating inertia in gradient descent. Damps the zigzag.
O
Overfitting · sobreajuste Memorizing the training set and failing outside it. → Stage 07.3
P
Parameter · parámetro A number the model learns. GPT-3 has 175 billion of them.
Perplexity · perplejidad e^loss. "How many options the model is torn between." Only comparable with the same tokenizer.
Prefill · precarga Processing the whole prompt in one go before starting to generate. Compute-bound.
Pretraining · preentrenamiento Training on massive text to predict the next token. Where everything is learned.
Prompt injection · inyección de prompt External text the model interprets as an instruction. An unsolved problem: there is no structural separation between data and instructions. → Stage 12.3
Q
Quantization · cuantización Storing the weights with fewer bits. The reason large models fit on a laptop. → Stage 08.3
R
RAG · Retrieval-Augmented Generation Searching for information and putting it into the prompt. → Stage 12
Residual connection · conexión residual / skip connection x + f(x). A motorway for the gradient. Makes 100+ layer networks possible. → Stage 07.2
RLHF · Reinforcement Learning from Human Feedback Aligning with human preferences via a reward model and PPO.
RoPE · Rotary Position Embedding Encoding position by rotating the query and key vectors. Extrapolates better than learned positions. LLaMA, Mistral and Gemma use it.
S
SFT · Supervised Fine-Tuning Fine-tuning on (instruction, answer) pairs. Turns a text continuer into an assistant. → Stage 09.1
Softmax Turns arbitrary scores into probabilities that add up to 1.
Superposition · superposición Storing more concepts than there are dimensions, along nearly perpendicular directions. That is why there is no "French neuron". → Stage 04.2
T
Temperature · temperatura Divides the logits before the softmax. Low = predictable, high = creative. → Stage 08.1
Token A chunk of text the model treats as a unit. → Stage 01
Top-k / Top-p (nucleus) Sampling strategies: keep the best k, or the ones adding up to probability p. → Stage 08.1
Transformer The architecture that alternates attention (communicating) and MLP (computing). → Stage 06
V
Validation · validación Data the model never sees while training. Without this you know nothing.
Vocabulary · vocabulario The set of tokens the model knows. Typically 32,000-256,000.
W
Warmup · calentamiento Raising the learning rate gradually at the start. Stops the model destroying itself in the first few steps.
Weight decay Shrinking the weights slightly on every step. Regularization. In AdamW it is decoupled from the gradient, and that is the "W".
Weight tying · pesos atados Reusing the embedding table as the output matrix. Saves parameters. → etapas/06_transformer/gpt.py
Z
ZeRO / FSDP Splitting weights, gradients and optimizer state across several GPUs.
False friends and frequent confusions
| What gets said | What it usually really means |
|---|---|
| "the model learns from our conversation" | the server resends you the history every time |
| "it reasons" | it generates intermediate tokens that improve the result |
| "it knows that it does not know" | it has no such signal; calibration is limited |
| "it has forgotten" | it fell outside the context window and got truncated |
| "it is deterministic at temperature 0" | nearly, but dynamic batching breaks ties |
| "it understands" | it has representations that predict well; anything beyond that is an open and legitimate philosophical argument |
| "AI" | in 99% of today's cases: a transformer predicting tokens |