LLM Core Ration
Read Transformer from token and probabilities.
- Readable articles
- 43
- System Chapters
- 3
Linking concepts with system chapters.
Read the whole thing first
- How the weight of Attention becomes a new expression
Two sets of two-dimensional teaching vectors are used to calculate matching scores, attention weights and output, and to examine each of them separately. causal mask and padding mask 。
- Release Attention back to Transformer: Disablement, Normalization and Location
One down the length shape. Decoder block , the manual is coding for the unicoded and rotated position and checking for alignment of the position deviation with the cache.
- From text to training target: word division, tab move and confusion
Manually perform a subword merge, draw a self-return to the label position, and calculate negative logarithms and confusion using a fixed probability.
Start with definitions, symbols and minimum examples.
Introduction
- Text is the same, bytes are not necessarily the same: Unicode regularization
Determines the identity of the text before the word is divided.
- How to exchange arguments, sequence length and rare word overlays for the size of the table
A larger vocabulary can press a common segment into a smaller number of token, while increasing input embedding and output projection.
- Why do the BPE merger rules have to be kept in order
The BPE training began with a smaller grouping of segments, which was gradually consolidated according to the adjacent segment statistics in the language.
- Chat template: roles, rotations and generation starting points are training protocols
The bottom level of the chat model is still continuing with the token sequence.
- Residue stream: how to add new information to an existing expression
The disablement connection returns the sublayer calculation to input, allowing the network to revise one of the indicated items from one layer to another.
- Multidirection: Different heads have different areas of match
Multi-head structures map the same input into multiple query, key and value spaces, each group independently calculates the position, then collates and projectes the hidden dimensions.
- Cross-focus: query and read content can come from different sequences
Self-direction allows for an exchange of information within one sequence, while cross-focus allows one sequence to search for the other.
- Self-regression: How the probability of union becomes a condition forecast
The language model describes the combined probability of the entire sequence as a multiplier of the probability of location-by-position conditions.
- Mask language model: restoring missing position is different from predicting the future
The mask language model covers part of the input and restores them using the visible context.
- Studyable absolute position sheets: different index and semantic scope of application
Absolute position embedds a vector for each location, which is usually added to the content embedded into the network.
- Temperature scaling: controlling concentration, not knowing that the answer is right or wrong
Temperatures resize differences in a set of fractions and convert them to probabilities.
- Log-sum-exp: Why does a big score stabilize the cross-enthon
Multiple cross-alcers can be calculated directly from logits without having to write all probabilities.
- KV RAM: Layer, Head, Length and Byte Unit
Key caches grow in layers, batches, active length, key-value headers and header.
- Prefill and decode: slow start and slow word are not the same bottlenecks
A request for services first handles known prefixes, creates a cache and gets the next distribution, usually called prefill; Then a new token is gradually generated, belonging to decode.
- Candidate set for sampling: threshold control mass, no word control
The sample sequences the candidate according to probabilities and retains the smallest prefix of the accumulated mass to the specified threshold, where it is then sampled.
See the difference between reasoning, realization and methodology.
Step
- Maximum match and failure retreat in WordPiece code
The common coding method for WordPiece starts with the word and prioritizes the maximum phrase segment that currently matches and processes the remainder.
- Unigram: Compare probability between multiple cut paths
Unigram divides a string with a different cut as a potential path, each of which consists of a snippet probability.
- Enter why you can share weights in the embedded and output table project
The language model input end reads the embedded line by token numbering, while the output end uses hidden vectors to project word table fractions.
- Pre-norm and post-norm: where does it go
Normalization and fragmentation contribute to deep network training, but the order of exchange of them changes functions.
- SwiGLU: Door control in front feed is not a probabilities switch
(b) A generic pre-dipheral layer indicating a first-enhanced, non-linear re-drawn dimension to a position; The front door feed adds another projection, allowing both outcomes to be multiplied by elements.
- GQA: what part of the share key header saves the cache
Grouping query attention allows multiple query heads to share fewer key headers.
- Cross-over noise: why sentry tags connect missing segments
The cross-over noise removes several consecutive segments, allowing the model to generate missing content based on the remaining text.
- Prefix LM : Which places in the same sequence can be read in both directions
The prefix language model conditions a known input into the subsequent target.
- ALiBi: Add distance punishment to match score
ALiBi allows different heads to form different near-distant preferences by adding linear bias associated with location distance to the attention matching score.
- The relative position of RoPE: why can one move offset
Rotate position encoding rotates the query and key pairing channel at their respective locations.
- relative position drums: close and fine, remote merge
The relative position bias can assign learning scores to different distances, but the table will be expanded with the range if each possible distance parameter is used.
- Sequence wrapping: Define whether documents can be viewed together before saving them
Loading a short sample into the same long sequence reduces padding, but may also allow the latter document to read to the previous document.
- Center indicates that the word sheet: Logit lens What can I see
Hide the middle expression to the output header, and you can see which token is in the direction of the table.
- Expert path dilution: the overall parameter is different from each active parameter
The hybrid expert model prepares multiple teams of experts for certain sublayers and allows routers to select a small number of experts for each token.
- Expert load balance: avoid all token crowding down the same path
If the expert route were to optimize only the current projected losses, a large number of token could be sent to a small number of experts, resulting in uneven capacity and training signals.
- Slide window attention: local visibility does not equal global independence
Slide window attention allows a limited range of proximity to each location and reduces the number of pairs per layer of the long sequence.
- Diminished attention: Draw the side before talking about complexity
The thin focus is to keep some of the pairings in fixed block or structural mode.
- Correctness of the KV cache: incremental calculation to align to full forward
The old position does not read the future token since the decoding has been returned, and their key values are therefore available for cache under the same prefix and calculation conditions.
- beam search: why do cumulative probabilities favour short sequences
The beam search retains a number of high-point prefixes at each step, is extended and re-screened to try to find high-probability output in a huge sequence space.
- Repeat punishment: what target will change by modifying the decoding score
Repeated punishments are adjusted to follow scores based on the token already generated, in an attempt to reduce loops or mechanical repetitions.
- Constraint generation: syntax legality and correctness are checked separately
At each step of the constraint generation, only token, which meets a syntax prefix, is allowed, making it easier for the output to resolve into a structured object.
- Location information for long context: putting it down does not equal to getting it
The context length of the model statement indicates how much token can be received, and does not directly indicate that it can be used with equal accuracy in each location.
- Calculate optimal scaling: how parameters and training together account for the budget
A defined calculation budget, model parameters and training token together determines to what extent training can be achieved.
Discuss assumptions, expiry conditions and systemic trade-offs.
Deep
- Online Softmax: block calculation can still be unified
The long focus matrix occupies a large amount of intermediate storage.
- Speculation decoding: how to align the draft with precision correction
Speculation decoding uses cheaper draft models to produce multiple tokens, which are then validated by target model batches.