🚀 Phi-Hybrid-1.5B: Merging Efficiency & Power
📌 Overview
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
🧠 Model Details
- Model Type: Hybrid Language Model (Merged)
- Parent Models:
- Merging Technique: Linear Merge (MergeKit)
🎯 Intended Use
This model is intended for research and experimentation in hybrid model optimization. Potential use cases include:
- ✅ Text Generation
- ✅ Conversational AI
- ✅ Code Assistance
- ✅ Creative Writing
- ✅ Exploration of Model Merging Effects
⚠️ Limitations & Considerations
While Phi-Hybrid-1.5B enhances certain capabilities, it also inherits limitations from its parent models:
- ❌ May generate inaccurate or misleading information
- ⚠️ Potential for biased, offensive, or harmful content
- 🔄 Merging may introduce unpredictable behaviors
- 📉 Performance may vary across different tasks
🔬 Merging Process & Configuration
This is not a newly trained model, but rather a merge of existing models using the following configuration:
1merge_method: linear
2dtype: float16
3models:
4 - model: "microsoft/phi-1"
5 parameters:
6 t: 1.0
7 weight: 0.6
8 - model: "microsoft/phi-1_5"
9 parameters:
10 t: 1.0
11 weight: 0.4
12parameters:
13 normalize: true
14 int8_mask: false
15layers:
16 - pattern: "model.*"
📊 No formal evaluation has been conducted yet. Users are encouraged to benchmark and share feedback!
🌍 Environmental Impact
By utilizing model merging rather than training from scratch, Phi-Hybrid-1.5B significantly reduces computational and environmental costs.
🚀 How to Use
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "YourProfile/Phi-Hybrid-1.5B"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(model_name)
6
7# Example usage
8prompt = "Explain the theory of relativity in simple terms."
9inputs = tokenizer(prompt, return_tensors="pt")
10outputs = model.generate(**inputs, max_length=200)
11response = tokenizer.decode(outputs[0], skip_special_tokens=True)
12print(response)
📜 Citation & References
If you use Phi-Hybrid-1.5B in your research, please cite the parent models:
📝 Phi-1
1@misc{phione,
2 title={Phi-1: A Small-Scale Language Model for Reasoning},
3 author={Microsoft Research},
4 year={2023},
5 url={https://huggingface.co/microsoft/phi-1}
6}
📝 Phi-1.5
📩
Feedback & Contact: Reach out via
Hugging Face.
🎉 Happy Experimenting! 🚀