Downloads · 30 days
19
15% of all-time downloads
Irfanuruchi/phi-2-chat
phi-2-chat is a machine learning model from Irfanuruchi. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A fine-tuned conversational variant of Microsoft's Phi-2 (2.7B) optimized for dialogue tasks
Downloads · 30 days
19
15% of all-time downloads
All-time downloads
127
Public
Parameters
2.8B
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.9 GB · 100%
How the weights are stored.
U82.5B · 89%
From the Hugging Face model README
A fine-tuned conversational variant of Microsoft's Phi-2 (2.7B) optimized for dialogue tasks
microsoft/phi-2 (2.7B parameters, MIT License)
@misc{ultrachat,
title={UltraChat: A Large-Scale Auto-generated Multi-round Dialogue Dataset},
author={Ding et al.},
year={2023},
howpublished={\url{https://github.com/thunlp/UltraChat}}
}
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"Irfanuruchi/phi-2-chat",
trust_remote_code=True,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Irfanuruchi/phi-2-chat")
# Recommended prompt format:
input_text = "<|user|>Explain dark matter<|assistant|>"
inputs = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
@misc{phi-2-chat,
author = {Irfan Uruchi},
title = {phi-2-chat: Fine-tuned Phi-2 for conversational AI},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Irfanuruchi/phi-2-chat}}
}
@misc{phi2,
title={Phi-2: The Surprisingly Capable Small Language Model},
author={Microsoft},
year={2023},
url={https://www.microsoft.com/en-us/research/blog/phi-2-the-surprising-power-of-small-language-models/}
}
For questions or issues, please open a discussion on the Hugging Face Hub.
Or you can do the same also in GitHub: