PJMixers-Dev/ThinkyThinky-v0.1-KTOShareGPT
Viewer
•
Updated
•
107k
•
1
You should be using <|begin▁of▁sentence|><|User|>
instead of <|begin▁of▁sentence|>User:
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B")
chat = [
{"role": "user", "content": "EXAMPLE USER TURN 1"},
{"role": "assistant", "content": "EXAMPLE MODEL TURN 1"},
{"role": "user", "content": "EXAMPLE USER TURN 2"},
]
print(tokenizer.apply_chat_template(chat, add_generation_prompt=True, tokenize=False))
# <|begin▁of▁sentence|><|User|>EXAMPLE USER TURN 1<|Assistant|>EXAMPLE MODEL TURN 1<|end▁of▁sentence|><|User|>EXAMPLE USER TURN 2<|Assistant|>