FuseChat: Knowledge Fusion of Chat Models
Paper โข 2408.07990 โข Published โข 15
How to use mergekit-community/mergekit-sce-osbthfy with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mergekit-community/mergekit-sce-osbthfy")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("mergekit-community/mergekit-sce-osbthfy")
model = AutoModelForCausalLM.from_pretrained("mergekit-community/mergekit-sce-osbthfy", device_map="auto")
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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use mergekit-community/mergekit-sce-osbthfy with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mergekit-community/mergekit-sce-osbthfy"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mergekit-community/mergekit-sce-osbthfy",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/mergekit-community/mergekit-sce-osbthfy
How to use mergekit-community/mergekit-sce-osbthfy with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mergekit-community/mergekit-sce-osbthfy" \
--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": "mergekit-community/mergekit-sce-osbthfy",
"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 "mergekit-community/mergekit-sce-osbthfy" \
--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": "mergekit-community/mergekit-sce-osbthfy",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use mergekit-community/mergekit-sce-osbthfy with Docker Model Runner:
docker model run hf.co/mergekit-community/mergekit-sce-osbthfy
This is a merge of pre-trained language models created using mergekit.
This model was merged using the SCE merge method using Qwen/Qwen2.5-1.5B-Instruct as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
models:
- model: bond005/meno-tiny-0.1
- model: fblgit/miniclaus-qw1.5B-UNAMGS
- model: fblgit/miniclaus-qw1.5B-UNAMGS-GRPO
- model: hotmailuser/QwenModelStock-1.8B
- model: hotmailuser/QwenStock-1.7B
- model: lalainy/ECE-PRYMMAL-YL-1B-SLERP-V3
- model: nvidia/AceInstruct-1.5B
- model: nvidia/AceMath-1.5B-Instruct
- model: Qwen/Qwen2.5-1.5B-Instruct
- model: Sakalti/Saba1.5-1.5B
- model: Sakalti/Saba1-1.8B
- model: Sakalti/SJT-1.5B-Alpha
- model: Youlln/ECE-PRYMMAL-YL-1B-SLERP-V1
- model: Youlln/ECE-PRYMMAL-YL-1B-SLERP-V2
tokenizer:
source: base
merge_method: sce
base_model: Qwen/Qwen2.5-1.5B-Instruct
dtype: bfloat16
parameters:
int8_mask: true