Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
Paper • 2311.03099 • Published • 33
How to use grimjim/MagTie-v1-12B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="grimjim/MagTie-v1-12B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("grimjim/MagTie-v1-12B")
model = AutoModelForCausalLM.from_pretrained("grimjim/MagTie-v1-12B")How to use grimjim/MagTie-v1-12B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "grimjim/MagTie-v1-12B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "grimjim/MagTie-v1-12B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/grimjim/MagTie-v1-12B
How to use grimjim/MagTie-v1-12B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "grimjim/MagTie-v1-12B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "grimjim/MagTie-v1-12B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "grimjim/MagTie-v1-12B" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "grimjim/MagTie-v1-12B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use grimjim/MagTie-v1-12B with Docker Model Runner:
docker model run hf.co/grimjim/MagTie-v1-12B
This is a merge of pre-trained language models created using mergekit.
We used a pretrained base model as the base for a DARE-TIES merge, compensating by boosting the weights and densities in order to retain more training from the contributing models.
This model was merged using the DARE TIES merge method using grimjim/mistralai-Mistral-Nemo-Base-2407 as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
base_model: grimjim/mistralai-Mistral-Nemo-Base-2407
models:
- model: grimjim/mistralai-Mistral-Nemo-Base-2407
- model: inflatebot/MN-12B-Mag-Mell-R1
parameters:
weight: 0.85
density: 0.75
- model: Delta-Vector/Francois-Huali-12B
parameters:
weight: 0.85
density: 0.75
- model: grimjim/Magnolia-v3-12B
parameters:
weight: 0.85
density: 0.75
merge_method: dare_ties
parameters:
normalize: true
int8_mask: true
dtype: bfloat16