A language model can write "let me double-check that" and still get the multiplication wrong. It can even write "wait, let me reconsider," and land on a different wrong answer. Neither sentence is evidence of thinking. If the goal is solving the problem, only the number at the end counts.DeepSeek’s R1-Zero brought considerable attention to reinforcement learning without a preliminary supervised fine-tuning stage. Its researchers reported behaviors such as revisiting an approach and spending more tokens on difficult problems. DeepSeek-R1, in contrast, used a broader training pipeline, including cold-start data, so we shouldn’t treat the two training processes as interchangeable. What interests me the most about Group Relative Policy Optimization, or GRPO as most of us know it, is how little feedback the basic setup needs. A model can generate several attempts at a question, receive a score for each, and use the differences to adjust its behavior. We can even check the final answer without writing out the solution we want it to imitate. Combined with techniques that reduce training memory, this makes smaller reasoning experiments more accessible.That leaves two things worth understanding before choosing a model or a GPU: how those scores guide an update, and what happens when the scoring rule rewards the wrong thing.A simple arithmetic example helps explain both. Consider four possible responses to the same question and how a reward function would score each one.···A problem with an answer we can checkConsider this question:A shop has 6 boxes with 8 items in each box. It sells 6 items. How many items remain?The answer is 42. A Python expression can verify it:Now, that simple check gives us something valuable: an independent way to score the final answer. We do not need another language model to decide whether the response sounds convincing.In a training dataset, the question goes to the model while the expected answer stays with the verifier. The model generates a response, the verifier scores it, and the training algorithm uses that score to adjust the model’s behavior.Easy.We can therefore use question-and-answer pairs without providing worked solutions as supervised targets. This is the appeal of reinforcement learning with verifiable rewards: the feedback can come from checking an outcome.For a real inventory system, ordinary arithmetic is still the sensible solution. The language model would be an expensive calculator with opinions. Here, the example makes the learning mechanism easy to inspect.This also shows where our verifier falls short, because checking that the final integer is correct doesn’t tell us whether the reasoning behind it makes sense.GRPO compares attempts at the same questionGRPO was introduced in the DeepSeekMath work as an alternative to the memory requirements of conventional PPO-based training. Common actor-critic implementations of PPO train a value estimator, often called a critic, alongside the policy. That estimator supplies a baseline for judging an action’s outcome.GRPO obtains its baseline from a group of responses sampled for the same prompt. Instead of asking a separate critic to estimate how well the model should do, it compares how well several attempts actually did.Imagine the model produces these four answers:AttemptFinal answerCorrectness reward1421240034214480The group’s average reward is 0.5. Attempts 1 and 3 performed better than that average; attempts 2 and 4 performed worse.The original outcome-reward formulation standardizes that comparison:[Ai=ri−rˉσr+ϵ][ A_i = \frac{r_i - \bar{r}}{\sigma_r + \epsilon} ]Here, (ri)(r_i)is an attempt’s reward, (rˉ)(\bar{r})is the group mean, and (σr)(\sigma_r)is the group’s reward standard deviation. The small (ϵ)(\epsilon)provides numerical protection in the denominator. This quantity is called the advantage.For these binary rewards, we can handle a group with no variation explicitly and divide by the standard deviation otherwise:This example assumes a nonempty group of finite binary rewards. It uses the population standard deviation and omits epsilon in the nonzero branch, so it illustrates the comparison rather than reproducing a trainer’s normalization exactly. A library implementation may use a different estimator or normalization option, changing the numerical scale without changing the basic idea of comparing attempts within a group.The optimizer uses the advantages to adjust the probabilities of the sampled responses, favoring higher-reward attempts relative to lower-reward ones. In outcome-based training, that signal applies across a response; it does not identify the exact arithmetic step responsible for success.That gives us a way to compare the attempts, but honestly there’s still the question of how those scores change the model. Actual training involves token probabilities and a policy objective that controls how the model changes. Clipping and, in some configurations, a penalty for drifting from a reference policy help regulate those updates. The Python calculation above shows how we get the advantages; the optimizer handles what happens next.If every answer in a group earns the same reward, whether all zero or all one, subtracting the mean leaves every attempt with zero advantage: there's no difference in reward to tell the model which attempt to favor. This makes task difficulty a practical consideration.If the model never succeeds, sparse correctness rewards may provide little useful direction. If it already succeeds consistently, the task offers little room for improvement. The group has to contain informative differences often enough for learning to benefit.The reward function defines successSuppose we reward a response whenever the string 42 appears in it. That would accept:I first considered 42, but my final answer is 40.The verifier would be wrong before training even started.For this illustration, require a single final answer block, with no text after it. Then extract its integer value:The parser accepts surrounding whitespace, signs, and leading zeros. It returns None for an invalid answer, which keeps a valid zero distinct from a parse failure. It rejects duplicate answer blocks, trailing text, decimals, and comma-separated numbers. That suits this constructed integer task but would be too narrow for a general math answer checker.The score is one or zero, but the decisions behind it are less tidy. Our parser rejects 42.0 even though it represents the same quantity. A different task might require a unit, or accept equivalent fractions. Those decisions belong in the verifier because they determine which responses training will favor.Our simple reward combines two things: getting the arithmetic right and obeying an output format. A model can improve its score just by learning the required tags, even if its arithmetic barely changes, which is why evaluation should track malformed responses separately.The verifier deliberately gives no extra credit for longer answers or phrases such as “wait” and “let me reconsider.” Rewarding those features would encourage the model to use them without establishing that they improve problem-solving.GRPO itself does not require deterministic rules. TRL supports reward models as well as custom reward functions. From my experience, rules are attractive when the task allows them because they make the scoring process inspectable. For open-ended explanations, correctness is somewhat harder to compress into a reliable automatic check.I would settle those decisions before spending time on the training configuration. Otherwise, it becomes difficult to tell whether a rising reward means the model is solving more problems or simply getting better at satisfying the checker.···Why the memory requirement becomes more manageableFor me, the practical question is how much of this can fit on a local machine. Removing the learned critic reduces memory use, and local training becomes more manageable when we also limit which parameters get updated and store model weights more efficiently.LoRA represents weight updates using low-rank matrices, reducing the number of parameters that require gradients and optimizer state. QLoRA combines adapter training with a four-bit backbone and additional memory-saving techniques. Neither removes the cost of generating responses or processing them during training.Unsloth brings these ideas into practical workflows, including GRPO-based reinforcement learning. Its reinforcement-learning documentation also covers integration with vLLM for rollout generation. The pieces are complementary: GRPO is the learning algorithm, adapters define the trainable parameters, and the software stack determines how efficiently the operations run.A small model such as Qwen2.5-1.5B-Instruct illustrates the scale at which someone might begin exploring. Its model card lists approximately 1.54 billion parameters and an Apache 2.0 license. Because it is instruction-tuned, it already carries behavior learned before any new GRPO run. Any improvements would easily build on that starting point.I wouldn’t judge whether a model fits on my GPU by its parameter count alone. At four bits per parameter, 1.5 billion parameters would take up roughly 0.75 GB, but that only covers the weights in an idealized calculation. The GPU also needs room for quantization metadata, components kept at higher precision, adapters, activations, generation caches, and temporary buffers.GRPO also samples several responses for each prompt. Longer responses and more concurrent generations increase the workload. Two experiments using the same model can have very different memory requirements because their rollout settings differ.So when you see a published VRAM figure, check which model and training settings it refers to, including the software version. A similarly sized model may need more memory on the same GPU, and hardware compatibility depends on the tools you use. The Unsloth installation guide is a useful place to check whether your setup is supported.Longer answers can be a misleading resultReasoning is an attractive interpretation when responses become longer and contain self-corrections. But it is not the only possible interpretation.Research examining R1-Zero-style training found that some behaviors associated with an “aha moment” were already present in the starting models. The same work identified biases in GRPO’s original formulation, including effects on response length, and proposed Dr. GRPO to address them.This changes what we should look for in a training run. A model may be making more useful calculations, learning a preferred response style, or reacting to an optimization bias. A few impressive examples aren’t enough to distinguish those possibilities.It also explains why two tutorials labeled “GRPO” may use different settings. Loss normalization, reward scaling, and reference-policy penalties are implementation choices that matter. A comparison should record them instead of assuming the algorithm’s name completely describes the experiment.For a run that improves its reward, the first defensible observation is quite specific: under that task and inference budget, the model became more likely to produce answers the verifier accepts. Whether that improvement survives new questions is something we still have to test.How to tell whether the model improvedThe comparison I'd want to see is the original model and the trained version answering the same unseen questions, with the same instructions, sampling settings, and token budget, so we can judge whether training actually made a difference.For the arithmetic example, measure accuracy across all test questions and track formatting failures separately, counting them as failures in the overall score. That helps distinguish better arithmetic from better compliance with the answer format. Don't forget, response length matters too, because an improvement that requires twice as much output comes at a different cost.The conclusion should stay close to what was tested. Better accuracy on new inventory questions is useful evidence that the model improved at that task, but it doesn’t establish general reasoning ability. I’d be more convinced by the model getting more answers right than by explanations that make it sound like it’s thinking harder.···Final thoughts and conclusionGRPO makes one part of language-model reinforcement learning simpler. It derives a learning signal by comparing responses to the same prompt, and avoiding a separately trained critic. Adapter training and quantization can reduce other parts of the memory burden, making smaller experiments more approachable.The difficult judgment is deciding what those experiments should reward. A score should reflect the behavior you actually care about, while a held-out evaluation checks whether the model can do more than satisfy the scoring rule.For arithmetic, the verifier can be a calculation. For generated programs, it might be tests executed in an isolated environment. And then for an open-ended explanation, building a trustworthy check may be the largest part of the project.Before choosing a model or a GPU, I would write down one question, one accepted answer, and one plausible response the verifier should reject. That small exercise exposes assumptions a training configuration cannot fix.GRPO gives those judgments a way to influence the model. Whether the result is useful still depends on what we chose to reward, and what we checked afterward.···Before you go!I write about how AI models work, where they fall short, and how to tell whether they’re actually getting better. If you’d like more of that, you can subscribe to my newsletter.Connect With Me
How GRPO Trains Small Language Models with Verifiable Rewards
Full Article
Original Source
Read the full article at Towardsdatascience →KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.