mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-09-03 15:04:35 +08:00
fix encoding with special tokens + chat template (#1189)
This commit is contained in:
@@ -14,7 +14,7 @@ conversation = [{"role": "user", "content": prompt}]
|
||||
|
||||
# Transform the prompt into the chat template
|
||||
prompt = tokenizer.apply_chat_template(
|
||||
conversation=conversation, tokenize=False, add_generation_prompt=True
|
||||
conversation=conversation, add_generation_prompt=True
|
||||
)
|
||||
|
||||
# Specify the maximum number of tokens
|
||||
|
Reference in New Issue
Block a user