Views
No views yet
1# Merge configuration for ZeroXClem/Qwen2.5-7B-HomerAnvita-NerdMix using Model Stock
2
3models:
4 - model: bunnycore/Qandora-2.5-7B-Creative
5 - model: allknowingroger/HomerSlerp1-7B
6 - model: sethuiyer/Qwen2.5-7B-Anvita
7 - model: fblgit/cybertron-v4-qw7B-MGS
8 - model: jeffmeloy/Qwen2.5-7B-nerd-uncensored-v1.0
9merge_method: model_stock
10base_model: newsbang/Homer-v0.5-Qwen2.5-7B
11normalize: false
12int8_mask: true
13dtype: bfloat16merge_method): Utilizes the Model Stock method, as described in Model Stock, to effectively combine multiple models by leveraging their strengths.models): Specifies the list of models to be merged:base_model): Defines the foundational model for the merge, which is newsbang/Homer-v0.5-Qwen2.5-7B in this case.normalize): Set to false to retain the original scaling of the model weights during the merge.int8_mask): Enabled (true) to apply INT8 quantization masking, optimizing the model for efficient inference without significant loss in precision.dtype): Uses bfloat16 to maintain computational efficiency while ensuring high precision.bfloat16 data type contribute to efficient computation, enabling faster response times without compromising quality.pip install -qU transformers accelerate1from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
2import torch
3
4# Define the model name
5model_name = "ZeroXClem/Qwen2.5-7B-HomerAnvita-NerdMix"
6
7# Load the tokenizer
8tokenizer = AutoTokenizer.from_pretrained(model_name)
9
10# Load the model
11model = AutoModelForCausalLM.from_pretrained(
12 model_name,
13 torch_dtype=torch.bfloat16,
14 device_map="auto"
15)
16
17# Initialize the pipeline
18text_generator = pipeline(
19 "text-generation",
20 model=model,
21 tokenizer=tokenizer,
22 torch_dtype=torch.bfloat16,
23 device_map="auto"
24)
25
26# Define the input prompt
27prompt = "Explain the significance of artificial intelligence in modern healthcare."
28
29# Generate the output
30outputs = text_generator(
31 prompt,
32 max_new_tokens=150,
33 do_sample=True,
34 temperature=0.7,
35 top_k=50,
36 top_p=0.95
37)
38
39# Print the generated text
40print(outputs[0]["generated_text"])temperature, top_k, and top_p to control the creativity and diversity of the generated text.mergemergekitmodel_stockQwenHomerAnvitaNerdZeroXClem/Qwen2.5-7B-HomerAnvita-NerdMixbunnycore/Qandora-2.5-7B-Creativeallknowingroger/HomerSlerp1-7Bsethuiyer/Qwen2.5-7B-Anvitafblgit/cybertron-v4-qw7B-MGSjeffmeloy/Qwen2.5-7B-nerd-uncensored-v1.0newsbang/Homer-v0.5-Qwen2.5-7B| Metric | Value |
|---|---|
| Avg. | 34.17 |
| IFEval (0-Shot) | 77.08 |
| BBH (3-Shot) | 36.58 |
| MATH Lvl 5 (4-Shot) | 29.53 |
| GPQA (0-shot) | 9.28 |
| MuSR (0-shot) | 14.41 |
| MMLU-PRO (5-shot) | 38.13 |