$ show axon-rl/gem
GEM is a Gym-like framework for training and evaluating agentic LLMs via reinforcement learning. It provides a diverse set of environments (games, math, code, QA, etc.) that can be used to train LLMs to interact with tools, solve problems, and make sequential decisions. The framework features a modular design with composable wrappers for observation modification, tool integration, and episode tracking, along with vectorized environments for parallel execution. It supports integration with multiple RL training frameworks (Oat, Verl, Tinker, OpenRLHF, RL2) through example scripts, making it a versatile tool for LLM agent research.
The LLM identified 3 files worth highlighting for reuse:
Provides functions for extracting structured outputs from LLM responses, such as boxed answers (\boxed{...}), code blocks, and tagged answers. This utility is self-contained, reusable in any LLM application, and addresses a common need in LLM output processing.
Implements a synchronous vectorized environment that allows running multiple environment instances in parallel for efficient experience collection in reinforcement learning. It follows the Gym vector environment pattern, is decoupled from specific environment implementations (only requiring step and reset methods), and can be extracted for use in other RL projects.
Wraps an environment to provide tool-use capabilities, allowing agents to invoke tools (e.g., Python execution, search) during interaction. It demonstrates a clean, composable pattern for extending environment functionality without modifying the core environment logic, and is reusable across different agent-environment setups.