When interacting with phi-3-small, the model does not predict the stop word token, or it breaks after 2-3 turns (shown in images below). This problem does not exist for phi-3-mini as it uses a different chat template and tokenizer. Can we fix the template for phi-3-small? Or is it because of another problem?
Others
microsoft/Phi-3-small-8k-instruct is a different model from all the other phi3 models (e.g. microsoft/Phi-3-mini-4k-instruct). As a result, it is using a different chat template. Phi-3-small-8k-instruct is also the only Phi-3 model that does not support using system messages.
Phi-3-small-8k-instruct Template
<|endoftext|><|user|>
I am going to Paris, what should I see?<|end|>
<|assistant|>
Paris, the capital of France, is known for its stunning architecture, art museums, historical landmarks, and romantic atmosphere. Here are some of the top attractions to see in Paris:\n\n1. The Eiffel Tower: The iconic Eiffel Tower is one of the most recognizable landmarks in the world and offers breathtaking views of the city.\n2. The Louvre Museum: The Louvre is one of the world's largest and most famous museums, housing an impressive collection of art and artifacts, including the Mona Lisa.\n3. Notre-Dame Cathedral: This beautiful cathedral is one of the most famous landmarks in Paris and is known for its Gothic architecture and stunning stained glass windows.\n\nThese are just a few of the many attractions that Paris has to offer. With so much to see and do, it's no wonder that Paris is one of the most popular tourist destinations in the world."<|end|>
<|user|>
What is so great about #1?<|end|>
<|assistant|>
Phi-3-mini-4k-instruct Template
<|system|>
You are a helpful travel assistant.<|end|>
<|user|>
I am going to Paris, what should I see?<|end|>
<|assistant|>
Paris, the capital of France, is known for its stunning architecture, art museums, historical landmarks, and romantic atmosphere. Here are some of the top attractions to see in Paris:\n\n1. The Eiffel Tower: The iconic Eiffel Tower is one of the most recognizable landmarks in the world and offers breathtaking views of the city.\n2. The Louvre Museum: The Louvre is one of the world's largest and most famous museums, housing an impressive collection of art and artifacts, including the Mona Lisa.\n3. Notre-Dame Cathedral: This beautiful cathedral is one of the most famous landmarks in Paris and is known for its Gothic architecture and stunning stained glass windows.\n\nThese are just a few of the many attractions that Paris has to offer. With so much to see and do, it's no wonder that Paris is one of the most popular tourist destinations in the world."<|end|>
<|user|>
What is so great about #1?<|end|>
<|assistant|>
Reminder
System Info
llamafactory
version: 0.8.2Reproduction
command
phi3-small.yaml
Expected behavior
When interacting with phi-3-small, the model does not predict the stop word token, or it breaks after 2-3 turns (shown in images below). This problem does not exist for phi-3-mini as it uses a different chat template and tokenizer. Can we fix the template for phi-3-small? Or is it because of another problem?
Others
microsoft/Phi-3-small-8k-instruct is a different model from all the other phi3 models (e.g. microsoft/Phi-3-mini-4k-instruct). As a result, it is using a different chat template. Phi-3-small-8k-instruct is also the only Phi-3 model that does not support using system messages.
Phi-3-small-8k-instruct Template
Phi-3-mini-4k-instruct Template