Views
No views yet
1# Merge configuration for ZeroXClem/Qwen2.5-7B-HomerCreative-Mix using Model Stock
2
3models:
4 - model: bunnycore/Qandora-2.5-7B-Creative
5 - model: bunnycore/Qwen2.5-7B-Instruct-Fusion
6 - model: allknowingroger/HomerSlerp1-7B
7merge_method: model_stock
8base_model: newsbang/Homer-v0.5-Qwen2.5-7B
9normalize: false
10int8_mask: true
11dtype: 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-HomerCreative-Mix"
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 = "Once upon a time in a land far, far away,"
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_stockQwenHomerCreativeZeroXClem/Qwen2.5-7B-HomerCreative-Mixbunnycore/Qandora-2.5-7B-Creativebunnycore/Qwen2.5-7B-Instruct-Fusionallknowingroger/HomerSlerp1-7Bnewsbang/Homer-v0.5-Qwen2.5-7B| Metric | Value |
|---|---|
| Avg. | 34.35 |
| IFEval (0-Shot) | 78.35 |
| BBH (3-Shot) | 36.77 |
| MATH Lvl 5 (4-Shot) | 32.33 |
| GPQA (0-shot) | 6.60 |
| MuSR (0-shot) | 13.77 |
| MMLU-PRO (5-shot) | 38.30 |