Downloads · 30 days
110
8% of all-time downloads
mmnga/Mixtral-Fusion-4x7B-Instruct-v0.1
Mixtral-Fusion-4x7B-Instruct-v0.1 is a text generation model from mmnga. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is an experimental model created by merging mistralai/Mixtral-8x7B-Instruct-v0.1 experts.
Downloads · 30 days
110
8% of all-time downloads
All-time downloads
1.5K
Public
Parameters
24.2B
96.6 GB on disk
Likes
18
Public
Click a slice to open those files.
.safetensors48.3 GB · 100%
From the Hugging Face model README
This model is an experimental model created by merging mistralai/Mixtral-8x7B-Instruct-v0.1 experts.
Changed to merge using slerp.
Discussion
old merge version
We simply take the average of every two experts.weight.
The same goes for gate.weight.
use colab cpu-high-memory.
convert_mixtral_8x7b_to_4x7b.ipynb
mmnga/Mixtral-Extraction-4x7B-Instruct-v0.1
pip install git+https://github.com/huggingface/transformers --upgrade
pip install torch accelerate bitsandbytes flash_attn
from transformers import AutoTokenizer, AutoModelForCausalLM, MixtralForCausalLM
import torch
model_name_or_path = "mmnga/Mixtral-Fusion-4x7B-Instruct-v0.1"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
model = MixtralForCausalLM.from_pretrained(model_name_or_path, load_in_8bit=True)
text = "[INST] What was John Holt's vision on education? [/INST] "
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))