![Revisit consent button](../images/body-df29beacd7496220cc94.svg)
We value your privacy
We use cookies to enhance your browsing experience, serve personalised ads or content, and analyse our traffic. By clicking "Accept All", you consent to our use of cookies.
Customise Reject All Accept All
Customise Consent Preferences ![](../images/body-2159bb67f3de8ad870eb.svg)
We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... Show more
NecessaryAlways Active
Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.
  * Cookie
BCTempID
  * Duration
10 minutes
  * Description
No description available.


  * Cookie
__cf_bm
  * Duration
1 hour
  * Description
This cookie, set by Cloudflare, is used to support Cloudflare Bot Management. 


  * Cookie
AWSALBCORS
  * Duration
7 days
  * Description
Amazon Web Services set this cookie for load balancing.


  * Cookie
_cfuvid
  * Duration
session
  * Description
Cloudflare sets this cookie to track users across sessions to optimize user experience by maintaining session consistency and providing personalized services


  * Cookie
li_gc
  * Duration
6 months
  * Description
Linkedin set this cookie for storing visitor's consent regarding using cookies for non-essential purposes.


  * Cookie
__hssrc
  * Duration
session
  * Description
This cookie is set by Hubspot whenever it changes the session cookie. The __hssrc cookie set to 1 indicates that the user has restarted the browser, and if the cookie does not exist, it is assumed to be a new session.


  * Cookie
__hssc
  * Duration
1 hour
  * Description
HubSpot sets this cookie to keep track of sessions and to determine if HubSpot should increment the session number and timestamps in the __hstc cookie.


  * Cookie
wpEmojiSettingsSupports
  * Duration
session
  * Description
WordPress sets this cookie when a user interacts with emojis on a WordPress site. It helps determine if the user's browser can display emojis properly.


  * Cookie
BCSessionID
  * Duration
1 year 1 month 4 days
  * Description
Blueconic sets this cookie as a unique identifier for the BlueConic profile.


  * Cookie
_octo
  * Duration
1 year
  * Description
No description available.


  * Cookie
logged_in
  * Duration
1 year
  * Description
No description available.


  * Cookie
__Secure-YEC
  * Duration
past
  * Description
YouTube sets this cookie to stores the user's video player preferences using embedded YouTube video


  * Cookie
__eoi
  * Duration
6 months
  * Description
Description is currently not available.


  * Cookie
AWSALBTGCORS
  * Duration
7 days
  * Description
No description available.


  * Cookie
login-status-p
  * Duration
past
  * Description
Description is currently not available.


  * Cookie
AWSALBTG
  * Duration
7 days
  * Description
No description available.


  * Cookie
csrf_token
  * Duration
session
  * Description
No description available.


  * Cookie
token_v2
  * Duration
1 day
  * Description
Description is currently not available.


  * Cookie
D
  * Duration
1 year
  * Description
Description is currently not available.


  * Cookie
PHPSESSID
  * Duration
session
  * Description
This cookie is native to PHP applications. The cookie stores and identifies a user's unique session ID to manage user sessions on the website. The cookie is a session cookie and will be deleted when all the browser windows are closed.


  * Cookie
VISITOR_PRIVACY_METADATA
  * Duration
6 months
  * Description
YouTube sets this cookie to store the user's cookie consent state for the current domain. 


  * Cookie
cookietest
  * Duration
session
  * Description
The cookietest cookie is typically used to determine whether the user's browser accepts cookies, essential for website functionality and user experience.


  * Cookie
__Host-airtable-session
  * Duration
1 year
  * Description
This cookie is used to enable us to integrate the services of Airtable.


  * Cookie
__Host-airtable-session.sig
  * Duration
1 year
  * Description
This cookie is used to enable us to integrate the services of Airtable.


  * Cookie
m
  * Duration
1 year 1 month 4 days
  * Description
Stripe sets this cookie for fraud prevention purposes. It identifies the device used to access the website, allowing the website to be formatted accordingly.


  * Cookie
BIGipServer*
  * Duration
session
  * Description
Marketo sets this cookie to collect information about the user's online activity and build a profile about their interests to provide advertisements relevant to the user. 


  * Cookie
__cfruid
  * Duration
session
  * Description
Cloudflare sets this cookie to identify trusted web traffic.


  * Cookie
_GRECAPTCHA
  * Duration
6 months
  * Description
