-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Closed
Closed
Copy link
Description
Hello,
I tried setting truncate_prompt_tokens=-1, but it looks like the value validation prevents this. This behavior seems inconsistent with the documentation (see below). Could you please clarify if -1 is still a supported value?
Lines 185 to 188 in ebf7605
| truncate_prompt_tokens: Optional[Annotated[int, msgspec.Meta(ge=1)]] = None | |
| """If set to -1, will use the truncation size supported by the model. If | |
| set to an integer k, will use only the last k tokens from the prompt | |
| (i.e., left truncation). If set to `None`, truncation is disabled.""" |
Lines 413 to 416 in ebf7605
| if (self.truncate_prompt_tokens is not None | |
| and self.truncate_prompt_tokens < 1): | |
| raise ValueError(f"truncate_prompt_tokens must be >= 1, " | |
| f"got {self.truncate_prompt_tokens}") |
Metadata
Metadata
Assignees
Labels
No labels