Reference · 336 terms
Glossary
Every technical term in the lessons, in plain English. Inside a lesson, hover or tap a dotted term to see its definition without leaving the page.
No term matches that. Try part of a word, or browse the concept map.
- `AutoModelForSequenceClassification`
- The Auto class for a model with a whole-text classification head.
- `id2label`
- The configuration's map from output position to label name.
- `max_length`
- The maximum number of tokens kept when truncating.
- `num_labels` / `id2label` / `label2id`
- Configuration settings for the number of classes and their names.
- `save_pretrained`
- Saves a model or tokeniser to a folder in Hub format.
- `save_to_disk`
- Saves a Hugging Face dataset in Arrow format.
- `top_k`
- How many top labels a classification pipeline returns;
Nonereturns all. - `torch.inference_mode()`
- A context manager that disables gradient recording for faster inference.
- `Trainer` / `TrainingArguments`
- Hugging Face's ready-made training loop and its settings.
- Abstention
- Declining to answer, usually because confidence is low.
- Access token
- A secret key that identifies you to a service.
- Activation function
- A simple non-linear function (such as ReLU, sigmoid or tanh) applied to each neuron's weighted sum. Without it, stacked layers collapse into a single linear model.
- Adam
- A popular optimizer that gives every parameter its own adaptive step size, using running averages of recent gradients and their squares. AdamW is Adam with weight decay applied correctly.
- AdamW
- Adam with decoupled weight decay; the standard fine-tuning optimiser.
- Adaptation
- Making a general pretrained model better at a specific task.
- Adaptation spectrum
- The range of adaptation methods, ordered by how much of the model they change.
- Adapter (PEFT)
- The saved set of trained PEFT weights for one task.
- Apache Arrow
- A column-based file format for fast reading of large tables.
- Application layer
- The code around a model: input checks, fit checks, decision rules, error handling.
- Architecture
- The design of a network — which layers, how many, how wide, and how they connect. It encodes built-in assumptions about the data.
- Attention mask
- 1s for real tokens and 0s for padding, so attention ignores padding.
- Auto classes
- Classes that read a configuration and build the matching architecture.
- Autoregressive
- Predicting each next item conditional on earlier items. Known training positions can be scored in parallel with a causal mask, while ordinary generation selects new tokens sequentially.
- Backpropagation
- The algorithm that computes the gradient of the loss with respect to every parameter, by applying the chain rule backwards through the computational graph. It assigns "credit" or "blame" to each parameter.
- Base model
- The model produced by pretraining, before adaptation to any task.
- Baseline
- A simple reference result (e.g. always predicting the majority class, or a logistic regression) that any serious model must beat to be worth its cost.
- Baseline ladder
- A set of baselines of increasing sophistication, measured identically.
- Batch
- A small group of training examples processed together in one forward and backward pass. The batch size is how many examples it contains.
- Batch size
- How many inputs are processed together in one forward pass.
- Benchmark
- A fixed public dataset and scoring rule for comparing models.
- bfloat16 (BF16)
- A 16-bit number format, 2 bytes per number.
- Bias (parameter)
- A learned number added to a neuron's weighted sum, letting it shift its output independently of the inputs — like the intercept in linear regression.
- Blockwise quantisation
- Quantising small blocks of numbers, each with its own scale.
- Body (encoder)
- The shared part of a model that builds representations.
- Bottleneck adapter
- A small down/up projection inserted into each layer.
- BPE (byte-pair encoding)
- A subword algorithm that merges frequent character pairs; used by GPT-2.
- Break-even volume
- The volume at which self-hosting and a hosted service cost the same.
- Broadcasting
- The rule that lets tensors of different shapes be combined element-wise by virtually stretching size-1 dimensions. Powerful, and a source of silent bugs when shapes are not what you think.
- Byte-pair encoding
- Tokenisation by repeatedly merging frequent adjacent pairs. Character-based versions require known characters; byte-level coverage can provide a fallback for arbitrary text.
- Cache hit rate
- The share of requests served from the cache.
- Cache key
- The information identifying a cached answer: input, model version, settings.
- Candidate
- A model shortlisted for testing.
- Capability
- What a model computes from an input.
- Card metadata
- Machine-readable fields at the top of a model card, such as
licenseandmodel-index. - Catastrophic forgetting
- Losing earlier abilities when trained on a new task.
- Causal LM loss
- Cross-entropy of predicting each token from those before it.
- Causal mask
- A restriction blocking future keys for a query position, so next-token prediction cannot read its answer. Padding restrictions are a separate mask concern.
- Chat template
- The special-marker format an instruction-tuned model expects around messages.
- Checkpoint
- A saved snapshot of training — model weights, optimizer state, epoch and config — from which you can resume or reproduce a run.
- Checkpoint selection
- Keeping the checkpoint with the best validation score.
- Class imbalance
- When one class is much rarer than another (e.g. 11.7% positives). Plain accuracy becomes misleading, so metrics like ROC-AUC and average precision are used.
- Classification head
- The task-specific layer(s) on top of a pretrained body.
- Cleaning
- Removing content with no signal for the task.
- CLIP
- Contrastive Language–Image Pretraining: paired image and text encoders trained to produce comparable projected representations. Similarity supports retrieval and candidate-based classification rather than directly generating an image.
- Commit / revision
- A recorded change to a repository / the version you ask for when loading.
- Computational graph
- The record of every operation used to compute the loss from the inputs and parameters. Backpropagation walks it backwards to compute gradients.
- Confidence
- The probability a classifier gives to its chosen class.
- Confidence interval
- An interval from a method designed to cover the target quantity at a stated rate over repeated samples; this is not a probability assigned to the fixed unknown value.
- Configuration
- A file describing a model's architecture (and labels) so a library can rebuild it.
- Confirmatory test
- A single use of the test set after all choices are made.
- Confusion matrix
- A table counting each combination of true and predicted label.
- Contamination
- Evaluation data appearing in a model's training data, inflating its scores.
- Context length
- The maximum number of tokens a model accepts at once.
- Context window
- The configured amount of sequence context a model can use under its architecture and implementation. A permitted length does not guarantee equal prediction quality at every position.
- Contextual representation
- A word vector that depends on the surrounding sentence.
- Contrastive learning
- Learning representations by favouring matched pairs relative to selected alternatives. What counts as a positive or negative pair depends on the training objective and data.
- Convolutional neural network
- A network that applies learned local filters with shared weights across spatial locations. It provides a useful inductive bias for many image tasks.
- Cosine similarity
- The dot product of two nonzero vectors divided by their lengths. It compares direction, lies between −1 and 1, and is not a calibrated probability of semantic equivalence.
- Coverage
- The share of inputs the system answers.
- Cross-attention
- Attention with queries from one sequence and keys and values from another, such as decoder target vectors reading encoded source memory.
- Cross-entropy loss
- Minus the log-probability of the correct class, averaged over a batch.
- CrossEntropyLoss
- The standard loss for classification. It heavily penalises confident wrong predictions and expects integer class labels (
long) in PyTorch. - Custom licence
- Terms written by a model's publisher specifically for that model.
- Data collator
- A function that combines examples into a batch, for example by padding them.
- DataLoader
- A PyTorch utility that takes a Dataset and serves shuffled mini-batches, optionally in parallel worker processes.
- Dataset (PyTorch)
- In PyTorch, an object that knows its length (
__len__) and how to return one example (__getitem__). - Dataset / DatasetDict
- A table of examples / a dictionary of tables, one per split.
- Dataset card
- The documentation page of a dataset on the Hub.
- Datasets
- Hugging Face's library for loading and processing datasets.
- Decision boundary
- The border in input space where a classifier's prediction switches from one class to another.
- Decision record
- A document of what was chosen, why, on what evidence, with which limitations.
- Decision rule
- The procedure, fixed in advance, for choosing among candidates.
- Degenerate repetition
- A generator getting stuck repeating words or tokens.
- Deployment constraint
- A practical limit a deployed model must meet, such as latency, memory or cost.
- Dequantisation
- Converting quantised values back to higher precision.
- Deterministic inference
- Exactly the same output for the same input every time.
- Dev set
- Another name for a validation set.
- Device placement
- Putting model weights and inputs on the same device.
- Distribution shift
- When the data a model sees in use differs from the data it was trained and validated on. Covariate shift changes the inputs; label shift changes how often each outcome occurs.
- Domain shift
- A difference between the data a model was built on and the data it meets in use.
- Double quantisation
- Quantising the quantisation scales themselves.
- Downstream task
- The task you actually want to solve with a pretrained model.
- Dropout
- A regulariser that randomly zeroes a fraction of activations during training (only), forcing the network not to rely on any single unit.
- dtype
- A tensor's data type, such as
float32,float16orint64(long). Layers and loss functions expect specific dtypes. - Dynamic batching
- Grouping requests that arrive close together into one batch.
- Early stopping
- Stopping training (and keeping the best checkpoint) when validation performance stops improving, to avoid overfitting.
- Embedding
- A learned vector of numbers that represents an item (a word, a user, an image) so that similar items get similar vectors.
- Encoder
- A model component that transforms an input into a representation used by another component or task.
- Engineered feature
- A feature whose formula a person invented and wrote in code, using domain knowledge — for example a ratio or a log transform.
- Epoch
- One complete pass over the whole training set.
- Error analysis
- Examining which examples a model gets wrong and why.
- Error overlap
- The number of errors two models share.
- Eval mode / train mode
- Model states that disable / enable training-only behaviour such as dropout.
- Evaluation leakage
- Evaluation data seen during training or model selection, inflating scores.
- Evaluation protocol
- Fixed rules for how every method is measured and compared.
- Exact / near-duplicate
- Identical examples / examples differing only trivially.
- Expected output (target)
- What the model should produce for each input.
- Experiment tracking
- Recording each run's settings, data, versions and results.
- Exposure bias
- The mismatch between training on reference histories and generating from model-produced histories, where errors can affect subsequent inputs.
- F1 score
- A combined score of precision and recall for one class.
- Failure analysis
- Examining the inputs a model gets wrong to find patterns.
- Fast tokeniser
- A tokeniser backed by the compiled Tokenizers library.
- Feature engineering
- The human work of inventing and computing input columns that make a problem easier for a model — the core skill of classical ML.
- Feature extraction
- Using a frozen model's outputs as features for a separate small model.
- Feature map
- A spatial grid of responses produced by a filter or layer. It records where particular learned computations respond, without automatically explaining a prediction.
- Features
- The named, typed columns of a dataset.
- Feed-forward network
- In a standard Transformer block, a shared nonlinear network applied separately to each token vector. Attention supplies cross-token information.
- Fine-tuning
- Further training of a pretrained model on labelled data for a downstream task.
- Fingerprint
- A digest of sorted texts identifies membership under this implementation; a separate ordered text/label digest is needed to check paired prediction alignment.
- float32 / float16 / bfloat16
- 32- and 16-bit floating-point number formats.
- Forward pass
- Running inputs through the network layer by layer to produce a prediction (and then the loss).
- Foundation model
- A model pretrained on broad data, designed to be adapted to many tasks.
- Freezing
- Setting
requires_grad = Falseso a parameter is not trained. - Frozen
- Not updated during training.
- Frozen encoder
- A pretrained model whose parameters stay fixed during the current training stage.
- Full fine-tuning
- Fine-tuning that updates every weight.
- Gated model
- A model whose files require signing in and accepting terms before download.
- GLUE
- A collection of English language-understanding benchmarks, including SST-2.
- GPU
- A processor with many parallel arithmetic units, well suited to neural networks.
- Gradient
- For each parameter, how much the loss would change if that parameter were nudged slightly. It points in the direction of steepest increase of the loss.
- Gradient boosting
- An ensemble of many small decision trees, each trained to correct the errors of the ones before it. A very strong default for tabular data.
- Gradient clipping
- Capping the size of the gradient before the update step, to stop a single huge gradient from wrecking training.
- Gradient descent
- The core learning rule — repeatedly nudge every parameter a small step in the direction that reduces the loss (opposite the gradient).
- Gradient norm
- The overall size of all gradients, as one number.
- Greedy decoding
- Generating by always choosing the most likely next token.
- Group split
- Splitting so that related examples (same author, same item) stay on one side.
- GRU
- Gated recurrent unit: a recurrent architecture using reset and update gates to control a changing state and candidate information.
- Head
- A small task-specific layer on top of the body.
- Head / tail / head+tail truncation
- Keeping the start, the end, or both ends of a long text.
- Highly polar
- Labels derived from extreme ratings; review prose may still contain mixed opinions.
- Hosted API
- A service that runs a model remotely and returns results over the internet.
- Hugging Face Hub
- A public website where models and datasets are shared.
- huggingface_hub
- The helper library that talks to the Hub: listing, downloading, caching.
- Hyperparameter
- A setting chosen before training rather than learned — learning rate, batch size, number of layers, dropout rate.
- IMDb
- A dataset of movie reviews labelled positive or negative, used throughout Modules 7 and 8.
- Inductive bias
- Assumptions built into a model's design, e.g. convolution assumes nearby pixels are related; attention lets any token relate to any other.
- Inference
- Using a model’s current parameters to calculate outputs without the task-training update loop. Evaluation mode and gradient-recording controls have distinct roles.
- Inference service
- A wrapper that turns a model into a dependable component with structured results.
- Inference tensor
- A tensor created under
inference_mode, excluded from gradient tracking. - Instruction formatting
- Rewriting a labelled example as an instruction and response for a chat model.
- Instruction-tuned model
- A base model further trained to follow instructions.
- int8
- 8-bit integers, 1 byte each.
- Intended use
- What a model's creators designed it to be used for.
- Keep-or-reject rule
- A criterion, set in advance, for adopting a model.
- Kernel
- A low-level routine performing an operation for specific hardware and number format.
- KV cache
- Stored attention keys and values for past tokens, reused during generation.
- Label -100
- The label value ignored by Hugging Face loss functions.
- Label scheme
- The set of output classes and what each output position means.
- Labelling rule
- How labels were decided.
- Latency
- The time to serve one request.
- Layer normalisation
- Normalisation over configured feature dimensions within each example or token, using its own mean and variance plus optional learned scale and offset. It does not use a training-dataset mean.
- Leakage
- When information that would not be available at prediction time sneaks into training (e.g. call
durationknown only after the call), making scores look better than reality. - Learning rate
- The step size used when updating parameters. Too small and training crawls; too large and it oscillates or diverges.
- Learning-rate schedule
- How the learning rate changes over training.
- Length bucketing
- Grouping inputs of similar length into batches to reduce padding.
- Licence
- The legal terms for using, changing and sharing a model.
- Linear decay
- Lowering the learning rate steadily to zero.
- Linear head (probe)
- A single linear layer trained on frozen features.
- Linear model
- A model whose prediction is a weighted sum of its inputs plus a bias. For classification its decision boundary is a straight line (or flat plane).
- Linear probe
- A simple linear classifier fitted on fixed representations to test how accessible task information is for a declared task and evaluation protocol.
- LOAD REPORT
- Hugging Face's table of skipped (UNEXPECTED) and newly created (MISSING) weights when loading.
- Local cache
- The folder where downloaded Hub files are stored for reuse.
- Logistic regression
- A linear classifier that passes a weighted sum of the inputs through a sigmoid to output a probability. Its decision boundary is a straight line.
- Logit
- The raw, unbounded output of a classifier before the sigmoid or softmax turns it into a probability.
- Logits
- A model's raw, unnormalised output scores.
- LoRA
- A PEFT method that adds small trainable low-rank matrices to some layers.
- LoRA alpha (α)
- A scaling constant; the update is multiplied by α / r.
- LoRA dropout
- Dropout applied to the LoRA input during training.
- LoRA rank (r)
- The inner dimension of B·A.
- Loss function
- A single number measuring how wrong the model's predictions are. Training tries to make it as small as possible.
- Low-rank
- Representable with few directions.
- LSTM
- Long short-term memory: a recurrent architecture with a cell-state pathway and learned gates controlling retention, input updates and visible output. It helps with long dependencies without guaranteeing unlimited memory.
- Majority-class baseline
- Always predicting the most common label.
- Majority-class floor
- A constant-label baseline selected from training data and evaluated under the same protocol; it is not a guaranteed lower bound.
- Manifest
- A record of the model version, settings, data and software behind a result.
- map / filter
- Datasets operations that transform every row / keep rows that pass a test.
- Masked language modelling
- A pretraining task: predict hidden words from the words on both sides.
- Masked-word loss
- Cross-entropy of a masked language model's guesses for hidden words.
- Mean pooling
- Averaging token vectors, ignoring padding, to get one vector per text.
- Memory mapping
- Reading a file on disk as if it were in memory, fetching parts only when used.
- Merging
- Folding a LoRA update into the frozen weights: W + (α / r)·B·A.
- Mixed precision
- Training with some operations in 16-bit floating point (fp16/bf16) to save memory and time, while keeping sensitive parts in 32-bit.
- MLP
- A multilayer perceptron — a feed-forward network of fully connected (Linear) layers with non-linear activations between them.
- Model card
- A repository's
README.mddescribing a model, its uses and limitations. - Model repository
- A Hub folder with a model's configuration, weights, tokeniser files and card, plus history.
- Momentum
- An optimizer trick that keeps a running "velocity" of past gradients, smoothing out zig-zags and speeding progress along consistent directions.
- Multi-head attention
- Several attention computations in learned projected subspaces, whose outputs are joined and projected. Heads divide feature coordinates, not disjoint sentence segments.
- n-gram
- A sequence of n consecutive words.
- NF4
- A 4-bit format with levels matched to bell-shaped weight distributions.
- nn.Module
- The base class for every PyTorch model and layer. It registers parameters and sub-modules and defines
forward(). - Normalisation
- Layers that rescale activations to a stable range during training, making deep networks easier to optimise.
- Normaliser
- The tokeniser step that cleans text before splitting, such as lowercasing.
- Off-the-shelf model
- A pretrained model used exactly as downloaded, with no further training.
- Offset mapping
- The character positions in the original text that each token came from.
- One-hot encoding
- Turning a categorical column into several 0/1 columns, one per category, so a model can use it numerically.
- ONNX
- A file format for running models outside the framework that trained them.
- Optimiser state
- Extra per-weight numbers kept by an optimiser; AdamW keeps two.
- Optimizer
- The rule that turns gradients into parameter updates — SGD, momentum, Adam, AdamW. Called with
optimizer.step()in PyTorch. - Out-of-distribution (OOD) input
- An input unlike the data a model was trained on.
- Out-of-domain detection
- Checking whether an input resembles the data a model was built for.
- Overfitting
- When a model fits the training data (including its noise) so closely that it performs worse on new data. The gap between training and validation scores reveals it.
- Overflow
- A value too large for its format, stored as infinity.
- Padding
- Adding filler tokens so sequences in a batch have equal length.
- Padding waste
- Computation spent on padding positions.
- Paged optimiser
- An optimiser that moves its state out of GPU memory when needed.
- Paired comparison
- Comparing two methods on the same examples, example by example.
- Paired sign test
- Comparing two models on the same examples by counting where only one is right.
- Parameter
- A number inside the model that training is allowed to change — usually a weight or a bias.
- PEFT
- Parameter-efficient fine-tuning: training only a small set of new or selected weights.
- Per-channel quantisation
- A separate scale for each row of a weight matrix.
- Percentile (p95)
- The value below which 95% of measurements fall.
- Permissive licence
- A licence allowing broad use, including commercial, with few conditions.
- Permutation equivariance
- Permuting inputs permutes outputs correspondingly. Unmasked self-attention without positional information has this property.
- Pipeline
- A Hugging Face helper that runs tokenising, the model and output decoding in one call.
- Pipeline tag
- The Hub's label for the task a model performs, also used as the
pipelinetask name. - Pooling
- An operation that summarises a set or neighbourhood, for example by taking its maximum or mean. The rule determines which information is preserved or discarded.
- Precision
- The smallest relative difference a format can represent.
- Preference tuning
- Training from judgements of which response is better (e.g. RLHF, DPO).
- Prefix tuning
- Learning extra key/value vectors that tokens can attend to.
- Pretrained model
- A model whose weights were learned by someone else on a large dataset and published for reuse.
- Pretraining
- Training a model on a large, general dataset first, so that its learned representation can be reused for other tasks.
- Probing
- Testing what a model knows with inputs designed to need specific knowledge.
- Prompt masking
- Excluding prompt tokens from the loss.
- Prompt template
- A sentence pattern used to describe each class, such as "a photo of a {}.".
- Prompting
- Adapting a model only through its input text; no weights change.
- QLoRA
- LoRA on top of a frozen 4-bit (NF4) model.
- Quantisation
- Storing numbers with fewer bits, such as int8 integers plus a scale.
- Question answering
- Finding the span of a passage that answers a question.
- Range
- The largest magnitude a format can store before overflowing.
- Rank
- The number of independent directions a matrix uses.
- Rate limit
- A cap on how many requests a service accepts in a given time.
- Recall
- The share of a class's real examples labelled correctly.
- Receptive field
- The region of the original input that can influence an output location, given the layer kernels, strides and connectivity.
- Recurrent neural network
- A sequence model that repeatedly updates a hidden state using the current input and previous state. The update weights are shared across positions.
- Regularisation
- Any technique that discourages overfitting — smaller models, weight decay, dropout, early stopping, more data.
- Relative change
- The size of a weight change divided by the size of the original weights.
- ReLU
- The activation max(0, z) — passes positive values through and turns negatives into zero. Cheap, and the default in most networks.
- Repository
- A Hub storage space for one model, with its files and history.
- Repository name
- The
owner/nameidentifier of a Hub repository. - Representation
- The set of numbers used to describe an example. It can be written by hand (engineered features) or learned by a network.
- Representation learning
- Learning the useful description of the data (the features) from the data itself, jointly with the task, instead of specifying it by hand.
- Requirement
- Concrete, checkable criteria a model must meet, written before measuring.
- Residual connection
- An addition of the form input plus learned update. Compatible shapes preserve an identity route through a block and can help gradient flow.
- Response cache
- Stored answers returned directly when the same request repeats.
- Results file
- A saved record of a method's settings, costs, metrics and predictions.
- ROC-AUC
- The probability that the model scores a random positive example above a random negative one. 1.0 = perfect ranking, 0.5 = random. Robust to class imbalance.
- Roles
- System, user and assistant parts of a conversation.
- Run-to-run variation
- Differences between runs caused by randomness.
- Safetensors
- A safe file format for weights that cannot contain executable code.
- Safetensors header
- The start of a safetensors file, listing each tensor's name, shape and number type.
- Scale
- The factor converting between original values and quantised integers.
- Screening
- Eliminating candidates on non-negotiable criteria before comparing performance.
- Seed
- The starting number for a random number generator. Fixing it makes random choices (splits, initial weights, shuffling) repeatable.
- Selective accuracy
- Accuracy on the answered inputs only.
- Self-attention
- An operation in which positions form learned weighted mixtures of value vectors from the same sequence, subject to information-access masks. Queries and keys determine the mixing weights.
- Self-hosting
- Running a model on machines you control.
- Semantic search
- Retrieving documents by similarity of meaning.
- Sentence embedding
- One vector for a whole sentence, placing similar meanings close together.
- Sentence-embedding model
- A model mapping a text to one vector so similar meanings are close.
- Setting (hyperparameter) tuning
- Choosing settings such as
max_lengthby validation results. - SFT
- Supervised fine-tuning on (instruction, response) examples.
- SGD
- Stochastic gradient descent — gradient descent using the gradient from one mini-batch at a time instead of the full dataset.
- Shard
- One of several files holding a large model's weights.
- Sigmoid
- The S-shaped function σ(z) = 1 / (1 + e^(−z)) that squashes any number into a probability between 0 and 1.
- Sign test
- A paired test that counts the examples where exactly one of two models is right.
- Singular value decomposition
- Splitting a matrix into ranked rank-1 pieces.
- Skip-gram
- A word-embedding objective predicting nearby context words from a centre word. Training pairs should respect document boundaries.
- Softmax
- Exponentiate each logit, then divide by the sum, giving probabilities.
- Special tokens
- Tokens with reserved meanings, such as turn markers.
- SST-2
- A dataset of short film-review sentences labelled positive or negative.
- Standardisation
- Rescaling each feature to mean 0 and standard deviation 1, using statistics computed on the training set only.
- State dict
- A dictionary from each weight's name to its tensor.
- Step
- One update, made from one batch.
- Stride
- The step between successive filter starting positions. A larger stride usually produces fewer output positions and lower spatial resolution.
- Summarisation
- Producing a shorter version of a long text.
- System message
- An instruction placed before the conversation that sets the assistant's role.
- Target modules
- The weight matrices that receive LoRA updates.
- Task head
- A model component that maps a representation to task outputs, such as class logits. A new head may need training even when the encoder is pretrained.
- Teacher forcing
- Training with the true preceding tokens as history. A causal Transformer can compute predictions at all known input positions in parallel.
- Temperature
- A divisor applied to logits before softmax, sharpening (below 1) or flattening (above 1) the distribution.
- Tensor
- PyTorch's multi-dimensional array — like a NumPy array, plus a device (CPU/GPU) and the ability to track gradients.
- Test set
- Data held back until the very end to give one honest, final estimate of performance. Never used for decisions during development.
- Text classification
- Assigning one label to a whole text.
- Text generation
- Continuing a prompt with new text.
- Text-to-image retrieval
- Finding images whose embeddings are closest to a text query's.
- TF-IDF
- A word-count representation that down-weights words common to most documents.
- Threshold
- The cut-off value in a decision rule, set on validation data.
- Throughput
- The number of requests served per second.
- Token budget
- The maximum number of tokens per example.
- Tokenisation
- Splitting text into the units (tokens) a language model processes, and mapping each to an integer ID.
- Tokenizers
- Hugging Face's fast, compiled library for splitting text into tokens.
- Tolerance
- The allowed difference when comparing floating-point results.
- Top-k sampling
- Sampling from the k most likely tokens.
- Top-p (nucleus) sampling
- Sampling from the smallest set of tokens with total probability at least p.
- Top-p sampling
- Sampling after retaining a highest-probability set whose cumulative probability reaches a threshold, then renormalising.
- torchao
- PyTorch's library for quantisation and related optimisations.
- Train / validation / test split
- Data for fitting / for choosing settings / for one final estimate.
- Trainable parameters
- Parameters that receive gradients and updates.
- Training from scratch
- Training from random weights using only your own data.
- Training loss
- Loss on the training batches.
- Training memory
- Weights + gradients + optimiser states + activations.
- Training records
- Files documenting how a model was trained: arguments, logs, data splits.
- Transfer learning
- Reusing a representation learned on one task or dataset as the starting point for another — the reason pretrained models are so useful.
- Transformer
- An architecture that combines attention-based contextual mixing with positionwise transformations, residual routes and normalisation. Its input interface, masks, training objective and output head determine its task behaviour.
- Transformers
- Hugging Face's library of model architectures and loading code.
- Truncation
- Cutting an input down to a maximum number of tokens.
- Underfitting
- When a model is too simple or too constrained to capture the pattern, so it performs poorly even on the training data.
- Validation loss / accuracy
- Loss or accuracy on held-out data, used to monitor generalisation.
- Validation set
- Data held out from training and used to make decisions — choosing hyperparameters, early stopping, comparing models.
- Validation–test gap
- The drop from validation to test score, partly due to selecting on validation.
- Vanishing gradients
- When gradients shrink (vanish) or grow (explode) as they pass back through many layers, so early layers learn far too slowly or training blows up.
- VRAM
- The memory on a GPU. Weights, gradients, optimizer state and activations must all fit in it, or training fails with an out-of-memory error.
- Warmup
- Raising the learning rate gradually at the start of training.
- Weight decay
- A regulariser that shrinks every weight slightly towards zero at each step, discouraging overly large weights.
- Weight memory
- Memory needed to hold a model's parameters: parameters × bytes per parameter.
- Weight tying
- Using one weight matrix in two places, such as the input word table and the word-prediction layer.
- Weight-only quantisation
- Quantising stored weights while computing with higher-precision activations.
- Weights
- The learned multipliers on a layer's inputs. Together with biases they are the model's parameters.
- Weights (parameters)
- The learned numbers inside a model.
- Wilson interval
- A standard confidence interval for a proportion.
- WordPiece
- A subword algorithm that marks continuation pieces with
##; used by BERT and DistilBERT.
- Zero-shot classification
- Classifying into classes described in words, without training on them.
- Zero-shot image classification
- Classifying an image into labels given as words at run time.