Editing Models with Task Arithmetic
Paper • 2212.04089 • Published • 8
How to use mrcuddle/Unbound-Llama3-8B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mrcuddle/Unbound-Llama3-8B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("mrcuddle/Unbound-Llama3-8B")
model = AutoModelForCausalLM.from_pretrained("mrcuddle/Unbound-Llama3-8B")How to use mrcuddle/Unbound-Llama3-8B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mrcuddle/Unbound-Llama3-8B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mrcuddle/Unbound-Llama3-8B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/mrcuddle/Unbound-Llama3-8B
How to use mrcuddle/Unbound-Llama3-8B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mrcuddle/Unbound-Llama3-8B" \
--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": "mrcuddle/Unbound-Llama3-8B",
"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 "mrcuddle/Unbound-Llama3-8B" \
--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": "mrcuddle/Unbound-Llama3-8B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use mrcuddle/Unbound-Llama3-8B with Docker Model Runner:
docker model run hf.co/mrcuddle/Unbound-Llama3-8B
This is a merge of pre-trained language models created using mergekit.
This model was merged using the task arithmetic merge method using winglian/llama-3-8b-1m-PoSE as a base.
The following models were included in the merge:
The following YAML configuration was used to produce this model:
models:
- model: aifeifei798/llama3-8B-DarkIdol-2.3-Uncensored-32K
parameters:
density: 0.65
weight: 0.15
- model: NeverSleep/Llama-3-Lumimaid-8B-v0.1
parameters:
density: 0.70
weight: 0.20
- model: mergekit-community/because_im_bored_nsfw1
parameters:
density: 0.60
weight: 0.10
- model: jondurbin/bagel-8b-v1.0
parameters:
density: 0.60
weight: 0.10
- model: Orenguteng/Llama-3.1-8B-Lexi-Uncensored-V2
parameters:
density: 0.65
weight: 0.15
- model: Undi95/Llama-3-LewdPlay-8B-evo
parameters:
density: 0.75
weight: 0.25
- model: Deev124/hermes-llama3-roleplay-4000-v1
parameters:
density: 0.60
weight: 0.10
- model: DevsDoCode/LLama-3-8b-Uncensored
parameters:
density: 0.60
weight: 0.10
- model: mlabonne/Hermes-3-Llama-3.1-8B-lorablated
parameters:
density: 0.65
weight: 0.15
- model: vicgalle/Roleplay-Llama-3-8B
parameters:
density: 0.70
weight: 0.20
- model: Gryphe/Pantheon-RP-1.0-8b-Llama-3
parameters:
density: 0.70
weight: 0.20
- model: vicgalle/Humanish-Roleplay-Llama-3.1-8B
parameters:
density: 0.70
weight: 0.20
- model: vicgalle/Unsafe-Llama-3-8B
parameters:
density: 0.70
weight: 0.20
- model: winglian/llama-3-8b-1m-PoSE
parameters:
density: 0.70
weight: 0.20
merge_method: task_arithmetic
base_model: winglian/llama-3-8b-1m-PoSE
parameters:
normalize: true
int8_mask: true
dtype: float16