Google Recaptcha service sets this cookie to identify bots to protect the website against malicious spam attacks.


  * Cookie
__Secure-YNID
  * Duration
6 months
  * Description
Google cookie used to protect user security and prevent fraud, especially during the login process.


  * Cookie
cookieyes-consent
  * Duration
1 year
  * Description
CookieYes sets this cookie to remember users' consent preferences so that their preferences are respected on subsequent visits to this site. It does not collect or store any personal information about the site visitors.


Functional
Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.
  * Cookie
lidc
  * Duration
1 day
  * Description
LinkedIn sets the lidc cookie to facilitate data center selection.


  * Cookie
brw
  * Duration
1 year
  * Description
No description available.


  * Cookie
brwConsent
  * Duration
5 minutes
  * Description
Description is currently not available.


  * Cookie
WMF-Uniq
  * Duration
1 year
  * Description
Description is currently not available.


  * Cookie
loom_anon_comment
  * Duration
1 year
  * Description
No description available.


  * Cookie
loom_referral_video
  * Duration
session
  * Description
Description is currently not available.


  * Cookie
VISITOR_INFO1_LIVE
  * Duration
6 months
  * Description
A cookie set by YouTube to measure bandwidth that determines whether the user gets the new or old player interface.


  * Cookie
yt-remote-connected-devices
  * Duration
Never Expires
  * Description
YouTube sets this cookie to store the user's video preferences using embedded YouTube videos.


  * Cookie
ytidb::LAST_RESULT_ENTRY_KEY
  * Duration
Never Expires
  * Description
The cookie ytidb::LAST_RESULT_ENTRY_KEY is used by YouTube to store the last search result entry that was clicked by the user. This information is used to improve the user experience by providing more relevant search results in the future.


  * Cookie
yt-remote-device-id
  * Duration
Never Expires
  * Description
YouTube sets this cookie to store the user's video preferences using embedded YouTube videos.


  * Cookie
yt-remote-session-name
  * Duration
session
  * Description
The yt-remote-session-name cookie is used by YouTube to store the user's video player preferences using embedded YouTube video.


  * Cookie
yt-remote-fast-check-period
  * Duration
session
  * Description
The yt-remote-fast-check-period cookie is used by YouTube to store the user's video player preferences for embedded YouTube videos.


  * Cookie
yt-remote-session-app
  * Duration
session
  * Description
The yt-remote-session-app cookie is used by YouTube to store user preferences and information about the interface of the embedded YouTube video player.


  * Cookie
yt-remote-cast-available
  * Duration
session
  * Description
The yt-remote-cast-available cookie is used to store the user's preferences regarding whether casting is available on their YouTube video player.


  * Cookie
yt-remote-cast-installed
  * Duration
session
  * Description
The yt-remote-cast-installed cookie is used to store the user's video player preferences using embedded YouTube video.


  * Cookie
cp_session
  * Duration
3 months
  * Description
Codepen sets this cookie for Help systems found in the website.


  * Cookie
loid
  * Duration
1 year 1 month 4 days
  * Description
This cookie is set by the Reddit. The cookie enables the sharing of content from the website onto the social media platform.


Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.
  * Cookie
__hstc
  * Duration
6 months
  * Description
Hubspot set this main cookie for tracking visitors. It contains the domain, initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session).


  * Cookie
hubspotutk
  * Duration
6 months
  * Description
HubSpot sets this cookie to keep track of the visitors to the website. This cookie is passed to HubSpot on form submission and used when deduplicating contacts.


  * Cookie
_ga
  * Duration
1 year 1 month 4 days
  * Description
Google Analytics sets this cookie to calculate visitor, session and campaign data and track site usage for the site's analytics report. The cookie stores information anonymously and assigns a randomly generated number to recognise unique visitors.


  * Cookie
_ga_*
  * Duration
1 year 1 month 4 days
  * Description
Google Analytics sets this cookie to store and count page views.


  * Cookie
__Host-psifi.analyticsTrace
  * Duration
6 hours
  * Description
Description is currently not available.


  * Cookie
__Host-psifi.analyticsTraceV2
  * Duration
6 hours
  * Description
Description is currently not available.


  * Cookie
_gh_sess
  * Duration
session
  * Description
GitHub sets this cookie for temporary application and framework state between pages like what step the user is on in a multiple step form.


  * Cookie
YSC
  * Duration
session
  * Description
