grpo-rlvr-training
하는 일
이 기능은 수학 문제를 푸는 것이나 코드를 쓰는 것처럼 자동으로 확인할 수 있는 작업을 위해 AI를 학습시킵니다. GRPO라는 방법과 강화 학습을 사용해 AI가 정답을 맞히도록 배우게 합니다.
사용하는 경우
- ✓AI가 수학 문제를 풀어야 할 때.
- ✓AI가 제대로 작동하는 코드를 쓰기를 원할 때.
- ✓AI의 작업에 명확한 '맞음' 또는 '틀림' 답이 있을 때.
스킬 링크
https://github.com/wshobson/agents/blob/main/plugins/llm-finetuning/skills/grpo-rlvr-training/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“AI가 수학 방정식을 풀고 답이 맞는지 확인하도록 학습시켜 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI에게 작업을 주면 AI가 풀어 봅니다. 시스템이 자동으로 답이 맞는지 확인합니다. 맞으면 AI는 보상을 받고 더 잘하도록 배웁니다. 틀리면 다시 시도합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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.
…
자주 묻는 질문
'검증 가능하다'는 무슨 뜻인가요?
사람이 판단하지 않아도 컴퓨터가 답이 맞는지 틀린지 확실히 알 수 있다는 뜻입니다.
이 기능을 쓰지 말아야 하는 경우는 언제인가요?
시를 쓰거나 조언을 하는 것처럼 사람의 의견이 필요한 작업이라면 이 기능은 적합하지 않습니다. 객관적인 답이 있는 작업에 가장 잘 맞습니다.
AI가 아무것도 맞히지 못하면 어떻게 하나요?
조정을 해도 계속 맞히지 못한다면 기초 학습이 더 필요할 수 있습니다. 이 기능은 AI가 이미 조금 할 줄 아는 기술을 향상시키는 데 쓰며, 처음부터 가르치는 용도가 아닙니다.
상세 정보
작성자의 원본 설명
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.
repo: wshobson/agents
인기도
- GitHub 스타
- 41k
- 순위
- #6732
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
screen-reader-testing
41k에이전트가 스크린 리더로 웹사이트를 테스트해 접근성을 확인하도록 돕습니다.
wcag-audit-patterns
41k에이전트가 WCAG 지침에 따라 웹사이트의 접근성을 감사하고 문제를 고치도록 돕습니다.
multi-reviewer-patterns
41k에이전트가 병렬 코드 리뷰를 조율하고, 중복된 발견 사항을 정리하며, 보고서를 통합하도록 돕습니다.
parallel-debugging
41k에이전트가 병렬 조사와 근본 원인 분석으로 복잡한 문제를 디버그하도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.