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-12.995 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Kaoeiri/MS-MagpantheonselRP-22B-12.995")
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-12.995")
model = AutoModelForMultimodalLM.from_pretrained("Kaoeiri/MS-MagpantheonselRP-22B-12.995")
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-12.995 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Kaoeiri/MS-MagpantheonselRP-22B-12.995"
# 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-12.995",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Kaoeiri/MS-MagpantheonselRP-22B-12.995
How to use Kaoeiri/MS-MagpantheonselRP-22B-12.995 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Kaoeiri/MS-MagpantheonselRP-22B-12.995" \
--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-12.995",
"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-12.995" \
--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-12.995",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Kaoeiri/MS-MagpantheonselRP-22B-12.995 with Docker Model Runner:
docker model run hf.co/Kaoeiri/MS-MagpantheonselRP-22B-12.995
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:
# Primary Fiction Core (Rebalanced for character focus)
- model: Kaoeiri/MS_Moingooistral-2409-22B # Monster fiction core
parameters:
weight: 0.22 # Reduced from 0.28
density: 0.72 # Adjusted for balance
- model: Kaoeiri/MS-Magpantheonsel-lark-v4x1.6.2RP-Cydonia-vXXX-22B-6 # Main writing engine
parameters:
weight: 0.72 # Increased to compensate for other reductions
density: 0.78 # Increased for better detail
# World Building & Character Focus (Enhanced)
- model: Kaoeiri/MS-Inky-2409-22B # World dynamics with character focus
parameters:
weight: 0.42 # Increased for stronger character-world integration
density: 0.85 # Increased for richer character detail
- model: Gryphe/Pantheon-RP-Pure-1.6.2-22b-Small # Character interaction specialist
parameters:
weight: 0.48 # Increased for deeper character development
density: 0.82 # Enhanced for personality detail
# Combat & Magic (Rebalanced)
- model: DigitalSouls/BlackSheep-DigitalSoul-22B # Combat
parameters:
weight: 0.16 # Significantly reduced
density: 0.70 # Maintained for quality
- model: InferenceIllusionist/SorcererLM-22B # Magical elements
parameters:
weight: 0.35 # Increased to maintain magical detail
density: 0.78 # Enhanced for better integration
# Story Elements (Adjusted)
- model: TheDrummer/Cydonia-22B-v1.1
parameters:
weight: 0.22 # Slight increase for narrative depth
density: 0.72
- model: crestf411/MS-sunfall-v0.7.0 # Writing enhancement
parameters:
weight: 0.22 # Increased for better writing quality
density: 0.75
- model: Kaoeiri/MS_a-coolyte-2409-22B # Character style content
parameters:
weight: 0.25 # Increased for better character elements
density: 0.76
# Ideas Generation
- model: Kaoeiri/MS_fujin-2409-22B
parameters:
weight: 0.07 # Significantly reduced
density: 0.62
- model: Kaoeiri/MS_dampf-2409-22B
parameters:
weight: 0.12
density: 0.68
# Story Enhancement & Character Detail
- model: hf-100/Mistral-Small-Spellbound-StoryWriter-22B-instruct-0.2-chkpt-200-16-bit
parameters:
weight: 0.28 # Increased for better story-character integration
density: 0.75
- model: ArliAI/Mistral-Small-22B-ArliAI-RPMax-v1.1 # Character interaction
parameters:
weight: 0.18 # Increased for better character dynamics
density: 0.68
- model: Darkknight535/MS-Moonlight-22B-v3 # Character detail specialist
parameters:
weight: 0.22 # Increased for deeper character profiles
density: 0.72
- model: Envoid/Mistral-Small-NovusKyver # Maintained core functionality
parameters:
weight: 0.12 # Reduced to minimize instruction avoidance
density: 0.65 # Adjusted down to reduce negative behaviors
- model: TroyDoesAI/BlackSheep-MermaidMistral-22B # Character moments
parameters:
weight: 0.25 # Slight increase for character interaction
density: 0.74 # Increased for better detail
merge_method: dare_ties
base_model: unsloth/Mistral-Small-Instruct-2409
parameters:
density: 0.98 # Increased for maximum character detail
epsilon: 0.047 # Reduced for better consistency
lambda: 1.58 # Increased for creative elements while maintaining coherence
dtype: bfloat16
tokenizer_source: union