Downloads · 30 days
30
19% of all-time downloads
MatteoKhan/phi-1-1.5-merged
phi-1-1.5-merged is a text generation model from MatteoKhan. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Phi-Hybrid-1.5B is an experimental hybrid language model that merges the capabilities of Phi-1 and Phi-1.5 from Microsoft. Built using MergeKit, this model is designed to enhance performance while maintaining efficien…
Downloads · 30 days
30
19% of all-time downloads
All-time downloads
159
Public
Parameters
1.4B
5.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
From the Hugging Face model README
Phi-Hybrid-1.5B is an experimental hybrid language model that merges the capabilities of Phi-1 and Phi-1.5 from Microsoft. Built using MergeKit, this model is designed to enhance performance while maintaining efficiency, making it a powerful tool for text generation.
🔗 Created by: [Matteo Khan ]
🎓 Affiliation: Apprentice at TW3 Partners (Generative AI Research)
📍 License: MIT
🔗 Connect with me on LinkedIn
🔍 Model on Hugging Face
This model is intended for research and experimentation in hybrid model optimization. Potential use cases include:
While Phi-Hybrid-1.5B enhances certain capabilities, it also inherits limitations from its parent models:
This is not a newly trained model, but rather a merge of existing models using the following configuration:
merge_method: linear
dtype: float16
models:
- model: "microsoft/phi-1"
parameters:
t: 1.0
weight: 0.6
- model: "microsoft/phi-1_5"
parameters:
t: 1.0
weight: 0.4
parameters:
normalize: true
int8_mask: false
layers:
- pattern: "model.*"
📊 No formal evaluation has been conducted yet. Users are encouraged to benchmark and share feedback!
By utilizing model merging rather than training from scratch, Phi-Hybrid-1.5B significantly reduces computational and environmental costs.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "YourProfile/Phi-Hybrid-1.5B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Example usage
prompt = "Explain the theory of relativity in simple terms."
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
If you use Phi-Hybrid-1.5B in your research, please cite the parent models:
📝 Phi-1
@misc{phione,
title={Phi-1: A Small-Scale Language Model for Reasoning},
author={Microsoft Research},
year={2023},
url={https://huggingface.co/microsoft/phi-1}
}
📝 Phi-1.5
📩 Feedback & Contact: Reach out via Hugging Face.
🎉 Happy Experimenting! 🚀