AI MOOC
✦ Grow togetherInvite 3 friends, earn 1 month of membership · Up to 12 monthsInvite friends →

Free learning library / Datawhale · Agentic RL Lab · KMnO4-zx

GRPO Experiment: From Group Rewards to Policy Updates

Use a math question-answering experiment to understand sampling, rewards, group comparisons and policy updates in GRPO.

Hands-on tutorial · Reinforcement learning and LLM training · Chinese and English; versions may be updated at different times

Who it is for

For learners familiar with Python, LLM fundamentals and basic reinforcement learning who want to understand a training experiment.

What you can learn

Follow multiple samples for each GSM8K question, answer rewards and group-relative advantages, then examine the PyTRIO training loop and loss comparisons. The example simplifies the advantage calculation for clarity.

Try it first

For one question, assign rewards of 1, 0, 1 and 0 to four answers. Calculate the group mean and each reward’s difference from it, then compare with the tutorial and consider reward-design limitations.

Free access and conditions

The Chinese and English text is free to read without signing in; update dates differ. Running the example requires a PyTRIO account and remote training service; SwanLab can be used for online logging. Training may incur charges; check current provider prices. Examples and dependencies may change.

Source and rights

The project repository lists Apache-2.0. This page links to the tutorial without hosting it; check dataset, image, model and third-party service terms separately.

Source: Datawhale · Agentic RL Lab · KMnO4-zx

Related learning resources

Continue learning: Free courses on AI MOOC

Read now