Part 15 of 15 in LLM fine-tuning techniques

Reinforcement Learning with Verifiable Rewards (RLVR) trains a language model with reinforcement learning where the reward comes from a program that checks the answer, not from a learned reward model. The Allen Institute for AI (Ai2) named it in its November 2024 Tülu 3 report, using math answers and checkable instruction constraints (arXiv).

29,946
Prompts with verifiers in Tülu 3's RLVR set
Tülu 3, Table 22
84.3% → 87.6%
GSM8K, Tülu 3 8B DPO → RLVR
Tülu 3, Table 23
10 or 0
Reward per answer: α if correct, else 0
Tülu 3, Sec. 6

What is RLVR?

RLVR is reinforcement learning in which a deterministic function decides the reward: the model gets a fixed reward when its answer is verifiably correct and nothing otherwise. Tülu 3 describes it as leveraging "the existing RLHF objective but replac[ing] the reward model with a verification function" (Lambert et al., 2024, Sec. 6).

It only works for tasks where correctness can be checked by code. Tülu 3 used three: grade-school math (GSM8K), competition math (MATH) and instruction following with verifiable constraints (IFEval-style, such as "answer in under 100 words"). DeepSeek-R1 applied the same idea, under the name "rule-based rewards", to math, coding and logic (DeepSeek-R1, Sec. 2.2).

How does RLVR work?

The model answers a prompt with a known ground truth, a verifier checks the answer, and RL updates the model toward higher reward while a KL penalty keeps it near the starting model. In Tülu 3 the reward v(x, y) is α if correct and 0 otherwise, with α = 10, optimized with PPO (Tülu 3, Sec. 6, Eq. 7–8).

Diagram of RLVR: prompts with ground truth go to the policy model, its completions go to a verifier that checks answer match or constraints, the verifier returns a reward of alpha (10) or 0, and a PPO update with a KL penalty feeds back to the policy; with Tülu 3's prompt counts

The objective in the paper (Eq. 7) is the RLHF objective with the reward model swapped out:

maximize E[ v(x, y) − β · KL(π_θ(y|x) ‖ π_ref(y|x)) ]

where v is the verifier. Tülu 3's footnote says this is "very similar to the standard KL-constrained RLHF objective ... with a reward function instead of a learned reward model."

What does a verifier actually check?

Each Tülu 3 data source came with its own check (Sec. 6.1, Table 22):

DataPromptsHow the answer is verified
GSM8K train7,473Extract the final number, exact match against the label
MATH train7,500Extract the answer, compare with "flex" MATH evaluation logic
IF verifiable14,973A verification function per constraint template
Total29,946

DeepSeek-R1's rule-based rewards follow the same pattern. Math answers must appear "in a specified format (e.g., within a box)" for "reliable rule-based verification", code is run "against a suite of predefined test cases", and a separate format reward requires the reasoning inside <think> tags. The two are added with equal weight (DeepSeek-R1, Sec. 2.2).

Worked example: scoring one batch

Take one GSM8K-style prompt whose label is 42 and three sampled answers. Rewards under Tülu 3's rules (α = 10, plus its −10 penalty for answers that hit the length limit without an end-of-sequence token, Sec. 6.2); our arithmetic:

Completion ends withVerifier resultReward
"... so the answer is 42."Extracted 42 = label10
"... so the answer is 40."Extracted 40 ≠ label0
(cut off at the max length, no EOS token)No final answer0 − 10 = −10

No partial credit and no judge model: the reward depends only on whether the extracted answer matches. Tülu 3 then normalizes advantages by subtracting the mean and dividing by the standard deviation, a standard PPO detail (Sec. 6.2).

When was RLVR introduced, and by whom?

The name comes from "Tülu 3: Pushing Frontiers in Open Language Model Post-Training" by Nathan Lambert and 22 co-authors at the Allen Institute for AI and the University of Washington, posted to arXiv on November 22, 2024. The abstract calls it "a novel method we call Reinforcement Learning with Verifiable Rewards (RLVR)" (arXiv 2411.15124).

The report credits earlier work using correct answers as a training signal, including STaR, TRICE, VinePPO (binary rewards from GSM8K and MATH) and code execution feedback. It says RLVR differs by using an existing RL algorithm (PPO) "entirely online with binary rewards" and by extending beyond math to precise instruction following (Sec. 9.2). DeepSeek-R1, posted January 22, 2025, uses rule-based rewards but does not use the term RLVR.

What results did the RLVR papers report?

