Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch
Paper • 2311.03099 • Published • 33
How to use CorticalStack/shadow-clown-7B-dare with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="CorticalStack/shadow-clown-7B-dare") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("CorticalStack/shadow-clown-7B-dare")
model = AutoModelForCausalLM.from_pretrained("CorticalStack/shadow-clown-7B-dare")How to use CorticalStack/shadow-clown-7B-dare with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "CorticalStack/shadow-clown-7B-dare"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "CorticalStack/shadow-clown-7B-dare",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/CorticalStack/shadow-clown-7B-dare
How to use CorticalStack/shadow-clown-7B-dare with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "CorticalStack/shadow-clown-7B-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": "CorticalStack/shadow-clown-7B-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 "CorticalStack/shadow-clown-7B-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": "CorticalStack/shadow-clown-7B-dare",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use CorticalStack/shadow-clown-7B-dare with Docker Model Runner:
docker model run hf.co/CorticalStack/shadow-clown-7B-dare
shadow-clown-7B-dare is a DARE merge of the following models using mergekit:
See the paper Language Models are Super Mario: Absorbing Abilities from Homologous Models as a Free Lunch for more on the method.
models:
- model: yam-peleg/Experiment26-7B
- model: CorticalStack/pastiche-crown-clown-7b-dare-dpo
parameters:
density: 0.52
weight: 0.4
- model: CultriX/NeuralTrix-7B-dpo
parameters:
density: 0.52
weight: 0.2
- model: CorticalStack/neurotic-crown-clown-7b-ties
parameters:
density: 0.52
weight: 0.3
merge_method: dare_ties
base_model: yam-peleg/Experiment26-7B
parameters:
int8_mask: true
dtype: bfloat16