DRY: A modern repetition penalty that reliably prevents looping (#5677)

This commit is contained in:
Philipp Emanuel Weidmann 2024-05-20 08:23:47 +05:30 committed by GitHub
parent 9f77ed1b98
commit 852c943769
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 137 additions and 8 deletions

View file

@ -33,6 +33,10 @@ class GenerationOptions(BaseModel):
seed: int = -1
encoder_repetition_penalty: float = 1
no_repeat_ngram_size: int = 0
dry_multiplier: float = 0
dry_base: float = 1.75
dry_allowed_length: int = 2
dry_sequence_breakers: str = '"\\n", ":", "\\"", "*"'
truncation_length: int = 0
max_tokens_second: int = 0
prompt_lookup_num_tokens: int = 0