Skip to content

AN OPEN RESEARCH NOTEBOOK

From a paper,
to a real training run.

Hands-on LLM and agent reinforcement learning with PyTRIO.
15 runnable experiment notes: from GRPO, DAPO and GSPO to Search-R1, ReTool and multimodal agents.

git clone KMnO4-zx/agentic-rl-lab && uv syncQuickstart
INSIDE THE TRAINING LOOPFIG. 01
Reinforcement learning training loopThe policy samples trajectories, receives environment rewards, computes advantages and updates. This is a schematic, not measured experiment data.POLICYπθAgentGROUP ROLLOUTSFEEDBACKOPTIMIZEUpdate θ → θ′ENVIRONMENTScore & rewardADVANTAGESample · Interact · Evaluate · Update
One loop connects the paper and the code.Schematic ↗
START HERE

New here? Start with Loss Functions and GRPO .

15experiment notes
04research tracks

THE BOARD

Every experiment, right here.

Find your learning path
LAB 00Foundations & optimization

Loss Functions

An intuition for reinforcement learning losses

Understand importance sampling, PPO clipping and CISPO through intuitive examples, equations and the policy updates used in this lab.

FoundationsObjectivesRead
LAB 01Foundations & optimization

GRPO

Learn from comparisons within a group

Follow GRPO from group sampling and rewards to policy updates on GSM8K, with runnable PyTRIO code and a comparison of three loss functions.

GSM8KGroup-relative advantageRead
LAB 02.1Distillation & self-learning

General OPD

Teach the student on its own trajectories

Build a minimal on-policy distillation loop on DeepMath-103K: student sampling, teacher scoring and reverse KL, with code and evaluation notes.

DistillationDeepMathRead
LAB 02.2Distillation & self-learning

Medical OPD

Balance specialist and general capabilities

Start from medical SFT and study SAR-OPD and IDT-OPD, with specialist and general-task evaluations and explicit experimental limitations.

Medical tasksMultiple teachersRead
LAB 03Tools & environments

Search-R1

Learn to search while reasoning

Put online search inside the rollout loop and train a model to retrieve evidence across turns, with switchable search backends and evaluation notes.

Online searchMulti-turn interactionRead
LAB 04Distillation & self-learning

OPSD

Distill from self-generated trajectories

Study self-distillation with a fixed step-0 teacher and trajectories sampled by the student, including the training loop and mathematical reasoning results.

Self-distillationMathematical reasoningRead
LAB 05Tools & environments

ReTool

Make Python part of the reasoning process

Connect a local Python sandbox and study reinforcement learning with interleaved reasoning and code execution, including rollout handling and results.

Code sandboxTool useRead
LAB 06Foundations & optimization

DAPO

Unpack four changes to training stability

Examine DAPO’s four core changes and the practical time cost of dynamic sampling through training code, equations and recorded experiments.

Dynamic samplingTraining stabilityRead
LAB 07Foundations & optimization

GSPO

Optimize at the sequence level

Implement sequence-level importance ratios and clipping, and distinguish the core GSPO loss reproduced here from a complete training reproduction.

Sequence-level optimizationCustom lossRead
LAB 08Tools & environments

ALFWorld

Train an agent to complete household tasks

Train a household agent in a real TextWorld environment, with long trajectories, environment feedback, group-relative advantages and evaluation notes.

Interactive environmentsLong trajectoriesRead
LAB 09.1Multimodal & frontier work

Vision GRPO

Bring images into reinforcement learning

Connect image inputs, geometry reasoning and verifiable rewards on GeoQA, with multimodal training code and evaluation details.

Vision-language modelsGeoQARead
LAB 09.2Multimodal & frontier work

TEMPO

Learn long tasks through shorter trajectory segments

Explore macro-step optimization and a generative critic in ALFWorld, with clear boundaries between the public TEMPO description and this reproduction.

Macro-stepsGenerative criticRead
LAB 09.3Multimodal & frontier work

AgentOPSD

Assign credit to each interaction turn

Use a skill-guided self-teacher to provide turn-level learning signals, then examine multi-turn agent training and paired evaluation in ALFWorld.

Credit assignmentSelf-teacherRead
LAB 09.4Multimodal & frontier work

Spec-o3

Search the sky with reinforcement learning

Move from SFT to GRPO for astronomical candidate review, interleaving spectrum images, reasoning and tools with explicit evaluation settings.

Spectral analysisMultimodal toolsRead
LAB 09.5Multimodal & frontier work

PyTrio-Jev

Train your own classification and decision model

Fine-tune Qwen3.5-4B on 2,160 records with LoRA, then run restricted-softmax inference, temperature calibration and five benchmark evaluations.

ClassificationProbability calibrationRead

TRAINING PLATFORMS

From training tools to experiments.

LEARN IN THE OPEN

Document the limits. Keep asking questions.

Implementations, results and things that did not work. Bring your questions, reproduction notes and ideas.

Discuss on GitHub

Open code. Real experiments. Honest limitations.