πMixture of Expert (MoE) TEST
Collection
MoE done using mergekit β’ 4 items β’ Updated β’ 2
How to use ChenWeiLi/MedLlama-3-8B_DARE with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ChenWeiLi/MedLlama-3-8B_DARE") # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("ChenWeiLi/MedLlama-3-8B_DARE")
model = AutoModelForMultimodalLM.from_pretrained("ChenWeiLi/MedLlama-3-8B_DARE")How to use ChenWeiLi/MedLlama-3-8B_DARE with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ChenWeiLi/MedLlama-3-8B_DARE"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ChenWeiLi/MedLlama-3-8B_DARE",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ChenWeiLi/MedLlama-3-8B_DARE
How to use ChenWeiLi/MedLlama-3-8B_DARE with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ChenWeiLi/MedLlama-3-8B_DARE" \
--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": "ChenWeiLi/MedLlama-3-8B_DARE",
"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 "ChenWeiLi/MedLlama-3-8B_DARE" \
--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": "ChenWeiLi/MedLlama-3-8B_DARE",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ChenWeiLi/MedLlama-3-8B_DARE with Docker Model Runner:
docker model run hf.co/ChenWeiLi/MedLlama-3-8B_DARE
This is a merge of pre-trained language models created using mergekit.
This model was merged using the DARE TIES merge method using mlabonne/ChimeraLlama-3-8B-v3 as a base.
The following models were included in the merge:
| Tasks | Version | Filter | n-shot | Metric | Value | Stderr | |
|---|---|---|---|---|---|---|---|
| - medmcqa | Yaml | none | 0 | acc | 0.5728 | Β± | 0.0076 |
| none | 0 | acc_norm | 0.5728 | Β± | 0.0076 | ||
| - medqa_4options | Yaml | none | 0 | acc | 0.5923 | Β± | 0.0138 |
| none | 0 | acc_norm | 0.5923 | Β± | 0.0138 | ||
| - anatomy (mmlu) | 0 | none | 0 | acc | 0.7111 | Β± | 0.0392 |
| - clinical_knowledge (mmlu) | 0 | none | 0 | acc | 0.7547 | Β± | 0.0265 |
| - college_biology (mmlu) | 0 | none | 0 | acc | 0.7917 | Β± | 0.0340 |
| - college_medicine (mmlu) | 0 | none | 0 | acc | 0.6647 | Β± | 0.0360 |
| - medical_genetics (mmlu) | 0 | none | 0 | acc | 0.8200 | Β± | 0.0386 |
| - professional_medicine (mmlu) | 0 | none | 0 | acc | 0.7426 | Β± | 0.0266 |
| stem | N/A | none | 0 | acc_norm | 0.5773 | Β± | 0.0067 |
| none | 0 | acc | 0.6145 | Β± | 0.0057 | ||
| - pubmedqa | 1 | none | 0 | acc | 0.7400 | Β± | 0.0196 |
| Groups | Version | Filter | n-shot | Metric | Value | Stderr | |
|---|---|---|---|---|---|---|---|
| stem | N/A | none | 0 | acc_norm | 0.5773 | Β± | 0.0067 |
| none | 0 | acc | 0.6145 | Β± | 0.0057 |
The following YAML configuration was used to produce this model:
models:
- model: mlabonne/ChimeraLlama-3-8B-v3
# No parameters necessary for base model
- model: sethuiyer/Medichat-Llama3-8B
parameters:
density: 0.53
weight: 0.5
- model: johnsnowlabs/JSL-MedLlama-3-8B-v2.0
parameters:
density: 0.53
weight: 0.5
merge_method: dare_ties
base_model: mlabonne/ChimeraLlama-3-8B-v3
parameters:
int8_mask: true
dtype: float16