Add custom sampler order support (#5443)

This commit is contained in:
oobabooga 2024-02-06 11:20:10 -03:00 committed by GitHub
parent 7301c7618f
commit 8c35fefb3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 205 additions and 113 deletions

View file

@ -40,6 +40,7 @@ class GenerationOptions(BaseModel):
max_tokens_second: int = 0
prompt_lookup_num_tokens: int = 0
custom_token_bans: str = ""
sampler_priority: List[str] | str | None = Field(default=None, description="List of samplers where the first items will appear first in the stack. Example: [\"top_k\", \"temperature\", \"top_p\"].")
auto_max_new_tokens: bool = False
ban_eos_token: bool = False
add_bos_token: bool = True