beam search: keep several prefixes and specify the length rule
Distinguishing search errors from model preferences and understanding the larger beam is not necessarily better.
Learning objectives and first steps2 objectives 2 first fixes
Try to do it after reading
- Distinguishing search errors from model preferences and understanding the larger beam is not necessarily better.
- Check the input, label and evaluation conditions in the example
Suggested first
- Text Tasks and Language Expressions
- Conditional probability and vector calculations
Leave a few more possible beginnings
Greed decodes only those words that are most likely to be used at present. The beam searches maintain several prefixes with a high cumulative score, and when they are started, a fixed number of candidates are re-elected. It alleviates the problem of local premature decisions, but it still throws away a large number of paths and does not provide an accurate global search of all possible sentences.
Prefix points are usually derived from the logarithm of the probability of a word-card condition. The logarithm probability of each new word is not greater than zero, and the continued generation often reduces the overall score; If the complete sequence is directly compared to different lengths, the model may prefer short answers. The length is normalized or punished to adjust this preference, but different formulas represent different objectives and cannot be referred to uniformly as unbiased amendments.
A process with a width of two
Candidates for the first step are A, B, C with a probability of 0.5, 0.3, 0.2, and only A and B are retained when the width is 2. Next, if the best probabilities for expansion are 0.4 after A and 0.9 after B, the corresponding path probabilities are 0.20 and 0.27, B inverse. The result is not to be seen if the greedy algorithms had locked A sooner.
This does not guarantee that the breadth will continue to increase to a certain extent the quality of human judgement. A fuller search may more accurately identify the short sentences, repeat phrases or generic expressions of model preference, but it may reveal inconsistencies between model objectives and mission quality. The search width, length rules and model versions should be used as joint configuration evaluations.
How to be involved in the completed sequence
After the candidate has been generated and the end mark is closed, it shall enter into the completion of the assembly or be retained as defined by the fulfilment, without the continued pointless addition of the ordinary word. Early cessation would need to be judged on the basis of the current rating rule: if the length of a change were to be normalized, the original threshold for future scores could also lapse. The mere fact that there is a successful candidate stops and may miss out on better results.
Batch decoding also involves each prefixing its own cache and word sequence. Recalculation of beam requires synchronisation of model status; Otherwise, the prefix would come from the candidate's first and the cache would come from the candidate's second, and it would be difficult to see the error from the output format. A comparison of the short phrases on the small model can be verified.
A distinction is made in reporting between a determinative beam search, a decoding with random sampling and a diversity beam search. They generate different candidate distributions and different delayed costs. When interacting with users, stability, simplicity and diversity may have different priorities and cannot simply seek small increases in automatic indicators.
Check understanding
Is it necessary to decode all forms of greed with one-size-fits-all search?
The same cessation rules, numeric treatment and constraints usually correspond to the path of greed. However, the conduct may remain different when the additional length rule, the completion of the collective treatment or the constraints are inconsistent.
Could the search code be determined to be wrong if the mass of beam is reduced?
Can't. It may also be that the model itself does not match the quality of the task. The search should be verified correctly with a short sequence before the length, repetition and rating targets are analysed.
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.