DELLA-Merging: Reducing Interference in Model Merging through Magnitude-Based Sampling
Paper • 2406.11617 • Published • 10
How to use mergekit-community/MS3-RP-half1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mergekit-community/MS3-RP-half1") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("mergekit-community/MS3-RP-half1")
model = AutoModelForCausalLM.from_pretrained("mergekit-community/MS3-RP-half1")How to use mergekit-community/MS3-RP-half1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mergekit-community/MS3-RP-half1"
# 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-half1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/mergekit-community/MS3-RP-half1
How to use mergekit-community/MS3-RP-half1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mergekit-community/MS3-RP-half1" \
--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-half1",
"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-half1" \
--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-half1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use mergekit-community/MS3-RP-half1 with Docker Model Runner:
docker model run hf.co/mergekit-community/MS3-RP-half1
This is a merge of pre-trained language models created using mergekit.
This model was merged using the Linear 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:
models:
- model: ArliAI/Mistral-Small-24B-ArliAI-RPMax-v1.4
parameters:
weight: 0.2
density: 0.7
- model: trashpanda-org/Llama3-24B-Mullein-v1
parameters:
weight: 0.2
density: 0.7
- model: TheDrummer/Cydonia-24B-v2
parameters:
weight: 0.2
density: 0.7
merge_method: della_linear
base_model: Nohobby/MS3-test-Merge-1
parameters:
epsilon: 0.2
lambda: 1.1
dtype: bfloat16
tokenizer:
source: base