HuggingFaceH4/ultrafeedback_binarized
Viewer • Updated • 187k • 14.9k • 340
How to use imelnyk/slm-2-dpo-full with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="imelnyk/slm-2-dpo-full", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("imelnyk/slm-2-dpo-full", trust_remote_code=True, dtype="auto")How to use imelnyk/slm-2-dpo-full with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "imelnyk/slm-2-dpo-full"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "imelnyk/slm-2-dpo-full",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/imelnyk/slm-2-dpo-full
How to use imelnyk/slm-2-dpo-full with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "imelnyk/slm-2-dpo-full" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "imelnyk/slm-2-dpo-full",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "imelnyk/slm-2-dpo-full" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "imelnyk/slm-2-dpo-full",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use imelnyk/slm-2-dpo-full with Docker Model Runner:
docker model run hf.co/imelnyk/slm-2-dpo-full
This model is a fine-tuned version of stabilityai/stablelm-2-zephyr-1_6b on the HuggingFaceH4/ultrafeedback_binarized 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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 16.8403 | 0.13 | 100 | 19.5118 | 0.0256 | 0.0173 | 0.5273 | 0.0082 | -2491.9011 | -2806.5552 | -1.6068 | -1.6730 |
| 28.1241 | 0.26 | 200 | 32.5175 | 0.0085 | -0.0039 | 0.5234 | 0.0124 | -2494.0195 | -2808.2581 | -1.6183 | -1.6812 |
| 84.7591 | 0.39 | 300 | 47.8043 | 0.0297 | 0.0136 | 0.5391 | 0.0161 | -2492.2703 | -2806.1406 | -1.5968 | -1.6601 |
| 40.7835 | 0.52 | 400 | 30.6722 | 0.0168 | -0.0029 | 0.5547 | 0.0197 | -2493.9204 | -2807.4263 | -1.6288 | -1.6917 |
| 36.2204 | 0.65 | 500 | 31.2202 | 0.0303 | 0.0209 | 0.5352 | 0.0095 | -2491.5447 | -2806.0762 | -1.6236 | -1.6843 |
| 99.7738 | 0.78 | 600 | 33.7403 | 0.0476 | 0.0372 | 0.5391 | 0.0104 | -2489.9089 | -2804.3484 | -1.6222 | -1.6827 |
| 41.8506 | 0.92 | 700 | 32.9133 | 0.0301 | 0.0195 | 0.5547 | 0.0106 | -2491.6851 | -2806.1006 | -1.6211 | -1.6823 |
Base model
stabilityai/stablelm-2-zephyr-1_6b