Instructions to use Chiaki111/phi4-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Chiaki111/phi4-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("microsoft/Phi-4-mini-instruct") model = PeftModel.from_pretrained(base_model, "Chiaki111/phi4-lora") - Transformers
How to use Chiaki111/phi4-lora with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Chiaki111/phi4-lora", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| {% for message in messages %}{% if message['role'] == 'system' and 'tools' in message and message['tools'] is not none %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|tool|>' + message['tools'] + '<|/tool|>' + '<|end|>' }}{% else %}{{ '<|' + message['role'] + '|>' + message['content'] + '<|end|>' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>' }}{% else %}{{ eos_token }}{% endif %} |