Instructions to use kamel-usp/jbcs2025_phi-4-phi4_classification_lora-C2-full_context-r16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use kamel-usp/jbcs2025_phi-4-phi4_classification_lora-C2-full_context-r16 with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("microsoft/phi-4") model = PeftModel.from_pretrained(base_model, "kamel-usp/jbcs2025_phi-4-phi4_classification_lora-C2-full_context-r16") - Notebooks
- Google Colab
- Kaggle
Download chat_template.jinja from kamel-usp/jbcs2025_phi-4-phi4_classification_lora-C2-full_context-r16: direct link, hf CLI and curl.
- Browser
- Download file 462 Bytes
-
https://huggingface.co/kamel-usp/jbcs2025_phi-4-phi4_classification_lora-C2-full_context-r16/resolve/main/chat_template.jinja
- Command line
-
hf download hf://kamel-usp/jbcs2025_phi-4-phi4_classification_lora-C2-full_context-r16/chat_template.jinja
-
curl -L -o chat_template.jinja https://huggingface.co/kamel-usp/jbcs2025_phi-4-phi4_classification_lora-C2-full_context-r16/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 %} |