jondurbin/truthy-dpo-v0.1
Viewer • Updated • 1.02k • 699 • 136
How to use nbeerbower/HeroBophades-2x7B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="nbeerbower/HeroBophades-2x7B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("nbeerbower/HeroBophades-2x7B")
model = AutoModelForCausalLM.from_pretrained("nbeerbower/HeroBophades-2x7B")How to use nbeerbower/HeroBophades-2x7B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "nbeerbower/HeroBophades-2x7B"
# 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-2x7B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/nbeerbower/HeroBophades-2x7B
How to use nbeerbower/HeroBophades-2x7B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "nbeerbower/HeroBophades-2x7B" \
--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-2x7B",
"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-2x7B" \
--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-2x7B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use nbeerbower/HeroBophades-2x7B with Docker Model Runner:
docker model run hf.co/nbeerbower/HeroBophades-2x7B
This is an experimental Mixture of Experts LLM built with (mergekit)[https://github.com/arcee-ai/mergekit/blob/main/docs/moe.md].
base_model: nbeerbower/bophades-mistral-truthy-DPO-7B
gate_mode: hidden
dtype: bfloat16
experts:
- 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"