jondurbin/truthy-dpo-v0.1
Viewer β’ Updated β’ 1.02k β’ 776 β’ 141
How to use eren23/OGNO-7b-dpo-truthful with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="eren23/OGNO-7b-dpo-truthful") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("eren23/OGNO-7b-dpo-truthful")
model = AutoModelForCausalLM.from_pretrained("eren23/OGNO-7b-dpo-truthful", device_map="auto")How to use eren23/OGNO-7b-dpo-truthful with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "eren23/OGNO-7b-dpo-truthful"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "eren23/OGNO-7b-dpo-truthful",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/eren23/OGNO-7b-dpo-truthful
How to use eren23/OGNO-7b-dpo-truthful with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "eren23/OGNO-7b-dpo-truthful" \
--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": "eren23/OGNO-7b-dpo-truthful",
"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 "eren23/OGNO-7b-dpo-truthful" \
--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": "eren23/OGNO-7b-dpo-truthful",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use eren23/OGNO-7b-dpo-truthful with Docker Model Runner:
docker model run hf.co/eren23/OGNO-7b-dpo-truthful
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("eren23/OGNO-7b-dpo-truthful")
model = AutoModelForCausalLM.from_pretrained("eren23/OGNO-7b-dpo-truthful", device_map="auto")DPO Finetuned paulml/OGNO-7B using jondurbin/truthy-dpo-v0.1
paulml/OGNO-7B is a mistral 7b variant afaik and this repo is an experimental repo, so might not be useable in prod
Thx for the great data sources.
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 76.14 |
| AI2 Reasoning Challenge (25-Shot) | 72.95 |
| HellaSwag (10-Shot) | 89.02 |
| MMLU (5-Shot) | 64.61 |
| TruthfulQA (0-shot) | 76.61 |
| Winogrande (5-shot) | 84.69 |
| GSM8k (5-shot) | 68.99 |
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="eren23/OGNO-7b-dpo-truthful")