Anthropic/hh-rlhf
Viewer • Updated • 169k • 34.2k • 1.94k
How to use jackf857/qwen3-8b-base-beta-dpo-hh-harmless-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-harmless-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-harmless-4xh200-batch-64")
model = AutoModelForCausalLM.from_pretrained("jackf857/qwen3-8b-base-beta-dpo-hh-harmless-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-harmless-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-harmless-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-harmless-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-harmless-4xh200-batch-64
How to use jackf857/qwen3-8b-base-beta-dpo-hh-harmless-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-harmless-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-harmless-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-harmless-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-harmless-4xh200-batch-64",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use jackf857/qwen3-8b-base-beta-dpo-hh-harmless-4xh200-batch-64 with Docker Model Runner:
docker model run hf.co/jackf857/qwen3-8b-base-beta-dpo-hh-harmless-4xh200-batch-64
This model is a fine-tuned version of /scratch/qu.yang1/dynamic-dpo-v4/outputs/qwen3-8b-base-sft-hh-helpful-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.3654 | 0.1512 | 100 | 0.6641 | 0.1110 | 0.6060 | 0.0717 | 0.2130 | -0.4824 | 0.0521 | 0.4233 | 1.6301 | 0.1110 | 0.1110 | 1.0 | 1.3014 | 1.2543 |
| 0.9954 | 0.3023 | 200 | 0.6120 | 0.0999 | 4.1607 | 0.5099 | 0.9505 | -0.4145 | 0.1620 | 4.2136 | 9.3730 | 0.0968 | 0.0999 | 1.0 | 0.9179 | 0.8638 |
| 1.2007 | 0.4535 | 300 | 0.6115 | 0.1346 | 6.6135 | 1.0588 | 1.7069 | -0.3695 | 0.2169 | 6.1583 | 12.2942 | 0.1273 | 0.1346 | 1.0 | 1.2327 | 1.1646 |
| 1.3823 | 0.6047 | 400 | 0.5951 | 0.1019 | 6.9792 | 0.8735 | 1.3552 | -0.3881 | 0.1738 | 7.2064 | 12.6529 | 0.0864 | 0.1019 | 1.0 | 1.2965 | 1.2260 |
| 1.2301 | 0.7559 | 500 | 0.6311 | 0.1290 | 8.6766 | 1.3653 | 2.0186 | -0.3625 | 0.2097 | 8.4351 | 15.6317 | 0.1145 | 0.1290 | 1.0 | 1.2194 | 1.1512 |
| 1.0426 | 0.9070 | 600 | 0.6518 | 0.1628 | 8.6336 | 1.6614 | 2.5181 | -0.3428 | 0.2482 | 7.7476 | 14.8995 | 0.1532 | 0.1628 | 1.0 | 1.2071 | 1.1403 |
docker model run hf.co/jackf857/qwen3-8b-base-beta-dpo-hh-harmless-4xh200-batch-64