HuggingFaceH4/ultrafeedback_binarized
Viewer β’ Updated β’ 187k β’ 15.9k β’ 342
How to use statking/zephyr-7b-sft-full-orpo with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="statking/zephyr-7b-sft-full-orpo", device_map="auto")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("statking/zephyr-7b-sft-full-orpo")
model = AutoModelForCausalLM.from_pretrained("statking/zephyr-7b-sft-full-orpo", device_map="auto")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use statking/zephyr-7b-sft-full-orpo with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "statking/zephyr-7b-sft-full-orpo"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "statking/zephyr-7b-sft-full-orpo",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/statking/zephyr-7b-sft-full-orpo
How to use statking/zephyr-7b-sft-full-orpo with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "statking/zephyr-7b-sft-full-orpo" \
--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": "statking/zephyr-7b-sft-full-orpo",
"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 "statking/zephyr-7b-sft-full-orpo" \
--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": "statking/zephyr-7b-sft-full-orpo",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use statking/zephyr-7b-sft-full-orpo with Docker Model Runner:
docker model run hf.co/statking/zephyr-7b-sft-full-orpo
This model is a fine-tuned version of mistralai/Mistral-7B-v0.1 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 | Nll Loss | Log Odds Ratio | Log Odds Chosen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.5226 | 0.1049 | 100 | 0.5280 | -0.0386 | -0.0472 | 0.6329 | 0.0086 | -0.9448 | -0.7728 | -2.7583 | -2.7860 | 0.4953 | -0.6326 | 0.2873 |
| 0.5074 | 0.2098 | 200 | 0.5134 | -0.0381 | -0.0478 | 0.6409 | 0.0098 | -0.9566 | -0.7612 | -2.6736 | -2.7002 | 0.4774 | -0.6357 | 0.3190 |
| 0.5265 | 0.3146 | 300 | 0.5012 | -0.0379 | -0.0479 | 0.6329 | 0.0099 | -0.9572 | -0.7588 | -2.7317 | -2.7594 | 0.4653 | -0.6374 | 0.3278 |
| 0.5194 | 0.4195 | 400 | 0.4912 | -0.0371 | -0.0478 | 0.6429 | 0.0107 | -0.9559 | -0.7417 | -2.6640 | -2.6974 | 0.4560 | -0.6284 | 0.3607 |
| 0.5008 | 0.5244 | 500 | 0.4847 | -0.0373 | -0.0489 | 0.6508 | 0.0117 | -0.9786 | -0.7455 | -2.5957 | -2.6294 | 0.4499 | -0.6209 | 0.3873 |
| 0.4725 | 0.6293 | 600 | 0.4794 | -0.0362 | -0.0470 | 0.6349 | 0.0107 | -0.9394 | -0.7248 | -2.6147 | -2.6477 | 0.4435 | -0.6320 | 0.3567 |
| 0.4875 | 0.7341 | 700 | 0.4767 | -0.0368 | -0.0498 | 0.6409 | 0.0129 | -0.9955 | -0.7365 | -2.6910 | -2.7213 | 0.4416 | -0.6158 | 0.4180 |
| 0.4796 | 0.8390 | 800 | 0.4740 | -0.0371 | -0.0508 | 0.6508 | 0.0137 | -1.0162 | -0.7416 | -2.7913 | -2.8114 | 0.4396 | -0.6169 | 0.4363 |
| 0.4851 | 0.9439 | 900 | 0.4714 | -0.0357 | -0.0466 | 0.6528 | 0.0109 | -0.9324 | -0.7143 | -2.9543 | -2.9692 | 0.4361 | -0.6245 | 0.3669 |