YSC cookie is set by Youtube and is used to track the views of embedded videos on Youtube pages.


  * Cookie
ajs_anonymous_id
  * Duration
1 year
  * Description
This cookie is set by Segment to count the number of people who visit a certain site by tracking if they have visited before.


  * Cookie
vuid
  * Duration
1 year 1 month 4 days
  * Description
Vimeo installs this cookie to collect tracking information by setting a unique ID to embed videos on the website. 


Performance
Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.
  * Cookie
AWSALB
  * Duration
7 days
  * Description
AWSALB is an application load balancer cookie set by Amazon Web Services to map the session to the target.


  * Cookie
acq
  * Duration
past
  * Description
Description is currently not available.


  * Cookie
acq.sig
  * Duration
past
  * Description
Description is currently not available.


  * Cookie
ptc
  * Duration
2 years
  * Description
No description available.


Advertisement
Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.
  * Cookie
muc_ads
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to collect user behaviour and interaction data to optimize the website.


  * Cookie
guest_id_marketing
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to identify and track the website visitor.


  * Cookie
guest_id_ads
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to identify and track the website visitor.


  * Cookie
personalization_id
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to integrate and share features for social media and also store information about how the user uses the website, for tracking and targeting.


  * Cookie
guest_id
  * Duration
1 year 1 month 4 days
  * Description
Twitter sets this cookie to identify and track the website visitor. It registers if a user is signed in to the Twitter platform and collects information about ad preferences.


  * Cookie
bcookie
  * Duration
1 year
  * Description
LinkedIn sets this cookie from LinkedIn share buttons and ad tags to recognize browser IDs.


  * Cookie
__Secure-ROLLOUT_TOKEN
  * Duration
6 months
  * Description
YouTube sets this cookie to manage feature rollout and experimentation. It helps Google control which new features or interface changes are shown to users as part of testing and staged rollouts, ensuring consistent experience for a given user during an experiment.


  * Cookie
yt.innertube::nextId
  * Duration
Never Expires
  * Description
YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.


  * Cookie
yt.innertube::requests
  * Duration
Never Expires
  * Description
YouTube sets this cookie to register a unique ID to store data on what videos from YouTube the user has seen.


  * Cookie
session_tracker
  * Duration
session
  * Description
This cookie is set by the Reddit. This cookie is used to identify trusted web traffic. It also helps in adverstising on the website.


  * Cookie
edgebucket
  * Duration
session
  * Description
Reddit sets this cookie to save the information about a log-on Reddit user, for the purpose of advertisement recommendations and updating the content.


  * Cookie
did
  * Duration
1 year
  * Description
Arbor sets this cookie to show targeted ads to site visitors.This cookie expires after 2 months or 1 year.


