AI Hero Club

LLM Post-training · Lesson 4

Marked Complete by You0 / 8

Saved in this browser only. Marking a lesson complete does not mean the project has passed verification.

Lesson Outline 7 subsections
Course Contents 8 lessons
Full course plan.
LLM Post-training / Learning Plan ↗

LESSON 04 / 8Suggested study 120 minutes

Bradley–Terry Reward Models and Identifiable Differences

If preferences constrain only reward differences, why must we handle the reward zero point and scale separately?

3 Questions for This Lesson
  • From Bradley-Terry's assumption, hessian seems stable, gradients and regularization.
  • Manual correctness and shortness independent comparison, verification of the solver gradient
  • Explanation of infinity-scale pressure, additional non-recognition and calibration limits that can be divided into preferences
Course Project ZIP ↓

Task, Prerequisites, and Statistical Assumptions

This chapter transforms the comparative data from Chapter III into an incentive model that can be drawn together. Readers need to define index logarithms, vector introcumulation, and first-order two-order guides to the previous chapter. Bradley-Terry short BT is a theory of comparative probability assumptions, not necessarily derived from the fact that “People have preferences.” is a fact. It sets out a real score r for each response under the same x, with the two candidates ' success rate being compared to their fraction index index. This hypothesis applies to the presentation of the lesson that transmits comparisons; the rebuttal in Chapter III has shown that it cannot express all true preferences.

For candidate w and l, define the difference d=r(x,w)−r(x,l)d=r(x,w)-r(x,l). The two indexes are being consolidated, the w-win is erw/(erw+erl)e^{r_w}/(e^{r_w}+e^{r_l}), the molecular denominator is divided by one plus the negative d of e and is counted as sigmoid(d). If d is zero, the odds are half; d increases, w wins increase. This compares only two candidates, so it is not a direct Softmax strategy for all answers, nor is it a probability of model-generated w.

P(w≻l∣x)=erwerw+erl=11+e−(rw−rl)=σ(d).P(w\succ l\mid x)=\frac{e^{r_w}}{e^{r_w}+e^{r_l}}=\frac1{1+e^{-(r_w-r_l)}}=\sigma(d).
This is a comparison of the two candidates, not a strategic probability to generate Winner's answer.

From Observation Likelihood to a Stable Loss

The training table has placed the actual Winner in w. Each observation appears to be sigmoid(d). The negative logarithm is a negative d-sub-d of log1 plus e, which is called softplus(−d). When d is very negative, the negative d-d side of e is likely to spill directly and stable by the negative absolute d-sub-d-d side of max(−d,0) plus log plus e. The project is expressed with this equivalent value; numerical protection does not change the target of the statistics. An independent check can compare the two formulas to the medium d, which are limited for extreme d and meet the roughly negative d-d limit of the positive Loss zero and negatives.

−log⁡σ(d)=log⁡(1+e−d)=max⁡(−d,0)+log⁡(1+e−∣d∣).-\log\sigma(d)=\log(1+e^{-d})=\max(-d,0)+\log(1+e^{-|d|}).
The same negative logarithm appears, and the right-hand side avoids direct calculation of positive indices.

Guide to d: Negative logsigmoid is guided by sigmoid(d) minus one. It approaches negative one when you are wrongly confident and close to zero when you are already confident. ϕ\phi Discrepancies with response feature f in volume ϕ\phi Inner volume with characteristics; the parameter gradient is this measure multiplied by characteristics. The Winner score is driven up and Loser is pushed down, but the range is now controlled by confidence. It cannot be claimed to be identically optimized by a fixed plus or minus one update.

The Project's Two Features and Observable Boundaries

The limited reference realization order is characterized by “Action symbol multipliedx” and “Is it brief?”, bearing f1 and f2, respectively. ϕ\phi It's two real numbers. rϕ=ϕ1f1+ϕ2f2r_\phi=\phi_1f_1+\phi_2f_2 f1 uses input values to interact with action symbols and does not read the correct labels directly; positive x is selected for positive, negative, negative. The larger absolute x creates a greater interval, which is a model assumption; oracle only gives a zero reward for correctness, which is not the same.

