Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 committed Oct 23, 2024
1 parent 0d4fc51 commit 81a9287
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def resolve_secret(secret: Optional[Secret]) -> Optional[str]:
model_max_length = kwargs.get("model_max_length", 4096)

# we initialize the prompt handler only if truncate is True: we avoid unnecessarily downloading the tokenizer
if truncate:
if self.truncate:
# Truncate prompt if prompt tokens > model_max_length-max_length
# (max_length is the length of the generated text)
# we use GPT2 tokenizer which will likely provide good token count approximation
Expand Down

0 comments on commit 81a9287

Please sign in to comment.