How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="martyn/mixtral-megamerge-dare-8x7b-v2")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("martyn/mixtral-megamerge-dare-8x7b-v2")
model = AutoModelForCausalLM.from_pretrained("martyn/mixtral-megamerge-dare-8x7b-v2", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

mixtral megamerge 8x7b v2

The following models were merged with DARE using https://github.com/martyn/safetensors-merge-supermario

Mergelist

mistralai/Mixtral-8x7B-v0.1
mistralai/Mixtral-8x7B-Instruct-v0.1
cognitivecomputations/dolphin-2.6-mixtral-8x7b
Brillibitg/Instruct_Mixtral-8x7B-v0.1_Dolly15K
orangetin/OpenHermes-Mixtral-8x7B
NeverSleep/Noromaid-v0.1-mixtral-8x7b-v3

Merge command

python3 hf_merge.py to_merge_mixtral2.txt mixtral-2 -p 0.15 -lambda 1.95

Notes

  • MoE gates were filtered for compatibility then averaged with (tensor1 + tensor2)/2
  • seems to generalize prompting formats and sampling settings
Downloads last month
68
Safetensors
Model size
47B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for martyn/mixtral-megamerge-dare-8x7b-v2

Quantizations
3 models

Collection including martyn/mixtral-megamerge-dare-8x7b-v2