Glossary
Agent: An AI system that can perform actions autonomously, often using LLMs as its brain.
Alignment: The process of ensuring that an AI model’s behaviors are aligned with human intentions and values.
Attention Mechanism: A technique that allows the model to selectively attend to different parts of the input when processing each element.
BERT: An encoder-based model designed to learn bidirectional representations and apply them to text understanding tasks.
Chain-of-Thought: A prompting technique that encourages the model to show its intermediate reasoning.
Context Window: The maximum amount of text the model can process at once.
Decoder: The component of the Transformer that generates sequences token by token.
Embedding: A dense vector representation of tokens that captures semantic relationships.
Fine-tuning: Adjusting a pre-trained model for a specific domain or task.
Flash Attention: A technique for speeding up the attention computation by reducing the memory required.
Generative AI: AI systems capable of creating new content, including text, images, audio, and code.
Gradient: A vector of partial derivatives indicating the direction of greatest increase of a loss function.
Hallucination: When a model generates incorrect or fabricated information with apparent confidence.
Inference: The process of using a trained model to make predictions or generate content.
In-Context Learning: A model’s ability to learn from examples provided in the prompt without adjusting weights.
LLM (Large Language Model): A large-scale language model trained on vast amounts of text.
LoRA (Low-Rank Adaptation): An efficient fine-tuning technique that adds low-rank adapters.
Multimodal: The ability to process multiple data modalities, such as text and images.
NLP (Natural Language Processing): The field of AI focused on processing and understanding natural language.
Parameter: An adjustable value in a neural network that is learned during training.
Prompt: Text input provided to the model to elicit a response.
Quantization: A technique for reducing the numerical precision of the model’s weights, lowering memory requirements.
Retrieval-Augmented Generation (RAG): An approach that combines LLMs with search over external knowledge bases.
RLHF (Reinforcement Learning from Human Feedback): An alignment technique using human feedback.
Self-Attention: An attention mechanism in which queries, keys, and values come from the same sequence.
Temperature: A parameter that controls the randomness of text generation.
Token: The basic unit of text processed by the model.
Tokenization: The process of converting text into a sequence of tokens.
Top-k/Top-p Sampling: Techniques for limiting randomness in token selection.
Transformer: A neural architecture based on attention mechanisms that revolutionized NLP.
Vanilla Transformers: The original version of the Transformer with an encoder and a decoder.
Backpropagation: An algorithm that applies the chain rule to compute the gradient of the loss with respect to the parameters.
Checkpoint: A record of the weights and, when necessary, of the states that allow training to be resumed.
Cross-Entropy: A loss function that penalizes low probability assigned to the target token.
KV Cache: A cache of the attention keys and values of the prefix, reused to speed up autoregressive generation.
Logit: An unnormalized real value produced before the softmax; differences between logits determine probability ratios.
Perplexity: The exponential of the mean cross-entropy; under comparable conditions, lower values indicate less surprise at the observed tokens.
Pre-norm: A block organization that normalizes the input before attention or the feed-forward network.
Softmax: A function that converts logits into positive values that sum to 1.
Weight Tying: Using the same matrix in the input embeddings and the output projection to reduce parameters.
FlashAttention: An exact implementation of attention that organizes the computation in blocks to reduce memory transfers and materialized intermediates.
GQA (Grouped-Query Attention): A variant in which groups of query heads share keys and values, reducing the KV cache.
Mixture of Experts (MoE): A layer with multiple expert networks and a router that activates only some of them for each token.
MQA (Multi-Query Attention): A variant that shares a single set of keys and values across all query heads.
Prompt Injection: Untrusted input that tries to alter instructions or induce actions outside the authorized purpose.
RoPE (Rotary Positional Embedding): An encoding that rotates pairs of query and key coordinates according to position, introducing relative relationships into attention.
SFT (Supervised Fine-Tuning): Supervised continuation of training with pairs of inputs and desired responses.
Speculative Decoding: Generation in which an auxiliary model proposes tokens and the main model verifies the proposals to reduce latency.
State-Space Model: A sequential architecture that maintains a state updated by successive inputs and can offer cost linear in length.
SwiGLU: A feed-forward network with a SiLU activation that works as a gate over another linear projection.