
[!TIP] This is avery small model, so it might not perform well for some prompts and may be sensitive to hyper parameters. I would appreciate any feedback to see if I can fix any issues in the next iteration. ❤️
ChatML prompt template:<|im_start|>system
{System}
<|im_end|>
<|im_start|>user
{User}
<|im_end|>
<|im_start|>assistant
{Assistant}1
2# Use a pipeline as a high-level helper
3
4from transformers import pipeline
5
6messages = [
7 {"role": "user", "content": "Who are you?"},
8]
9pipe = pipeline("text-generation", model="MaziyarPanahi/calme-3.1-baguette-3b")
10pipe(messages)
11
12
13# Load model directly
14
15from transformers import AutoTokenizer, AutoModelForCausalLM
16
17tokenizer = AutoTokenizer.from_pretrained("MaziyarPanahi/calme-3.1-baguette-3b")
18model = AutoModelForCausalLM.from_pretrained("MaziyarPanahi/calme-3.1-baguette-3b")