LLM training and reasoning
Linking data, training objectives, suitability and reasoning efficiency.
- Readable articles
- 44
- System Chapters
- 4
Linking concepts with system chapters.
Read the whole thing first
- Pre-training takes the data, then the model
Explains the cleaning, de-weighting, isolation and mixing of composite data counters to verify parameters, token numbers and effective training volume for a fixed-calculation budget.
- LoRA and QLoRA: What parameters have been trained
A set of low-level updates is calculated manually, distinguishing weight quantification, computation of accuracy and trainingable parameters, and a checklist is established for the fitper to store and load.
- Prefer to DPO: What was optimized when comparing two responses
The logarithmic, loss and gradient of DPO is calculated over time from pair preferences and reference strategies, and the length, labelling and evaluation deviations are checked.
- From Probability to Response: Decoding, KV Cache and service delay
Compares the temperature with the value of top-p, calculates the presence of KV caches and separates the initial token delay, generation speed and total time.
Start with definitions, symbols and minimum examples.
Introduction
- Trained units: whole, paragraph and close repetition
Repeated text alters the distribution of actual contact with the model and may allow training and evaluation to leak.
- Assessment of pollution: there are variations to the recoupled text and the answers
Pollution assessment refers to training or development processes that have obtained information that should have been independently tested.
- Response paragraph monitoring: reminder is a condition and not necessarily a learning goal
The supervision fine-tuning often sends user questions to the model together with the assistant ' s answers, but calculates the loss only in the target position where the assistant should be exporting.
- Preference tag: The answer chosen is not an absolute correct answer
The preferred data record is the relative choice of the next two responses to the same reminder.
- Freezing parameters: The power weight without updating may still change the active state
Freezing parameters usually mean that they are not updated for their calculations or given to the optimist, but there may be other states in the module.
- Preheat and decay: Which steps are the study rate planned to move forward
The preheating of the learning rate has gradually increased from smaller values to the target, and then decreased as planned.
- Contracts for training check points: what status to keep beyond the model
Checkpoints should answer where to continue and not just whether to load the weight.
- Recoverability: seeds, algorithms, environment and data are different layers
Fixed random torrents allow some of the pseudo-random sequences to be repeated without automatically controlling all threads, devices, data loads and library algorithms.
- Morning stop and model selection: a certified assembly seen becomes selection information
The determination of when to retain the model based on the certification of performance is made at an early stage to reduce the risk of ineffective training and preparation.
- Post-training regression matrix: what to look at in addition to local targets
Post-training can improve command compliance, style and specific competencies, and may also change basic knowledge, rejection, language distribution and output length.
See the difference between reasoning, realization and methodology.
Step
- Language mix: The probability of sampling is not equal to the original ratio
The proportion of sources seen during model training is determined by the sampler and does not necessarily correspond to the size of the sources on disk.
- Ongoing pre-training: how to check old ability drifting when learning new distribution
Continuing pre-training follows the language modelling objectives of the existing models and continues to be updated on new areas.
- Long-term dialogue cut off: to keep the answer and the necessary conditions to keep it alive
Long-term dialogue must choose to retain content when it went beyond budget.
- Incentive model pair loss: difference is more identifiable than absolute score
Incentive models often predict which of the difference in points between the two responses is preferred.
- KL Rule: Let the reward optimize to remember the reference strategy
Maximizing incentives alone may keep strategies away from pre-existing behaviour and magnify the loopholes in incentive models.
- REINFORCE: logarithmic gradient for weighted actions
The strategic gradient adjusts the probability of action by the return of the sampling trajectory.
- Group comparative advantage: what kind of comparative signals are provided by multiple responses to the same question
The group relative approach provides multiple answers to the same tip sample, comparing the tectonic advantages with intra-group incentives and reducing reliance on separate value networks.
- Reference value for DPO: separation of relative lifting from absolute probability
DPO compares the probability changes of the selected versus the unselected answer against the reference model.
- Preference length deviation: More token does not equal more valid information
The length of the answer affects both the integrity of the content and the probability of marking and sequence.
- LoRA Target Layer and Quality: Where should the budget be spent
Low-matching requires not only selection but also selection of matrices to be added to the appropriate component.
- Low initialization: zero branch, where else can the gradient enter
Low-end branches often wish to keep the basic model output unchanged at the beginning of the training, so that one of the matrices starts with zero.
- Combination of adaptor: model identity to be checked after adding values
An online calculation of base output plus fitting branches corresponds to the forward addition of the incremental matrix to base weights, in compatible linear structures and accuracy.
- NF4 with Calculating Precision: Four Bits Storage does not equal four bits Multiply
The lower privileges are stored in discrete and scaled information and calculated to be restored to specific kernels or integrated.
- Quantified by group: meta-data costs and local dynamic range exchange
Quantified groups allow a group weight to share scaling parameters and reduce metadata while adapting to the range of different regions.
- Activate sensor quantification: why input distributions are viewed for weight error
The output error of the linear layer is determined not only by the error in re-establishment of weights, but also by input activation.
- Soft target distillation: the teacher's sub-prime category also carries information
The distillation of knowledge allows students to export the distribution to teachers, rather than just a hard label.
- Sequence distillation: different distribution of imitation results and imitation probability
The sequence distillation uses the complete answers generated by the teacher as a training goal for students and does not necessarily require a visit to the probability of the teacher ' s full vocabulary.
- Activate recalculation: save less with more forwards
Activates the check point without saving all intermediate results, and recalculates the parts forward in reverse to reduce peaks to activate memory.
- Mixed Precision Order: Zoom, Reverse, Revert, Crop, Update
Automatically mix accuracy selects the type of calculation by sub, and gradient scaling reduces the risk of spillage below the low accuracy gradient.
- AdamW: Why not put L2 in a gradient when weight decline
L2 is directly related to the multiplication weight decay under certain conditions of the normal gradient decline; Adds the L2 item to the gradient and the independent decay parameter is no longer the same price after the gradient has been scaled.
- Gradient accumulation: different sizes microbatch cannot be easily over-average
The gradient accumulates a number of small batches that together form an update of the parameters and are often used for limited memory training.
- Cross-equipment token average: how local means become global targets
The data parallels different processes to process different samples and synchronize the gradient.
- FSDP: Cut parameter status is not a cut sample label
Completely segmented data disperses model parameters, gradients and optimisers into multiple processes in parallel, collecting the corresponding parameters when a particular calculation unit is required.
- Parallel length: how a matrix multiply to multiple pieces of equipment
The volume is divided in parallel by the dimensions of the same layer matrix calculation, allowing multiple devices to work together on the expression of a sample.
- Streamline parallel: small batches reduce bubbles and increase status management
The flow line uses multiple microbatch staggered to put different layers in different devices in parallel.
- Course data order: Simple after complicated is not a general law
The course-based training, which sequences data according to difficulty, length or other attributes, seeks to allow optimization to gradually face a more complex pattern.
- Frequency of evaluation in training: increase in costing and selection deviations
A more frequent assessment would result in faster detection of returns or selection of inspection points and would also increase the reliance on calculations and validation feedback.
Discuss assumptions, expiry conditions and systemic trade-offs.
Deep
- PPO Cut Targets: Limit Probability Ratio of Incentives
PPO sampled with old strategy, comparing the probability of old and new strategy to the same action.
- GAE: Synthetic advantage of different length TD error
Broad advantage estimates the strategic advantage of the discounted time differential tectonic advantage by reconciling deviations and squares between short-term self-charges and long-trajectories returns.
- Reconstruction perspective for GPTQ: Quantifying how to compensate for output errors
Post-training quantification can write the problem as follows: keeping as much output as possible from a level of calibration input with a low priority.