ybisk/piqa
Updated • 60.7k • 104
How to use LouisSanna/dpo-model-output with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="LouisSanna/dpo-model-output") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("LouisSanna/dpo-model-output")
model = AutoModelForCausalLM.from_pretrained("LouisSanna/dpo-model-output")How to use LouisSanna/dpo-model-output with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "LouisSanna/dpo-model-output"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "LouisSanna/dpo-model-output",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/LouisSanna/dpo-model-output
How to use LouisSanna/dpo-model-output with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "LouisSanna/dpo-model-output" \
--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": "LouisSanna/dpo-model-output",
"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 "LouisSanna/dpo-model-output" \
--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": "LouisSanna/dpo-model-output",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use LouisSanna/dpo-model-output with Docker Model Runner:
docker model run hf.co/LouisSanna/dpo-model-output
This model is a fine-tuned version of openai-community/gpt2 on the piqa dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Rewards/chosen | Rewards/rejected | Rewards/accuracies | Rewards/margins | Logps/rejected | Logps/chosen | Logits/rejected | Logits/chosen |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.717 | 1.0 | 3223 | 0.6773 | -6.7817 | -7.2423 | 0.6513 | 0.4606 | -163.6990 | -157.3790 | -76.4738 | -76.4513 |
| 0.3122 | 2.0 | 6446 | 0.7910 | -12.1665 | -13.1665 | 0.6675 | 1.0000 | -222.9408 | -211.2272 | -85.8639 | -85.9837 |
| 0.0481 | 3.0 | 9669 | 1.0022 | -17.7008 | -19.2025 | 0.6638 | 1.5016 | -283.3009 | -266.5706 | -79.0250 | -79.1854 |
Base model
openai-community/gpt2