Skip to content

Commit

Permalink
set encode add_special_tokens=False
Browse files Browse the repository at this point in the history
  • Loading branch information
wnma3mz committed Jan 28, 2025
1 parent d009edf commit 5ac4b38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tllm/generate/token_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def preprocess(
messages, tokenize=False, add_generation_prompt=add_generation_prompt
)
assert text is not None, "Either text or messages must be provided."
input_ids = self.tokenizer.encode(text, add_special_tokens=True)
input_ids = self.tokenizer.encode(text, add_special_tokens=False)
return TokenizerResult(input_ids=input_ids, input_str=text)

def preprocess_old(self, text: str = None, messages: List[List[Dict[str, str]]] = None) -> TokenizerResult:
Expand Down

0 comments on commit 5ac4b38

Please sign in to comment.