Instructions to use Elcaida/phi4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Elcaida/phi4 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Elcaida/phi4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Unsloth Desktop
Download chat_template.jinja from Elcaida/phi4: direct link, hf CLI and curl.
- Browser
- Download file 462 Bytes
-
https://huggingface.co/Elcaida/phi4/resolve/main/chat_template.jinja
- Command line
-
hf download hf://Elcaida/phi4/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/Elcaida/phi4/resolve/main/chat_template.jinja
462 Bytes
| {% for message in messages %}{% if (message['role'] == 'system') %}{{'<|im_start|>system<|im_sep|>' + message['content'] + '<|im_end|>'}}{% elif (message['role'] == 'user') %}{{'<|im_start|>user<|im_sep|>' + message['content'] + '<|im_end|>'}}{% elif (message['role'] == 'assistant') %}{{'<|im_start|>assistant<|im_sep|>' + message['content'] + '<|im_end|>'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant<|im_sep|>' }}{% endif %} |