Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
Paper • 2311.03099 • Published • 38
How to use phoenixiv6/quasar-sn24-wt4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="phoenixiv6/quasar-sn24-wt4", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("phoenixiv6/quasar-sn24-wt4", trust_remote_code=True, device_map="auto")How to use phoenixiv6/quasar-sn24-wt4 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "phoenixiv6/quasar-sn24-wt4"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "phoenixiv6/quasar-sn24-wt4",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/phoenixiv6/quasar-sn24-wt4
How to use phoenixiv6/quasar-sn24-wt4 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "phoenixiv6/quasar-sn24-wt4" \
--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": "phoenixiv6/quasar-sn24-wt4",
"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 "phoenixiv6/quasar-sn24-wt4" \
--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": "phoenixiv6/quasar-sn24-wt4",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use phoenixiv6/quasar-sn24-wt4 with Docker Model Runner:
docker model run hf.co/phoenixiv6/quasar-sn24-wt4
This is a merge of pre-trained language models created using mergekit.
This model was merged using the DARE TIES merge method using /root/DOWN_24/coolroman/quasar-sn24-v15b as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
models:
- model: /root/DOWN_24/tung_zenai
parameters:
density: 0.55
weight: 0.45
- model: /root/DOWN_24/coolroman/quasar-sn24-v15b
parameters:
density: 0.75
weight: 0.75
- model: /root/DOWN_24/tung_zenai
parameters:
density: 0.35
weight: 0.25
merge_method: dare_ties
base_model: /root/DOWN_24/coolroman/quasar-sn24-v15b
parameters:
normalize: true
int8_mask: true
rescale: true
dtype: bfloat16
out_dtype: bfloat16
trust_remote_code: true