7B Mistral Merges
Collection
A collection of my 7B parameter merges • 3 items • Updated • 1
How to use rmdhirr/Multiparadigm_7B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="rmdhirr/Multiparadigm_7B")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("rmdhirr/Multiparadigm_7B")
model = AutoModelForCausalLM.from_pretrained("rmdhirr/Multiparadigm_7B")
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 rmdhirr/Multiparadigm_7B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "rmdhirr/Multiparadigm_7B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "rmdhirr/Multiparadigm_7B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/rmdhirr/Multiparadigm_7B
How to use rmdhirr/Multiparadigm_7B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "rmdhirr/Multiparadigm_7B" \
--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": "rmdhirr/Multiparadigm_7B",
"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 "rmdhirr/Multiparadigm_7B" \
--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": "rmdhirr/Multiparadigm_7B",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use rmdhirr/Multiparadigm_7B with Docker Model Runner:
docker model run hf.co/rmdhirr/Multiparadigm_7B
Multiparadigm_7B is a merge of the following models:
Thanks to mradermacher, static GGUF quants are available here.
slices:
- sources:
- model: MTSAIR/multi_verse_model
layer_range: [0, 32]
- model: ResplendentAI/Paradigm_7B
layer_range: [0, 32]
merge_method: slerp
base_model: MTSAIR/multi_verse_model
parameters:
t:
- filter: self_attn
value: [0, 0.6, 0.3, 0.7, 1]
- filter: mlp
value: [1, 0.6, 0.7, 0.3, 0]
- value: 0.6
dtype: bfloat16
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 76.08 |
| AI2 Reasoning Challenge (25-Shot) | 73.21 |
| HellaSwag (10-Shot) | 88.95 |
| MMLU (5-Shot) | 64.28 |
| TruthfulQA (0-shot) | 76.87 |
| Winogrande (5-shot) | 83.82 |
| GSM8k (5-shot) | 69.37 |