f2 takes a short, zero, and it is lengthy. This is an explicit target feature, not a secret length projection of human preferences. The two features are sufficient to express the current rules and cannot evaluate factuality, security, courtesy or arbitrary text. The full DPO feed of the decoder does not need to call this incentive function; it uses a pro-active training strategy. The purpose of retaining the independent BT model is to allow readers to fully calculate probability and reward scales and to understand how the DPO can eliminate open incentives.

Example 1: Separating Correctness and Brevity Directions

Picking x=2, Winner is short for positives, feature [2,1]; Loser is short for negatives, feature [−2,1], which is different from [4,0] if ϕ\phi = [0.25,0.5], with a score of one and a success of about 0 731059, Loss of about 0 313262. The uncorrected gradient is sigmoid one down by [4,0], or [−1.075766,0] again and again. This Pair only provides information in the right direction and does not recognize short weights because the two candidates have the same short features, and the subtraction disappears altogether.

Change Loser to positive, long-term, characteristic [2,0], with a difference of [0,1]. ϕ\phi The lower score of 0. 5 is about 0. 622459, Loss about 0. 474077, the gradient [0,−0.377541]. This only recognizes a short direction. The two axes are given together. The independent check is that the difference between the characteristics observed and the non-changed factor is true; the independent check is about two. ϕ\phi The difference in the centre is recalculated to check the factor and the symbol. Checking the correct final order leaves a problem of four times the gradient's degree of appreciation or the opposite direction.

Example 2: All-Win Data Has No Finite Maximum-Likelihood Scale

Seeing only one characteristic difference between Winner and softplus(−v), the parameter v is Loss. Any limited v can be increased a little bit, making Loses even lower; when v is flat, it has no limited position to zero. The large fraction of training output does not reveal an objective and huge utility, but can be divided into similar border behaviors.

Added to agreed L2 rules, target changed to average Pair loss plus λ∥ϕ∥2/2\lambda\|\phi\|^2/2 Project λ\lambda To 0. 02. The gradient is increased. λ\lambda Multiply ϕ\phi, encouraging the control scale; it is a modelling option, not a punishment observed in the data. The single parameter case meets sigmoid(v) minus one λ\lambda Multiply v equals zero. The lead is strictly increased with v, negative at zero, positive at large enoughv, so there is only one root; second order is sigmoid(v) multiplied by sigmoid(v) plus λ\lambda Strictly correct, the only thing that matters is that the whole picture is very small.

The project Hessian refers to a matrix of all second-order bias, which here is equal to the average of non-negative weights for each feature difference, plus λ\lambda Unit array. For any non-zero orientation h, the second is equal to the non-negative plus of several squares λ\lambda Multiplysing the h-class square, so it is strict. The certificate gives a strict focus on the positive linear reward target, not automatically reducing the limit of the sub-gradancies by zero optimising errors, nor does it extend to any deep network incentive model. Two hundred steps of receipts are a practical result, and the word “Bong” is not used to skip the value check.

Reward Origin, Temperature, and Calibration

The same x reward plus c(x), the difference is the same. The BT appears to be identical. It is therefore impossible to identify this public bias by comparison alone. If the model adds a cut-off distance that does not depend on an action, it is zero; L2 may push it to zero; but it is a positive option, not a zero point given by the labeler. The project simply retains two movement-related features and avoids creating false interpretations with an unidentified constant.

Incentive scaling usually changes the sigmoid probability. ϕ\phi Doubles without changing the relative noise temperature, the odds are closer to zero or one. Some narratives mix arbitrary incentives with preferred temperatures, leading to a shift in KL coefficient; we fix BT at one, clear. ϕ\phi It's under this deal. It's in the back. τ\tau or β\beta In the same measure of incentive, the incentives must be scaled in such a way as to maintain the same optimal distribution.

Sorting accuracy is only positive or negative, and reducing all positive differences by a factor of ten may also maintain a percentage change in the forecast success rate. Determining perfect sequencing under the noise label does not prove probabilities calibration, let alone estimating differences in real human labels. Project report Pair accuracy and regular Loses, fractions, and gradients, without giving an incentive point crown to “Percentage of credibility”. If there is an independent comparison in the future, it can be used to set aside the probability assumptions for matching loss and calibration curves, which are not observed by the current data.

Fitting, Independent Checks, and Limits

