Key Differences from v1
v1 (retool) requires manually implementing the full multi-turn conversation loop ingenerate_with_retool.py, directly depending on low-level GenerateState and sglang_rollout interfaces — resulting in verbose code tightly coupled to the framework internals.
v2 (retool_v2) uses the framework’s standard plugin interfaces. Users only need to implement three functions and mount them via command-line arguments:
Users only need to focus on business logic (tool definitions, tool execution, reward calculation). Multi-turn scheduling, token concatenation, loss masking, etc. are all handled by the framework.
Files
tool_sandbox.py: Tool definitions (tool_specs), tool execution (execute_tool), reward function (reward_func), and sandboxed safe execution environmentrun_retool_multi_turn.py: Training launch script
Quick Start
torch_dist before training starts.
