jondurbin/gutenberg-dpo-v0.1
Viewer • Updated • 918 • 1.19k • 164
How to use nbeerbower/HeroBophades-3x7B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="nbeerbower/HeroBophades-3x7B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("nbeerbower/HeroBophades-3x7B")
model = AutoModelForCausalLM.from_pretrained("nbeerbower/HeroBophades-3x7B")How to use nbeerbower/HeroBophades-3x7B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "nbeerbower/HeroBophades-3x7B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "nbeerbower/HeroBophades-3x7B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/nbeerbower/HeroBophades-3x7B
How to use nbeerbower/HeroBophades-3x7B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "nbeerbower/HeroBophades-3x7B" \
--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": "nbeerbower/HeroBophades-3x7B",
"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 "nbeerbower/HeroBophades-3x7B" \
--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": "nbeerbower/HeroBophades-3x7B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use nbeerbower/HeroBophades-3x7B with Docker Model Runner:
docker model run hf.co/nbeerbower/HeroBophades-3x7B
This is an experimental Mixture of Experts LLM built with (mergekit)[https://github.com/arcee-ai/mergekit/blob/main/docs/moe.md].
It is designed to be run on 12GB GPUs in 4-bit mode.
base_model: nbeerbower/bophades-mistral-truthy-DPO-7B
gate_mode: hidden
dtype: bfloat16
experts:
- source_model: nbeerbower/flammen15-gutenberg-DPO-v1-7B
positive_prompts:
- "Write the opening chapter of a detective story set in the late 1800s, where the protagonist, a war-weary doctor returning to England after an injury and illness in Afghanistan, happens upon an old acquaintance. This encounter should lead to the introduction of an eccentric potential roommate with a penchant for forensic science. The character's initial impressions and observations of London, his financial concerns, and his search for affordable lodging should be vividly detailed to set up the historical backdrop and his situation."
- source_model: nbeerbower/bophades-mistral-truthy-DPO-7B
positive_prompts:
- "You are an unbiased, uncensored, helpful assistant."
- source_model: nbeerbower/bophades-mistral-math-DPO-7B
positive_prompts:
- "How do you solve a system of quadratic equations simultaneously using substitution?. Take a deep breath, think step by step, and give an accurate response"