Use of full batch gradient for limited projects down, initial ϕ\phi = [0,0], learning rate 0. 15, 200 moves. Initial pair probability is one half, but feature difference provides a non-zero gradient. The correct shortness of the comparison is better than the correct length, error is brief and error is lengthy, so both characteristics are activated. Tests vary between these two parameters per item in a non-zero state, and compare the two fault directions that increase the scale to lower loss and then increase the target on a large scale without a positive.

If the training loss is reduced to allow for a misdirection of the pair margin, it should be checked for generalization, comparative coverage and rules, rather than directly increasing the number of optimising steps. For current numerical tasks, close to zero x allows for a smaller interval between correct features, the odds may be closer to half; this phenomenon is derived from linear characteristics that do not represent “It's harder to judge the nature of positives and negatives close to zero.”. The difference between models and the true value of the mission should be explained, rather than treating the output of the reward network as an attribute of the world itself.

This chapter delivery is an explicit assumption, an incentive compositeer that can prove the contour and complete gradient. Chapter V will temporarily assume that r has been awarded to maximize the optimal distribution of expected rewards near a fixed reference strategy; that is another question of optimization. Separated from strategy optimization, it will be possible to see what step has been taken to replace the DPO successor variable without turning “No explicit incentive model is required” into “No preference for model assumptions”.

The non-negative weights of the second tier can be derived directly from sigmoid: sigmoid is a sub-d of e divided by one plus e, while the commercial law provides a square of a sub-d of e divided by one plus e, i.e., sigmoid multiplied by one minus sigmoid. Between zero and one quarter, the value is at a maximum of half the winning margin. So the already very confident pair is small and the incentive scale increases further, so the data are less bound to the scale; the positive below is provided, rather than stopped by training.

For the current training x absolute value of up to three, the characteristic difference is not more than six, the second coordinate is not more than one, and the square dimension is not more than 37. λ\lambda ♪ Stay in line, take ♪ λ\lambda 0.02 got 9. 27. The learning rate is 0.15 less than two times this upper limit. The target change is not greater than the negative learning rate multiplied by the gradient square, plus half the curve multiplied by the learning rate squared by the same parameter; the coefficient is negative, so the full batch length is guaranteed to decline under these conditions. This is conservative and applies only this linear positive goal.

If all comparisons are fixed shortness, the secondary feature is constant zero, and the corresponding parameter is completely unrecognizable when there are no positives; even if the training Loss is very low, it cannot be said that the data church has a short preference. Joining L2 would make the parameter zero, it would be to choose the lowest-level representative, and it would not create preferred information in vain. The project specifically includes the same correctness and different short-forming pair, making the second direction a data gradient. This example separates the coverage of features, their recognition, from the formalization of the three concepts, avoiding “The training has yielded results.” concealing issues that the data have not asked.

Linear BTs are still heavily focused on positives. λ\lambda. If the positives are turned off, the characteristic deviation matrix, even if it is full, will be well-labelled to the limitless boundary; local Hessian is not allowed to set errors as a limited minimum. Reverse labels or soft frequency numbers may limit scales, but that is another observation. The course also retains the opposite of no positive or incremental scale, with two checks covering different conditions.

The preceding reduction line can be re-established along a one-dimensional path: fix the current gradientg, defining the path function as the original target “Current Parameter LesstMultiply Learning Ratesg”. The starting point is the negative learning rate multiplied by the gradient square; the second degree is controlled by the Hessian upper boundary and does not exceed the curve boundary multiplied by the learning factor square by the gradient square. The remaining weight is reduced by one point to one point to one half of the function fraction, and the zero to one part is divided by one point, so that the upper step is taken. Here g is fixed by the entire path tested and cannot be miscalculated as the gradient that is constantly recalculated along the path.

