Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
Paper • 2311.03099 • Published • 33
How to use Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen")
model = AutoModelForMultimodalLM.from_pretrained("Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen")
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 Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen
How to use Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen" \
--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": "Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen",
"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 "Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen" \
--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": "Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen with Docker Model Runner:
docker model run hf.co/Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen
# Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen")
model = AutoModelForMultimodalLM.from_pretrained("Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen")
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]:]))This is a merge of pre-trained language models created using mergekit.
This model was merged using the DARE TIES merge method using unsloth/Mistral-Small-Instruct-2409 as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
models:
# Obedience and Strong Replies
- model: qingy2024/MwM-22B-Instruct
parameters:
weight: 1.2
density: 0.8
- model: DigitalSouls/BlackSheep-DigitalSoul-22B
parameters:
weight: 0.8
density: 0.85
- model: ArliAI/Mistral-Small-22B-ArliAI-RPMax-v1.1
parameters:
weight: 0.7
density: 0.85
# RP and Storytelling
- model: Kaoeiri/MS-Magpantheonsel-lark-v4x1.6.2RP-Cydonia-vXXX-22B-8
parameters:
weight: 0.8
density: 0.75
- model: TheDrummer/Cydonia-22B-v1.3
parameters:
weight: 0.5
density: 0.7
- model: spow12/ChatWaifu_v2.0_22B
parameters:
weight: 0.5
density: 0.7
- model: Gryphe/Pantheon-RP-Pure-1.6.2-22b-Small
parameters:
weight: 0.5
density: 0.7
# Background and Additional Features
- model: Darkknight535/MS-Moonlight-22B-v3
parameters:
weight: 0.3
density: 0.7
- model: InferenceIllusionist/SorcererLM-22B
parameters:
weight: 0.3
density: 0.7
- model: Envoid/Mistral-Small-NovusKyver
parameters:
weight: 0.3
density: 0.7
- model: crestf411/MS-sunfall-v0.7.0
parameters:
weight: 0.3
density: 0.7
- model: Kaoeiri/MS_a-coolyte-2409-22B
parameters:
weight: 0.3
density: 0.7
- model: invisietch/MiS-Firefly-v0.2-22B
parameters:
weight: 0.3
density: 0.7
- model: Kaoeiri/MS_fujin-2409-22B
parameters:
weight: 0.3
density: 0.7
- model: Kaoeiri/MS_dampf-2409-22B
parameters:
weight: 0.3
density: 0.7
- model: allura-org/MS-Meadowlark-22B
parameters:
weight: 0.3
density: 0.7
- model: Saxo/Linkbricks-Horizon-AI-Japanese-Superb-V1-22B
parameters:
weight: 0.3
density: 0.7
- model: Kaoeiri/MS_Moingooistral-2409-22B
parameters:
weight: 0.3
density: 0.7
- model: Kaoeiri/MS-Inky-2409-22B
parameters:
weight: 0.3
density: 0.7
merge_method: dare_ties
base_model: unsloth/Mistral-Small-Instruct-2409
parameters:
density: 0.90
epsilon: 0.08
lambda: 1.18
normalize: true
dtype: bfloat16
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Kaoeiri/MS-MagpantheonselRP-22B-14.9-Omen") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)