Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
Paper • 2311.03099 • Published • 34
How to use CultriX/Qwen2.5-14B-Unity with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="CultriX/Qwen2.5-14B-Unity")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("CultriX/Qwen2.5-14B-Unity")
model = AutoModelForCausalLM.from_pretrained("CultriX/Qwen2.5-14B-Unity")
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=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use CultriX/Qwen2.5-14B-Unity with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "CultriX/Qwen2.5-14B-Unity"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "CultriX/Qwen2.5-14B-Unity",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/CultriX/Qwen2.5-14B-Unity
How to use CultriX/Qwen2.5-14B-Unity with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "CultriX/Qwen2.5-14B-Unity" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "CultriX/Qwen2.5-14B-Unity",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "CultriX/Qwen2.5-14B-Unity" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "CultriX/Qwen2.5-14B-Unity",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use CultriX/Qwen2.5-14B-Unity with Docker Model Runner:
docker model run hf.co/CultriX/Qwen2.5-14B-Unity
This is a merge of pre-trained language models created using mergekit.
This model was merged using the DARE TIES merge method using CultriX/SeQwence-14Bv1 as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
base_model: CultriX/SeQwence-14Bv1
merge_method: dare_ties
parameters:
normalize: true
int8_mask: true
dtype: bfloat16
models:
- model: CultriX/SeQwence-14Bv1
parameters:
weight: 0.28 # Strong base for multitask benchmarks.
density: 0.7 # Retains strong multitask performance.
- model: CultriX/Qwen2.5-14B-Wernickev3
parameters:
weight: 0.22 # Balanced to support reasoning-heavy benchmarks like BBH.
density: 0.65
- model: qingy2019/Qwen2.5-Math-14B-Instruct
parameters:
weight: 0.22 # Optimized for MATH and BBH.
density: 0.6
- model: allknowingroger/QwenSlerp6-14B
parameters:
weight: 0.18 # Reintegration of the highest scorer for stability across benchmarks.
density: 0.65 # Focused on its exceptional multitask and reasoning strengths.
- model: CultriX/Qwen2.5-14B-Emergedv3
parameters:
weight: 0.15 # Maintains multitask stability for GPQA and MMLU-PRO.
density: 0.6
- model: sometimesanotion/Qwen2.5-14B-Vimarckoso
parameters:
weight: 0.1 # Late-layer contributor for MUSR and multi-step reasoning.
density: 0.6
adaptive_merge_parameters:
task_weights:
IFEval: 1.4 # Balanced to maintain instruction-following benchmarks.
BBH: 1.4 # Ensures strong reasoning capabilities.
MATH: 1.5 # Prioritizes mathematical reasoning.
GPQA: 1.5 # Balanced for factual QA.
MUSR: 1.4 # Advanced multi-step reasoning.
MMLU-PRO: 1.5 # Emphasized for domain-specific multitask performance.
smoothing_factor: 0.12 # Smooth transitions between task-specific contributions.
gradient_clipping:
CultriX/SeQwence-14Bv1: 0.8
CultriX/Qwen2.5-14B-Wernickev3: 0.8
qingy2019/Qwen2.5-Math-14B-Instruct: 0.85
allknowingroger/QwenSlerp6-14B: 0.8 # Balanced for high scoring model contributions.
CultriX/Qwen2.5-14B-Emergedv3: 0.75
sometimesanotion/Qwen2.5-14B-Vimarckoso: 0.75
tokenizer_source: CultriX/SeQwence-14Bv1