ybisk/piqa
Updated • 60.7k • 104
How to use LouisSanna/orpo-model-output with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="LouisSanna/orpo-model-output") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("LouisSanna/orpo-model-output")
model = AutoModelForCausalLM.from_pretrained("LouisSanna/orpo-model-output")How to use LouisSanna/orpo-model-output with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "LouisSanna/orpo-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/orpo-model-output",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/LouisSanna/orpo-model-output
How to use LouisSanna/orpo-model-output with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "LouisSanna/orpo-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/orpo-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/orpo-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/orpo-model-output",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use LouisSanna/orpo-model-output with Docker Model Runner:
docker model run hf.co/LouisSanna/orpo-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 | Nll Loss | Log Odds Ratio | Log Odds Chosen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3.1799 | 1.0 | 3223 | 3.1575 | -0.2992 | -0.3103 | 0.6472 | 0.0111 | -3.1030 | -2.9917 | -16.2781 | -16.3180 | 3.0900 | -0.6758 | 0.1201 |
| 2.7077 | 2.0 | 6446 | 3.1544 | -0.3005 | -0.3160 | 0.6652 | 0.0154 | -3.1595 | -3.0051 | -21.7517 | -21.8387 | 3.0878 | -0.6671 | 0.1676 |
| 2.2691 | 3.0 | 9669 | 3.2999 | -0.3182 | -0.3369 | 0.6693 | 0.0187 | -3.3688 | -3.1821 | -24.5739 | -24.6603 | 3.2330 | -0.6695 | 0.2013 |
Base model
openai-community/gpt2