Downloads · 30 days
7
19% of all-time downloads
alphaXiv/Qwen-2.5-1.5b-instruct-ppo
Qwen-2.5-1.5b-instruct-ppo is a machine learning model from alphaXiv. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
<p align="center" <a href="https://arxiv.org/abs/2511.14460" <img src="https://img.shields.io/badge/Paper-Arxiv-b31b1b?logo=arxiv&logoColor=white" alt="Paper Arxiv" </a </p
Downloads · 30 days
7
19% of all-time downloads
All-time downloads
36
Public
Parameters
1.8B
3.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.6 GB · 100%
From the Hugging Face model README
Welcome to Agent-R1! This repository is designed not just as a tool, but as a guide to understanding how to train Large Language Model (LLM) agents using Reinforcement Learning (RL).
If you've ever wondered how to move beyond simple prompting and supervised fine-tuning to agents that can learn from their interactions with tools and environments, you're in the right place.
Our Github Repo: https://github.com/alphaXiv/paper-implementations/tree/yuvraj/agent-r1
This repository has the model checkpoint for ppo variant of qwen-2.5-1.5B model trained following the paper!
Training agents is hard. Unlike standard chatbots that just generate text, agents need to:
Standard RLHF (Reinforcement Learning from Human Feedback) pipelines are typically designed for single-turn interactions:
Prompt -> Response -> Reward
But agents operate in a multi-turn loop. We need a framework that treats the entire interaction trajectory as a training episode.
Agent-R1 is built on top of VERL (VolcEngine Reinforcement Learning). VERL provides the robust, scalable infrastructure needed for distributed RL training (handling the "heavy lifting" of PPO/GRPO across GPUs).
Agent-R1 adds the "Agent" logic on top of this infrastructure. Think of VERL as the engine, and Agent-R1 as the car designed for a specific type of race (agentic tasks).
To make RL work for agents, Agent-R1 introduces two critical concepts that you'll see annotated throughout the codebase:
Reinforcement learning for Agents differs significantly from LLM (Chatbots, Reasoners). The key distinction lies in the fact that: a complete Agent trajectory typically involves multi-turn interaction, requiring multiple tool calls to solve user queries. Below, we formalize this distinction using the Markov Decision Process (MDP) framework.
In the context of LLM:
For Agents, the components are more complex:
Formal Definition:
To better understand the difference, we can define the probability of a trajectory:
$$ P(\tau) = P(X) \prod_{j=1}^{m} \left( P(C_j | X, a_{1:t_{j-1}}, C_{1:j-1}) \prod_{i=1}^{t_j} \pi_\theta(a_i | X, a_{1:i-1}, C_{1:j}) \right) $$
where:
This richer reinforcement learning framework allows Agent-R1 to train LLMs that learn effective strategies for when and how to use tools across multi-turn interactions. By optimizing over entire trajectories rather than single responses, we can apply algorithms like PPO and GRPO to develop agents that reason effectively before taking actions.
This is the technical "secret sauce". In a multi-turn trajectory, the context window contains a mix of:
We only want to update the model based on its own actions. We don't want to calculate gradients for the tool outputs (the model didn't generate them, the environment did).
Agent-R1 implements sophisticated masking:
Inspired by projects like Nanochat, we aim for code readability and ease of understanding.
We provide the main scripts to help you get started, depending on your environment and needs.
Once training is complete, you can interact with your trained agent using the inference script. For more detailed information, please refer to docs/inference/inference.md.
# Run inference (interactive chat)
bash inference.sh
This script will:
You can also customize the paths if your checkpoints are in a different location:
bash inference.sh --use-hf-model --hf-model-path alphaXiv/Qwen-2.5-1.5b-instruct-ppo