In Tülu 3, RLVR applied after DPO raised the 8B model on all three targeted benchmarks: GSM8K from 84.3% to 87.6%, MATH from 42.0% to 43.7%, and IFEval from 81.1% to 82.4%. At 70B the gains were smaller, and GSM8K did not change (Tülu 3, Table 23).

Benchmark8B DPO8B RLVR70B DPO70B RLVR
GSM8K (8-shot CoT)84.387.693.593.5
MATH (4-shot CoT, flex)42.043.762.363.0
IFEval (strict)81.182.482.683.2
Average, all evals64.464.875.976.0

Source: Tülu 3, Table 23. The paper attributes the flat 70B GSM8K result to the benchmark being "already close to saturation (93.5%)".

Other reported findings:

  • Some 8B runs reached "GSM8k scores of up to 89.4% and IFEval scores of up to 84.8%", but those models "tended to perform worse in other metrics" (Sec. 6.4).
  • For the 405B model, RLVR used only the MATH set: "even with as few as 25 RLVR steps, MATH performance improved by over 5 points". Training stopped at 75 steps because of compute limits (Sec. 8.1).
  • In ablations, "using only the verifiable rewards outperforms using scores from the reward model" (Sec. 6.2, Fig. 22).

DeepSeek-R1-Zero, trained with rule-based rewards and GRPO directly on a base model, raised its average AIME 2024 pass@1 "from an initial 15.6% to 77.9%" (DeepSeek-R1, Sec. 2.3).

How is RLVR different from RLHF, GRPO and DPO?

RLVR changes the reward, not the optimizer. RLHF trains a reward model on human preferences and optimizes it with RL; RLVR keeps the RL step and replaces the learned reward with a correctness check. Tülu 3 ran RLVR with PPO and noted that value-model-free algorithms such as GRPO are an option (Tülu 3, Sec. 6, 8.1).

RLHFRLAIFDPOGRPORLVR
What it definesReward from human preferencesPreference labels from an AI modelLoss on preference pairsRL algorithmReward from a verifier
Learned reward modelYesTypically, trained on AI labelsNo (implicit)OptionalNo
Needs checkable answersNoNoNoNoYes
Typical tasksHelpfulness, styleSame as RLHFSame as RLHFAny rewardMath, code, constraints

GRPO and RLVR combine naturally: DeepSeek-R1-Zero is GRPO with rule-based (verifiable) rewards. DPO is offline and uses no rewards, and in Tülu 3 it ran before RLVR in the pipeline: SFT, then DPO, then RLVR. RLAIF changes who labels preferences, which still requires judgment rather than a check.

Which libraries support RLVR?

RLVR has no dedicated trainer class in TRL; you run it by passing a verification function as the reward to GRPOTrainer. TRL's docs show reward functions that check a \boxed{} answer against a ground_truth column, and ship accuracy_reward for math answers (TRL GRPO docs).

Ai2's Open Instruct, the codebase behind Tülu 3, states it includes "reinforcement learning with verifiable rewards (RLVR)" code, with GRPO scripts (grpo.py, grpo_fast.py) and a script to reproduce Llama-3.1-Tulu-3.1-8B. Its README calls it "a research codebase" that "does not guarantee backward compatibility", and its launch scripts target Ai2's Beaker clusters, so we show TRL below. Ai2 published its RLVR prompts on Hugging Face as allenai/RLVR-GSM-MATH-IF-Mixed-Constraints (Tülu 3, Table 1).

How do you use RLVR in code?

In TRL, write a reward function that returns 1.0 when the answer checks out and 0.0 otherwise, and pass it to GRPOTrainer with a dataset holding the ground truth. Extra dataset columns such as ground_truth reach the function as keyword arguments (TRL GRPO docs, v1.19.0).

import re
from datasets import Dataset
from trl import GRPOConfig, GRPOTrainer

def verifiable_reward(completions, ground_truth, **kwargs):
    # 1.0 if the \boxed{} answer matches the label exactly, else 0.0
    found = [re.search(r"\\boxed\{(.*?)\}", c) for c in completions]
    return [1.0 if m and m.group(1).strip() == gt else 0.0
            for m, gt in zip(found, ground_truth)]

dataset = Dataset.from_list([
    {"prompt": "What is 6 * 7? Put the final answer in \\boxed{}.", "ground_truth": "42"},
    {"prompt": "What is 15 + 27? Put the final answer in \\boxed{}.", "ground_truth": "42"},
])

trainer = GRPOTrainer(
    model="Qwen/Qwen2.5-0.5B-Instruct",
    reward_funcs=verifiable_reward,
    args=GRPOConfig(output_dir="Qwen2.5-0.5B-RLVR"),
    train_dataset=dataset,
)
trainer.train()