Uncategorised
Other uncategorised cookies are those that are being analysed and have not been classified into a category as yet.
No cookies to display.
Reject All Save My Preferences Accept All
Toggle Search[](https://towardsdatascience.com/)Toggle Mobile Navigation
[](https://towardsdatascience.com/)
Publish AI, ML & data-science insights to a global community of data professionals.
Sign in[Submit an Article](https://write.insightmediagroup.io)
[Latest](https://towardsdatascience.com/latest/)[Editor's Picks](https://towardsdatascience.com/tag/editors-pick/)[Newsletter](https://towardsdatascience.com/tag/the-variable/)[ShipAI](https://towardsdatascience.com/shipai/)
* * *
[Write For TDS](https://towardsdatascience.com/submissions/)
[LinkedIn](https://www.linkedin.com/company/towards-data-science/)[X](https://x.com/TDataScience)Toggle Search
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
# How GRPO Trains Small Language Models with Verifiable Rewards
The mechanics behind local reasoning experiments with Unsloth and why the reward function matters as much as the model.
[Benjamin Nweke](https://towardsdatascience.com/author/benjaminnweke/)
September 23, 202610 min read
![A blue processor on a laptop-shaped platform connects to several branching paths, with one orange path passing through an arch.](../images/000.webp)
Image by author (Generated with ChatGPT)
Conceptual illustration of GRPO reinforcement learning for small language models. Branching paths represent possible responses, while the highlighted orange route symbolizes an answer that passes verification and receives a positive reward.
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](https://arxiv.org/abs/2501.12948) 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.
···
Learn this step by step with the interactive [Machine Learning](https://roadmap.sh/machine-learning) roadmap.
## A problem with an answer we can check
Consider 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:
python

```
boxes, items_per_box, sold = 6, 8, 6
expected_count = boxes * items_per_box - sold

assert expected_count == 42
```

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 question
GRPO was introduced in the [DeepSeekMath work](https://arxiv.org/abs/2402.03300) 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:  
| Attempt  | Final answer  | Correctness reward  |  
| --- | --- | --- |  
| 1  | 42  | 1  |  
| 2  | 40  | 0  |  
| 3  | 42  | 1  |  
| 4  | 48  | 0  |  
The 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} ][Ai​=σr​+ϵri​−rˉ​]
Here, (ri)(r_i)(ri​)is an attempt’s reward, (rˉ)(\bar{r})(rˉ)is the group mean, and (σr)(\sigma_r)(σ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:
python

```
from statistics import mean, pstdev

rewards = [1.0, 0.0, 1.0, 0.0]
group_mean = mean(rewards)
group_std = pstdev(rewards)

# Equal rewards give us nothing to rank within this group.
if group_std == 0:
    advantages = [0.0] * len(rewards)
else:
    advantages = [(r - group_mean) / group_std for r in rewards]

print(advantages)
# [1.0, -1.0, 1.0, -1.0]
```

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](https://huggingface.co/docs/trl/grpo_trainer). 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 success
Suppose 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:
python

```
import re

# Keep integer conversion bounded; 12 digits is ample for this toy task.
FINAL_INTEGER = re.compile(
    r"<answer>\s*([+-]?[0-9]{1,12})\s*</answer>\s*\Z"
)


def extract_final_count(response: str) -> int | None:
    # Don't let a response submit several answers and win on the last one.
    if response.count("<answer>") != 1 or response.count("</answer>") != 1:
        return None

    match = FINAL_INTEGER.search(response)
    if match is None:
        return None

    return int(match.group(1))


def correctness_reward(response: str, expected_count: int) -> float:
    count = extract_final_count(response)
    if count is None:
        return 0.0

    return float(count == expected_count)


assert correctness_reward("48 - 6 = 42. <answer>42</answer>", 42) == 1.0
assert correctness_reward("I considered 42. <answer>40</answer>", 42) == 0.0
assert correctness_reward("<answer>40</answer><answer>42</answer>", 42) == 0.0
assert correctness_reward("<answer>0</answer>", 0) == 1.0
```

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](https://huggingface.co/docs/trl/grpo_trainer). 
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 manageable
For 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](https://arxiv.org/abs/2106.09685) represents weight updates using low-rank matrices, reducing the number of parameters that require gradients and optimizer state. 
[QLoRA](https://arxiv.org/abs/2305.14314) 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](https://unsloth.ai/docs/get-started/reinforcement-learning-rl-guide/advanced-rl-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](https://huggingface.co/Qwen/Qwen2.5-1.5B-Instruct) 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](https://unsloth.ai/docs/get-started/install) is a useful place to check whether your setup is supported.
## Longer answers can be a misleading result
Reasoning 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](https://arxiv.org/abs/2503.20783) 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 improved
The 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 conclusion
GRPO 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](https://thatcsguy.substack.com/).
**Connect With Me**
  * [LinkedIn](http://www.linkedin.com/in/nwekebenjamin)
  * [Substack](https://thatcsguy.substack.com/)


## Register Now to Continue Reading
### Unlock Towards Data Science with a Free Account
All articles on Towards Data Science are available to registered users. Create a free account today to access this article and thousands more.
Register for freeSign in to your account
* * *
![](../images/body-4ad89a2fc5e69dde007d.jpeg)
Written By
## [Benjamin Nweke](https://towardsdatascience.com/author/benjaminnweke/)
Benjamin Nweke is a Computer Science graduate and technical writer exploring AI, machine learning, and data science. He writes about building reliable AI systems, model evaluation, agentic architectures, and the practical challenges that appear when machine learning moves beyond experiments. His work focuses on making technically complex ideas clear, useful, and grounded in real implementation.
[See all from Benjamin Nweke](https://towardsdatascience.com/author/benjaminnweke/)
[Artificial Intelligence](https://towardsdatascience.com/tag/artificial-intelligence/)[Fine Tuning](https://towardsdatascience.com/tag/fine-tuning/)[Llm](https://towardsdatascience.com/tag/llm/)[Machine Learning](https://towardsdatascience.com/tag/machine-learning/)[Reinforcement Learning](https://towardsdatascience.com/tag/reinforcement-learning/)
Share This Article
  * [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ftowardsdatascience.com%2Fhow-grpo-trains-small-language-models-with-verifiable-rewards%2F&title=How%20GRPO%20Trains%20Small%20Language%20Models%20with%20Verifiable%20Rewards)
  * [](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Ftowardsdatascience.com%2Fhow-grpo-trains-small-language-models-with-verifiable-rewards%2F&title=How%20GRPO%20Trains%20Small%20Language%20Models%20with%20Verifiable%20Rewards)
  * [](https://x.com/share?url=https%3A%2F%2Ftowardsdatascience.com%2Fhow-grpo-trains-small-language-models-with-verifiable-rewards%2F&text=How%20GRPO%20Trains%20Small%20Language%20Models%20with%20Verifiable%20Rewards)


Towards Data Science is a community publication. Submit your insights to reach our global audience and earn through the TDS Author Payment Program.
[Write for TDS](https://towardsdatascience.com/submissions/)
## Related Articles
  * [![](../images/001.jpeg)](https://towardsdatascience.com/6-machine-learning-algorithms-to-know-when-learning-data-science-6e45ef139b99/)
## [6 Machine Learning Algorithms to Know About When Learning Data Science](https://towardsdatascience.com/6-machine-learning-algorithms-to-know-when-learning-data-science-6e45ef139b99/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Short Explanations of 6 Popular Machine Learning Algorithms
[Andy McDonald](https://towardsdatascience.com/author/andymcdonaldgeo/)
July 25, 20229 min read
  * [![](../images/002.jpeg)](https://towardsdatascience.com/why-is-feature-scaling-important-in-machine-learning-discussing-6-feature-scaling-techniques-2773bda5be30/)
## [Why is Feature Scaling Important in Machine Learning? Discussing 6 Feature Scaling Techniques](https://towardsdatascience.com/why-is-feature-scaling-important-in-machine-learning-discussing-6-feature-scaling-techniques-2773bda5be30/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Standardization, Normalization, Robust Scaling, Mean Normalization, Maximum Absolute Scaling and Vector Unit Length Scaling
[Rukshan Pramoditha](https://towardsdatascience.com/author/rukshanpramoditha/)
August 15, 202313 min read
  * [![](../images/003.jpg)](https://towardsdatascience.com/bayesian-machine-learning-and-julia-are-a-match-made-in-heaven-c3c498f2d221/)
## [Bayesian Machine Learning and Julia are a match made in heaven](https://towardsdatascience.com/bayesian-machine-learning-and-julia-are-a-match-made-in-heaven-c3c498f2d221/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Two Julia libraries to make Bayesian Machine Learning a breeze
[Sarem Seitz](https://towardsdatascience.com/author/sarem-seitz/)
March 8, 20226 min read
  * [![](../images/004.png)](https://towardsdatascience.com/can-unconditional-language-models-recover-arbitrary-sentences-a-paper-summary-98530f2316c7/)
## [Can Unconditional Language Models Recover Arbitrary Sentences? - A paper summary](https://towardsdatascience.com/can-unconditional-language-models-recover-arbitrary-sentences-a-paper-summary-98530f2316c7/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Summary of an unconventional approach towards pre-trained language models to determine if they can function as general-purpose decoders.
[Devansh Goenka](https://towardsdatascience.com/author/devanshgoenka97/)
October 11, 20206 min read
  * [![](../images/005.png)](https://towardsdatascience.com/transfer-learning-covid-19-from-chest-x-rays-classifier-66d6c483fb03/)
## [Transfer Learning: COVID-19 from Chest X-Rays Classifier](https://towardsdatascience.com/transfer-learning-covid-19-from-chest-x-rays-classifier-66d6c483fb03/)
[Deep Learning](https://towardsdatascience.com/category/artificial-intelligence/deep-learning/)
A detailed overview on how to do transfer learning and some theory behind each step.
[Alfonso Santacruz Garcia](https://towardsdatascience.com/author/ponchosg96/)
December 17, 202111 min read
  * [![](../images/006.jpeg)](https://towardsdatascience.com/spicing-up-ice-hockey-with-ai-player-tracking-with-computer-vision-ce9ceec9122a/)
## [Spicing up Ice Hockey with AI: Player Tracking with Computer Vision](https://towardsdatascience.com/spicing-up-ice-hockey-with-ai-player-tracking-with-computer-vision-ce9ceec9122a/)
[Artificial Intelligence](https://towardsdatascience.com/category/artificial-intelligence/)
Using PyTorch, computer vision techniques, and a CNN, I worked on a model that tracks players, teams, and basic performance statistics
[Raul Vizcarra Chirinos](https://towardsdatascience.com/author/raul.vizcarrach/)
July 9, 202433 min read
  * [![](../images/007.jpg)](https://towardsdatascience.com/starting-ml-product-initiatives-on-the-right-foot-cf24cbe163b3/)
## [Starting ML Product Initiatives on the Right Foot](https://towardsdatascience.com/starting-ml-product-initiatives-on-the-right-foot-cf24cbe163b3/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Top 3 lessons learned: the problem, the size, and the data
[Anna Via](https://towardsdatascience.com/author/annaviaba/)
May 2, 20249 min read
  * [![](../images/008.jpg)](https://towardsdatascience.com/kernel-regression-from-scratch-in-python-ea0615b23918/)
## [Kernel Regression from Scratch in Python](https://towardsdatascience.com/kernel-regression-from-scratch-in-python-ea0615b23918/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
Everyone knows Linear Regression, but do you know Kernel Regression?
[Kunj Mehta](https://towardsdatascience.com/author/kunjmehta10/)
August 20, 20206 min read
  * [![](../images/009.png)](https://towardsdatascience.com/federated-learning-and-custom-aggregation-schemes/)
## [Federated Learning and Custom Aggregation Schemes](https://towardsdatascience.com/federated-learning-and-custom-aggregation-schemes/)
[Machine Learning](https://towardsdatascience.com/category/artificial-intelligence/machine-learning/)
A practical guide to designing and analyzing robust aggregation strategies
[Salman Toor](https://towardsdatascience.com/author/salman.toor/)
October 22, 202510 min read


  * [YouTube](https://www.youtube.com/c/TowardsDataScience)
  * [X](https://x.com/TDataScience)
  * [LinkedIn](https://www.linkedin.com/company/towards-data-science/)
  * [Threads](https://www.threads.net/@towardsdatascience)
  * [Bluesky](https://bsky.app/profile/towardsdatascience.com)


[](https://towardsdatascience.com/)
Your home for data science and AI. The world's leading publication for data science, data analytics, data engineering, machine learning, and artificial intelligence professionals.
Subscribe to Our Newsletter[Write For TDS](https://towardsdatascience.com/submissions/)•[About](https://towardsdatascience.com/about-towards-data-science-d691af11cc2f/)•[Advertise](https://contact.towardsdatascience.com/advertise-with-towards-data-science)•[Privacy Policy](https://towardsdatascience.com/privacy-policy/)•[Terms of Use](https://towardsdatascience.com/website-terms-of-use/)
© Insight Media Group, LLC 2026•[The New Stack](https://thenewstack.io)•[roadmap.sh](https://roadmap.sh)•[Creator Network](https://insightmediagroup.io/creator-network)
####  Recommended Articles 
Close
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/607686/image?etag=1782161464448&width=500&height=500) How Relevance Models Foreshadowed Transformers for NLP ](https://towardsdatascience.com/how-relevance-models-foreshadowed-transformers-for-nlp/ "How Relevance Models Foreshadowed Transformers for NLP")
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/607639/image?etag=1781250125848&width=500&height=500) Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 1 ](https://towardsdatascience.com/javascript-fatigue-you-dont-need-js-to-build-chatgpt/ "Javascript Fatigue: HTMX Is All You Need to Build ChatGPT — Part 1")
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/607930/image?etag=1782124566054&width=500&height=500) The Subset Sum Problem Solved in Linear Time for Dense Enough Inputs ](https://towardsdatascience.com/subset-sum-problem-solved-in-linear-time-for-dense-enough-inputs/ "The Subset Sum Problem Solved in Linear Time for Dense Enough Inputs")
  * [ ![](https://h030.towardsdatascience.com/rest/v2/contentStores/d7d3a4ab-7caf-4383-bbd2-fbf7fb4f1787/items/3660/image?etag=1780176246070&width=500&height=500) Does Your Company Have a Data Strategy? ](https://towardsdatascience.com/does-your-company-have-a-data-strategy-e8944dbec4ae/ "Does Your Company Have a Data Strategy?")


