The most interesting thing about this is the way it was trained using synthetic data, which is described in quite a bit of detail in the technical report: https://arxiv.org/abs/2412.08905 Microsoft haven't officially released the weights yet but there are unofficial GGUFs up on Hugging Face already. I tried this one: https://huggingface.co/matteogeniaccio/phi-4/tree/main I got it working with my LLM tool like this: l…
When working with GGUF what chat templates do you use? Pretty much every gguf I've imported into ollama has given me garbage response. Converting the tokenizer json has yielded mixed results. For example how do you handle the phi-4 models gguf chat template?
You can click on the little info icon on Hugging Face to see that directly.
For https://huggingface.co/matteogeniaccio/phi-4/tree/main?show_... that's this:
{% for message in messages %}{% if
(message['role'] == 'system')
%}{{'system' +
message['content'] + ''}}{%
elif (message['role'] == 'user')
%}{{'user' +
message['content'] +
'assistant'}}{%
elif (message['role'] == 'assistant')
%}{{message['content'] + ''}}{%
endif %}{% endfor %}