This is a two-row toy to show the shape; real runs use thousands of prompts, like Tülu 3's 29,946. For math with equivalent forms (1/2 vs 0.5), TRL's accuracy_reward uses the math-verify package instead of string matching and reads the label from a solution column (TRL Reward Functions docs).

Common pitfalls with RLVR

  • Over-optimization. Tülu 3 found that "more KL divergence typically results in lower average scores" and showed over-optimized outputs from high-KL IFEval runs (Sec. 6.2, Appendix B.4). It picked final checkpoints on a development set every 40–100 steps.
  • Mixing in reward-model scores. Adding reward-model scores to the verifiable reward "seems to introduce more noise, especially in the average scores" (Tülu 3, Sec. 6.2).
  • Unfinished answers. PPO samples to a fixed token limit; Tülu 3 gave a −10 penalty to responses without an end-of-sequence token "to encourage the model to always complete its responses" (Sec. 6.2).
  • Dropout during RL. Tülu 3 set dropout to 0 so token log-probabilities match between rollout and training; otherwise "all ratios could potentially be clipped, resulting in zero gradient" (Sec. 6.2).
  • Answers the checker can't parse. Verification depends on extracting an answer, which is why DeepSeek-R1 required a specified format such as a box (Sec. 2.2) and Tülu 3 added the standard few-shot chain-of-thought prompts (Sec. 6.1).
  • Tasks without a checker. DeepSeek-R1 notes that dependable rule-based rewards "are difficult to construct for certain tasks, such as writing", and model-assigned rewards are "more susceptible to exploitation" (Sec. 6, limitations).
  • Starting point. Tülu 3 found SFT and DPO starting points reached the same verifiable reward, but SFT incurred more KL, and "starting from a stronger model usually results in better test set performance" (Sec. 6.2).

FAQ

What does RLVR stand for?

Reinforcement Learning with Verifiable Rewards. The Tülu 3 report from the Allen Institute for AI introduced the name in November 2024.

Is RLVR the same as GRPO?

No. RLVR is a choice of reward (a verifier); GRPO is an RL algorithm. Tülu 3 optimized verifiable rewards with PPO, while DeepSeek-R1 optimized rule-based rewards with GRPO.

Does RLVR need a reward model?

Not for the reward. Tülu 3 used PPO, which still needs a value model, and found initializing it from a general reward model worked best. With GRPO no value model is needed.

What tasks can RLVR train?

Tasks where code can check the answer. Tülu 3 used math word problems, competition math and instruction constraints; DeepSeek-R1 also used code tested against predefined test cases.

Did DeepSeek-R1 use RLVR?

DeepSeek-R1 calls its approach "rule-based rewards": accuracy and format rewards for math, coding and logic. That matches RLVR's definition, though the paper does not use the term.

How much does RLVR improve a model?

In Tülu 3, RLVR after DPO raised the 8B model's GSM8K score from 84.3% to 87.6% and MATH from 42.0% to 43.7%. At 70B, GSM8K stayed at 93.5%.

Can you do RLVR with Hugging Face TRL?

Yes, by passing a verification function as reward_funcs to GRPOTrainer. TRL also ships accuracy_reward, which checks math answers with the math-verify package.

Sources

  1. Lambert, N., Morrison, J., Pyatkin, V., Huang, S., Ivison, H., et al. "Tülu 3: Pushing Frontiers in Open Language Model Post-Training." arXiv 2411.15124, Nov. 22, 2024 (v5 Apr. 14, 2025). Read Dec. 4, 2026.
  2. Hugging Face. "GRPO Trainer." TRL documentation, v1.19.0. Read Dec. 4, 2026.
  3. Hugging Face. "Reward Functions." TRL documentation, v1.19.0. Read Dec. 4, 2026.
  4. Ai2. "Open Instruct documentation" and "README." Read Dec. 4, 2026.
  5. DeepSeek-AI (Guo, D., et al.). "DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning." arXiv 2501.12948, Jan. 22, 2025 (v2 Jan. 4, 2026); Nature 645, 633–638 (2025). Read Dec. 4, 2026.
  6. Shao, Z., et al. "DeepSeekMath." arXiv 2402.03300, Feb. 5, 2024. Read Dec. 4, 2026.

Series: ← Prev: GRPO · All 15 techniques · Next: LLM fine-tuning techniques →

  • #llm-fine-tuning
  • #rlvr
  • #alignment
  • #reinforcement-learning
  • #tulu-3