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.
Learning objectives and first steps2 objectives . 1 first fix
Try to do it after reading
- Explanation ALiBi: Mechanisms and prerequisites for adding distance punishment to matching scores
- Positioning the mechanism ' s fault limits with fixed examples
Suggested first
- Attention score and position means
Issues and mechanisms
ALiBi allows different heads to form different near-distant preferences by adding linear bias associated with location distance to the attention matching score. It does not need to add a learning position table to the input, and it is more easily structured to expand the location index. Distance bias is a general preference that does not amount to proof that it can be used correctly in any long context; The extrapolation of the length still requires a physical task test.
In the one-way form of instruction, the distance away from which the historical position is allowed to be read, the larger the points subtracted. The tilt is configured head-on and the scores themselves are still provided by the inside of the query key, so distance does not determine the weight. The ban on reading of future locations also requires a causal effect, mask, which cannot be considered to be strictly shielded from a large range of punishments.
A concrete example
Synthetic queries confront two histories of key with the same original matching score of two, one and four, respectively, with a tilt rate of 0.5. The points after incorporation are 1.5 and 0, with the weights of about 0.817574 and 0.182426. If the remote content score rises to five, it is three and may exceed the proximity, indicating that the approach encourages proximity rather than imposing it.
Borders and checks
The definition of the distance between slopes, directions and two-way tasks is an architecture contract and cannot be freely converted to absolute values but is still described as a restoration method. (b) In the case of a cache of reasoning, the true location difference must be consistent with the complete forward orientation; If each step is repositioned, the distance relationship is wrong. The specific length experiment of historical papers should not be written into all languages, all context budget guarantees.
A method of verification
The cross-reference of the distance entry may fix the content score and then only equalize all the positions to check if the relative distance and the result are maintained; If you simply move a query without moving the key, the result is changed at a new distance. The two tests were used to verify the change in common deviation and true distance, respectively. When using multiple headings, the different slopes should be clearly mapped and the local slots should not be mistaken for the original text position after the cache. Otherwise, the penalty for the distant content will be wrongly reset as the cache moves.
Check understanding
The future position minus a very limited bias is the exact mask?
It is still possible to obtain non-zero weights in mathematics and extreme content fractions to offset bias. A strict prohibition on reading should be achieved within a clear and visible range.
Did attention be determined by distance only when distance was added?
No, it's not. (a) The content matching score and distance item are added together, and their combined effects are consolidated; A strong match from a distance can still exceed a weak match from a near place.
Sources and reconciliations
Definitions, methods and interfaces are available.
Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.