rubricreward/R3-Dataset-4K
Viewer • Updated • 3.95k • 132 • 2
How to use rubricreward/R3-Qwen3-14B-4k with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="rubricreward/R3-Qwen3-14B-4k")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("rubricreward/R3-Qwen3-14B-4k")
model = AutoModelForCausalLM.from_pretrained("rubricreward/R3-Qwen3-14B-4k")
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 rubricreward/R3-Qwen3-14B-4k with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "rubricreward/R3-Qwen3-14B-4k"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "rubricreward/R3-Qwen3-14B-4k",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/rubricreward/R3-Qwen3-14B-4k
How to use rubricreward/R3-Qwen3-14B-4k with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "rubricreward/R3-Qwen3-14B-4k" \
--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": "rubricreward/R3-Qwen3-14B-4k",
"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 "rubricreward/R3-Qwen3-14B-4k" \
--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": "rubricreward/R3-Qwen3-14B-4k",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use rubricreward/R3-Qwen3-14B-4k with Docker Model Runner:
docker model run hf.co/rubricreward/R3-Qwen3-14B-4k
R3-Qwen3-14B-4k is part of the R3 family, a series of Robust Rubric-Agnostic Reward Models. We perform SFT on the Qwen3 model family on the 4B, 8B, and 14B scales as well as on Phi-4-reasoning plus. Check out our paper for more information!
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
model_path = "rubricreward/R3-Qwen3-14B-4k"
tokenizer = AutoTokenizer.from_pretrained(model_path)
sampling_params = SamplingParams(temperature=0.6, top_p=0.95, max_tokens=8192, min_p=0, top_k=20)
llm = LLM(
model=model_path,
dtype="bfloat16",
max_model_len=10000,
tensor_parallel_size=2,
gpu_memory_utilization=0.9,
enforce_eager=True,
)
messages: list[dict[str, str]] = [
{'content': "Evaluate the response based on the given task, input, response, and evaluation rubric. Provide a fair and detailed assessment following the rubric...", 'role': 'user'}
]
list_text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=True # Switch between thinking and non-thinking modes.
)
outputs = llm.generate(list_text, sampling_params)
R3 is licensed under the Apache 2.0 license.
@article{anugraha2025r3,
title={R3: Robust Rubric-Agnostic Reward Models},
author={Anugraha, David and Tang, Zilu and Miranda, Lester James V. and Zhao, Hanyang and Farhansyah, Mohammad Rifqi and Kuwanto, Garry and Wijaya, Derry and Winata, Genta Indra},
journal={arXiv preprint arXiv:2505.13388},
year={2025}
}
Base model
Qwen/Qwen3-14B-Base