RLFactory is an easy and efficient RL post-training framework for Agentic Learning.
RL-Factory decouples the environment from RL post-training, enabling training with just a tool config and reward function while supporting async tool-calling to make RL post-training 2x faster.
Current version natively supports one-click DeepSearch training and features multi-turn tool-calling, model judge reward, and training of multiple models including Qwen3. More easy and efficient agentic learning modules will be added in upcoming features.
We’ll keep a fast release cycle to quickly deliver and polish the upcoming features.
Our goal is to enable users to focus on reward logic and tool setup for fast agentic learning with minimal code, while hardcore developers could focus on improving training efficiency and model performance.
For easy-to-use, we decouple the environment from RL-based post-training with several advantages.
For efficient learning, we develope several essential modules within the RL post-training framework, making training 2x faster.
For future progression, we will continue to prioritize "easy" and "efficient".
Cuda: >=12.0 (Recommended: 12.4)
Python: >=3.10 (Recommended: 3.10)
# For Qwen3 model support
vllm: >=0.8.3 (Recommended: 0.8.5)
pip3 install accelerate bitsandbytes datasets deepspeed==0.16.4 einops flash-attn==2.7.0.post2 isort jsonlines loralib optimum packaging peft pynvml>=12.0.0 ray[default]==2.46.0 tensorboard torch==2.6.0 torchmetrics tqdm transformers==4.51.3 transformers_stream_generator wandb wheel
pip3 install vllm==0.8.5 # Mainly for Qwen3 model support
pip3 install "qwen-agent[code_interpreter]"
pip3 install llama_index bs4 pymilvus infinity_client codetiming tensordict==0.6 omegaconf torchdata==0.10.0 hydra-core easydict dill python-multipart mcp==1.9.3
pip3 install -e . --no-deps
pip3 install faiss-gpu-cu12 # Optional, needed for end-to-end search model training with rag_server
pip3 install nvidia-cublas-cu12==12.4.5.8 # Optional, needed while encountering ray worker died issue during training
docs/rl_factory/main_tutorial.md# Before running, modify MODEL_PATH, REWARD_MODEL_PATH, and several actor_rollout_ref.env parameters as needed
bash main_grpo.sh
# Before running, modify MODEL_PATH, REWARD_MODEL_PATH, and several data and trainer parameters as needed
bash main_eval.sh
In docs/rl_factory/main_tutorial.md, we provide an RLFactory reproduction example of Search-R1. We use Qwen3-4B and Qwen3-8B as the base model for RL training.
Easy: Start with Qwen3 and MCP tools to quickly train your own DeepSearch Agent.
Efficient: Enjoy the efficient training enabled by asynchronous parallel tool-call.
Qwen3-4B achieves a score of 0.458 and Qwen3-8B achieves a score of 0.463.The table below presents our training results under identical computational resources, software, and verl versions
| Model Name | Test Score (NQ) | Total Training Time (100 step) | Seconds per step | Training Resources |
|---|---|---|---|---|
| Search-R1-Qwen2.5-3B-Instruct-GRPO | 0.356 | 7.39 h | 266 s | A100 × 8 |
| Search-R1-Qwen2.5-7B-Instruct-GRPO | 0.451 | 9.25 h | 333 s | A100 × 8 |
| Search-R1-Qwen3-4B-GRPO | 0.420 | 7.95 h | 286 s | A100 × 8 |
| RLFactory-Qwen3-4B-GRPO | 0.458 | 5.30 h | 190 s | A100 × 8 |
| RLFactory-Qwen3-8B-GRPO | 0.463 | 5.76 h | 207 s | A100 × 8 |
We welcome all users and developers to contribute code to RLFactory. If you have any questions, encounter bugs, or would like to collaborate on development, please feel free to contact us!
This repo benefits from verl, Search-R1, Qwen-Agent. Thanks for their wonderful works. We will also introduce TRL in the future to further expand the applicability of our framework.
Our technical report can be found here. If you find our work useful, please consider citing our work:
@misc{chai2025rlfactoryplugandplayreinforcementlearning,
title={RLFactory: A Plug-and-Play Reinforcement Learning Post-Training Framework for LLM Multi-Turn Tool-Use},
author={Jiajun Chai and Guojun Yin and Zekun Xu and Chuhuai Yue and Yi Jia and Siyu Xia and Xiaohan Wang and Jiwen Jiang and Xiaoguang Li and Chengqi Dong and Hang He and Wei Lin},
year={2025},
eprint={2509.06980},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2509.06980},
}
If you have contributed to this project and wish to be included in our technical report, please contact me (gjyin@outlook.com) promptly.
Python
95.4%
Shell
4.4%
RLFactory is an easy and efficient RL post-training framework for Agentic Learning.
RL-Factory decouples the environment from RL post-training, enabling training with just a tool config and reward function while supporting async tool-calling to make RL post-training 2x faster.
Current version natively supports one-click DeepSearch training and features multi-turn tool-calling, model judge reward, and training of multiple models including Qwen3. More easy and efficient agentic learning modules will be added in upcoming features.
We’ll keep a fast release cycle to quickly deliver and polish the upcoming features.
Our goal is to enable users to focus on reward logic and tool setup for fast agentic learning with minimal code, while hardcore developers could focus on improving training efficiency and model performance.
For easy-to-use, we decouple the environment from RL-based post-training with several advantages.
For efficient learning, we develope several essential modules within the RL post-training framework, making training 2x faster.
For future progression, we will continue to prioritize "easy" and "efficient".
Cuda: >=12.0 (Recommended: 12.4)
Python: >=3.10 (Recommended: 3.10)
# For Qwen3 model support
vllm: >=0.8.3 (Recommended: 0.8.5)
pip3 install accelerate bitsandbytes datasets deepspeed==0.16.4 einops flash-attn==2.7.0.post2 isort jsonlines loralib optimum packaging peft pynvml>=12.0.0 ray[default]==2.46.0 tensorboard torch==2.6.0 torchmetrics tqdm transformers==4.51.3 transformers_stream_generator wandb wheel
pip3 install vllm==0.8.5 # Mainly for Qwen3 model support
pip3 install "qwen-agent[code_interpreter]"
pip3 install llama_index bs4 pymilvus infinity_client codetiming tensordict==0.6 omegaconf torchdata==0.10.0 hydra-core easydict dill python-multipart mcp==1.9.3
pip3 install -e . --no-deps
pip3 install faiss-gpu-cu12 # Optional, needed for end-to-end search model training with rag_server
pip3 install nvidia-cublas-cu12==12.4.5.8 # Optional, needed while encountering ray worker died issue during training
docs/rl_factory/main_tutorial.md# Before running, modify MODEL_PATH, REWARD_MODEL_PATH, and several actor_rollout_ref.env parameters as needed
bash main_grpo.sh
# Before running, modify MODEL_PATH, REWARD_MODEL_PATH, and several data and trainer parameters as needed
bash main_eval.sh
In docs/rl_factory/main_tutorial.md, we provide an RLFactory reproduction example of Search-R1. We use Qwen3-4B and Qwen3-8B as the base model for RL training.
Easy: Start with Qwen3 and MCP tools to quickly train your own DeepSearch Agent.
Efficient: Enjoy the efficient training enabled by asynchronous parallel tool-call.
Qwen3-4B achieves a score of 0.458 and Qwen3-8B achieves a score of 0.463.The table below presents our training results under identical computational resources, software, and verl versions
| Model Name | Test Score (NQ) | Total Training Time (100 step) | Seconds per step | Training Resources |
|---|---|---|---|---|
| Search-R1-Qwen2.5-3B-Instruct-GRPO | 0.356 | 7.39 h | 266 s | A100 × 8 |
| Search-R1-Qwen2.5-7B-Instruct-GRPO | 0.451 | 9.25 h | 333 s | A100 × 8 |
| Search-R1-Qwen3-4B-GRPO | 0.420 | 7.95 h | 286 s | A100 × 8 |
| RLFactory-Qwen3-4B-GRPO | 0.458 | 5.30 h | 190 s | A100 × 8 |
| RLFactory-Qwen3-8B-GRPO | 0.463 | 5.76 h | 207 s | A100 × 8 |
We welcome all users and developers to contribute code to RLFactory. If you have any questions, encounter bugs, or would like to collaborate on development, please feel free to contact us!
This repo benefits from verl, Search-R1, Qwen-Agent. Thanks for their wonderful works. We will also introduce TRL in the future to further expand the applicability of our framework.
Our technical report can be found here. If you find our work useful, please consider citing our work:
@misc{chai2025rlfactoryplugandplayreinforcementlearning,
title={RLFactory: A Plug-and-Play Reinforcement Learning Post-Training Framework for LLM Multi-Turn Tool-Use},
author={Jiajun Chai and Guojun Yin and Zekun Xu and Chuhuai Yue and Yi Jia and Siyu Xia and Xiaohan Wang and Jiwen Jiang and Xiaoguang Li and Chengqi Dong and Hang He and Wei Lin},
year={2025},
eprint={2509.06980},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2509.06980},
}
If you have contributed to this project and wish to be included in our technical report, please contact me (gjyin@outlook.com) promptly.
Python
95.4%
Shell
4.4%