You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a new configuration parameter, "bigram_repetition_penalty", to the Text Generation Inference module. This parameter will introduce a mechanism that penalizes repeated bigrams in generated text, similar to how "repetition_penalty" operates for individual tokens, but extend this logic to two-token sequences (bigrams).
Integrate the "bigram_repetition_penalty" as an optional parameter within the text generation configuration. This would function by reducing the probability of selecting any token that, combined with the last generated token, forms a bigram already appearing in the generated sequence.
Motivation
Repetition in the generated text is a common issue in large language models, where the output may become redundant or repetitive, diminishing the quality of responses. While the existing "repetition_penalty" addresses this concern for individual tokens, it can decrease the usage of "stop words" and affect the response's nature. However, adding a "bigram_repetition_penalty" would provide finer control over text generation by preventing the model from generating the exact two-token phrases repeatedly.
Your contribution
I am open to collaborating with the community to implement this feature.
The text was updated successfully, but these errors were encountered:
Feature request
Add a new configuration parameter, "bigram_repetition_penalty", to the Text Generation Inference module. This parameter will introduce a mechanism that penalizes repeated bigrams in generated text, similar to how "repetition_penalty" operates for individual tokens, but extend this logic to two-token sequences (bigrams).
Integrate the "bigram_repetition_penalty" as an optional parameter within the text generation configuration. This would function by reducing the probability of selecting any token that, combined with the last generated token, forms a bigram already appearing in the generated sequence.
Motivation
Repetition in the generated text is a common issue in large language models, where the output may become redundant or repetitive, diminishing the quality of responses. While the existing "repetition_penalty" addresses this concern for individual tokens, it can decrease the usage of "stop words" and affect the response's nature. However, adding a "bigram_repetition_penalty" would provide finer control over text generation by preventing the model from generating the exact two-token phrases repeatedly.
Your contribution
I am open to collaborating with the community to implement this feature.
The text was updated successfully, but these errors were encountered: