Learn Before
Penalty Function in Controllable Decoding
Repetition Penalty
A repetition penalty is a mechanism designed to discourage a model from generating repetitive or redundant text. It functions by measuring the frequency of repeated tokens or phrases within the generated sequence and applying a penalty that is proportional to their occurrence, thereby preventing monotonous output.
0
1
Tags
Ch.5 Inference - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Flexibility of the Penalty Function
Repetition Penalty
Length Penalty
Diversity Penalty
Constraint-based Penalty
Penalty Functions Based on Hidden States
A developer is building a system to generate empathetic and cautious responses for a customer service chatbot. To achieve this, they want to implement a penalty function that discourages the model from adopting an 'overly confident' or 'assertive' internal state during the text generation process, rather than simply penalizing specific words in the final output. Which of the following penalty function designs best aligns with this goal of operating on the model's internal representations?
Learn After
Representation-based Repetition Penalty
A language model is tasked with writing a short story and produces the following output: 'The knight rode his horse through the dark forest. The forest was very dark. The knight was a brave knight, and the dark forest did not scare him.' Which of the following adjustments to the generation process would be most effective at discouraging this kind of repetitive phrasing?