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.
Learning objectives and first steps2 objectives . 1 first fix
Try to do it after reading
- Explain Prefix LM: Mechanisms and premises for two-way reading of the same sequence
- Positioning the mechanism ' s fault limits with fixed examples
Suggested first
- Causal mask and condition generation
Issues and mechanisms
The prefix language model conditions a known input into the subsequent target. A common visible range allows the prefix position to read to each other in both directions, and the target location to read the entire prefix and the generated target, but cannot read the future target. It expresses in an attention matrix the different roles that condition input and produce output, and cannot simply be called full-way or full-causal.
Set the prefix length P and the target length S, and then define the row representative query and column representative readable position. Prefix queries only look at prefixes; The target query looks at all prefixes and not later than its own target. Supervision usually falls on the side of the target, but the loss of mask and attention mask still need to be constructed separately. Whether boundary markers, label shifts and prefixes are involved in additional targets is stated in the specific task.
A concrete example
The synthetic sequence has two prefixes token and three targets token, with five positions. The first line can read the first two columns instead of the first; The third line is the first objective, with the first three columns to read; All five columns can be read in the fifth line. If the fourth column were a goal for the future, it should not appear in the visible cluster in the third line. Draws the five rows to allow columns to be assembled, and then uses the Boolean Matrix comparison code to avoid extending the " prefixed two-way" error to future targets.
Borders and checks
The prefix may contain a search for evidence or a mission statement, which needs to be confirmed that it is genuinely available at the time of reasoning. Losses can be extremely easy if part of the target answer is misplaced in the prefix. Nor can the mask be changed at will when models are available, and the structures seen during pre-training may be different; The model supports a certain length of position that does not automatically support such a condition agreement.
A method of verification
It could also set the prefix length at two extremes of zero and full length. The former should be degraded to a defined common target causal reading, while the latter should explicitly refrain from generating this monitoring when not producing the target, rather than implicitly acquiescing in the normal average of participation of zero loss. If the prefix contains the position to be filled, the padding limit is to be merged simultaneously to avoid the target reading meaningless placeholders. The list allows the assembly to be assembled and converted to framebull mask, avoiding silent errors caused by the opposite meaning of the exact value of the different interfaces.
Check understanding
Can you read the target behind the prefix?
Not under the definition in this chapter. The prefix is known as a condition and the target is to be generated; Allowing reverse reading targets changes the problem and may allow the answer to be leaked.
Do you not need to check the prefix sign if the target side is not involved in the loss of prefix?
Still need to. All targets will rely on the prefix to indicate that illegal information, errors in mask or location codes in the prefix will affect their generation and the range of loss cannot be a substitute for a visible range check.
Sources and reconciliations
Definitions, methods and interfaces are available.
- Attention Is All You Need
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
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.