grpo-rlvr-training
Train reasoning and verifiable-task behavior with GRPO and reinforcement learning from verifiable rewards (RLVR)
Install / Use
npx skills add wshobson/agents --skill grpo-rlvr-trainingInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Education & ResearchSupported Platforms
Our assessment of grpo-rlvr-training
grpo-rlvr-training scores 90/100 on our quality scale, 26th of 127 Education & Research skills we index (top 21%).
Its SKILL.md is 7.6 KB long, split into 7 sections with 1 code example: a thorough specification that gives an agent plenty to work with.
With 39,920 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated 5 days ago, so grpo-rlvr-training is actively maintained.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-26. Automated pattern scan on 2026-09-25. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
grpo-rlvr-training compared with similar skills
All 4 of these similar skills score higher than grpo-rlvr-training; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| grpo-rlvr-training (this skill)by wshobson | 90 | 39.9k | 5d ago | SKILL.md |
| last30days-skillby mvanhorn | 100 | 62.8k | 2d ago | CLAUDE.md |
| algorithmic-artby anthropics | 100 | 177.9k | 3d ago | SKILL.md |
| pptxby anthropics | 100 | 177.9k | 3d ago | SKILL.md |
| designby nextlevelbuilder | 100 | 130.2k | 4d ago | SKILL.md |
Frequently asked questions
- How do I install grpo-rlvr-training?
- Run
npx skills add wshobson/agents --skill grpo-rlvr-training. The install tabs above show the steps for each supported agent. - Which AI agents does grpo-rlvr-training work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is grpo-rlvr-training safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is grpo-rlvr-training still maintained?
- The repository was last updated 5 days ago, so grpo-rlvr-training is actively maintained.
Skill content
View source on GitHubname: grpo-rlvr-training description: Train reasoning and verifiable-task behavior with GRPO and reinforcement learning from verifiable rewards (RLVR). Use when task success is algorithmically checkable (math, code, tool calls, structured output), when designing GRPO reward functions, or when a GRPO run diverges or reward-hacks.
GRPO & RLVR Training
This skill assumes finetuning-method-selection
already routed here because the target behavior
has a verifiable pass/fail signal — not
demonstrations (lora-qlora-recipes) or
preference pairs (preference-optimization).
What follows is when RL is the right tool, the
reference recipe, the mandatory reward-inspection
gate, and how to pick a GRPO variant when the
base recipe misbehaves.
Input: a routing decision (RLVR via GRPO)
plus a verifier (code executor, test suite,
schema checker, or grader) for the target task.
Output format: a validated GRPO config — the
kwarg values in references/grpo-memory.md and
the reward functions in
references/reward-functions.md, not free-form
advice — that llm-finetuning-training-engineer
consumes directly.
When RL Applies
GRPO+RLVR only pays off when task success is
algorithmically checkable — a unit test
passes, a parser accepts the output, a tool call
matches an expected schema, a math answer matches
a ground truth. If grading the output requires
human judgment or a subjective rubric, that's an
eval-harness and judge-calibration problem first
— see eval-harness-first — not a reason to skip
straight to RL.
Before opening a GRPO run, confirm the model can sometimes succeed on the target task already. RL sharpens an existing capability by reweighting toward the samples that already work; it does not install a capability from zero.
- The model never succeeds, even at low
temperature across many samples: the gap is
format or task understanding, not policy
refinement. Route back to SFT first
(
lora-qlora-recipes) and only return to this skill once the base success rate is nonzero. - The model succeeds sometimes, inconsistently: this is the GRPO sweet spot — proceed to The Recipe below.
The standing rule for the whole plugin: DPO for
taste, GRPO for reasoning. If the signal is a
preference between two acceptable outputs, that's
preference-optimization, not this skill.
The Recipe
The reference recipe is TRL's GRPOTrainer with
vLLM-backed generation:
from trl import GRPOConfig, GRPOTrainer
grpo_args = GRPOConfig(
output_dir="./outputs-grpo",
use_vllm=True,
vllm_mode="colocate", # single GPU; "server" for multi-GPU
num_generations=8, # floor — fewer starves the group-relative baseline
learning_rate=5e-7, # settled range for GRPO
beta=0.01, # KL coefficient vs the reference policy
per_device_train_batch_size=8,
gradient_accumulation_steps=4,
bf16=True,
logging_steps=10,
seed=3407,
)
trainer = GRPOTrainer(
model=SFT_CHECKPOINT,
args=grpo_args,
reward_funcs=[format_reward, correctness_reward], # references/reward-functions.md
train_dataset=prompts, # prompt-only — GRPO generates its own completions
processing_class=tokenizer,
)
trainer.train()
vllm_mode="colocate"runs generation and training on the same GPU — the default for a single-GPU box.vllm_mode="server"points at a separate vLLM server process and is the multi-GPU path — generation and training don't compete for the same device.num_generations≥ 8 is a floor, not a suggestion: GRPO's advantage estimate is relative to the group mean, and fewer than 8 samples per prompt produces a noisy baseline.- Reward is composite — a format reward (did the output parse / match the required structure) plus a correctness reward (did the answer verify). A well-formed-but-wrong answer and a malformed one should not score identically; correctness alone loses that signal.
learning_rate=5e-7andbeta=0.01are the settled starting point; deviate only after the base run is stable and reward-inspected (below).
Memory sizing for this recipe by target size
class: references/grpo-memory.md.
The Inspection Rule
Run the reward function against 50–100 sampled outputs and manually read the results before starting the actual training run. This is a gate, not a one-time sanity check.
If the reward function's judgment disagrees with a human reading of that sample, fix the reward function first. Training against an uninspected reward, or tuning hyperparameters to compensate for one silently scoring the wrong thing, is how a run reward-hacks: the model optimizes cleanly toward the wrong target, and that doesn't surface as a training-loop bug.
This inspection is a Phase 1 gate input for
/finetune — the same 50–100-sample read that
catches a broken reward function here is what that
command checks for before it lets a GRPO brief
proceed.
Complete reward function implementations to
inspect against — exact-match, schema-validation,
unit-test-execution, a length-penalty wrapper, and
a rubric-as-reward judge pattern:
references/reward-functions.md.
Variant Selection
The base recipe above is the default. Reach for a variant only when a specific failure mode shows up, not preemptively:
| Failure mode | Variant | Why | |---|---|---| | Entropy collapse / degenerate long chain-of-thought | DAPO | Decouples clip bounds and relaxes the KL penalty that over-regularizes exploration on long reasoning traces | | Reward or output length trends up regardless of quality | Dr.GRPO | Removes GRPO's length-normalization bias so reward tracks correctness, not completion length | | Training a mixture-of-experts model | GSPO | Moves the importance-sampling ratio to the sequence level instead of per-token — per-token ratios are unstable on MoE routing, so GSPO is required here, not optional |
Start with plain GRPO. Watch for the specific symptom — collapsing entropy on long CoT, a length-reward correlation, or MoE instability — and only then swap in the matching variant above. Don't pre-select a variant before the base recipe has actually shown the failure mode.
VLM RL Is Reference-Only
Vision-language RL is not executed by this plugin in v1 — it's documented here for context, not as a runnable path. Tooling is fragmented across ms-swift and EasyR1-derived forks with no one-line TRL command yet, and naive text-only GRPO applied to a VLM tends to reward-hack by optimizing the text-reasoning trace while ignoring the image — the model learns to sound right without looking at the input. A VLM RL run is a research spike outside this skill's supported recipe, not a variant of The Recipe above.
References
references/reward-functions.md— complete Python reward functions (exact-match correctness, schema validation, unit-test execution, a length-penalty wrapper, and a rubric-as-reward judge pattern) to inspect under The Inspection Rule before any training run.references/grpo-memory.md— memory sizing by target size class, vLLM sleep-mode and optimizer-state tactics, Unsloth's long-context RL chunking, and the DGX Spark bandwidth caveat for decode-heavy rollouts.
Related skills: finetuning-method-selection
routes here once a verifiable pass/fail signal
exists; preference-optimization is the sibling
skill for preference pairs rather than verifiable
rewards; eval-harness-first covers judge
calibration for any reward that isn't purely
code-checkable. On DGX Spark, defer to the
dgx-spark-ops plugin's skills, when installed,
for the memory/thermal remediation ladder this
skill's memory table doesn't cover.
Related Skills
last30days-skill
62.8kAI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
algorithmic-art
177.9kCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
pptx
177.9kUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an em…
design
130.2kComprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, or MuAPI AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social/ads/web/print), icon design (15 styles, SVG…
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
