DELLA-Merging: Reducing Interference in Model Merging through Magnitude-Based Sampling
Paper • 2406.11617 • Published • 10
How to use mergekit-community/MS3-RP-RP-half2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mergekit-community/MS3-RP-RP-half2") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("mergekit-community/MS3-RP-RP-half2")
model = AutoModelForCausalLM.from_pretrained("mergekit-community/MS3-RP-RP-half2")How to use mergekit-community/MS3-RP-RP-half2 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mergekit-community/MS3-RP-RP-half2"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mergekit-community/MS3-RP-RP-half2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/mergekit-community/MS3-RP-RP-half2
How to use mergekit-community/MS3-RP-RP-half2 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mergekit-community/MS3-RP-RP-half2" \
--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": "mergekit-community/MS3-RP-RP-half2",
"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 "mergekit-community/MS3-RP-RP-half2" \
--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": "mergekit-community/MS3-RP-RP-half2",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use mergekit-community/MS3-RP-RP-half2 with Docker Model Runner:
docker model run hf.co/mergekit-community/MS3-RP-RP-half2
This is a merge of pre-trained language models created using mergekit.
This model was merged using the DELLA merge method using Nohobby/MS3-test-Merge-1 as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
base_model: Nohobby/MS3-test-Merge-1
parameters:
epsilon: 0.05
lambda: 0.9
int8_mask: true
rescale: true
normalize: false
dtype: bfloat16
tokenizer:
source: base
merge_method: della
models:
- model: estrogen/MS2501-24b-Ink-apollo-ep2
parameters:
weight: [0.1, -0.01, 0.1, -0.02, 0.1]
density: [0.6, 0.4, 0.5, 0.4, 0.6]
- model: huihui-ai/Mistral-Small-24B-Instruct-2501-abliterated
parameters:
weight: [0.02, -0.01, 0.02, -0.02, 0.01]
density: [0.45, 0.55, 0.45, 0.55, 0.45]
- model: ToastyPigeon/ms3-roselily-rp-v2
parameters:
weight: [0.01, -0.02, 0.02, -0.025, 0.01]
density: [0.45, 0.65, 0.45, 0.65, 0.45]
- model: PocketDoc/Dans-DangerousWinds-V1.1.1-24b
parameters:
weight: [0.1, -0.01, 0.1, -0.02, 0.1]
density: [0.6, 0.4, 0.5, 0.4, 0.6]