LBT(ϕ)=1N∑isoftplus⁡(−ϕTΔfi)+λ2∥ϕ∥2,∇L=1N∑i(σ(ϕTΔfi)−1)Δfi+λϕ.\mathcal L_{BT}(\phi)=\frac1N\sum_i\operatorname{softplus}(-\phi^T\Delta f_i)+\frac\lambda2\|\phi\|^2,\quad \nabla\mathcal L=\frac1N\sum_i(\sigma(\phi^T\Delta f_i)-1)\Delta f_i+\lambda\phi.
Delta f is the Winner feature minus Loser; L2 is a pre-established scale control agreement.
∇2L=1N∑iσ(di)(1−σ(di))ΔfiΔfiT+λI.\nabla^2\mathcal L=\frac1N\sum_i\sigma(d_i)(1-\sigma(d_i))\Delta f_i\Delta f_i^T+\lambda I.
A secondary type of arbitrary non-zero orientation at lambda>0 is strictly strict and limited to this linear reward group.
Standalone ProgramIndependent validation of the standard library: two mechanism directions and regular sites, curvature and scalable pressures.
import math
sigmoid=lambda x:1/(1+math.exp(-x))
softplus=lambda x:max(x,0)+math.log1p(math.exp(-abs(x)))
phi=[.25,.5]
for delta in [[4.,0.],[0.,1.]]:
    d=sum(a*b for a,b in zip(phi,delta))
    g=[(sigmoid(d)-1)*v for v in delta]
    print('margin',d,'probability',sigmoid(d),'loss',softplus(-d),'gradient',g)
lam=.02;lo,hi=0.,100.
for _ in range(80):
    mid=(lo+hi)/2; derivative=sigmoid(mid)-1+lam*mid
    if derivative>0:hi=mid
    else:lo=mid
v=(lo+hi)/2
assert abs(sigmoid(v)-1+lam*v)<1e-12
assert softplus(-2)<softplus(-1)
print('regularized one-pair minimizer',v,'positive curvature',sigmoid(v)*(1-sigmoid(v))+lam)

TRY IT YOURSELF

Practice I: Recognition of margin

Was the same BT victory for [3,1] and [103,101]? What about [6,2]?

Hint 1
BT uses a margin of reward rather than two absolute values.
Hint 2
Three separate sets of differences are calculated and sent to sigmoid; distinguishing the effect of co-mixing and co-scaling on fixed temperature probabilities.
Compare with the Solution
The first two sets of differences are both 2 with a win of about 0. 880797 for sigmoid2. The third set of margin 4, with a score of about 0.982014, has changed. Public flats are unrecognizable, the probability that scaling changes the fixed temperature, and the two degrees of freedom cannot be called “Any reward is equal.”.

TRY IT YOURSELF

Practice II: Regular Gradient

ph = [0.25,0.5], Delta f = [4,0], Lambda0 02, request for an order for a regular gradient.

Hint 1
The phi and Delta f build up first, and then the data gradient factor is obtained through sigmoid.
Hint 2
Data items are listed separately from lambda×phi and, in particular, check whether Delta f coordinates with zero receive a regular gradient.
Compare with the Solution
The pair gradient is about [−1.075766,0]; the regular gradient is [0.005,0.01], which totals [−1.070766,0.01]. The data for the second coordinates are not available, but it still decreases. If it learns a short preference from this pair, it mistraces the positive action as data evidence.

TRY IT YOURSELF

Practice three: Perfect sequencing is inadequate

Can the two models assert that the difference between 0.01 and 10 for all determinations of pair is 100 per cent in order to be equally good or better calibrated?

Hint 1
Sorts only the margin symbol, which appears to be in line with the calibration.
Hint 2
The ratio of two margins was calculated separately, asking whether the label could be determined to provide independent evidence of the probability of a true repetition of judgement.
Compare with the Solution
The odds are about 0.5025. 999955 NLL varies widely, and the sorting of indicators is not sufficient to distinguish. It is not possible to estimate the probability of a true repetition of human judgment by determining the difference between the obscurantial viewing tendency. It should be clearly assessed whether it is sorted, appears to be independent calibrated, and the positive intensity is kept in comparison with the setting aside; large margins cannot automatically be called objective quality.

CHECK YOUR UNDERSTANDING

Check Your Understanding

Answer first, then open the explanation to check your reasoning. These questions help reveal gaps in understanding; independent implementation and transfer require separate evaluation.

What's the probability of 1.BT?

Show ExplanationCompare probability and generate distribution are different objects.
2. What can be done when you're sure that there's no right for Pair?

Show ExplanationBoundary limits do not mean that limited parameters are optimal.
Why is 3. L2 linear BT Hessian fixed?

Show ExplanationAt least the positive contribution of the lambda square is in any non-zero direction.
4. Does the DPO sequence feed have to call this reward first?

Show ExplanationThe open-ended incentive is a feeder of understanding/composure, and the DPO directly uses comparative data.

Manual completion records your progress; it does not certify your project.