Anthropic/hh-rlhf
Viewer • Updated • 169k • 34.2k • 1.94k
How to use jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64")
model = AutoModelForCausalLM.from_pretrained("jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64", 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 jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64
How to use jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64" \
--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": "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64",
"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 "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64" \
--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": "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64 with Docker Model Runner:
docker model run hf.co/jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64
docker model run hf.co/jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64This model is a fine-tuned version of /scratch/qu.yang1/dynamic-dpo-v4/outputs/qwen3-8b-base-sft-hh-harmless-4xh200-batch-64-20260417-214452 on the Anthropic/hh-rlhf 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 | Beta Dpo/beta | Beta Dpo/loss Margin Mean | Beta Dpo/beta Margin Mean | Beta Dpo/beta Margin Std | Beta Dpo/beta Margin Grad Mean | Beta Dpo/beta Margin Grad Std | Beta Dpo/gap Mean | Beta Dpo/gap Std | Beta Dpo/beta Used Raw | Beta Dpo/beta Used | Beta Dpo/mask Keep Frac | Logits/chosen | Logits/rejected |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.3421 | 0.1468 | 100 | 0.6724 | 0.1051 | 0.4154 | 0.0454 | 0.1109 | -0.4887 | 0.0276 | 0.3297 | 0.9661 | 0.1051 | 0.1051 | 1.0 | 1.9351 | 2.0227 |
| 1.1746 | 0.2937 | 200 | 0.5979 | 0.1463 | 3.4910 | 0.5960 | 1.1231 | -0.3984 | 0.1967 | 2.7526 | 6.6589 | 0.1443 | 0.1463 | 1.0 | 2.4745 | 2.5521 |
| 1.0588 | 0.4405 | 300 | 0.6234 | 0.1568 | 7.0255 | 1.3113 | 2.0548 | -0.3561 | 0.2381 | 6.2446 | 12.2876 | 0.1469 | 0.1568 | 1.0 | 2.5889 | 2.6667 |
| 1.0387 | 0.5874 | 400 | 0.5861 | 0.0864 | 8.3161 | 0.9103 | 1.2402 | -0.3898 | 0.1540 | 9.0513 | 15.3829 | 0.0559 | 0.0864 | 1.0 | 2.2982 | 2.3580 |
| 1.3836 | 0.7342 | 500 | 0.6929 | 0.2278 | 9.2738 | 2.4511 | 3.5401 | -0.3173 | 0.2780 | 7.2783 | 15.5833 | 0.2197 | 0.2278 | 1.0 | 2.3062 | 2.3664 |
| 1.1032 | 0.8811 | 600 | 0.6201 | 0.1744 | 9.2097 | 1.8984 | 2.6738 | -0.3317 | 0.2463 | 8.2231 | 14.9607 | 0.1592 | 0.1744 | 1.0 | 2.4073 | 2.4748 |
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jackf857/qwen3-8b-base-beta-dpo-hh-helpful-4xh200-batch-64", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'