Views
No views yet
1merge_method: linear
2dtype: float16
3models:
4 - model: mistralai/Mistral-7B-v0.1
5 parameters:
6 t: 1.0
7 weight: 0.6
8 - model: meta-llama/Llama-2-7b-hf
9 parameters:
10 t: 1.0
11 weight: 0.4
12
13parameters:
14 normalize: true
15 int8_mask: false
16
17layers:
18 - pattern: "model.*"
19📌 Note: No additional fine-tuning was performed. This is a straight merge using MergeKit.
20
21🌱 Why Merging?
22Merging allows rapid experimentation with existing checkpoints while reducing the computational cost and carbon footprint compared to training from scratch.
23
24🚀 How to Use
25python
26Copier
27Modifier
28from transformers import AutoModelForCausalLM, AutoTokenizer
29
30model_name = "MatteoKhan/Mistral-LLaMA-Fusion"
31tokenizer = AutoTokenizer.from_pretrained(model_name)
32model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto")
33
34prompt = "Explain the benefits of merging language models."
35inputs = tokenizer(prompt, return_tensors="pt")
36outputs = model.generate(**inputs, max_length=200)
37print(tokenizer.decode(outputs[0], skip_special_tokens=True))