Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- config/_10_rubikscube.yaml +25 -0
- config/_1_bandit.yaml +30 -0
- config/_3_frozen_lake.yaml +24 -0
- config/_5_metamathqa.yaml +14 -0
- config/_9_2048.yaml +23 -0
- config/_9_search.yaml +38 -0
- config/envs.yaml +426 -0
- config/eval.yaml +96 -0
- config/eval_webshop.yaml +35 -0
- config/evaluate_api_llm.yaml +59 -0
- docs/eval.md +265 -0
- docs/experiment_frozen_lake_slipper_sweep.md +103 -0
- docs/experiment_intervention_sweep.md +171 -0
- docs/experiment_sokoban_gradient_analysis.md +154 -0
- docs/experiment_webshop_release.md +136 -0
- docs/guide_gradient_analysis.md +491 -0
- docs/guide_rollout_filtering.md +130 -0
- docs/readme_v1.md +397 -0
- docs/reference_mutual_information_metrics.md +490 -0
- gradient_analysis/README.md +128 -0
- gradient_analysis/plot_gradient_analysis.py +438 -0
- merge.sh +106 -0
- outputs/2026-04-30/11-03-16/.hydra/config.yaml +989 -0
- outputs/2026-04-30/11-03-16/.hydra/overrides.yaml +2 -0
- outputs/2026-04-30/11-03-39/.hydra/config.yaml +989 -0
- outputs/2026-04-30/13-11-58/.hydra/overrides.yaml +2 -0
- outputs/2026-04-30/13-11-58/train.log +0 -0
- outputs/2026-04-30/14-13-32/.hydra/config.yaml +989 -0
- outputs/2026-04-30/14-13-32/.hydra/hydra.yaml +175 -0
- outputs/2026-04-30/14-13-32/.hydra/overrides.yaml +2 -0
- outputs/2026-04-30/19-02-13/.hydra/config.yaml +989 -0
- outputs/2026-04-30/19-02-13/.hydra/hydra.yaml +175 -0
- outputs/2026-04-30/19-02-13/.hydra/overrides.yaml +2 -0
- outputs/2026-05-01/08-52-01/.hydra/config.yaml +989 -0
- outputs/2026-05-01/08-52-01/.hydra/hydra.yaml +175 -0
- outputs/2026-05-01/08-52-01/.hydra/overrides.yaml +2 -0
- outputs/2026-05-01/08-52-01/train.log +0 -0
- outputs/2026-05-11/10-46-20/.hydra/overrides.yaml +2 -0
- outputs/2026-05-11/10-46-20/train.log +0 -0
- outputs/2026-05-11/10-52-37/.hydra/config.yaml +989 -0
- outputs/2026-05-11/10-52-37/.hydra/hydra.yaml +177 -0
- outputs/2026-05-11/10-52-37/.hydra/overrides.yaml +4 -0
- outputs/2026-05-11/11-23-48/.hydra/config.yaml +989 -0
- outputs/2026-05-11/11-23-48/.hydra/hydra.yaml +177 -0
- outputs/2026-05-11/11-23-48/.hydra/overrides.yaml +4 -0
- outputs/2026-05-11/11-23-48/train.log +0 -0
- outputs/2026-05-11/11-35-35/.hydra/config.yaml +989 -0
- outputs/2026-05-11/11-35-35/train.log +0 -0
- outputs/2026-05-11/11-38-43/.hydra/hydra.yaml +177 -0
- outputs/2026-05-11/11-38-43/.hydra/overrides.yaml +4 -0
config/_10_rubikscube.yaml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base
|
| 3 |
+
|
| 4 |
+
trainer:
|
| 5 |
+
experiment_name: rubikscube
|
| 6 |
+
|
| 7 |
+
actor_rollout_ref:
|
| 8 |
+
rollout:
|
| 9 |
+
response_length: 500
|
| 10 |
+
val_kwargs:
|
| 11 |
+
do_sample: True
|
| 12 |
+
temperature: 0.5
|
| 13 |
+
|
| 14 |
+
agent_proxy:
|
| 15 |
+
max_turn: 10
|
| 16 |
+
max_actions_per_turn: 4
|
| 17 |
+
max_context_window: 5
|
| 18 |
+
|
| 19 |
+
es_manager:
|
| 20 |
+
train:
|
| 21 |
+
env_configs:
|
| 22 |
+
tags: ["rubikscube"]
|
| 23 |
+
val:
|
| 24 |
+
env_configs:
|
| 25 |
+
tags: ["rubikscube"]
|
config/_1_bandit.yaml
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base
|
| 3 |
+
|
| 4 |
+
hydra:
|
| 5 |
+
searchpath:
|
| 6 |
+
- pkg://verl.trainer.config
|
| 7 |
+
|
| 8 |
+
actor_rollout_ref:
|
| 9 |
+
rollout:
|
| 10 |
+
response_length: 500
|
| 11 |
+
val_kwargs:
|
| 12 |
+
do_sample: True
|
| 13 |
+
temperature: 0.5 # enabling randomness in evaluation
|
| 14 |
+
|
| 15 |
+
trainer:
|
| 16 |
+
experiment_name: bandit-base
|
| 17 |
+
|
| 18 |
+
agent_proxy:
|
| 19 |
+
max_turn: 1
|
| 20 |
+
max_actions_per_turn: 1 # how many actions can be output at most in a single turn
|
| 21 |
+
|
| 22 |
+
es_manager:
|
| 23 |
+
train:
|
| 24 |
+
env_configs:
|
| 25 |
+
tags: ["Bandit"] # BanditGeneralizationNoThink
|
| 26 |
+
val:
|
| 27 |
+
env_groups: 512
|
| 28 |
+
env_configs:
|
| 29 |
+
tags: ["Bandit", "BanditTest"]
|
| 30 |
+
n_groups: [256, 256]
|
config/_3_frozen_lake.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base
|
| 3 |
+
|
| 4 |
+
hydra:
|
| 5 |
+
searchpath:
|
| 6 |
+
- pkg://verl.trainer.config
|
| 7 |
+
|
| 8 |
+
trainer:
|
| 9 |
+
experiment_name: frozenlake-main
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
es_manager:
|
| 13 |
+
train:
|
| 14 |
+
env_configs:
|
| 15 |
+
tags: ["CoordFrozenLake"]
|
| 16 |
+
val:
|
| 17 |
+
env_configs:
|
| 18 |
+
tags: ["CoordFrozenLake"]
|
| 19 |
+
|
| 20 |
+
custom_envs:
|
| 21 |
+
CoordFrozenLake:
|
| 22 |
+
env_config:
|
| 23 |
+
success_rate: 1 # Probability of moving in the intended direction
|
| 24 |
+
observation_format: "grid_coord"
|
config/_5_metamathqa.yaml
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base
|
| 3 |
+
|
| 4 |
+
hydra:
|
| 5 |
+
searchpath:
|
| 6 |
+
- pkg://verl.trainer.config
|
| 7 |
+
|
| 8 |
+
es_manager:
|
| 9 |
+
train:
|
| 10 |
+
env_configs:
|
| 11 |
+
tags: ["MetamathQA"]
|
| 12 |
+
val:
|
| 13 |
+
env_configs:
|
| 14 |
+
tags: ["MetamathQA"]
|
config/_9_2048.yaml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base
|
| 3 |
+
|
| 4 |
+
trainer:
|
| 5 |
+
experiment_name: 2048
|
| 6 |
+
|
| 7 |
+
agent_proxy:
|
| 8 |
+
max_turn: 800
|
| 9 |
+
max_actions_per_turn: 1
|
| 10 |
+
max_context_window: 5
|
| 11 |
+
|
| 12 |
+
actor_rollout_ref:
|
| 13 |
+
rollout:
|
| 14 |
+
max_model_len: 8192
|
| 15 |
+
response_length: 256
|
| 16 |
+
|
| 17 |
+
es_manager:
|
| 18 |
+
train:
|
| 19 |
+
env_configs:
|
| 20 |
+
tags: ["game_2048"]
|
| 21 |
+
val:
|
| 22 |
+
env_configs:
|
| 23 |
+
tags: ["game_2048"]
|
config/_9_search.yaml
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base
|
| 3 |
+
|
| 4 |
+
hydra:
|
| 5 |
+
searchpath:
|
| 6 |
+
- pkg://verl.trainer.config
|
| 7 |
+
|
| 8 |
+
# NOTE: Before training, start the retrieval server:
|
| 9 |
+
# bash scripts/retrieval/launch_server.sh ./search_data/prebuilt_indices 8000
|
| 10 |
+
|
| 11 |
+
micro_batch_size_per_gpu: 4
|
| 12 |
+
ppo_mini_batch_size: 32
|
| 13 |
+
model_path: Qwen/Qwen2.5-3B-Instruct
|
| 14 |
+
|
| 15 |
+
trainer:
|
| 16 |
+
experiment_name: search-qa
|
| 17 |
+
|
| 18 |
+
agent_proxy:
|
| 19 |
+
max_turn: 5 # allow up to 5 search rounds before final answer
|
| 20 |
+
max_actions_per_turn: 1 # one action per LLM response (search or finish)
|
| 21 |
+
|
| 22 |
+
actor_rollout_ref:
|
| 23 |
+
rollout:
|
| 24 |
+
max_model_len: 5000
|
| 25 |
+
max_num_batched_tokens: 5000
|
| 26 |
+
|
| 27 |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
custom_envs:
|
| 2 |
+
SimpleSokoban:
|
| 3 |
+
env_type: sokoban
|
| 4 |
+
max_actions_per_traj: 20 # used in environment state manager to control the actual max actions executed per trajectory
|
| 5 |
+
env_instruction: |
|
| 6 |
+
You are a careful Sokoban solver. Use these reusable abstractions when reasoning:
|
| 7 |
+
1. First compare the box position with the target position; the useful push directions are usually the directions that reduce their row/column distance.
|
| 8 |
+
2. Before pushing, move the player to the square opposite the intended push direction. A move that only repositions the player can be useful if it sets up the next push.
|
| 9 |
+
3. Never push a box into a wall, corner, or narrow dead end unless that square is the target or clearly on the only path to the target.
|
| 10 |
+
4. Prefer short plans that move the single box steadily toward the target; avoid wandering moves that do not improve player position or box position.
|
| 11 |
+
5. If the box and target are aligned in the same row or column, try to keep the box on that line and push along it.
|
| 12 |
+
6. If they are not aligned, first push to fix one coordinate, then reposition and push to fix the other coordinate.
|
| 13 |
+
7. Check that after each push, the player can still reach the next required pushing side of the box.
|
| 14 |
+
8. Output only the required XML-like format and choose valid Sokoban actions.
|
| 15 |
+
|
| 16 |
+
You are the player and you need to push all boxes to targets.
|
| 17 |
+
When you are right next to a box, you can push it by moving in the same direction.
|
| 18 |
+
You cannot push a box through a wall, and you cannot pull a box.
|
| 19 |
+
The answer should be a sequence of actions, like <answer>Right || Right || Up</answer>
|
| 20 |
+
max_tokens: 100 # used to curate llm prompt "max words", not used for rollout
|
| 21 |
+
parallel_friendly: false
|
| 22 |
+
max_workers: 32
|
| 23 |
+
env_config: # keys should be a subset of SokobanConfig
|
| 24 |
+
dim_x: 6
|
| 25 |
+
dim_y: 6
|
| 26 |
+
num_boxes: 2
|
| 27 |
+
max_steps: 100
|
| 28 |
+
|
| 29 |
+
LargerSokoban:
|
| 30 |
+
env_type: sokoban
|
| 31 |
+
max_actions_per_traj: 10
|
| 32 |
+
env_instruction: |
|
| 33 |
+
You are solving the Sokoban puzzle.
|
| 34 |
+
You are the player and you need to push all boxes to targets.
|
| 35 |
+
When you are right next to a box, you can push it by moving in the same direction.
|
| 36 |
+
You cannot push a box through a wall, and you cannot pull a box.
|
| 37 |
+
The answer should be a sequence of actions, like <answer>Right || Right || Up</answer>
|
| 38 |
+
max_tokens: 100
|
| 39 |
+
parallel_friendly: false
|
| 40 |
+
max_workers: 32
|
| 41 |
+
env_config:
|
| 42 |
+
dim_x: 8
|
| 43 |
+
dim_y: 8
|
| 44 |
+
num_boxes: 2
|
| 45 |
+
max_steps: 100
|
| 46 |
+
search_depth: 10
|
| 47 |
+
|
| 48 |
+
SokobanDifferentGridVocab:
|
| 49 |
+
env_type: sokoban
|
| 50 |
+
max_actions_per_traj: 10
|
| 51 |
+
env_instruction: |
|
| 52 |
+
You are solving the Sokoban puzzle.
|
| 53 |
+
You are the player and you need to push all boxes to targets.
|
| 54 |
+
When you are right next to a box, you can push it by moving in the same direction.
|
| 55 |
+
You cannot push a box through a wall, and you cannot pull a box.
|
| 56 |
+
The answer should be a sequence of actions, like <answer>Right || Right || Up</answer>
|
| 57 |
+
max_tokens: 100
|
| 58 |
+
parallel_friendly: false
|
| 59 |
+
max_workers: 32
|
| 60 |
+
env_config: # keys should be a subset of SokobanConfig
|
| 61 |
+
search_depth: 30
|
| 62 |
+
dim_x: 6
|
| 63 |
+
dim_y: 6
|
| 64 |
+
num_boxes: 1
|
| 65 |
+
max_steps: 100
|
| 66 |
+
grid_lookup: {0: "W", 1: ".", 2: "G", 3: "C", 4: "B", 5: "A", 6: "@"}
|
| 67 |
+
grid_vocab: {"W": "wall", ".": "empty", "G": "target", "C": "box on target", "B": "box", "A": "player", "@": "player on target"}
|
| 68 |
+
|
| 69 |
+
CoordSokoban:
|
| 70 |
+
env_type: sokoban
|
| 71 |
+
max_actions_per_traj: 20
|
| 72 |
+
env_instruction: |
|
| 73 |
+
You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets.
|
| 74 |
+
You are provided with a symbol grid and the zero-indexed coordinates of the player, each box, and each target.
|
| 75 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5).
|
| 76 |
+
When you are exactly next to a box, you can push it by moving in the same direction.
|
| 77 |
+
You cannot push a box through a wall, and you cannot pull a box.
|
| 78 |
+
The answer should be a sequence of actions, like <answer>Right || Right || Up</answer>.
|
| 79 |
+
max_tokens: 120
|
| 80 |
+
parallel_friendly: false
|
| 81 |
+
max_workers: 32
|
| 82 |
+
env_config: # keys should be a subset of SokobanConfig
|
| 83 |
+
dim_x: 6
|
| 84 |
+
dim_y: 6
|
| 85 |
+
num_boxes: 1
|
| 86 |
+
max_steps: 100
|
| 87 |
+
observation_format: "grid_coord"
|
| 88 |
+
|
| 89 |
+
VisualSimpleSokoban:
|
| 90 |
+
env_type: sokoban
|
| 91 |
+
max_actions_per_traj: 10
|
| 92 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you need to push all boxes to targets. When you are right next to a box, you can push it by moving in the same direction. You cannot push a box through a wall, and you cannot pull a box. The answer should be a sequence of actions, like <answer>Right || Right || Up</answer>"
|
| 93 |
+
max_tokens: 100
|
| 94 |
+
parallel_friendly: false
|
| 95 |
+
max_workers: 32
|
| 96 |
+
env_config: # keys should be a subset of SokobanConfig
|
| 97 |
+
dim_x: 6
|
| 98 |
+
dim_y: 6
|
| 99 |
+
num_boxes: 1
|
| 100 |
+
max_steps: 100
|
| 101 |
+
render_mode: "rgb_array"
|
| 102 |
+
|
| 103 |
+
Alfworld:
|
| 104 |
+
env_type: alfworld
|
| 105 |
+
max_actions_per_traj: 50
|
| 106 |
+
parallel_friendly: false
|
| 107 |
+
max_workers: 1
|
| 108 |
+
env_instruction: |
|
| 109 |
+
You are an expert agent in the ALFRED Embodied Environment.
|
| 110 |
+
Complete household tasks by navigating and interacting with objects.
|
| 111 |
+
|
| 112 |
+
You should first reason step-by-step about the current situation. This reasoning process MUST be enclosed within <think> </think> tags.
|
| 113 |
+
Once you've finished your reasoning, you should choose an admissible action for current step and present it within <answer>...</answer> tags.
|
| 114 |
+
|
| 115 |
+
max_tokens: 512
|
| 116 |
+
env_config:
|
| 117 |
+
eval_dataset: "eval_in_distribution"
|
| 118 |
+
|
| 119 |
+
AlfworldOOD:
|
| 120 |
+
env_type: alfworld
|
| 121 |
+
max_actions_per_traj: 50
|
| 122 |
+
parallel_friendly: false
|
| 123 |
+
max_workers: 1
|
| 124 |
+
env_instruction: |
|
| 125 |
+
You are an expert agent in the ALFRED Embodied Environment.
|
| 126 |
+
Complete household tasks by navigating and interacting with objects.
|
| 127 |
+
|
| 128 |
+
You should first reason step-by-step about the current situation. This reasoning process MUST be enclosed within <think> </think> tags.
|
| 129 |
+
Once you've finished your reasoning, you should choose an admissible action for current step and present it within <answer>...</answer> tags.
|
| 130 |
+
|
| 131 |
+
max_tokens: 512
|
| 132 |
+
env_config:
|
| 133 |
+
eval_dataset: "eval_out_of_distribution"
|
| 134 |
+
|
| 135 |
+
Countdown:
|
| 136 |
+
env_type: countdown
|
| 137 |
+
max_actions_per_traj: 1
|
| 138 |
+
env_instruction: "You are solving the Countdown puzzle. You should use the num list to create an equation that equals the target. Example answer format: <think> To find an equation using [3, 5, 2] to get 4. Let's check 2 + 5 = 7, 7 - 3 = 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>"
|
| 139 |
+
max_tokens: 100
|
| 140 |
+
parallel_friendly: false
|
| 141 |
+
max_workers: 32
|
| 142 |
+
env_config: null
|
| 143 |
+
|
| 144 |
+
Bandit:
|
| 145 |
+
env_type: bandit
|
| 146 |
+
max_actions_per_traj: 1
|
| 147 |
+
env_instruction: ""
|
| 148 |
+
max_tokens: 100
|
| 149 |
+
parallel_friendly: false
|
| 150 |
+
max_workers: 32
|
| 151 |
+
env_config:
|
| 152 |
+
split: "train"
|
| 153 |
+
|
| 154 |
+
BanditTest:
|
| 155 |
+
env_type: bandit
|
| 156 |
+
max_actions_per_traj: 1
|
| 157 |
+
env_instruction: ""
|
| 158 |
+
max_tokens: 100
|
| 159 |
+
parallel_friendly: false
|
| 160 |
+
max_workers: 32
|
| 161 |
+
env_config:
|
| 162 |
+
split: "test"
|
| 163 |
+
|
| 164 |
+
DeepCoder:
|
| 165 |
+
env_type: deepcoder
|
| 166 |
+
max_actions_per_traj: 1
|
| 167 |
+
env_instruction: "You are solving a coding task. Provide a complete Python function solution only. Format: <answer>...</answer>"
|
| 168 |
+
max_tokens: 8000
|
| 169 |
+
parallel_friendly: true
|
| 170 |
+
max_workers: 32
|
| 171 |
+
env_config:
|
| 172 |
+
max_steps: 1
|
| 173 |
+
|
| 174 |
+
FrozenLake:
|
| 175 |
+
env_type: frozen_lake
|
| 176 |
+
max_actions_per_traj: 10
|
| 177 |
+
env_instruction: "You are solving the FrozenLake puzzle. Forbid the whole and go to the target. You may move to the unintended direction due to the slippery ice. Example answer format: <think>To forbid the hole and go to the target, I should go left then go up.</think><answer>Left || Up</answer>"
|
| 178 |
+
max_tokens: 100
|
| 179 |
+
parallel_friendly: false
|
| 180 |
+
max_workers: 32
|
| 181 |
+
env_config:
|
| 182 |
+
success_rate: 0.8
|
| 183 |
+
|
| 184 |
+
CoordFrozenLake:
|
| 185 |
+
env_type: frozen_lake
|
| 186 |
+
max_actions_per_traj: 10
|
| 187 |
+
env_instruction: |
|
| 188 |
+
You are solving the FrozenLake puzzle. The observation includes both a symbol grid and zero-indexed coordinates for the start, goal, player, and any holes.
|
| 189 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner (5, 5).
|
| 190 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended tile.
|
| 191 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 192 |
+
max_tokens: 120
|
| 193 |
+
parallel_friendly: false
|
| 194 |
+
max_workers: 32
|
| 195 |
+
env_config:
|
| 196 |
+
observation_format: "grid_coord"
|
| 197 |
+
success_rate: 0.8
|
| 198 |
+
|
| 199 |
+
MetamathQA:
|
| 200 |
+
env_type: metamathqa
|
| 201 |
+
max_actions_per_traj: 1
|
| 202 |
+
env_instruction: "You are solving Math problems. "
|
| 203 |
+
max_tokens: 100
|
| 204 |
+
env_config: null
|
| 205 |
+
|
| 206 |
+
WebShopFull:
|
| 207 |
+
env_type: webshop
|
| 208 |
+
max_actions_per_traj: 15
|
| 209 |
+
env_instruction: "You are an expert autonomous agent operating in the WebShop e‑commerce environment."
|
| 210 |
+
max_tokens: 200
|
| 211 |
+
env_config:
|
| 212 |
+
dataset: full # choose from small or full
|
| 213 |
+
|
| 214 |
+
WebShop:
|
| 215 |
+
env_type: webshop
|
| 216 |
+
max_actions_per_traj: 9
|
| 217 |
+
# env_instruction: "You are browsing an online shop. Based on the instruction, find the product that close to the production description. You need to read the website and decide what action to take next until buying a product. Available actions depends on the page: in the search page you can search keywords, in the search result page you can click an item url or click[next >] to navigate to next page, in the product page you can click[description] or click[features] to see the details, click[blue] or click[x-large] to choose size and colors, click[buy now] when you decided to buy the product, click[back to search] to return to search page. You should only choose action from the available actions list. Example process: I need a gingko light and 20x20 pillow cover that is hand painted. First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>]."
|
| 218 |
+
env_instruction: "You are browsing an online shop. Based on the instruction, buy a product that close to the production description. You need to search, read the search results, pick a product, choose the size and color and buy. You should only choose action from the available actions list provided later. Example process: I need a gingko light and 20x20 pillow cover that is hand painted. First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>]."
|
| 219 |
+
# env_instruction: >
|
| 220 |
+
# You are browsing an online shop. Based on the instruction, find a product
|
| 221 |
+
# that closely matches the production description. You need to iteratively take
|
| 222 |
+
# actions(search or click) in the browser and buy the chosen product.
|
| 223 |
+
# Example:
|
| 224 |
+
# WebShop [SEP] Instruction: [SEP] Find me machine wash men's dress shirts with cotton spandex, classic fit, short sleeve with color: deep atlantic, and size: large tall, and price lower than 60.00 dollars [SEP] Search
|
| 225 |
+
# Available actions: ['search[<content>]']
|
| 226 |
+
# <think>Search for the item: men's dress shirts with cotton spandex, classic fit, short sleeve. Do not search for color, size or price, because they will be on the search result or product page</think><answer>search[men's dress shirts with cotton spandex, classic fit, short sleeve]</answer>
|
| 227 |
+
# Instruction: [SEP] Find me machine wash men's dress shirts with cotton spandex, classic fit, short sleeve with color: deep atlantic, and size: large tall, and price lower than 60.00 dollars [SEP] Back to Search [SEP] Page 1 (Total results: 1) [SEP] Next > [SEP] B09M63B87V [SEP] YALFJV Women Long Sleeve Crew Neck Side Button T Shirts Tunic Dress Loose Asymmetric Hem Tunic Pullover to Wear with Leggings [SEP] $10.71 to $18.34
|
| 228 |
+
# <think>The product on this page is for women. None of the products are close to the description. Click next page to see more products.</think><answer>click[next >]</answer>
|
| 229 |
+
# Instruction: [SEP] Find me machine wash men's dress shirts with cotton spandex, classic fit, short sleeve with color: deep atlantic, and size: large tall, and price lower than 60.00 dollars [SEP] Back to Search [SEP] Page 2 (Total results: 2) [SEP] B07HRFSNL4 [SEP] Nautica Men's Solid Crew Neck Short-Sleeve Pocket T-Shirt [SEP] $16.05 to $40.98 [SEP] B07N7TDKXQ [SEP] SOCKS'NBULK Mens Cotton Crew Neck Short Sleeve T-Shirts Mix Colors Bulk [SEP] $80.79 to $172.8
|
| 230 |
+
# Available actions: ['click[back to search]', 'click[< prev]', 'click[next >]', 'click[b07hrfsnl4]', 'click[b07n7tdkxq]']
|
| 231 |
+
# <think>The B07HRFSNL4 products seems close to the description, and with the price range. Click it.</think><answer>click[b07hrfsnl4]</answer>
|
| 232 |
+
# Instruction: [SEP] Find me machine wash men's dress shirts with cotton spandex, classic fit, short sleeve with color: deep atlantic, and size: large tall, and price lower than 60.00 dollars [SEP] Back to Search [SEP] < Prev [SEP] size [SEP] x-small [SEP] small [SEP] large tall [SEP] color [SEP] navy [SEP] deep atlantic [SEP] deep atlantic
|
| 233 |
+
# Available actions: ['click[back to search]', 'click[< prev]', 'click[description]', 'click[features]', 'click[reviews]', 'click[buy now]', 'click[x-small]', 'click[small]', 'click[large tall]', 'click[navy]', 'click[deep atlantic]']
|
| 234 |
+
# <think>I need to choose the right size. Click large tall</think><answer>click[large tall]</answer>
|
| 235 |
+
# Instruction: [SEP] Find me machine wash men's dress shirts with cotton spandex, classic fit, short sleeve with color: deep atlantic, and size: large tall, and price lower than 60.00 dollars [SEP] Back to Search [SEP] < Prev [SEP] size [SEP] x-small [SEP] small [SEP] large tall [SEP] color [SEP] navy [SEP] deep atlantic [SEP] deep atlantic
|
| 236 |
+
# Available actions: ['click[back to search]', 'click[< prev]', 'click[description]', 'click[features]', 'click[reviews]', 'click[buy now]', 'click[x-small]', 'click[small]', 'click[large tall]', 'click[navy]', 'click[deep atlantic]']
|
| 237 |
+
# <think>Now I need to choose the right color. Click deep atlantic</think><answer>click[deep atlantic]</answer>
|
| 238 |
+
# Instruction: [SEP] Find me machine wash men's dress shirts with cotton spandex, classic fit, short sleeve with color: deep atlantic, and size: large tall, and price lower than 60.00 dollars [SEP] Back to Search [SEP] < Prev [SEP] size [SEP] x-small [SEP] small [SEP] large tall [SEP] color [SEP] navy [SEP] deep atlantic [SEP] deep atlantic
|
| 239 |
+
# Available actions: ['click[back to search]', 'click[< prev]', 'click[description]', 'click[features]', 'click[reviews]', 'click[buy now]', 'click[x-small]', 'click[small]', 'click[large tall]', 'click[navy]', 'click[deep atlantic]']
|
| 240 |
+
# <think>Having selected the size and color, I am ready to buy. Click buy now.</think><answer>click[buy now]</answer>
|
| 241 |
+
|
| 242 |
+
# You are browsing an online shop. Based on the instruction, find the product
|
| 243 |
+
# that best matches the production description. You need to iteratively take
|
| 244 |
+
# actions(search or click) in the browser and buy the chosen product. Example
|
| 245 |
+
# process:
|
| 246 |
+
# Instruction: Find me machine wash men's t-shirts with long sleeve with color: black, and size: xx-large big tall, and price lower than 50.00 dollars
|
| 247 |
+
# WebShop [SEP] Instruction: [SEP] Find me machine wash men's t-shirts with long sleeve with color: black, and size: xx-large big tall, and price lower than 50.00 dollars [SEP] Search
|
| 248 |
+
# Available actions: ['search[<content>]']
|
| 249 |
+
# <think>First search for the big catagory: machine wash men's t-shirts with long sleeve. Do not search for color, size or price, because they will be on the search result or product page</think><answer>search[machine wash men's t-shirts with long sleeve]</answer>
|
| 250 |
+
# Instruction: [SEP] Find me machine wash men's t-shirts with long sleeve with color: black, and size: xx-large big tall, and price lower than 50.00 dollars [SEP] Back to Search [SEP] Page 1 (Total results: 50) [SEP] Next > [SEP] B09QQP3356 [SEP] HAUKLIE Men's Sports Waffle Ribbed Polo Shirts Summer Short Sleeve Cotton Muscle Quarter-Zip Henley T-Shirt Tunics Tops [SEP] $10.99 [SEP] B09Q8RD8YN [SEP] Bungo Stray Anime Dogs Anime Character, Long Sleeve, Sweatshirt, Hoodie, T shirt [SEP] $19.99 [SEP] B09QGK5XHZ [SEP] WENKOMG1 Men's Long Sleeve Undershirt with Mask Turtleneck Hooded T-Shirt Solid Color Workout Tops Zipper Side Slit Shirts Slim Fit Sweatshirt Spring/Summer Tee Shirts(Gray,) [SEP] $8.39 [SEP] B09QQJJ3KM [SEP] One Lucky Teacher St Patrick Day Shamrock Tee Teachers Custom Personalized Unisex T-Shirts Long Sleeve Hoodie Sweatshirt Gifts [SEP] $100.0 [SEP] B09S3BN15C [SEP] Mens Linen Shirt,Men's Striped Shirts Casual Short Sleeve Button Down Shirts Regular Fit Hawaiian Shirts Beach Tees Tops [SEP] $3.78 to $11.38 [SEP] B09ND9DP7J [SEP] InterestPrint Gold Horse Pattern Men's 2-Piece Sleepwear Set, Long Sleeve Shirt with Pants Loungewear [SEP] $43.59 [SEP] B09T756KQ5 [SEP] WENKOMG1 Men's Crewneck Goth Tee Shirts Skull Print Tops Spring/Summer Long Sleeve Sports T-Shirt Baggy Y2K Soft Streetwear [SEP] $4.09 to $8.09 [SEP] B09Q67H373 [SEP] JSPOYOU 2022 Newly T-Shirt for Mens Funny 3D Graphics Pattern Crewneck Short Sleeve Tees Big and Tall Summer Casual Comfy Top [SEP] $1.99 to $8.99 [SEP] B09R9YCM6R [SEP] XXBR Summer T-shirts for Mens, Soldier Short Sleeve 3D Street Vintage Printed Shirt Slim Fit Muscle Casual Tee Tops [SEP] $8.98 to $11.99 [SEP] B09KLQLLT2 [SEP] Long Sleeve Superhero T Shirt Tank Top Mens Compression Shirt Men Workout Fitness Gym Shirt [SEP] $19.99
|
| 251 |
+
# Available actions: ['click[back to search]', 'click[next >]', 'click[b09qqp3356]', 'click[b09q8rd8yn]', 'click[b09qgk5xhz]', 'click[b09qqjj3km]', 'click[b09s3bn15c]', 'click[b09nd9dp7j]', 'click[b09t756kq5]', 'click[b09q67h373]', 'click[b09r9ycm6r]', 'click[b09klqllt2]']
|
| 252 |
+
# <think>Product b09klqllt2 is a Men's Long Sleeve Superhero T Shirt priced 19.99$, which satisfies my need</think><answer>click[b09klqllt2]</answer>
|
| 253 |
+
# Instruction: [SEP] Find me machine wash men's t-shirts with long sleeve with color: black, and size: xx-large big tall, and price lower than 50.00 dollars [SEP] Back to Search [SEP] < Prev [SEP] color [SEP] black | blue [SEP] blue [SEP] blue | red [SEP] bronze [SEP] brown [SEP] gold [SEP] green [SEP] red [SEP] red | blue [SEP] yellow [SEP] grey | red [SEP] size [SEP] small [SEP] medium [SEP] large [SEP] x-large [SEP] xx-large [SEP] Long Sleeve Superhero T Shirt Tank Top Mens Compression Shirt Men Workout Fitness Gym Shirt [SEP] Price: $19.99 [SEP] Rating: N.A. [SEP] Description [SEP] Features [SEP] Reviews [SEP] Buy Now
|
| 254 |
+
# Available actions: ['click[back to search]', 'click[< prev]', 'click[description]', 'click[features]', 'click[reviews]', 'click[buy now]', 'click[black | blue]', 'click[blue]', 'click[blue | red]', 'click[bronze]', 'click[brown]', 'click[gold]', 'click[green]', 'click[red]', 'click[red | blue]', 'click[yellow]', 'click[grey | red]', 'click[small]', 'click[medium]', 'click[large]', 'click[x-large]', 'click[xx-large]']
|
| 255 |
+
# <think>Produce description and price looks good, now select the right color</think><answer>click[black | blue]</answer>
|
| 256 |
+
# Instruction: [SEP] Find me machine wash men's t-shirts with long sleeve with color: black, and size: xx-large big tall, and price lower than 50.00 dollars [SEP] Back to Search [SEP] < Prev [SEP] color [SEP] black | blue [SEP] blue [SEP] blue | red [SEP] bronze [SEP] brown [SEP] gold [SEP] green [SEP] red [SEP] red | blue [SEP] yellow [SEP] grey | red [SEP] size [SEP] small [SEP] medium [SEP] large [SEP] x-large [SEP] xx-large [SEP] Long Sleeve Superhero T Shirt Tank Top Mens Compression Shirt Men Workout Fitness Gym Shirt [SEP] Price: $19.99 [SEP] Rating: N.A. [SEP] Description [SEP] Features [SEP] Reviews [SEP] Buy Now
|
| 257 |
+
# Available actions: ['click[back to search]', 'click[< prev]', 'click[description]', 'click[features]', 'click[reviews]', 'click[buy now]', 'click[black | blue]', 'click[blue]', 'click[blue | red]', 'click[bronze]', 'click[brown]', 'click[gold]', 'click[green]', 'click[red]', 'click[red | blue]', 'click[yellow]', 'click[grey | red]', 'click[small]', 'click[medium]', 'click[large]', 'click[x-large]', 'click[xx-large]']
|
| 258 |
+
# <think>I already selected color, now click size xx-large</think><answer>click[xx-large]</answer>
|
| 259 |
+
# Instruction: [SEP] Find me machine wash men's t-shirts with long sleeve with color: black, and size: xx-large big tall, and price lower than 50.00 dollars [SEP] Back to Search [SEP] < Prev [SEP] color [SEP] black | blue [SEP] blue [SEP] blue | red [SEP] bronze [SEP] brown [SEP] gold [SEP] green [SEP] red [SEP] red | blue [SEP] yellow [SEP] grey | red [SEP] size [SEP] small [SEP] medium [SEP] large [SEP] x-large [SEP] xx-large [SEP] Long Sleeve Superhero T Shirt Tank Top Mens Compression Shirt Men Workout Fitness Gym Shirt [SEP] Price: $19.99 [SEP] Rating: N.A. [SEP] Description [SEP] Features [SEP] Reviews [SEP] Buy Now
|
| 260 |
+
# Available actions: ['click[back to search]', 'click[< prev]', 'click[description]', 'click[features]', 'click[reviews]', 'click[buy now]', 'click[black | blue]', 'click[blue]', 'click[blue | red]', 'click[bronze]', 'click[brown]', 'click[gold]', 'click[green]', 'click[red]', 'click[red | blue]', 'click[yellow]', 'click[grey | red]', 'click[small]', 'click[medium]', 'click[large]', 'click[x-large]', 'click[xx-large]']
|
| 261 |
+
# <think>I already selected color and size, now click buy now</think><answer>click[buy now]</answer>
|
| 262 |
+
max_tokens: 200
|
| 263 |
+
# env_config: null
|
| 264 |
+
env_config:
|
| 265 |
+
dataset: small # choose from small or full
|
| 266 |
+
# data_path: /RAGEN-Dev/external/webshop-minimal/webshop_minimal
|
| 267 |
+
# file_path: /RAGEN-Dev/external/webshop-minimal/webshop_minimal/data/items_shuffle.json
|
| 268 |
+
|
| 269 |
+
Lean:
|
| 270 |
+
env_type: lean
|
| 271 |
+
max_actions_per_traj: 30
|
| 272 |
+
env_instruction: "You are a Lean theorem prover. Given a Lean theorem statement, propose a sequence of tactics that completes the proof. Think step by step about which tactics to apply next. Provide tactics separated by '||', for example <answer>intro || simp || rfl</answer>."
|
| 273 |
+
max_tokens: 512
|
| 274 |
+
parallel_friendly: true
|
| 275 |
+
max_workers: 32
|
| 276 |
+
env_config: null # Please refer to ragen/env/lean/config.py for a full list of parameters.
|
| 277 |
+
|
| 278 |
+
SimpleSudoku:
|
| 279 |
+
env_type: sudoku
|
| 280 |
+
max_actions_per_traj: 20
|
| 281 |
+
env_instruction: |
|
| 282 |
+
You are a careful 4x4 Sudoku solver. Use these reusable abstractions when reasoning:
|
| 283 |
+
1. In <think>, explain the constraint logic behind the move, not just the final placement. Mention which row, column, or 2x2 box makes the move safe or forced.
|
| 284 |
+
2. Treat each move as a constraint-preserving placement: place a number only if it does not already appear in the same row, column, or 2x2 box.
|
| 285 |
+
3. First look for highly forced cells. If an empty cell has only one legal candidate after checking its row, column, and box, fill it immediately and explain why other numbers are excluded.
|
| 286 |
+
4. If no cell is obviously forced, scan each row, column, and 2x2 box for missing numbers. If a missing number can go in only one empty position within that unit, place it there and state that unit-level reason.
|
| 287 |
+
5. Prefer moves that reduce uncertainty and create new forced cells for the next turn. A good move should make the remaining puzzle more constrained, not more ambiguous.
|
| 288 |
+
6. Solve incrementally: choose exactly one placement, explain it briefly in <think>, then output that one move in <answer>.
|
| 289 |
+
7. Never modify bracketed initial cells or already-filled cells. Only place numbers into dots.
|
| 290 |
+
8. Avoid exploratory guesses when a forced move exists. In this environment, reliable progress usually comes from constraint propagation rather than trial-and-error.
|
| 291 |
+
9. If a previous move was invalid or the board did not change, do not repeat the same placement. Recompute legal candidates and explain the corrected constraint-consistent choice.
|
| 292 |
+
10. Use row, column, and box agreement as confidence: the strongest placements are those supported by multiple constraints at once.
|
| 293 |
+
11. Keep <think> concise but meaningful: identify the target cell, list or compare its legal candidates, and give the decisive constraint.
|
| 294 |
+
12. Output only the required XML-like format and choose valid Sudoku placements.
|
| 295 |
+
|
| 296 |
+
You are solving a Sudoku puzzle. Fill in the grid so that every row, column, and 2x2 box contains the numbers 1-4 without repetition.
|
| 297 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are shown as dots (.).
|
| 298 |
+
Place numbers one at a time using the format: <answer>place 1 at row 2 col 3</answer>
|
| 299 |
+
Always output: <think> [brief constraint-based reasoning] </think> <answer> [one placement] </answer>
|
| 300 |
+
The environment will provide feedback on valid/invalid moves and show conflicts if any occur.
|
| 301 |
+
max_tokens: 150
|
| 302 |
+
parallel_friendly: false
|
| 303 |
+
max_workers: 32
|
| 304 |
+
env_config:
|
| 305 |
+
grid_size: 4
|
| 306 |
+
difficulty: "easy"
|
| 307 |
+
render_format: "with_feedback"
|
| 308 |
+
show_conflicts: false
|
| 309 |
+
show_valid_numbers: false
|
| 310 |
+
max_steps: 20
|
| 311 |
+
|
| 312 |
+
MediumSudoku:
|
| 313 |
+
env_type: sudoku
|
| 314 |
+
max_actions_per_traj: 30
|
| 315 |
+
env_instruction: |
|
| 316 |
+
You are solving a Sudoku puzzle. Fill in the grid so that every row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 317 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are shown as dots (.).
|
| 318 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer> or <answer>2,3,5</answer>
|
| 319 |
+
The environment will provide feedback on valid/invalid moves and show conflicts if any occur.
|
| 320 |
+
max_tokens: 150
|
| 321 |
+
parallel_friendly: false
|
| 322 |
+
max_workers: 32
|
| 323 |
+
env_config:
|
| 324 |
+
grid_size: 9
|
| 325 |
+
difficulty: "medium"
|
| 326 |
+
render_format: "with_feedback"
|
| 327 |
+
show_conflicts: true
|
| 328 |
+
show_valid_numbers: true
|
| 329 |
+
max_steps: 81
|
| 330 |
+
|
| 331 |
+
# --- Search QA (HotpotQA) ---
|
| 332 |
+
# Requires: retrieval server running (see scripts/retrieval/launch_server.sh)
|
| 333 |
+
SearchQA:
|
| 334 |
+
env_type: search
|
| 335 |
+
max_actions_per_traj: 10
|
| 336 |
+
env_instruction: |
|
| 337 |
+
You are a search agent answering questions by searching for information.
|
| 338 |
+
Use search[your query] to find relevant documents, and finish[your answer] to submit your final answer.
|
| 339 |
+
|
| 340 |
+
You should first reason step-by-step about the current situation. This reasoning process MUST be enclosed within <think> </think> tags.
|
| 341 |
+
Then provide your action within <answer>...</answer> tags.
|
| 342 |
+
|
| 343 |
+
Examples:
|
| 344 |
+
<think>I need to find information about Ben Platt's father.</think><answer>search[Ben Platt father parent]</answer>
|
| 345 |
+
<think>Based on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry Platt]</answer>
|
| 346 |
+
max_tokens: 300
|
| 347 |
+
parallel_friendly: true
|
| 348 |
+
max_workers: 32
|
| 349 |
+
env_config:
|
| 350 |
+
max_steps: 10
|
| 351 |
+
max_search_results: 5
|
| 352 |
+
|
| 353 |
+
SearchQAMock:
|
| 354 |
+
env_type: search
|
| 355 |
+
max_actions_per_traj: 10
|
| 356 |
+
env_instruction: |
|
| 357 |
+
You are a search agent answering questions by searching for information.
|
| 358 |
+
Use search[your query] to find relevant documents, and finish[your answer] to submit your final answer.
|
| 359 |
+
|
| 360 |
+
You should first reason step-by-step about the current situation. This reasoning process MUST be enclosed within <think> </think> tags.
|
| 361 |
+
Then provide your action within <answer>...</answer> tags.
|
| 362 |
+
|
| 363 |
+
Examples:
|
| 364 |
+
<think>I need to find information about Ben Platt's father.</think><answer>search[Ben Platt father parent]</answer>
|
| 365 |
+
<think>Based on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry Platt]</answer>
|
| 366 |
+
max_tokens: 300
|
| 367 |
+
parallel_friendly: true
|
| 368 |
+
max_workers: 32
|
| 369 |
+
env_config:
|
| 370 |
+
max_steps: 10
|
| 371 |
+
max_search_results: 5
|
| 372 |
+
mock_mode: true
|
| 373 |
+
game_2048:
|
| 374 |
+
env_type: game_2048
|
| 375 |
+
max_actions_per_traj: 700
|
| 376 |
+
env_instruction: |
|
| 377 |
+
You are playing the 2048 game on a 4x4 grid. Merge equal tiles by sliding Up, Right, Down, or Left.
|
| 378 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with a single action.
|
| 379 |
+
Example: <answer>Up</answer>
|
| 380 |
+
max_tokens: 8192
|
| 381 |
+
env_config: null
|
| 382 |
+
|
| 383 |
+
rubikscube:
|
| 384 |
+
env_type: rubikscube
|
| 385 |
+
max_actions_per_traj: 10
|
| 386 |
+
env_instruction: |
|
| 387 |
+
You are solving a 2x2 Rubik's Cube (Pocket Cube). The goal is to restore the cube so that each of the faces consists of a single, unique color.
|
| 388 |
+
Available actions use standard Singmaster notation for face rotations: U, U', D, D', L, L', R, R', F, F', B, B'.
|
| 389 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 390 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., 'R'). A letter with prime (') means 90° counter-clockwise (e.g., "R'").
|
| 391 |
+
Respond with a sequence of actions separated by "||".
|
| 392 |
+
Example: <answer>U</answer>
|
| 393 |
+
max_tokens: 96
|
| 394 |
+
env_config:
|
| 395 |
+
scramble_depth: 1
|
| 396 |
+
max_steps: 7
|
| 397 |
+
render_mode: "text"
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
# You are a careful 4x4 Sudoku solver. Use these reusable abstractions when reasoning:
|
| 401 |
+
# 1. In <think>, explain the constraint logic behind the move, not just the final placement. Mention which row, column, or 2x2 box makes the move safe or forced.
|
| 402 |
+
# 2. Treat each move as a constraint-preserving placement: place a number only if it does not already appear in the same row, column, or 2x2 box.
|
| 403 |
+
# 3. First look for highly forced cells. If an empty cell has only one legal candidate after checking its row, column, and box, fill it immediately and explain why other numbers are excluded.
|
| 404 |
+
# 4. If no cell is obviously forced, scan each row, column, and 2x2 box for missing numbers. If a missing number can go in only one empty position within that unit, place it there and state that unit-level reason.
|
| 405 |
+
# 5. Prefer moves that reduce uncertainty and create new forced cells for the next turn. A good move should make the remaining puzzle more constrained, not more ambiguous.
|
| 406 |
+
# 6. Solve incrementally: choose exactly one placement, explain it briefly in <think>, then output that one move in <answer>.
|
| 407 |
+
# 7. Never modify bracketed initial cells or already-filled cells. Only place numbers into dots.
|
| 408 |
+
# 8. Avoid exploratory guesses when a forced move exists. In this environment, reliable progress usually comes from constraint propagation rather than trial-and-error.
|
| 409 |
+
# 9. If a previous move was invalid or the board did not change, do not repeat the same placement. Recompute legal candidates and explain the corrected constraint-consistent choice.
|
| 410 |
+
# 10. Use row, column, and box agreement as confidence: the strongest placements are those supported by multiple constraints at once.
|
| 411 |
+
# 11. Keep <think> concise but meaningful: identify the target cell, list or compare its legal candidates, and give the decisive constraint.
|
| 412 |
+
# 12. Output only the required XML-like format and choose valid Sudoku placements.
|
| 413 |
+
|
| 414 |
+
# You are solving a Sudoku puzzle. Fill in the grid so that every row, column, and 2x2 box contains the numbers 1-4 without repetition.
|
| 415 |
+
# Initial cells are shown in [brackets] and cannot be modified. Empty cells are shown as dots (.).
|
| 416 |
+
# Place numbers one at a time using the format: <answer>place 1 at row 2 col 3</answer>
|
| 417 |
+
# Always output: <think> [brief constraint-based reasoning] </think> <answer> [one placement] </answer>
|
| 418 |
+
# The environment will provide feedback on valid/invalid moves and show conflicts if any occur.
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
|
| 422 |
+
|
| 423 |
+
# You are solving a Sudoku puzzle. Fill in the grid so that every row, column, and 2x2 box contains the numbers 1-4 without repetition.
|
| 424 |
+
# Initial cells are shown in [brackets] and cannot be modified. Empty cells are shown as dots (.).
|
| 425 |
+
# Place numbers one at a time using the format, for example: <answer>place 1 at row 2 col 3</answer> or <answer>1,2,3</answer>
|
| 426 |
+
# The environment will provide feedback on valid/invalid moves and show conflicts if any occur.
|
config/eval.yaml
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- envs
|
| 3 |
+
- base
|
| 4 |
+
|
| 5 |
+
hydra:
|
| 6 |
+
searchpath:
|
| 7 |
+
- pkg://verl.trainer.config
|
| 8 |
+
|
| 9 |
+
system:
|
| 10 |
+
CUDA_VISIBLE_DEVICES: "0"
|
| 11 |
+
|
| 12 |
+
seed:
|
| 13 |
+
train: 10000
|
| 14 |
+
val: 123
|
| 15 |
+
|
| 16 |
+
model_path: Qwen/Qwen2.5-3B-Instruct
|
| 17 |
+
enable_response_mask: True
|
| 18 |
+
|
| 19 |
+
lora:
|
| 20 |
+
rank: 0
|
| 21 |
+
alpha: 64
|
| 22 |
+
target_modules: all-linear
|
| 23 |
+
|
| 24 |
+
actor_rollout_ref:
|
| 25 |
+
model:
|
| 26 |
+
path: ${model_path}
|
| 27 |
+
lora_rank: ${lora.rank}
|
| 28 |
+
lora_alpha: ${lora.alpha}
|
| 29 |
+
target_modules: ${lora.target_modules}
|
| 30 |
+
rollout:
|
| 31 |
+
name: vllm
|
| 32 |
+
log_prob_micro_batch_size_per_gpu: 64
|
| 33 |
+
tensor_model_parallel_size: 1
|
| 34 |
+
dtype: bfloat16
|
| 35 |
+
max_model_len: 3600
|
| 36 |
+
prompt_length: 1
|
| 37 |
+
response_length: 400
|
| 38 |
+
gpu_memory_utilization: 0.9
|
| 39 |
+
max_num_batched_tokens: 8192
|
| 40 |
+
enforce_eager: True
|
| 41 |
+
free_cache_engine: True
|
| 42 |
+
enable_chunked_prefill: False
|
| 43 |
+
disable_log_stats: False
|
| 44 |
+
val_kwargs:
|
| 45 |
+
do_sample: True
|
| 46 |
+
temperature: 0.5
|
| 47 |
+
top_p: 1.0
|
| 48 |
+
top_k: -1
|
| 49 |
+
logprobs: 20 # return top20 logprobs
|
| 50 |
+
|
| 51 |
+
agent_proxy:
|
| 52 |
+
context_window_mode: "full" # "full" | "limited_multi_turn" | "single_turn"
|
| 53 |
+
max_context_window: -1
|
| 54 |
+
max_turn: 5
|
| 55 |
+
action_sep: "||"
|
| 56 |
+
max_actions_per_turn: 2
|
| 57 |
+
use_turn_scores: False
|
| 58 |
+
enable_think: True
|
| 59 |
+
reward_normalization:
|
| 60 |
+
grouping: "state"
|
| 61 |
+
method: "identity"
|
| 62 |
+
|
| 63 |
+
es_manager:
|
| 64 |
+
format_penalty: -0.1
|
| 65 |
+
train:
|
| 66 |
+
env_groups: 8
|
| 67 |
+
group_size: 16
|
| 68 |
+
env_configs:
|
| 69 |
+
tags: ["CoordSokoban"]
|
| 70 |
+
n_groups: [8]
|
| 71 |
+
val:
|
| 72 |
+
env_groups: 32
|
| 73 |
+
group_size: 16
|
| 74 |
+
env_configs:
|
| 75 |
+
tags: ["CoordSokoban"]
|
| 76 |
+
n_groups: [32]
|
| 77 |
+
|
| 78 |
+
ctx_manager:
|
| 79 |
+
generation:
|
| 80 |
+
gen_config:
|
| 81 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 82 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 83 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 84 |
+
top_k: ${actor_rollout_ref.rollout.top_k}
|
| 85 |
+
kwargs: null
|
| 86 |
+
|
| 87 |
+
output:
|
| 88 |
+
dir: results/eval
|
| 89 |
+
filename: val_rollouts.pkl
|
| 90 |
+
format: pkl # pkl | jsonl
|
| 91 |
+
append_timestamp: true
|
| 92 |
+
save_jsonl_backup: false # Save JSONL backup when format=pkl
|
| 93 |
+
save_pkl_backup: false # Save PKL backup when format=jsonl
|
| 94 |
+
keep_batch_keys: null
|
| 95 |
+
keep_non_tensor_keys: null
|
| 96 |
+
keep_meta_info: true
|
config/eval_webshop.yaml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base # inherit the base training/eval config
|
| 3 |
+
|
| 4 |
+
hydra:
|
| 5 |
+
searchpath:
|
| 6 |
+
- pkg://verl.trainer.config
|
| 7 |
+
|
| 8 |
+
system:
|
| 9 |
+
CUDA_VISIBLE_DEVICES: "0,1,2,3" # change to your GPU layout
|
| 10 |
+
|
| 11 |
+
trainer:
|
| 12 |
+
# Evaluation-only run (no training)
|
| 13 |
+
val_only: true
|
| 14 |
+
val_before_train: false
|
| 15 |
+
total_training_steps: 0
|
| 16 |
+
validation_steps: 1 # e.g., each step may launch a fixed number of rollouts
|
| 17 |
+
test_freq: 0
|
| 18 |
+
logger: [console] # turn off W&B
|
| 19 |
+
save_freq: -1 # no checkpoints
|
| 20 |
+
experiment_name: webshop_10turns_eval # ASCII only; keep concise
|
| 21 |
+
|
| 22 |
+
# Resume a pre-trained checkpoint to evaluate
|
| 23 |
+
resume_mode: resume_path
|
| 24 |
+
resume_from_path: /ABSOLUTE/PATH/TO/checkpoints/webshop_12turns_200steps_grpo/global_step_200 # <- set this
|
| 25 |
+
|
| 26 |
+
use_critic: false # no critic during eval
|
| 27 |
+
|
| 28 |
+
# Rollout / decoding behavior
|
| 29 |
+
actor_rollout_ref:
|
| 30 |
+
rollout:
|
| 31 |
+
do_sample: false # deterministic (greedy). For a stochastic pass, flip to true and set temperature/top_p elsewhere
|
| 32 |
+
|
| 33 |
+
# Evaluation horizon
|
| 34 |
+
agent_proxy:
|
| 35 |
+
max_turn: 10 # align with experiment_name; change to 12/18 if you want longer horizons
|
config/evaluate_api_llm.yaml
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
defaults:
|
| 2 |
+
- base # this is a symbolic link to the verl/verl/trainer/config/ppo_trainer.yaml file
|
| 3 |
+
|
| 4 |
+
hydra:
|
| 5 |
+
searchpath:
|
| 6 |
+
- pkg://verl.trainer.config
|
| 7 |
+
|
| 8 |
+
model_config:
|
| 9 |
+
model_name: gpt-4o # should be registered in model_info
|
| 10 |
+
max_concurrency: 16
|
| 11 |
+
|
| 12 |
+
model_info:
|
| 13 |
+
Qwen2.5-7B-Instruct:
|
| 14 |
+
provider_name: together
|
| 15 |
+
model_name: Qwen/Qwen2.5-7B-Instruct-Turbo
|
| 16 |
+
generation_kwargs:
|
| 17 |
+
temperature: 0
|
| 18 |
+
max_tokens: 512
|
| 19 |
+
Qwen2.5-72B-Instruct:
|
| 20 |
+
provider_name: together
|
| 21 |
+
model_name: Qwen/Qwen2.5-72B-Instruct-Turbo
|
| 22 |
+
generation_kwargs:
|
| 23 |
+
temperature: 0
|
| 24 |
+
max_tokens: 512
|
| 25 |
+
claude-3.7:
|
| 26 |
+
provider_name: anthropic
|
| 27 |
+
model_name: claude-3-7-sonnet-20250219
|
| 28 |
+
generation_kwargs:
|
| 29 |
+
temperature: 0
|
| 30 |
+
max_tokens: 512 # max_completion_tokens if o1-mini
|
| 31 |
+
gpt-4o:
|
| 32 |
+
provider_name: openai
|
| 33 |
+
model_name: gpt-4o
|
| 34 |
+
generation_kwargs:
|
| 35 |
+
temperature: 0
|
| 36 |
+
max_tokens: 512 # max_completion_tokens if o1-mini
|
| 37 |
+
deepseek-r1:
|
| 38 |
+
provider_name: deepseek
|
| 39 |
+
model_name: deepseek-reasoner
|
| 40 |
+
generation_kwargs:
|
| 41 |
+
temperature: 0
|
| 42 |
+
max_completion_tokens: 512
|
| 43 |
+
deepseek-v3:
|
| 44 |
+
provider_name: deepseek
|
| 45 |
+
model_name: deepseek-chat
|
| 46 |
+
generation_kwargs:
|
| 47 |
+
temperature: 0
|
| 48 |
+
max_completion_tokens: 512
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
es_manager:
|
| 53 |
+
val:
|
| 54 |
+
env_groups: 256
|
| 55 |
+
group_size: 1 # should be set to 1 because val temperature is set to 0 and same prompt leads to same output
|
| 56 |
+
env_configs:
|
| 57 |
+
tags: ["CoordSokoban"]
|
| 58 |
+
n_groups: [256] # If not set, all env names divide nums equally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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RAGEN Evaluation Guide
|
| 2 |
+
|
| 3 |
+
This guide explains how to evaluate trained RAGEN models and configure output formats.
|
| 4 |
+
|
| 5 |
+
## Quick Start
|
| 6 |
+
|
| 7 |
+
Evaluate a model using the default configuration:
|
| 8 |
+
|
| 9 |
+
```bash
|
| 10 |
+
python -m ragen.llm_agent.agent_proxy --config-name eval
|
| 11 |
+
```
|
| 12 |
+
|
| 13 |
+
Or use a specific config:
|
| 14 |
+
|
| 15 |
+
```bash
|
| 16 |
+
python -m ragen.llm_agent.agent_proxy --config-name _2_sokoban
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
## Configuration File
|
| 20 |
+
|
| 21 |
+
Evaluation settings are configured in `config/eval.yaml`. Key sections:
|
| 22 |
+
|
| 23 |
+
### Model Configuration
|
| 24 |
+
|
| 25 |
+
```yaml
|
| 26 |
+
model_path: Qwen/Qwen2.5-3B-Instruct
|
| 27 |
+
|
| 28 |
+
lora:
|
| 29 |
+
rank: 0 # Set to 0 to disable LoRA; set to > 0 for LoRA-finetuned models
|
| 30 |
+
alpha: 64
|
| 31 |
+
target_modules: all-linear
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
### Rollout Settings
|
| 35 |
+
|
| 36 |
+
```yaml
|
| 37 |
+
actor_rollout_ref:
|
| 38 |
+
rollout:
|
| 39 |
+
max_model_len: 3600 # Max context length
|
| 40 |
+
response_length: 400 # Max tokens per response
|
| 41 |
+
val_kwargs:
|
| 42 |
+
do_sample: True # Enable sampling
|
| 43 |
+
temperature: 0.5 # Sampling temperature
|
| 44 |
+
top_p: 1.0 # Nucleus sampling
|
| 45 |
+
top_k: -1 # Top-k sampling (-1 = disabled)
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
### Agent Proxy Settings
|
| 49 |
+
|
| 50 |
+
```yaml
|
| 51 |
+
agent_proxy:
|
| 52 |
+
context_window_mode: "full" # "full" | "limited_multi_turn" | "single_turn"
|
| 53 |
+
max_context_window: -1 # Number of previous turns to retain (-1 = unlimited)
|
| 54 |
+
max_turn: 5 # Maximum interaction turns
|
| 55 |
+
enable_think: True # Enable <think>...</think> reasoning
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
**Context Window Modes:**
|
| 59 |
+
- `full`: Keep all previous turns in context
|
| 60 |
+
- `limited_multi_turn`: Keep only the last `max_context_window` turns
|
| 61 |
+
- `single_turn`: Only current state, no history
|
| 62 |
+
|
| 63 |
+
### Environment Settings
|
| 64 |
+
|
| 65 |
+
```yaml
|
| 66 |
+
es_manager:
|
| 67 |
+
val:
|
| 68 |
+
env_groups: 32 # Number of environment groups
|
| 69 |
+
group_size: 16 # Environments per group (total = groups × size)
|
| 70 |
+
env_configs:
|
| 71 |
+
tags: ["CoordSokoban"] # Environment type(s)
|
| 72 |
+
n_groups: [32] # Groups per environment type
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
**Available environment tags** are defined in `config/envs.yaml` under `custom_envs`.
|
| 76 |
+
|
| 77 |
+
### Output Configuration
|
| 78 |
+
|
| 79 |
+
```yaml
|
| 80 |
+
output:
|
| 81 |
+
dir: results/eval # Output directory
|
| 82 |
+
filename: val_rollouts.pkl # Output filename
|
| 83 |
+
format: pkl # pkl | jsonl
|
| 84 |
+
append_timestamp: true # Add timestamp to filename
|
| 85 |
+
save_jsonl_backup: false # Save JSONL backup when format=pkl
|
| 86 |
+
save_pkl_backup: false # Save PKL backup when format=jsonl
|
| 87 |
+
keep_batch_keys: null # Filter batch keys (null = keep all)
|
| 88 |
+
keep_non_tensor_keys: null # Filter non-tensor keys (null = keep all)
|
| 89 |
+
keep_meta_info: true # Include metadata
|
| 90 |
+
```
|
| 91 |
+
|
| 92 |
+
## Output Formats
|
| 93 |
+
|
| 94 |
+
### PKL Format (Default)
|
| 95 |
+
|
| 96 |
+
Binary format containing the full `DataProto` object with tensors, metadata, and trajectories.
|
| 97 |
+
|
| 98 |
+
```yaml
|
| 99 |
+
output:
|
| 100 |
+
format: pkl
|
| 101 |
+
filename: val_rollouts.pkl
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
**Visualization:**
|
| 105 |
+
```bash
|
| 106 |
+
python scripts/visualize.py --rollout_path results/eval/
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
### JSONL Format (OpenAI-Compatible)
|
| 110 |
+
|
| 111 |
+
Human-readable JSONL where each line is a trajectory in OpenAI message format.
|
| 112 |
+
|
| 113 |
+
```yaml
|
| 114 |
+
output:
|
| 115 |
+
format: jsonl
|
| 116 |
+
filename: trajectories.jsonl
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
**JSONL structure:**
|
| 120 |
+
```json
|
| 121 |
+
{
|
| 122 |
+
"custom_id": "traj_0",
|
| 123 |
+
"messages": [
|
| 124 |
+
{"role": "user", "content": "Initial state..."},
|
| 125 |
+
{"role": "assistant", "content": "<think>...</think><ans>action</ans>"},
|
| 126 |
+
{"role": "user", "content": "Next state... (reward: 1.0)"},
|
| 127 |
+
...
|
| 128 |
+
],
|
| 129 |
+
"metadata": {
|
| 130 |
+
"env_id": 0,
|
| 131 |
+
"group_id": 0,
|
| 132 |
+
"success": true,
|
| 133 |
+
"total_reward": 5.0,
|
| 134 |
+
"num_turns": 3,
|
| 135 |
+
"entropy": 2.45,
|
| 136 |
+
"n_tokens": 128
|
| 137 |
+
}
|
| 138 |
+
}
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
### Dual Output
|
| 142 |
+
|
| 143 |
+
Save both formats simultaneously:
|
| 144 |
+
|
| 145 |
+
```yaml
|
| 146 |
+
output:
|
| 147 |
+
format: pkl
|
| 148 |
+
save_jsonl_backup: true # Also save JSONL
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
Or:
|
| 152 |
+
|
| 153 |
+
```yaml
|
| 154 |
+
output:
|
| 155 |
+
format: jsonl
|
| 156 |
+
save_pkl_backup: true # Also save PKL
|
| 157 |
+
```
|
| 158 |
+
|
| 159 |
+
## Converting Existing PKL Files
|
| 160 |
+
|
| 161 |
+
Convert existing PKL rollouts to JSONL:
|
| 162 |
+
|
| 163 |
+
```bash
|
| 164 |
+
python scripts/convert_to_jsonl.py \
|
| 165 |
+
--input results/eval/val_rollouts_20260413_123456.pkl \
|
| 166 |
+
--output trajectories.jsonl
|
| 167 |
+
```
|
| 168 |
+
|
| 169 |
+
Auto-generate output filename:
|
| 170 |
+
|
| 171 |
+
```bash
|
| 172 |
+
python scripts/convert_to_jsonl.py --input results/eval/val_rollouts_*.pkl
|
| 173 |
+
# Creates: val_rollouts_*.jsonl in the same directory
|
| 174 |
+
```
|
| 175 |
+
|
| 176 |
+
## Advanced Usage
|
| 177 |
+
|
| 178 |
+
### Override Config from Command Line
|
| 179 |
+
|
| 180 |
+
```bash
|
| 181 |
+
python -m ragen.llm_agent.agent_proxy --config-name eval \
|
| 182 |
+
model_path=path/to/checkpoint \
|
| 183 |
+
actor_rollout_ref.rollout.temperature=0.7 \
|
| 184 |
+
output.format=jsonl \
|
| 185 |
+
es_manager.val.env_groups=64
|
| 186 |
+
```
|
| 187 |
+
|
| 188 |
+
### Custom Evaluation Seeds
|
| 189 |
+
|
| 190 |
+
Control randomness for reproducibility:
|
| 191 |
+
|
| 192 |
+
```yaml
|
| 193 |
+
seed:
|
| 194 |
+
val: 123 # Validation seed
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
### GPU Configuration
|
| 198 |
+
|
| 199 |
+
```yaml
|
| 200 |
+
system:
|
| 201 |
+
CUDA_VISIBLE_DEVICES: "0" # GPU device(s)
|
| 202 |
+
|
| 203 |
+
actor_rollout_ref:
|
| 204 |
+
rollout:
|
| 205 |
+
tensor_model_parallel_size: 1 # Number of GPUs for tensor parallelism
|
| 206 |
+
gpu_memory_utilization: 0.9 # Max GPU memory fraction
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
### Filtering Output Data
|
| 210 |
+
|
| 211 |
+
Reduce file size by filtering keys:
|
| 212 |
+
|
| 213 |
+
```yaml
|
| 214 |
+
output:
|
| 215 |
+
keep_batch_keys: ["rm_scores", "responses"] # Only keep these tensor keys
|
| 216 |
+
keep_non_tensor_keys: ["history", "metrics"] # Only keep these non-tensor keys
|
| 217 |
+
```
|
| 218 |
+
|
| 219 |
+
Set to `null` to keep all keys.
|
| 220 |
+
|
| 221 |
+
## Metrics
|
| 222 |
+
|
| 223 |
+
After evaluation, metrics are displayed in the terminal:
|
| 224 |
+
|
| 225 |
+
```
|
| 226 |
+
rollout rewards: 0.85
|
| 227 |
+
metrics:
|
| 228 |
+
CoordSokoban/success: 0.78
|
| 229 |
+
CoordSokoban/num_actions: 4.2
|
| 230 |
+
CoordSokoban/pass@16: 0.92
|
| 231 |
+
```
|
| 232 |
+
|
| 233 |
+
**Common metrics:**
|
| 234 |
+
- `{env}/success`: Success rate (0-1)
|
| 235 |
+
- `{env}/num_actions`: Average actions per trajectory
|
| 236 |
+
- `{env}/pass@k`: At least one success in group of k rollouts
|
| 237 |
+
- `episodic_return`: Cumulative reward
|
| 238 |
+
|
| 239 |
+
## Troubleshooting
|
| 240 |
+
|
| 241 |
+
**Out of memory:**
|
| 242 |
+
```yaml
|
| 243 |
+
actor_rollout_ref:
|
| 244 |
+
rollout:
|
| 245 |
+
max_model_len: 2048 # Reduce context length
|
| 246 |
+
response_length: 128 # Reduce response length
|
| 247 |
+
gpu_memory_utilization: 0.7 # Lower memory usage
|
| 248 |
+
```
|
| 249 |
+
|
| 250 |
+
**Evaluation too slow:**
|
| 251 |
+
- Reduce `es_manager.val.env_groups` or `group_size`
|
| 252 |
+
- Use `temperature: 0` for greedy decoding (faster)
|
| 253 |
+
- Enable `enforce_eager: False` for compiled mode (if compatible)
|
| 254 |
+
|
| 255 |
+
**JSONL parsing errors:**
|
| 256 |
+
- Ensure `history` data is serializable
|
| 257 |
+
- Check for special characters in state/response strings
|
| 258 |
+
- Use `save_pkl_backup: true` to preserve original data
|
| 259 |
+
|
| 260 |
+
## Related Documentation
|
| 261 |
+
|
| 262 |
+
- [Main README](../README.md) - General RAGEN overview
|
| 263 |
+
- [Rollout Filtering Guide](guide_rollout_filtering.md) - Training-time filtering
|
| 264 |
+
- [V1 README](readme_v1.md) - Legacy evaluation instructions
|
| 265 |
+
- [WebShop Evaluation](experiment_webshop_release.md) - WebShop-specific setup
|
docs/experiment_frozen_lake_slipper_sweep.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FrozenLake Slipper Sweep Runs
|
| 2 |
+
|
| 3 |
+
This doc covers the experiment script for the FrozenLake slipper-rate sweep.
|
| 4 |
+
|
| 5 |
+
## Scripts Overview
|
| 6 |
+
|
| 7 |
+
| Script | Purpose | Variables |
|
| 8 |
+
|--------|---------|-----------|
|
| 9 |
+
| `run_frozen_lake_slipper_rate_sweep.sh` | Sweep FrozenLake stochasticity while comparing `filter` vs `nofilter` | `slipper_rate` (`100,50,20,10,5,2,0` by default), `filter`/`nofilter` |
|
| 10 |
+
|
| 11 |
+
The script runs FrozenLake with `Qwen2.5-3B`, `GAE`.
|
| 12 |
+
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
## 1. FrozenLake Slipper Sweep (`run_frozen_lake_slipper_rate_sweep.sh`)
|
| 16 |
+
|
| 17 |
+
Tracks how `filter` and `nofilter` success rates change as FrozenLake stochasticity varies via `slipper_rate`, using project `ragen_release_frozenlake_slipper_rate_sweep`.
|
| 18 |
+
|
| 19 |
+
Goal:
|
| 20 |
+
- Test whether RV-style filtering remains helpful as FrozenLake transition randomness changes
|
| 21 |
+
|
| 22 |
+
Key Details:
|
| 23 |
+
- `slipper_rate` is normalized to a ratio in `[0, 1]`, and the environment is configured with `success_rate = 1 - slipper_rate`
|
| 24 |
+
- Default comparison modes are both `filter` and `nofilter`
|
| 25 |
+
- This script explicitly fixes `rollout_filter_top_p_prob_mode=softmax`
|
| 26 |
+
- Mode mapping:
|
| 27 |
+
- `filter`: `top_p=0.9` by default and `rollout_filter_include_zero=False`
|
| 28 |
+
- `nofilter`: `top_p=1.0` by default and `rollout_filter_include_zero=True`
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
bash scripts/runs/run_frozen_lake_slipper_rate_sweep.sh
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Options:
|
| 35 |
+
- `--steps` (default: `400`)
|
| 36 |
+
- `--slipper-rate` (comma list; accepts `100,50,20,10,5,2,0`, `1.0,0.5,...`, or `%`-suffixed values)
|
| 37 |
+
- `--filter-modes` (comma list; `filter`, `nofilter`, or both; default: both)
|
| 38 |
+
- `--filter-top-p` (default: `0.9`)
|
| 39 |
+
- `--nofilter-top-p` (default: `1.0`)
|
| 40 |
+
- `--gpus` (comma list; auto-detect if omitted)
|
| 41 |
+
- `--gpus-per-exp` (default: `1`)
|
| 42 |
+
- `--ray-num-cpus` (default: `16`)
|
| 43 |
+
- `--cooldown` (default: `30`)
|
| 44 |
+
- `--gpu-memory-utilization` (default: `0.5`)
|
| 45 |
+
- `--save-freq` (default: `-1`)
|
| 46 |
+
|
| 47 |
+
Examples:
|
| 48 |
+
```bash
|
| 49 |
+
# Run the full default sweep
|
| 50 |
+
bash scripts/runs/run_frozen_lake_slipper_rate_sweep.sh
|
| 51 |
+
|
| 52 |
+
# Run only `nofilter` on a custom subset of slipper rates
|
| 53 |
+
bash scripts/runs/run_frozen_lake_slipper_rate_sweep.sh --slipper-rate 50,20,5 --filter-modes nofilter --gpus 0 --cooldown 30 --ray-num-cpus 8
|
| 54 |
+
|
| 55 |
+
# Run one `filter` and one `nofilter` 50%-slipper experiment on 4xH100 each
|
| 56 |
+
bash scripts/runs/run_frozen_lake_slipper_rate_sweep.sh --slipper-rate 50 --gpus-per-exp 4 --gpus 0,1,2,3,4,5,6,7
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Outputs:
|
| 60 |
+
- Per-run logs: `logs/frozenlake_slipper_rate_sweep_Qwen2.5-3B/<mode>/slip<label>/`
|
| 61 |
+
- Summary log: `logs/frozenlake_slipper_rate_sweep_Qwen2.5-3B.log`
|
| 62 |
+
|
| 63 |
+
---
|
| 64 |
+
|
| 65 |
+
## Common Notes
|
| 66 |
+
|
| 67 |
+
- Shared setup:
|
| 68 |
+
- Config: `_3_frozen_lake`
|
| 69 |
+
- Model: `Qwen/Qwen2.5-3B`
|
| 70 |
+
- `algorithm.adv_estimator=gae`
|
| 71 |
+
- `trainer.total_training_steps=400`
|
| 72 |
+
- `trainer.save_freq=-1`
|
| 73 |
+
- `trainer.logger=['console','wandb']`
|
| 74 |
+
- `trainer.val_before_train=True`
|
| 75 |
+
- `actor_rollout_ref.actor.loss_agg_mode=token-mean`
|
| 76 |
+
- `actor_rollout_ref.actor.use_kl_loss=False`
|
| 77 |
+
- `actor_rollout_ref.actor.kl_loss_type=low-var-kl`
|
| 78 |
+
- `actor_rollout_ref.actor.kl_loss_coef=0`
|
| 79 |
+
- `actor_rollout_ref.actor.entropy_coeff=0`
|
| 80 |
+
- `actor_rollout_ref.actor.entropy_from_logits_with_chunking=True`
|
| 81 |
+
- `actor_rollout_ref.actor.filter_loss_scaling=none`
|
| 82 |
+
- `actor_rollout_ref.actor.ppo_mini_batch_size=32`
|
| 83 |
+
- `actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=4`
|
| 84 |
+
- `critic.ppo_mini_batch_size=32`
|
| 85 |
+
- `critic.ppo_micro_batch_size_per_gpu=4`
|
| 86 |
+
- `actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8`
|
| 87 |
+
- `actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8`
|
| 88 |
+
- `actor_rollout_ref.rollout.rollout_filter_strategy=top_p`
|
| 89 |
+
- `actor_rollout_ref.rollout.rollout_filter_top_p_prob_mode=softmax`
|
| 90 |
+
- `actor_rollout_ref.rollout.rollout_filter_type=largest`
|
| 91 |
+
- `actor_rollout_ref.rollout.rollout_filter_metric=reward_variance`
|
| 92 |
+
- `actor_rollout_ref.rollout.gpu_memory_utilization=0.5`
|
| 93 |
+
- `actor_rollout_ref.actor.checkpoint.save_contents=[model]`
|
| 94 |
+
- `critic.checkpoint.save_contents=[model]`
|
| 95 |
+
- Input and naming conventions:
|
| 96 |
+
- `slipper_rate` accepts `50`, `0.5`, and `50%` as equivalent inputs
|
| 97 |
+
- Experiment labels use `slip<label>` with compact decimal formatting
|
| 98 |
+
- Examples: `50% -> slip0p5`, `2% -> slip0p02`
|
| 99 |
+
- Comparison protocol:
|
| 100 |
+
- Each slipper rate is run under both `filter` and `nofilter` unless `--filter-modes` restricts the set
|
| 101 |
+
- With `--gpus-per-exp 4`, a 4-GPU list runs one experiment at a time; an 8-GPU list can run one `filter` and one `nofilter` experiment in parallel
|
| 102 |
+
- Base-config inheritance:
|
| 103 |
+
- `algorithm.kl_ctrl.kl_coef` is not overridden in this script
|
docs/experiment_intervention_sweep.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Intervention Sweep Runs
|
| 2 |
+
|
| 3 |
+
This doc covers the experiment scripts for the intervention sweep experiments.
|
| 4 |
+
|
| 5 |
+
## Scripts Overview
|
| 6 |
+
|
| 7 |
+
| Script | Purpose | Variables |
|
| 8 |
+
|--------|---------|-----------|
|
| 9 |
+
| `run_top_p_sweep.sh` | Sweep RV-filter strength | `rollout_filter_value` (`1.0,0.98,0.95,0.9,0.8,0.6,0.4,nofilter`) |
|
| 10 |
+
| `run_kl_sweep.sh` | Sweep KL regularization | `kl_loss_coef` (`0,0.001,0.003,0.01,0.03,0.1`) |
|
| 11 |
+
| `run_entropy_sweep.sh` | Sweep entropy regularization | `entropy_coeff` (`0,0.001,0.003,0.01,0.03,0.1`) |
|
| 12 |
+
|
| 13 |
+
All three scripts run Sokoban with `Qwen2.5-3B`, `GAE`.
|
| 14 |
+
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
## 1. Top-p Sweep (`run_top_p_sweep.sh`)
|
| 18 |
+
|
| 19 |
+
Scans `actor_rollout_ref.rollout.rollout_filter_value` on Sokoban.
|
| 20 |
+
|
| 21 |
+
Goal:
|
| 22 |
+
- Isolate the effect of RV-filter strength while keeping KL and entropy lightly enabled at `0.001`
|
| 23 |
+
|
| 24 |
+
Key Details:
|
| 25 |
+
- Reward-variance filtering scores each env group by the standard deviation of rollout rewards within the group
|
| 26 |
+
- Selection uses `top_p`, `largest`, `reward_variance`, and explicitly fixes `rollout_filter_top_p_prob_mode=softmax`
|
| 27 |
+
- Filtered groups are dropped as whole groups, and this sweep keeps `filter_loss_scaling=none`
|
| 28 |
+
- `1.0` and `nofilter` are different conditions: `1.0` still uses `include_zero=False`, while `nofilter` sets `include_zero=True`
|
| 29 |
+
|
| 30 |
+
Options:
|
| 31 |
+
- `--steps` (default: `400`)
|
| 32 |
+
- `--rollout_filter_value` (comma list; default: `1.0,0.98,0.95,0.9,0.8,0.6,0.4,nofilter`)
|
| 33 |
+
- `--gpus` (comma list; auto-detect if omitted)
|
| 34 |
+
- `--gpus-per-exp` (default: `1`)
|
| 35 |
+
- `--ray-num-cpus` (default: `16`)
|
| 36 |
+
- `--gpu-memory-utilization` (default: `0.5`)
|
| 37 |
+
- `--save-freq` (default: `-1`)
|
| 38 |
+
|
| 39 |
+
Examples:
|
| 40 |
+
```bash
|
| 41 |
+
# Run the full default sweep
|
| 42 |
+
bash scripts/runs/run_top_p_sweep.sh
|
| 43 |
+
|
| 44 |
+
# Run one `0.9` point and one `nofilter` point on 4xH100 each
|
| 45 |
+
bash scripts/runs/run_top_p_sweep.sh --rollout_filter_value 0.9,nofilter --gpus-per-exp 4 --gpus 0,1,2,3,4,5,6,7
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
Outputs:
|
| 49 |
+
- Per-value logs: `logs/top_p_sweep_Qwen2.5-3B/<value_label>/`
|
| 50 |
+
- Summary log: `logs/top_p_sweep_Qwen2.5-3B.log`
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
|
| 54 |
+
## 2. KL Sweep (`run_kl_sweep.sh`)
|
| 55 |
+
|
| 56 |
+
Scans `actor_rollout_ref.actor.kl_loss_coef` on Sokoban.
|
| 57 |
+
|
| 58 |
+
Goal:
|
| 59 |
+
- Isolate the effect of KL regularization while fixing entropy to `0` and keeping RV-filter effectively off with `rollout_filter_value=1`
|
| 60 |
+
|
| 61 |
+
Key Details:
|
| 62 |
+
- KL is computed token-wise between the current policy and a frozen reference policy worker
|
| 63 |
+
- This sweep uses the actor KL loss, not reward-level KL shaping
|
| 64 |
+
- When `kl_loss_coef=0`, the script also sets `use_kl_loss=False`, so the ref-policy forward pass is skipped
|
| 65 |
+
- Increasing `kl_loss_coef` penalizes drift from the reference policy more strongly
|
| 66 |
+
|
| 67 |
+
Options:
|
| 68 |
+
- `--steps` (default: `400`)
|
| 69 |
+
- `--kl-values` (comma list; default: `0,0.001,0.003,0.01,0.03,0.1`)
|
| 70 |
+
- `--rollout_filter_include_zero` (bool; default: `True`)
|
| 71 |
+
- `--gpus` (comma list; auto-detect if omitted)
|
| 72 |
+
- `--gpus-per-exp` (default: `1`)
|
| 73 |
+
- `--ray-num-cpus` (default: `16`)
|
| 74 |
+
- `--gpu-memory-utilization` (default: `0.5`)
|
| 75 |
+
- `--save-freq` (default: `-1`)
|
| 76 |
+
|
| 77 |
+
Examples:
|
| 78 |
+
```bash
|
| 79 |
+
# Run the full default sweep
|
| 80 |
+
bash scripts/runs/run_kl_sweep.sh
|
| 81 |
+
|
| 82 |
+
# Run two KL points on 4xH100 each, with zero-variance groups excluded
|
| 83 |
+
bash scripts/runs/run_kl_sweep.sh --kl-values 0,0.01 --rollout_filter_include_zero False --gpus-per-exp 4 --gpus 0,1,2,3,4,5,6,7
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Outputs:
|
| 87 |
+
- Per-value logs: `logs/kl_sweep_Qwen2.5-3B/<filter_tag>/<value_label>/`
|
| 88 |
+
- Summary log: `logs/kl_sweep_Qwen2.5-3B.log`
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## 3. Entropy Sweep (`run_entropy_sweep.sh`)
|
| 93 |
+
|
| 94 |
+
Scans `actor_rollout_ref.actor.entropy_coeff` on Sokoban.
|
| 95 |
+
|
| 96 |
+
Goal:
|
| 97 |
+
- Isolate the effect of entropy regularization while fixing KL to `0` and keeping RV-filter effectively off with `rollout_filter_value=1`
|
| 98 |
+
|
| 99 |
+
Key Details:
|
| 100 |
+
- Entropy is computed token-wise over the full vocabulary on response tokens
|
| 101 |
+
- Aggregation is `token-mean`, so the sweep compares average token-level exploration pressure
|
| 102 |
+
- The entropy term enters the actor loss with a negative sign, so larger `entropy_coeff` encourages more exploration
|
| 103 |
+
- The script keeps `entropy_from_logits_with_chunking=True`, so large-vocabulary entropy is computed in a memory-friendly way
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
bash scripts/runs/run_entropy_sweep.sh
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
Options:
|
| 110 |
+
- `--steps` (default: `400`)
|
| 111 |
+
- `--entropy-values` (comma list; default: `0,0.001,0.003,0.01,0.03,0.1`)
|
| 112 |
+
- `--rollout_filter_include_zero` (bool; default: `True`)
|
| 113 |
+
- `--gpus` (comma list; auto-detect if omitted)
|
| 114 |
+
- `--gpus-per-exp` (default: `1`)
|
| 115 |
+
- `--ray-num-cpus` (default: `16`)
|
| 116 |
+
- `--gpu-memory-utilization` (default: `0.5`)
|
| 117 |
+
- `--save-freq` (default: `-1`)
|
| 118 |
+
|
| 119 |
+
Examples:
|
| 120 |
+
```bash
|
| 121 |
+
# Run the full default sweep
|
| 122 |
+
bash scripts/runs/run_entropy_sweep.sh
|
| 123 |
+
|
| 124 |
+
# Run two entropy points on 4xH100 each, with zero-variance groups excluded
|
| 125 |
+
bash scripts/runs/run_entropy_sweep.sh --entropy-values 0,0.01 --rollout_filter_include_zero False --gpus-per-exp 4 --gpus 0,1,2,3,4,5,6,7
|
| 126 |
+
```
|
| 127 |
+
|
| 128 |
+
Outputs:
|
| 129 |
+
- Per-value logs: `logs/entropy_sweep_Qwen2.5-3B/<filter_tag>/<value_label>/`
|
| 130 |
+
- Summary log: `logs/entropy_sweep_Qwen2.5-3B.log`
|
| 131 |
+
|
| 132 |
+
---
|
| 133 |
+
|
| 134 |
+
## Common Notes
|
| 135 |
+
|
| 136 |
+
- Comparability protocol:
|
| 137 |
+
- The three Sokoban sweeps change only one intervention axis at a time
|
| 138 |
+
- Top-p sweep scans RV-filter while fixing `use_kl_loss=True`, `kl_loss_coef=0.001`, and `entropy_coeff=0.001`
|
| 139 |
+
- KL sweep scans `kl_loss_coef` while keeping entropy off and filtering off
|
| 140 |
+
- Entropy sweep scans `entropy_coeff` while keeping KL off and filtering off
|
| 141 |
+
- Training budget and early stopping:
|
| 142 |
+
- Each condition runs for at most `400` PPO steps with `8` train env groups and `16` rollouts per group
|
| 143 |
+
- Runs may stop early if reward variance collapses for long enough or if validation success stays below the failure threshold for repeated validations
|
| 144 |
+
- Early stopping is part of the comparison protocol: if a setting stops early, that run is treated as a failed training regime rather than a fully budgeted run
|
| 145 |
+
- Shared setup across all three sweeps:
|
| 146 |
+
- Config: `_2_sokoban`
|
| 147 |
+
- Model: `Qwen/Qwen2.5-3B`
|
| 148 |
+
- `algorithm.adv_estimator=gae`
|
| 149 |
+
- `trainer.total_training_steps=400`
|
| 150 |
+
- `trainer.save_freq=-1`
|
| 151 |
+
- `trainer.logger=['console','wandb']`
|
| 152 |
+
- `trainer.val_before_train=True`
|
| 153 |
+
- `actor_rollout_ref.actor.filter_loss_scaling=none`
|
| 154 |
+
- `actor_rollout_ref.actor.ppo_mini_batch_size=32`
|
| 155 |
+
- `actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=4`
|
| 156 |
+
- `critic.ppo_mini_batch_size=32`
|
| 157 |
+
- `critic.ppo_micro_batch_size_per_gpu=4`
|
| 158 |
+
- `actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8`
|
| 159 |
+
- `actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8`
|
| 160 |
+
- `es_manager.train.env_groups=8`, `es_manager.train.group_size=16`
|
| 161 |
+
- `es_manager.val.env_groups=512`, `es_manager.val.group_size=1`
|
| 162 |
+
- Rollout filter settings used by these sweeps:
|
| 163 |
+
- `rollout_filter_strategy=top_p`
|
| 164 |
+
- `rollout_filter_top_p_prob_mode=softmax`
|
| 165 |
+
- `rollout_filter_type=largest`
|
| 166 |
+
- `rollout_filter_metric=reward_variance`
|
| 167 |
+
- Top-p sweep uses two distinct `top_p=1.0` conditions:
|
| 168 |
+
- `1.0`: `rollout_filter_value=1.0`, `rollout_filter_include_zero=False`
|
| 169 |
+
- `nofilter`: `rollout_filter_value=1.0`, `rollout_filter_include_zero=True`
|
| 170 |
+
- KL sweep and Entropy sweep default to `rollout_filter_include_zero=True`; if you pass `--rollout_filter_include_zero False`, logs are written under `filter_zero/` instead of `nofilter/`
|
| 171 |
+
- You can run a single sweep point on `4xH100` by setting `--gpus-per-exp 4` and passing a 4-GPU list, or run two sweep points in parallel by passing an 8-GPU list
|
docs/experiment_sokoban_gradient_analysis.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Sokoban Gradient Analysis Runs
|
| 2 |
+
|
| 3 |
+
This doc covers the helper scripts for the Sokoban top-p=0.9 gradient-analysis experiments.
|
| 4 |
+
|
| 5 |
+
For the internal execution order, metric definitions, and plotting workflow, see [guide_gradient_analysis.md](guide_gradient_analysis.md).
|
| 6 |
+
|
| 7 |
+
## Scripts Overview
|
| 8 |
+
|
| 9 |
+
| Script | Purpose | When to use |
|
| 10 |
+
|--------|---------|-------------|
|
| 11 |
+
| `run_sokoban_ppo_filter_grad_analysis.sh` | Train Sokoban with periodic gradient-analysis passes | Run this first to produce training logs and checkpoints |
|
| 12 |
+
| `run_sokoban_ppo_filter_grad_analysis_probe_ckpt.sh` | Resume a saved checkpoint and run one analysis-only probe | Run this after the training script when you want to inspect a specific checkpoint |
|
| 13 |
+
|
| 14 |
+
Both scripts run Sokoban with `Qwen2.5-3B`, reward-variance top-p filtering at `0.9`, and a separate gradient-analysis batch of `128x16`.
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
## Recommended Workflow
|
| 19 |
+
|
| 20 |
+
1. Start with `run_sokoban_ppo_filter_grad_analysis.sh`.
|
| 21 |
+
- This is the script that actually trains the policy, runs periodic gradient analysis, and writes the checkpoint layout that the probe script expects by default.
|
| 22 |
+
|
| 23 |
+
2. Choose a saved `global_step_*` checkpoint.
|
| 24 |
+
- The probe helper defaults to `global_step_101` under the checkpoint directory layout produced by the training script.
|
| 25 |
+
- If your run saved a different step, pass `--checkpoint-step` or `--resume-from-path`.
|
| 26 |
+
|
| 27 |
+
3. Run `run_sokoban_ppo_filter_grad_analysis_probe_ckpt.sh`.
|
| 28 |
+
- This reloads the checkpoint, runs one gradient-analysis pass, optionally performs a validation first, and then exits.
|
| 29 |
+
|
| 30 |
+
---
|
| 31 |
+
|
| 32 |
+
## 1. Periodic Training + Analysis (`run_sokoban_ppo_filter_grad_analysis.sh`)
|
| 33 |
+
|
| 34 |
+
Trains Sokoban and inserts gradient-analysis passes during training.
|
| 35 |
+
|
| 36 |
+
Goal:
|
| 37 |
+
- Follow the filtered Sokoban setup while logging gradient-analysis metrics at a fixed cadence on a larger analysis batch.
|
| 38 |
+
|
| 39 |
+
Key Details:
|
| 40 |
+
- Validation runs once before training and then every `10` steps.
|
| 41 |
+
- Gradient analysis runs every `50` steps. With the default `101` steps, the trigger points are `1`, `51`, and `101`.
|
| 42 |
+
- The normal training batch is `8` env groups x `16` samples.
|
| 43 |
+
- Gradient analysis uses a separate batch of `128` env groups x `16` samples.
|
| 44 |
+
- The run continues after analysis because `trainer.exit_after_gradient_analysis=False`.
|
| 45 |
+
- This script uses `top_p=0.9`, `rollout_filter_top_p_prob_mode=linear`, `rollout_filter_type=largest`, `rollout_filter_metric=reward_variance`, and `rollout_filter_include_zero=False`.
|
| 46 |
+
- `--algo PPO` selects `algorithm.adv_estimator=gae` and `actor_rollout_ref.actor.loss_agg_mode=token-mean`.
|
| 47 |
+
- `--algo GRPO` selects `algorithm.adv_estimator=grpo`, `algorithm.norm_adv_by_std_in_grpo=True`, and `actor_rollout_ref.actor.loss_agg_mode=seq-mean-token-mean`.
|
| 48 |
+
- The training helper keeps `actor_rollout_ref.actor.use_kl_loss=False`, so it is meant for filtered training with periodic analysis rather than a KL-regularized sweep.
|
| 49 |
+
|
| 50 |
+
Examples:
|
| 51 |
+
```bash
|
| 52 |
+
# Default PPO run
|
| 53 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh
|
| 54 |
+
|
| 55 |
+
# GRPO run on four GPUs
|
| 56 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh --algo GRPO --gpus 0,1,2,3
|
| 57 |
+
|
| 58 |
+
# Short smoke test
|
| 59 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh --steps 5 --gpus 0,1,2,3
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
Options:
|
| 63 |
+
- `--algo NAME` (`PPO` or `GRPO`; default: `PPO`)
|
| 64 |
+
- `--steps` (default: `101`)
|
| 65 |
+
- `--gpus` (comma list; auto-detect if omitted)
|
| 66 |
+
- `--gpu-memory-utilization` (default: `0.3`)
|
| 67 |
+
- `--ray-num-cpus` (default: `16`)
|
| 68 |
+
- `--ppo-micro-batch-size-per-gpu` (default: `4`)
|
| 69 |
+
- `--log-prob-micro-batch-size-per-gpu` (default: `4`)
|
| 70 |
+
- `--save-freq` (default: `100`)
|
| 71 |
+
|
| 72 |
+
Outputs:
|
| 73 |
+
- Per-run log: `logs/gradient_analysis_sokoban_Qwen2.5-3B/<exp_name>.log`
|
| 74 |
+
- Checkpoints: `model_saving/gradient_analysis/sokoban/<ALGO>/filter/<exp_name>/`
|
| 75 |
+
- W&B project: `ragen_gradient_analysis`
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
## 2. Checkpoint Probe (`run_sokoban_ppo_filter_grad_analysis_probe_ckpt.sh`)
|
| 80 |
+
|
| 81 |
+
Resumes a saved checkpoint and runs one gradient-analysis-only probe.
|
| 82 |
+
|
| 83 |
+
Goal:
|
| 84 |
+
- Inspect one checkpoint without continuing the normal training run.
|
| 85 |
+
|
| 86 |
+
Key Details:
|
| 87 |
+
- The script resumes from an existing `global_step_*` directory with `trainer.resume_mode=resume_path`.
|
| 88 |
+
- It runs in probe mode with `trainer.gradient_analysis_only=True`.
|
| 89 |
+
- It exits after the analysis pass because `trainer.exit_after_gradient_analysis=True`.
|
| 90 |
+
- By default it does not run validation first; add `--with-val` if you want a pre-probe validation.
|
| 91 |
+
- It uses the same Sokoban task, model, filter setup, and analysis batch shape as the training helper.
|
| 92 |
+
- Unlike the training helper, this probe sets `actor_rollout_ref.actor.use_kl_loss=True` together with `kl_loss_coef=0.001` and `entropy_coeff=0.001`, so the checkpoint probe explicitly logs KL and entropy gradient components.
|
| 93 |
+
- If `--resume-from-path` is given, that exact checkpoint directory is used. Otherwise the script resolves `<checkpoint-root>/global_step_<checkpoint-step>`.
|
| 94 |
+
|
| 95 |
+
Examples:
|
| 96 |
+
```bash
|
| 97 |
+
# Probe the default checkpoint layout produced by the training helper
|
| 98 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis_probe_ckpt.sh
|
| 99 |
+
|
| 100 |
+
# Probe a specific saved step with validation
|
| 101 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis_probe_ckpt.sh \
|
| 102 |
+
--checkpoint-step 51 \
|
| 103 |
+
--with-val \
|
| 104 |
+
--gpus 0,1,2,3
|
| 105 |
+
|
| 106 |
+
# Probe an exact checkpoint path
|
| 107 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis_probe_ckpt.sh \
|
| 108 |
+
--resume-from-path model_saving/gradient_analysis/sokoban/PPO/filter/<exp_name>/global_step_101 \
|
| 109 |
+
--gpus 0,1,2,3
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
Options:
|
| 113 |
+
- `--algo NAME` (`PPO` or `GRPO`; default: `PPO`)
|
| 114 |
+
- `--checkpoint-step` (default: `101`)
|
| 115 |
+
- `--checkpoint-root DIR` (default: derived from the training helper's checkpoint layout)
|
| 116 |
+
- `--resume-from-path DIR` (exact `global_step_*` directory; overrides root + step resolution)
|
| 117 |
+
- `--with-val` (flag; default: off)
|
| 118 |
+
- `--gpus` (comma list; auto-detect if omitted)
|
| 119 |
+
- `--gpu-memory-utilization` (default: `0.3`)
|
| 120 |
+
- `--ray-num-cpus` (default: `16`)
|
| 121 |
+
- `--ppo-micro-batch-size-per-gpu` (default: `4`)
|
| 122 |
+
- `--log-prob-micro-batch-size-per-gpu` (default: `4`)
|
| 123 |
+
|
| 124 |
+
Outputs:
|
| 125 |
+
- Per-run log: `logs/gradient_analysis_probe_sokoban_Qwen2.5-3B/<exp_name>.log`
|
| 126 |
+
- Probe output dir: `model_saving/gradient_analysis_probe/sokoban/<ALGO>/filter/<exp_name>/`
|
| 127 |
+
- W&B project: `ragen_gradient_analysis_probe`
|
| 128 |
+
|
| 129 |
+
---
|
| 130 |
+
|
| 131 |
+
## Common Notes
|
| 132 |
+
|
| 133 |
+
- Shared fixed setup:
|
| 134 |
+
- config: `_2_sokoban`
|
| 135 |
+
- model: `Qwen/Qwen2.5-3B`
|
| 136 |
+
- training batch: `es_manager.train.env_groups=8`, `es_manager.train.group_size=16`
|
| 137 |
+
- analysis batch: `trainer.gradient_analysis_env_groups=128`, `trainer.gradient_analysis_group_size=16`
|
| 138 |
+
- `trainer.gradient_analysis_log_prefilter=True`
|
| 139 |
+
- `actor_rollout_ref.rollout.gradient_analysis_num_buckets=6`
|
| 140 |
+
- `actor_rollout_ref.rollout.gradient_analysis_bucket_mode=quantile`
|
| 141 |
+
- Shared rollout filter setup:
|
| 142 |
+
- `actor_rollout_ref.rollout.rollout_filter_value=0.9`
|
| 143 |
+
- `actor_rollout_ref.rollout.rollout_filter_strategy=top_p`
|
| 144 |
+
- `actor_rollout_ref.rollout.rollout_filter_top_p_prob_mode=linear`
|
| 145 |
+
- `actor_rollout_ref.rollout.rollout_filter_type=largest`
|
| 146 |
+
- `actor_rollout_ref.rollout.rollout_filter_metric=reward_variance`
|
| 147 |
+
- `actor_rollout_ref.rollout.rollout_filter_include_zero=False`
|
| 148 |
+
- GPU behavior:
|
| 149 |
+
- if `--gpus` is omitted, the scripts try to auto-detect GPUs with `nvidia-smi`
|
| 150 |
+
- if auto-detection fails, they fall back to `0,1,2,3,4,5,6,7`
|
| 151 |
+
- Directory relationship:
|
| 152 |
+
- the training helper writes checkpoints under `model_saving/gradient_analysis/...`
|
| 153 |
+
- the probe helper reads from that layout by default and writes its own outputs under `model_saving/gradient_analysis_probe/...`
|
| 154 |
+
- If you need the meaning of bucket metrics, prefilter logging, or the plotting commands after the run finishes, use [guide_gradient_analysis.md](guide_gradient_analysis.md).
|
docs/experiment_webshop_release.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WebShop Release Runs
|
| 2 |
+
|
| 3 |
+
This doc covers the current WebShop release runner.
|
| 4 |
+
|
| 5 |
+
## Overview
|
| 6 |
+
|
| 7 |
+
Use [`scripts/runs/run_webshop_release_combos.sh`](../scripts/runs/run_webshop_release_combos.sh) for the main WebShop release experiments.
|
| 8 |
+
|
| 9 |
+
Fixed setup:
|
| 10 |
+
- **Task**: WebShop
|
| 11 |
+
- **Config**: `_6_webshop`
|
| 12 |
+
- **Model**: `Qwen/Qwen2.5-3B-Instruct`
|
| 13 |
+
- **Algorithm**: `GRPO`
|
| 14 |
+
- **Train batch**: `16` env groups x `8` samples
|
| 15 |
+
- **Validation batch**: `256` env groups x `1` sample
|
| 16 |
+
- **W&B project**: `main_webshop`
|
| 17 |
+
|
| 18 |
+
The runner compares four filter modes while keeping the rest of the setup fixed:
|
| 19 |
+
|
| 20 |
+
| Filter | Strategy | Value | Prob Mode | Description |
|
| 21 |
+
|--------|----------|-------|-----------|-------------|
|
| 22 |
+
| `topk25` | `top_k` | `0.25` | `linear` | Keep top 25% of groups by reward variance |
|
| 23 |
+
| `topp09` | `top_p` | `0.9` | `linear` | Keep groups covering 90% cumulative reward variance |
|
| 24 |
+
| `topp095` | `top_p` | `0.95` | `linear` | Keep groups covering 95% cumulative reward variance |
|
| 25 |
+
| `nofilter` | `top_p` | `1.0` | `linear` | Keep all groups |
|
| 26 |
+
|
| 27 |
+
All four modes use:
|
| 28 |
+
- `rollout_filter_type=largest`
|
| 29 |
+
- `rollout_filter_metric=reward_variance`
|
| 30 |
+
- `rollout_filter_include_zero=True`
|
| 31 |
+
|
| 32 |
+
## Setup
|
| 33 |
+
|
| 34 |
+
For WebShop, use the original base setup path:
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
bash scripts/setup_ragen_old.sh
|
| 38 |
+
bash scripts/setup_webshop.sh
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
Do not use `setup_ragen.sh` as the primary WebShop setup path.
|
| 42 |
+
|
| 43 |
+
Notes:
|
| 44 |
+
- `setup_webshop.sh` now treats the Google Drive full-data download as best-effort. A failure there does not mean the Python environment setup failed.
|
| 45 |
+
- The runner already pins `micro_batch_size_per_gpu=1` and `log_prob_micro_batch_size_per_gpu=1` to reduce WebShop rollout/log-prob memory pressure.
|
| 46 |
+
|
| 47 |
+
## Main Commands
|
| 48 |
+
|
| 49 |
+
### 4 GPUs
|
| 50 |
+
|
| 51 |
+
Run one experiment on 4 GPUs:
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
bash scripts/runs/run_webshop_release_combos.sh \
|
| 55 |
+
--steps 400 \
|
| 56 |
+
--gpus 0,1,2,3 \
|
| 57 |
+
--gpus-per-exp 4 \
|
| 58 |
+
--filters nofilter
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
Other filter modes:
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
bash scripts/runs/run_webshop_release_combos.sh \
|
| 65 |
+
--steps 400 \
|
| 66 |
+
--gpus 0,1,2,3 \
|
| 67 |
+
--gpus-per-exp 4 \
|
| 68 |
+
--filters topk25
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
bash scripts/runs/run_webshop_release_combos.sh \
|
| 73 |
+
--steps 400 \
|
| 74 |
+
--gpus 0,1,2,3 \
|
| 75 |
+
--gpus-per-exp 4 \
|
| 76 |
+
--filters topp09
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
```bash
|
| 80 |
+
bash scripts/runs/run_webshop_release_combos.sh \
|
| 81 |
+
--steps 400 \
|
| 82 |
+
--gpus 0,1,2,3 \
|
| 83 |
+
--gpus-per-exp 4 \
|
| 84 |
+
--filters topp095
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
### 8 GPUs
|
| 88 |
+
|
| 89 |
+
Run one experiment on 8 GPUs:
|
| 90 |
+
|
| 91 |
+
```bash
|
| 92 |
+
bash scripts/runs/run_webshop_release_combos.sh \
|
| 93 |
+
--steps 400 \
|
| 94 |
+
--gpus 0,1,2,3,4,5,6,7 \
|
| 95 |
+
--gpus-per-exp 8 \
|
| 96 |
+
--filters nofilter
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
You can swap `nofilter` for `topk25`, `topp09`, or `topp095`.
|
| 100 |
+
|
| 101 |
+
## Key Flags
|
| 102 |
+
|
| 103 |
+
| Flag | Default | Description |
|
| 104 |
+
|------|---------|-------------|
|
| 105 |
+
| `--steps N` | `100` | Total training steps |
|
| 106 |
+
| `--gpus LIST` | auto-detect | Comma-separated GPU IDs |
|
| 107 |
+
| `--gpus-per-exp N` | `1` | GPUs assigned to one experiment |
|
| 108 |
+
| `--save-freq N` | `100` | Checkpoint save frequency |
|
| 109 |
+
| `--gpu-memory-utilization V` | `0.3` | vLLM rollout memory fraction |
|
| 110 |
+
| `--filters LIST` | `all` | `topk25`, `topp09`, `topp095`, `nofilter`, or `all` |
|
| 111 |
+
| `--cooldown N` | `30` | Delay before reusing the same GPU slot |
|
| 112 |
+
|
| 113 |
+
## Outputs
|
| 114 |
+
|
| 115 |
+
- Logs: `logs/webshop_release_combos/<exp_name>.log`
|
| 116 |
+
- Per-run summaries: `logs/webshop_release_combos/<exp_name>.result`
|
| 117 |
+
- Checkpoints: `model_saving/webshop_release_combos/<model>/<algo>/<filter>/<exp_name>/`
|
| 118 |
+
- W&B project: `main_webshop`
|
| 119 |
+
|
| 120 |
+
Experiment names follow:
|
| 121 |
+
|
| 122 |
+
```text
|
| 123 |
+
webshop-release-GRPO-<filter-suffix>-Qwen2.5-3B-Instruct-16x8
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
Examples:
|
| 127 |
+
- `webshop-release-GRPO-topk25-Qwen2.5-3B-Instruct-16x8`
|
| 128 |
+
- `webshop-release-GRPO-topp09-linear-Qwen2.5-3B-Instruct-16x8`
|
| 129 |
+
- `webshop-release-GRPO-topp095-linear-Qwen2.5-3B-Instruct-16x8`
|
| 130 |
+
- `webshop-release-GRPO-nofilter-Qwen2.5-3B-Instruct-16x8`
|
| 131 |
+
|
| 132 |
+
## Related Files
|
| 133 |
+
|
| 134 |
+
- [`scripts/runs/run_webshop_release_combos.sh`](../scripts/runs/run_webshop_release_combos.sh)
|
| 135 |
+
- [`scripts/runs/run_webshop_small_combos.sh`](../scripts/runs/run_webshop_small_combos.sh)
|
| 136 |
+
- [`scripts/runs/README_webshop_small_combos.md`](../scripts/runs/README_webshop_small_combos.md)
|
docs/guide_gradient_analysis.md
ADDED
|
@@ -0,0 +1,491 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Gradient Analysis Walkthrough
|
| 2 |
+
|
| 3 |
+
This document explains how gradient analysis works in the current RAGEN codebase, which arguments control it, which W&B metrics it writes, how to run it from scratch or from a checkpoint, and how to turn a finished W&B run into local plots.
|
| 4 |
+
|
| 5 |
+
Normal training now enables gradient analysis by default:
|
| 6 |
+
- `trainer.gradient_analysis_mode=True`
|
| 7 |
+
- `trainer.gradient_analysis_every=50`
|
| 8 |
+
- by default it reuses the training batch unless separate analysis batch overrides are set
|
| 9 |
+
|
| 10 |
+
## Quickstart
|
| 11 |
+
|
| 12 |
+
### Run a periodic analysis job from scratch
|
| 13 |
+
|
| 14 |
+
```bash
|
| 15 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh \
|
| 16 |
+
--gpus 0,1,2,3,4,5,6,7
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
That helper script:
|
| 20 |
+
- trains for `101` steps
|
| 21 |
+
- runs validation before training and then every `10` steps
|
| 22 |
+
- runs gradient analysis on steps `1`, `51`, and `101`
|
| 23 |
+
- uses the main-table training batch (`8x16`) but a separate analysis batch (`128x16`)
|
| 24 |
+
|
| 25 |
+
### Run one analysis-only job
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh \
|
| 29 |
+
--steps 1 \
|
| 30 |
+
--gpus 0,1,2,3,4,5,6,7
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
Then set:
|
| 34 |
+
- `trainer.gradient_analysis_every=1`
|
| 35 |
+
- `trainer.exit_after_gradient_analysis=True`
|
| 36 |
+
|
| 37 |
+
### Plot the finished run
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 41 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 42 |
+
--step 1
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
Default output directory:
|
| 46 |
+
|
| 47 |
+
```text
|
| 48 |
+
gradient_analysis_outputs/<run_name>_<run_id>/
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## What It Does
|
| 52 |
+
|
| 53 |
+
Gradient analysis is a reporting path that probes the actor on reward-variance buckets without taking an optimizer step.
|
| 54 |
+
|
| 55 |
+
The current execution order inside [agent_trainer.py](../ragen/trainer/agent_trainer.py) is:
|
| 56 |
+
|
| 57 |
+
1. generate rollouts
|
| 58 |
+
2. apply rollout filtering
|
| 59 |
+
3. compute rewards and advantages
|
| 60 |
+
4. update critic if enabled
|
| 61 |
+
5. if the current step matches the gradient-analysis cadence:
|
| 62 |
+
- split the batch into reward-variance buckets
|
| 63 |
+
- run actor backward passes for task / entropy / KL on each bucket
|
| 64 |
+
- log gradient-analysis metrics
|
| 65 |
+
6. if `trainer.exit_after_gradient_analysis=True`, exit here
|
| 66 |
+
7. otherwise continue to the normal actor update
|
| 67 |
+
|
| 68 |
+
So the important boundary is:
|
| 69 |
+
- gradient analysis runs after rollout, filtering, reward computation, and critic update
|
| 70 |
+
- it runs before the normal actor update
|
| 71 |
+
- with `exit_after_gradient_analysis=True`, the run exits before actor update, checkpoint save, and post-step validation
|
| 72 |
+
|
| 73 |
+
When `trainer.gradient_analysis_env_groups` or `trainer.gradient_analysis_group_size` is set:
|
| 74 |
+
- training still uses the normal training batch
|
| 75 |
+
- the analysis step generates a second, separate rollout batch just for gradient analysis
|
| 76 |
+
- that separate batch is filtered, scored, bucketed, and probed without affecting the training update batch
|
| 77 |
+
|
| 78 |
+
## How Bucketing Works
|
| 79 |
+
|
| 80 |
+
Bucketing is implemented in [rollout_filter.py](../ragen/trainer/rollout_filter.py).
|
| 81 |
+
|
| 82 |
+
### Source Signal
|
| 83 |
+
|
| 84 |
+
- The rollout filter computes in-group reward standard deviation
|
| 85 |
+
- It broadcasts that value to each sample as `batch.batch["reward_std"]`
|
| 86 |
+
- Gradient analysis then splits the filtered batch using this `reward_std`
|
| 87 |
+
|
| 88 |
+
This means the buckets are built from the same reward-variance signal used by rollout filtering, not from a separate offline computation.
|
| 89 |
+
|
| 90 |
+
### Bucket Modes
|
| 91 |
+
|
| 92 |
+
Two bucket modes are supported:
|
| 93 |
+
|
| 94 |
+
1. `quantile` (default)
|
| 95 |
+
- Controlled by `gradient_analysis_num_buckets`
|
| 96 |
+
- Groups are sorted by group-level `reward_std`
|
| 97 |
+
- They are split into equal-percentage buckets
|
| 98 |
+
- If the filtered batch contains fewer groups than the requested bucket count, the effective bucket count is reduced so each bucket still contains at least one group
|
| 99 |
+
- Bucket names are `bucket_1` to `bucket_N`
|
| 100 |
+
- `bucket_1` is lowest reward variance, `bucket_N` is highest reward variance
|
| 101 |
+
|
| 102 |
+
2. `fixed_rv`
|
| 103 |
+
- Uses fixed reward-variance intervals:
|
| 104 |
+
- `bucket_1`: `[0, 1)`
|
| 105 |
+
- `bucket_2`: `[1, 2)`
|
| 106 |
+
- `bucket_3`: `[2, 3)`
|
| 107 |
+
- `bucket_4`: `[3, 4)`
|
| 108 |
+
- `bucket_5`: `[4, 5)`
|
| 109 |
+
- `bucket_6`: `[5, +inf)`
|
| 110 |
+
|
| 111 |
+
### Special `all` Bucket
|
| 112 |
+
|
| 113 |
+
Gradient analysis always includes an `all` bucket in addition to the real variance buckets.
|
| 114 |
+
|
| 115 |
+
`all` means:
|
| 116 |
+
- the whole filtered batch
|
| 117 |
+
- no bucket subsetting
|
| 118 |
+
|
| 119 |
+
This is the bridge between the bucketed metrics and the top-level actor metrics.
|
| 120 |
+
|
| 121 |
+
### DP Safety
|
| 122 |
+
|
| 123 |
+
If a bucket size is not divisible by `trainer.n_gpus_per_node`, the reporter drops the remainder before calling actor update. If a bucket would become empty after that adjustment, it is skipped.
|
| 124 |
+
|
| 125 |
+
## How The Analysis Is Computed
|
| 126 |
+
|
| 127 |
+
The reporting loop is in [gradient_reporter.py](../ragen/trainer/gradient_reporter.py).
|
| 128 |
+
|
| 129 |
+
For each bucket:
|
| 130 |
+
|
| 131 |
+
1. create a sub-batch
|
| 132 |
+
2. set two meta flags:
|
| 133 |
+
- `skip_optimizer_step=True`
|
| 134 |
+
- `grad_component_analysis=True`
|
| 135 |
+
3. call `trainer.actor_rollout_wg.update_actor(sub_batch)`
|
| 136 |
+
4. inside the actor, run three backward passes:
|
| 137 |
+
- task policy loss
|
| 138 |
+
- entropy term
|
| 139 |
+
- KL term
|
| 140 |
+
5. record gradient norms and losses
|
| 141 |
+
6. zero gradients and move to the next bucket
|
| 142 |
+
|
| 143 |
+
The component-wise backward path is implemented in [dp_actor.py](../ragen/workers/actor/dp_actor.py).
|
| 144 |
+
|
| 145 |
+
Important detail:
|
| 146 |
+
- this path does not call `optimizer.step()`
|
| 147 |
+
- it is analysis-only probing of the current actor state
|
| 148 |
+
|
| 149 |
+
## Arguments
|
| 150 |
+
|
| 151 |
+
### New Hydra Args
|
| 152 |
+
|
| 153 |
+
These are the gradient-analysis-specific trainer overrides:
|
| 154 |
+
|
| 155 |
+
1. `trainer.gradient_analysis_mode=True`
|
| 156 |
+
- enables the feature
|
| 157 |
+
- default behavior in `config/base.yaml`: enabled
|
| 158 |
+
- set `trainer.gradient_analysis_mode=False` to disable it
|
| 159 |
+
|
| 160 |
+
2. `trainer.gradient_analysis_every=<N>`
|
| 161 |
+
- run analysis every `N` training steps
|
| 162 |
+
- trigger condition is:
|
| 163 |
+
- `(global_steps - 1) % gradient_analysis_every == 0`
|
| 164 |
+
- default behavior in `config/base.yaml`: `50`
|
| 165 |
+
- so `gradient_analysis_every=1` means every step
|
| 166 |
+
- `gradient_analysis_every=50` means steps `1, 51, 101, ...`
|
| 167 |
+
|
| 168 |
+
3. `trainer.exit_after_gradient_analysis=True`
|
| 169 |
+
- analysis-only mode
|
| 170 |
+
- after the selected analysis step finishes, log metrics and exit immediately
|
| 171 |
+
- exit happens before:
|
| 172 |
+
- actor update
|
| 173 |
+
- checkpoint save
|
| 174 |
+
- post-step validation
|
| 175 |
+
- default behavior in `config/base.yaml`: `False`
|
| 176 |
+
- it does not suppress `val_before_train`
|
| 177 |
+
|
| 178 |
+
4. `trainer.gradient_analysis_env_groups=<N>`
|
| 179 |
+
- optional
|
| 180 |
+
- if set, gradient analysis uses a separate rollout batch with this many groups
|
| 181 |
+
- training keeps using `es_manager.train.env_groups`
|
| 182 |
+
- default behavior in `config/base.yaml`: `null` (reuse training batch)
|
| 183 |
+
|
| 184 |
+
5. `trainer.gradient_analysis_group_size=<N>`
|
| 185 |
+
- optional
|
| 186 |
+
- if set, gradient analysis uses a separate rollout batch with this group size
|
| 187 |
+
- training keeps using `es_manager.train.group_size`
|
| 188 |
+
- default behavior in `config/base.yaml`: `null` (reuse training batch)
|
| 189 |
+
|
| 190 |
+
6. `actor_rollout_ref.rollout.gradient_analysis_num_buckets=<N>`
|
| 191 |
+
- number of quantile buckets
|
| 192 |
+
- default is `6`
|
| 193 |
+
|
| 194 |
+
7. `actor_rollout_ref.rollout.gradient_analysis_bucket_mode=quantile|fixed_rv`
|
| 195 |
+
- chooses the bucketing rule
|
| 196 |
+
- default is `quantile`
|
| 197 |
+
|
| 198 |
+
### Existing Training Args That Matter
|
| 199 |
+
|
| 200 |
+
These are not new, but they materially affect the analysis:
|
| 201 |
+
|
| 202 |
+
- `es_manager.train.env_groups`
|
| 203 |
+
- number of prompt groups
|
| 204 |
+
- more groups gives a finer reward-variance ranking
|
| 205 |
+
|
| 206 |
+
- `es_manager.train.group_size`
|
| 207 |
+
- number of rollouts per group
|
| 208 |
+
- affects how stable each group reward-variance estimate is
|
| 209 |
+
|
| 210 |
+
- `trainer.n_gpus_per_node`
|
| 211 |
+
- affects DP-safe bucket trimming
|
| 212 |
+
|
| 213 |
+
- rollout filter args such as:
|
| 214 |
+
- `actor_rollout_ref.rollout.rollout_filter_value`
|
| 215 |
+
- `actor_rollout_ref.rollout.rollout_filter_strategy`
|
| 216 |
+
- `actor_rollout_ref.rollout.rollout_filter_metric`
|
| 217 |
+
- `actor_rollout_ref.rollout.rollout_filter_top_p_prob_mode`
|
| 218 |
+
- `actor_rollout_ref.rollout.rollout_filter_include_zero`
|
| 219 |
+
|
| 220 |
+
The current Sokoban PPO helper runner uses:
|
| 221 |
+
- training batch: `env_groups=8`, `group_size=16`
|
| 222 |
+
- analysis batch: `gradient_analysis_env_groups=128`, `gradient_analysis_group_size=16`
|
| 223 |
+
- `rollout_filter_strategy=top_p`
|
| 224 |
+
- `rollout_filter_value=0.9`
|
| 225 |
+
- `rollout_filter_metric=reward_variance`
|
| 226 |
+
- `rollout_filter_top_p_prob_mode=softmax`
|
| 227 |
+
|
| 228 |
+
## W&B Metrics
|
| 229 |
+
|
| 230 |
+
There are two layers of metrics:
|
| 231 |
+
|
| 232 |
+
1. bucket-prefixed analysis metrics
|
| 233 |
+
2. top-level actor metrics copied from the `all` bucket
|
| 234 |
+
|
| 235 |
+
### Bucket-Prefixed Metrics
|
| 236 |
+
|
| 237 |
+
These are written under:
|
| 238 |
+
- `grad_norm/all/...`
|
| 239 |
+
- `grad_norm/bucket_1/...`
|
| 240 |
+
- `grad_norm/bucket_2/...`
|
| 241 |
+
- ...
|
| 242 |
+
|
| 243 |
+
#### Bucket Size / Coverage
|
| 244 |
+
|
| 245 |
+
- `grad_norm/<bucket>/sample_count`
|
| 246 |
+
- `grad_norm/<bucket>/sample_pct`
|
| 247 |
+
|
| 248 |
+
#### Reward-Variance Stats
|
| 249 |
+
|
| 250 |
+
- `grad_norm/<bucket>/reward_std_mean`
|
| 251 |
+
- `grad_norm/<bucket>/reward_std_min`
|
| 252 |
+
- `grad_norm/<bucket>/reward_std_max`
|
| 253 |
+
- `grad_norm/<bucket>/group_rv_count`
|
| 254 |
+
- `grad_norm/<bucket>/group_rv_table`
|
| 255 |
+
|
| 256 |
+
`group_rv_table` is a `wandb.Table` with columns:
|
| 257 |
+
- `bucket`
|
| 258 |
+
- `group_id`
|
| 259 |
+
- `reward_std`
|
| 260 |
+
|
| 261 |
+
#### Gradient Norms
|
| 262 |
+
|
| 263 |
+
- `grad_norm/<bucket>/task`
|
| 264 |
+
- `grad_norm/<bucket>/entropy`
|
| 265 |
+
- `grad_norm/<bucket>/kl`
|
| 266 |
+
|
| 267 |
+
#### Normalized Gradient Norms
|
| 268 |
+
|
| 269 |
+
- `grad_norm/<bucket>/per_sample/task`
|
| 270 |
+
- `grad_norm/<bucket>/per_sample/entropy`
|
| 271 |
+
- `grad_norm/<bucket>/per_sample/kl`
|
| 272 |
+
- `grad_norm/<bucket>/per_token/task`
|
| 273 |
+
- `grad_norm/<bucket>/per_token/entropy`
|
| 274 |
+
- `grad_norm/<bucket>/per_token/kl`
|
| 275 |
+
|
| 276 |
+
#### Losses
|
| 277 |
+
|
| 278 |
+
- `grad_norm/<bucket>/loss/policy`
|
| 279 |
+
- `grad_norm/<bucket>/loss/entropy`
|
| 280 |
+
- `grad_norm/<bucket>/loss/kl`
|
| 281 |
+
- `grad_norm/<bucket>/loss/total`
|
| 282 |
+
|
| 283 |
+
### Top-Level Metrics Copied From `all`
|
| 284 |
+
|
| 285 |
+
When the bucket name is `all`, the reporter also writes the actor metrics back to top level:
|
| 286 |
+
|
| 287 |
+
- `actor/loss/policy`
|
| 288 |
+
- `actor/loss/entropy`
|
| 289 |
+
- `actor/loss/kl`
|
| 290 |
+
- `actor/loss/total`
|
| 291 |
+
- `actor/grad_norm/task`
|
| 292 |
+
- `actor/grad_norm/entropy`
|
| 293 |
+
- `actor/grad_norm/kl`
|
| 294 |
+
|
| 295 |
+
If `exit_after_gradient_analysis=True`, the trainer also logs:
|
| 296 |
+
|
| 297 |
+
- `trainer/exited_after_gradient_analysis = 1.0`
|
| 298 |
+
|
| 299 |
+
## Commands
|
| 300 |
+
|
| 301 |
+
### 1. From Scratch With The Helper Script
|
| 302 |
+
|
| 303 |
+
The helper runner is:
|
| 304 |
+
- [run_sokoban_ppo_filter_grad_analysis.sh](../scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh)
|
| 305 |
+
|
| 306 |
+
It is fixed to:
|
| 307 |
+
- task: `sokoban`
|
| 308 |
+
- algo: `PPO`
|
| 309 |
+
- filter: `top_p=0.9`
|
| 310 |
+
- model: `Qwen2.5-3B`
|
| 311 |
+
- env_groups: `32`
|
| 312 |
+
- group_size: `16`
|
| 313 |
+
- gradient analysis: once on step 1
|
| 314 |
+
- `exit_after_gradient_analysis=True`
|
| 315 |
+
- one initial validation before training
|
| 316 |
+
- no periodic validation afterwards
|
| 317 |
+
|
| 318 |
+
Example on 8 GPUs:
|
| 319 |
+
|
| 320 |
+
```bash
|
| 321 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh \
|
| 322 |
+
--steps 1 \
|
| 323 |
+
--gpus 0,1,2,3,4,5,6,7
|
| 324 |
+
```
|
| 325 |
+
|
| 326 |
+
Key defaults inside that script:
|
| 327 |
+
- `trainer.project_name=ragen_gradient_analysis`
|
| 328 |
+
- `env_groups=32`
|
| 329 |
+
- `group_size=16`
|
| 330 |
+
- `trainer.gradient_analysis_every=1`
|
| 331 |
+
- `trainer.exit_after_gradient_analysis=True`
|
| 332 |
+
- `actor_rollout_ref.rollout.gradient_analysis_num_buckets=6`
|
| 333 |
+
- `actor_rollout_ref.rollout.gradient_analysis_bucket_mode=quantile`
|
| 334 |
+
|
| 335 |
+
### 2. Direct `train.py` Usage
|
| 336 |
+
|
| 337 |
+
Minimal pattern when you want to override the global defaults:
|
| 338 |
+
|
| 339 |
+
```bash
|
| 340 |
+
python train.py ... \
|
| 341 |
+
trainer.gradient_analysis_mode=True \
|
| 342 |
+
trainer.gradient_analysis_every=1 \
|
| 343 |
+
trainer.exit_after_gradient_analysis=True \
|
| 344 |
+
actor_rollout_ref.rollout.gradient_analysis_num_buckets=6 \
|
| 345 |
+
actor_rollout_ref.rollout.gradient_analysis_bucket_mode=quantile
|
| 346 |
+
```
|
| 347 |
+
|
| 348 |
+
### 3. Resume From A Checkpoint And Probe It Once
|
| 349 |
+
|
| 350 |
+
Checkpoint resume should point to the `global_step_<N>` directory, not the nested `actor/` directory.
|
| 351 |
+
|
| 352 |
+
Example:
|
| 353 |
+
|
| 354 |
+
```bash
|
| 355 |
+
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python train.py --config-name _2_sokoban \
|
| 356 |
+
model_path=Qwen/Qwen2.5-3B \
|
| 357 |
+
trainer.project_name=ragen_gradient_analysis \
|
| 358 |
+
trainer.experiment_name=sokoban-PPO-filter-topp09-grad-from-ckpt100 \
|
| 359 |
+
trainer.default_local_dir=model_saving/gradient_analysis/sokoban/PPO/filter/sokoban-PPO-filter-topp09-grad-from-ckpt100 \
|
| 360 |
+
trainer.resume_mode=resume_path \
|
| 361 |
+
trainer.resume_from_path=/ABS/PATH/TO/your_run/global_step_100 \
|
| 362 |
+
trainer.total_training_steps=101 \
|
| 363 |
+
trainer.save_freq=-1 \
|
| 364 |
+
trainer.val_before_train=False \
|
| 365 |
+
trainer.test_freq=-1 \
|
| 366 |
+
trainer.n_gpus_per_node=8 \
|
| 367 |
+
ray_kwargs.ray_init.num_cpus=16 \
|
| 368 |
+
system.CUDA_VISIBLE_DEVICES="'0,1,2,3,4,5,6,7'" \
|
| 369 |
+
es_manager.train.env_groups=32 \
|
| 370 |
+
es_manager.train.group_size=16 \
|
| 371 |
+
es_manager.train.env_configs.n_groups="[32]" \
|
| 372 |
+
actor_rollout_ref.actor.use_kl_loss=False \
|
| 373 |
+
actor_rollout_ref.actor.kl_loss_type=low-var-kl \
|
| 374 |
+
actor_rollout_ref.actor.kl_loss_coef=0.001 \
|
| 375 |
+
actor_rollout_ref.actor.entropy_coeff=0.001 \
|
| 376 |
+
actor_rollout_ref.actor.entropy_from_logits_with_chunking=True \
|
| 377 |
+
actor_rollout_ref.actor.filter_loss_scaling=none \
|
| 378 |
+
actor_rollout_ref.actor.loss_agg_mode=token-mean \
|
| 379 |
+
actor_rollout_ref.rollout.gpu_memory_utilization=0.3 \
|
| 380 |
+
actor_rollout_ref.rollout.rollout_filter_value=0.9 \
|
| 381 |
+
actor_rollout_ref.rollout.rollout_filter_strategy=top_p \
|
| 382 |
+
actor_rollout_ref.rollout.rollout_filter_top_p_prob_mode=softmax \
|
| 383 |
+
actor_rollout_ref.rollout.rollout_filter_type=largest \
|
| 384 |
+
actor_rollout_ref.rollout.rollout_filter_metric=reward_variance \
|
| 385 |
+
actor_rollout_ref.rollout.rollout_filter_include_zero=True \
|
| 386 |
+
algorithm.adv_estimator=gae \
|
| 387 |
+
trainer.gradient_analysis_mode=True \
|
| 388 |
+
trainer.gradient_analysis_every=1 \
|
| 389 |
+
trainer.exit_after_gradient_analysis=True \
|
| 390 |
+
actor_rollout_ref.rollout.gradient_analysis_num_buckets=6 \
|
| 391 |
+
actor_rollout_ref.rollout.gradient_analysis_bucket_mode=quantile
|
| 392 |
+
```
|
| 393 |
+
|
| 394 |
+
Why `total_training_steps=101` for a `global_step_100` checkpoint:
|
| 395 |
+
- the trainer resumes at step 100
|
| 396 |
+
- one more training iteration is enough to trigger one analysis pass
|
| 397 |
+
- `exit_after_gradient_analysis=True` then exits before actor update
|
| 398 |
+
|
| 399 |
+
## Practical Notes
|
| 400 |
+
|
| 401 |
+
- `exit_after_gradient_analysis=True` is not a full “no training code at all” mode.
|
| 402 |
+
- rollout generation, filtering, reward computation, and critic update still happen before the analysis point
|
| 403 |
+
- what it prevents is the normal actor update and everything after it
|
| 404 |
+
|
| 405 |
+
- If you want the cleanest checkpoint inspection, keep the resumed run aligned with the original training geometry:
|
| 406 |
+
- same `env_groups`
|
| 407 |
+
- same `group_size`
|
| 408 |
+
- same rollout filter settings
|
| 409 |
+
|
| 410 |
+
- The analysis buckets are built on the filtered batch, not on the raw unfiltered rollout batch.
|
| 411 |
+
|
| 412 |
+
## Plotting After The Run
|
| 413 |
+
|
| 414 |
+
The plotting entry point is:
|
| 415 |
+
- [plot_gradient_analysis.py](../gradient_analysis/plot_gradient_analysis.py)
|
| 416 |
+
|
| 417 |
+
### List Available Analysis Steps
|
| 418 |
+
|
| 419 |
+
Before plotting, you can ask the script which steps in the run actually contain bucket metrics:
|
| 420 |
+
|
| 421 |
+
```bash
|
| 422 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 423 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 424 |
+
--list-steps
|
| 425 |
+
```
|
| 426 |
+
|
| 427 |
+
### Plot All Available Analysis Steps
|
| 428 |
+
|
| 429 |
+
```bash
|
| 430 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 431 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id>
|
| 432 |
+
```
|
| 433 |
+
|
| 434 |
+
### Plot A Specific Step
|
| 435 |
+
|
| 436 |
+
```bash
|
| 437 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 438 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 439 |
+
--step 1
|
| 440 |
+
```
|
| 441 |
+
|
| 442 |
+
You can also request multiple steps:
|
| 443 |
+
|
| 444 |
+
```bash
|
| 445 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 446 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 447 |
+
--step 1 11 21
|
| 448 |
+
```
|
| 449 |
+
|
| 450 |
+
### Choose An Output Directory
|
| 451 |
+
|
| 452 |
+
```bash
|
| 453 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 454 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 455 |
+
--step 1 \
|
| 456 |
+
--output-dir gradient_analysis_outputs/my_run_step1
|
| 457 |
+
```
|
| 458 |
+
|
| 459 |
+
### Files The Plot Script Produces
|
| 460 |
+
|
| 461 |
+
For each selected step, it writes:
|
| 462 |
+
|
| 463 |
+
- `gradient_analysis_summary_step_<N>.png`
|
| 464 |
+
- `gradient_analysis_plots_step_<N>.png`
|
| 465 |
+
- `gradient_analysis_loss_plots_step_<N>.png`
|
| 466 |
+
- `gradient_analysis_reward_std_step_<N>.png`
|
| 467 |
+
- `gradient_analysis_normed_grads_step_<N>.png`
|
| 468 |
+
- `gradient_analysis_metrics_step_<N>.json`
|
| 469 |
+
- `gradient_analysis_bucket_rv_table_step_<N>.csv`
|
| 470 |
+
|
| 471 |
+
Recommended reading order:
|
| 472 |
+
|
| 473 |
+
1. `gradient_analysis_summary_step_<N>.png`
|
| 474 |
+
2. `gradient_analysis_plots_step_<N>.png`
|
| 475 |
+
3. `gradient_analysis_metrics_step_<N>.json`
|
| 476 |
+
|
| 477 |
+
### Paper-Style Multi-Step Figure
|
| 478 |
+
|
| 479 |
+
If you already exported per-step `metrics.json` files and want the fixed 3-step comparison figure, use:
|
| 480 |
+
|
| 481 |
+
```bash
|
| 482 |
+
python gradient_analysis/plot_icml_steps.py \
|
| 483 |
+
--mode ppo \
|
| 484 |
+
--step0-dir /path/to/step0 \
|
| 485 |
+
--step20-dir /path/to/step20 \
|
| 486 |
+
--step40-dir /path/to/step40 \
|
| 487 |
+
--out gradient_analysis_outputs/ppo_step0_20_40.png
|
| 488 |
+
```
|
| 489 |
+
|
| 490 |
+
The plotting-only README is here:
|
| 491 |
+
- [gradient_analysis/README.md](../gradient_analysis/README.md)
|
docs/guide_rollout_filtering.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Rollout Filtering Guide
|
| 2 |
+
|
| 3 |
+
## What is Rollout Filtering?
|
| 4 |
+
|
| 5 |
+
In RAGEN, each training step generates multiple rollouts per prompt (a **group**). The within-group **reward variance (RV)** measures how much the model's responses differ in quality for that prompt:
|
| 6 |
+
|
| 7 |
+
- **High RV** — the model sometimes succeeds and sometimes fails → strong learning signal
|
| 8 |
+
- **Low RV** — all responses receive similar rewards → noisy gradient (low SNR)
|
| 9 |
+
|
| 10 |
+
**SNR-Adaptive Filtering** discards low-variance groups before the policy gradient update, keeping only prompts that provide meaningful signal. This reduces gradient noise and mitigates reasoning collapse during training.
|
| 11 |
+
|
| 12 |
+
<p align="center"><img src="../public/top_p.png" width="800px" alt="SNR-Adaptive Filtering (Top-p) pipeline" /></p>
|
| 13 |
+
<p align="center"><em>Top-p filtering pipeline: (1) sample rollouts and compute rewards, (2) compute within-prompt reward variance, (3) rank by RV and apply Top-p threshold — low-variance prompts are discarded.</em></p>
|
| 14 |
+
|
| 15 |
+
All config keys live under `actor_rollout_ref.rollout` in [config/base.yaml](../config/base.yaml).
|
| 16 |
+
|
| 17 |
+
## Quick Recommendation
|
| 18 |
+
|
| 19 |
+
| Goal | Config |
|
| 20 |
+
|---|---|
|
| 21 |
+
| No filtering (default) | `rollout_filter_value=1.0`, `rollout_filter_include_zero=True` |
|
| 22 |
+
| **Top-p Linear (recommended)** | `rollout_filter_value=0.9`, `rollout_filter_top_p_prob_mode=linear`, `rollout_filter_include_zero=False`, `rollout_filter_selection_eps=0.01` |
|
| 23 |
+
| Top-p Softmax | `rollout_filter_value=0.9`, `rollout_filter_top_p_prob_mode=softmax`, `rollout_filter_include_zero=False` |
|
| 24 |
+
| Top-k Fractional | `rollout_filter_strategy=top_k`, `rollout_filter_value=0.25`, `rollout_filter_type=largest`, `rollout_filter_include_zero=True` |
|
| 25 |
+
|
| 26 |
+
## Config Parameters
|
| 27 |
+
|
| 28 |
+
| Parameter | Description |
|
| 29 |
+
|---|---|
|
| 30 |
+
| `rollout_filter_strategy` | Selection strategy: `top_p`, `top_k`, `top_k_abs`, `min_p` |
|
| 31 |
+
| `rollout_filter_value` | Threshold value — meaning depends on strategy (see below) |
|
| 32 |
+
| `rollout_filter_type` | `largest` (keep high-RV groups) or `smallest` (keep low-RV groups) |
|
| 33 |
+
| `rollout_filter_include_zero` | Whether to keep groups with zero reward variance |
|
| 34 |
+
| `rollout_filter_top_p_prob_mode` | Top-p score aggregation: `linear` (score-sum rule) or `softmax` (probability mass) |
|
| 35 |
+
| `rollout_filter_selection_eps` | Epsilon for the linear top-p threshold (default `0.01`) |
|
| 36 |
+
| `rollout_filter_metric` | What to compute per group: `reward_variance` (default), `reward`, `reward_sum`, `entropy`, `entropy_variance`, `length` |
|
| 37 |
+
| `rollout_filter_empty_stop_steps` | Early-stop after this many consecutive steps with 0 kept samples (default `5`) |
|
| 38 |
+
|
| 39 |
+
## Filtering Strategies
|
| 40 |
+
|
| 41 |
+
### 1. No Filter
|
| 42 |
+
|
| 43 |
+
Keep all groups. Use this as a baseline.
|
| 44 |
+
|
| 45 |
+
```yaml
|
| 46 |
+
actor_rollout_ref:
|
| 47 |
+
rollout:
|
| 48 |
+
rollout_filter_strategy: top_p
|
| 49 |
+
rollout_filter_value: 1.0
|
| 50 |
+
rollout_filter_include_zero: True
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
With `value=1.0` and `include_zero=True`, the filter is effectively disabled — all groups pass through.
|
| 54 |
+
|
| 55 |
+
### 2. Top-p Linear (Recommended)
|
| 56 |
+
|
| 57 |
+
Keep the highest-RV groups whose cumulative score reaches a fraction of the total score.
|
| 58 |
+
|
| 59 |
+
```yaml
|
| 60 |
+
actor_rollout_ref:
|
| 61 |
+
rollout:
|
| 62 |
+
rollout_filter_strategy: top_p
|
| 63 |
+
rollout_filter_value: 0.9
|
| 64 |
+
rollout_filter_top_p_prob_mode: linear
|
| 65 |
+
rollout_filter_include_zero: False
|
| 66 |
+
rollout_filter_selection_eps: 0.01
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
How it works:
|
| 70 |
+
1. Remove zero-RV groups (`include_zero=False`)
|
| 71 |
+
2. Sort remaining groups by score (descending)
|
| 72 |
+
3. Compute threshold: `top_p * sum(scores) - eps`
|
| 73 |
+
4. Accumulate scores from the top until the threshold is reached
|
| 74 |
+
5. If the threshold cannot be reached, the step is skipped (`empty_after_filter`)
|
| 75 |
+
|
| 76 |
+
Tuning:
|
| 77 |
+
- `value=0.9`: recommended default
|
| 78 |
+
- Lower `value` → more aggressive filtering (fewer groups kept)
|
| 79 |
+
- `eps=0.01`: recommended default; larger eps rejects near-zero-RV batches more easily
|
| 80 |
+
|
| 81 |
+
### 3. Top-p Softmax
|
| 82 |
+
|
| 83 |
+
Nucleus-style selection based on softmax probability mass over group scores.
|
| 84 |
+
|
| 85 |
+
```yaml
|
| 86 |
+
actor_rollout_ref:
|
| 87 |
+
rollout:
|
| 88 |
+
rollout_filter_strategy: top_p
|
| 89 |
+
rollout_filter_value: 0.9
|
| 90 |
+
rollout_filter_top_p_prob_mode: softmax
|
| 91 |
+
rollout_filter_include_zero: False
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
How it works:
|
| 95 |
+
1. Remove zero-RV groups (`include_zero=False`)
|
| 96 |
+
2. Convert scores to probabilities: `probs = softmax(scores)`
|
| 97 |
+
3. Sort by probability (descending) and accumulate until cumulative mass reaches `top_p`
|
| 98 |
+
|
| 99 |
+
Tuning:
|
| 100 |
+
- `value=0.9`: recommended default
|
| 101 |
+
- `0.95–0.98`: mild filtering
|
| 102 |
+
- `0.6–0.8`: aggressive filtering
|
| 103 |
+
|
| 104 |
+
### 4. Top-k Fractional
|
| 105 |
+
|
| 106 |
+
Keep a fixed fraction of groups ranked by score.
|
| 107 |
+
|
| 108 |
+
```yaml
|
| 109 |
+
actor_rollout_ref:
|
| 110 |
+
rollout:
|
| 111 |
+
rollout_filter_strategy: top_k
|
| 112 |
+
rollout_filter_value: 0.25
|
| 113 |
+
rollout_filter_type: largest
|
| 114 |
+
rollout_filter_include_zero: True
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
How it works:
|
| 118 |
+
1. Compute `k = int(value * num_groups)` (at least 1)
|
| 119 |
+
2. Keep the top-k groups by score
|
| 120 |
+
3. With `include_zero=True`, zero-RV groups remain as candidates
|
| 121 |
+
|
| 122 |
+
`value=0.25` means "keep about 25% of groups". Example: with 8 groups, keeps `int(0.25 * 8) = 2` groups.
|
| 123 |
+
|
| 124 |
+
For a fixed absolute count instead of a fraction, use `strategy=top_k_abs`.
|
| 125 |
+
|
| 126 |
+
## Code References
|
| 127 |
+
|
| 128 |
+
- Filter logic: [ragen/trainer/rollout_filter.py](../ragen/trainer/rollout_filter.py)
|
| 129 |
+
- Trainer integration: [ragen/trainer/agent_trainer.py](../ragen/trainer/agent_trainer.py)
|
| 130 |
+
- Experiment scripts: [scripts/runs/run_filtering_final.sh](../scripts/runs/run_filtering_final.sh)
|
docs/readme_v1.md
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<h1 align="center"> RAGEN: Training Agents by Reinforcing Reasoning </h1>
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
<p align="center"><img src="public/ragen_logo.jpeg" width="300px" alt="RAGEN icon" /></p>
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
<p align="center" style="font-size: 18px;">
|
| 9 |
+
<strong>RAGEN</strong> (<b>R</b>easoning <b>AGEN</b>t, pronounced like "region") leverages reinforcement learning (RL) to train <br>
|
| 10 |
+
<strong>LLM reasoning agents</strong> in interactive, stochastic environments.<br>
|
| 11 |
+
<em>We strongly believe in the future of RL + LLM + Agents. The release is a minimally viable leap forward.</em>
|
| 12 |
+
</p>
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
<p align="center">
|
| 16 |
+
<a href="https://ragen-ai.github.io/"><img src="https://img.shields.io/badge/📝_HomePage-FF5722?style=for-the-badge&logoColor=white" alt="Blog"></a>
|
| 17 |
+
<a href="https://arxiv.org/abs/2504.20073"><img src="https://img.shields.io/badge/📄_Paper-EA4335?style=for-the-badge&logoColor=white" alt="Paper"></a>
|
| 18 |
+
<a href="https://ragen-doc.readthedocs.io/"><img src="https://img.shields.io/badge/📚_Documentation-4285F4?style=for-the-badge&logoColor=white" alt="Documentation"></a>
|
| 19 |
+
<a href="https://x.com/wzihanw/status/1915052871474712858"><img src="https://img.shields.io/badge/🔍_Post-34A853?style=for-the-badge&logoColor=white" alt="Post"></a>
|
| 20 |
+
<a href="https://api.wandb.ai/links/zihanwang-ai-northwestern-university/a8er8l7b"><img src="https://img.shields.io/badge/🧪_Experiment_Log-AB47BC?style=for-the-badge&logoColor=white" alt="Experiment Log"></a>
|
| 21 |
+
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
**2025.5.8 Update:**
|
| 25 |
+
We now release the official [Documentation](https://ragen-doc.readthedocs.io/) for RAGEN. The documentation will be continuously updated and improved to provide a comprehensive and up-to-date guidance.
|
| 26 |
+
|
| 27 |
+
**2025.5.2 Update:**
|
| 28 |
+
We now release a [tracking document](https://docs.google.com/document/d/1bg7obeiKTExuHHBl5uOiSpec5uLDZ2Tgvxy6li5pHX4/edit?usp=sharing) to log minor updates in the RAGEN codebase.
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
**2025.4.20 Update:**
|
| 32 |
+
|
| 33 |
+
Our RAGEN [paper](https://arxiv.org/abs/2504.20073) is out!
|
| 34 |
+
|
| 35 |
+
We've further streamlined the RAGEN codebase (v0423) to improve development.
|
| 36 |
+
1. Architecture: Restructured veRL as a submodule for better co-development
|
| 37 |
+
2. Modularity: Divided RAGEN into three components—Environment Manager, Context Manager, and Agent Proxy, making it significantly simpler to add new environments (details below), track environmental dynamics, and run multiple experiments
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
**2025.4.16 Update:**
|
| 41 |
+
|
| 42 |
+
We recently noticed that a [third-party website](https://ragen-ai.com) has been created using our project's name and content. While we appreciate the interest in the project, we'd like to clarify that this GitHub repository is the official and primary source for all code, updates, and documentation.
|
| 43 |
+
If we launch an official website in the future, it will be explicitly linked here.
|
| 44 |
+
|
| 45 |
+
Thank you for your support and understanding!
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
**2025.3.13 Update:**
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
We are recently refactoring RAGEN code to help you better develop your own idea on the codebase. Please checkout our [developing branch](https://github.com/ZihanWang314/RAGEN/tree/main-new). The first version decomposes RAGEN and veRL for better co-development, taking the latter as a submodule rather than a static directory.
|
| 52 |
+
|
| 53 |
+
**2025.3.8 Update:**
|
| 54 |
+
|
| 55 |
+
1. In previous veRL implementation, there is a [KL term issue](https://github.com/volcengine/verl/pull/179/files), which has been fixed in recent versions.
|
| 56 |
+
2. We find evidence from multiple sources that PPO could be more stable than GRPO training in [Open-Reasoner-Zero](https://x.com/rosstaylor90/status/1892664646890312125), [TinyZero](https://github.com/Jiayi-Pan/TinyZero), and [Zhihu](https://www.zhihu.com/search?type=content&q=%E6%97%A0%E5%81%8FGRPO). We have changed the default advantage estimator to GAE (using PPO) and aim to find more stable while efficient RL optimization methods in later versions.
|
| 57 |
+
|
| 58 |
+
**2025.1.27:**
|
| 59 |
+
|
| 60 |
+
We are thrilled to release RAGEN! Check out our post [here](https://x.com/wzihanw/status/1884092805598826609).
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
## Overview
|
| 64 |
+
|
| 65 |
+
<!--
|
| 66 |
+
Reinforcement Learning (RL) with rule-based rewards has shown promise in enhancing reasoning capabilities of large language models (LLMs). However, existing approaches have primarily focused on static, single-turn tasks like math reasoning and coding. Extending these methods to agent scenarios introduces two fundamental challenges:
|
| 67 |
+
|
| 68 |
+
1. **Multi-turn Interactions**: Agents must perform sequential decision-making and react to environment feedback
|
| 69 |
+
2. **Stochastic Environments**: Uncertainty where identical actions can lead to different outcomes
|
| 70 |
+
|
| 71 |
+
RAGEN addresses these challenges through:
|
| 72 |
+
- A Markov Decision Process (MDP) formulation for agent tasks
|
| 73 |
+
- State-Thinking-Actions-Reward Policy Optimization (StarPO) algorithm that optimizes entire trajectory distributions
|
| 74 |
+
- Progressive reward normalization strategies to handle diverse, complex environments
|
| 75 |
+
-->
|
| 76 |
+
|
| 77 |
+
Reinforcement Learning (RL) with rule-based rewards has shown promise in enhancing reasoning capabilities of large language models (LLMs). However, existing approaches have primarily focused on static, single-turn tasks like math reasoning and coding. Extending these methods to agent scenarios introduces two fundamental challenges:
|
| 78 |
+
|
| 79 |
+
1. **Multi-turn Interactions**: Agents must perform sequential decision-making and react to environment feedback
|
| 80 |
+
2. **Stochastic Environments**: Uncertainty where identical actions can lead to different outcomes
|
| 81 |
+
|
| 82 |
+
To address these challenges, we propose a general RL framework: **StarPO** (**S**tate-**T**hinking-**A**ctions-**R**eward **P**olicy **O**ptimization), a comprehensive RL framework that provides a unified approach for training multi-turn, trajectory-level agents with flexible control over reasoning processes, reward assignment mechanisms, and prompt-rollout structures.
|
| 83 |
+
Building upon StarPO, we introduce **RAGEN**, a modular agent training and evaluation system that implements the complete training loop, including rollout generation, reward calculation, and trajectory optimization. RAGEN serves as a robust research infrastructure for systematically analyzing LLM agent training dynamics in multi-turn and stochastic environments.
|
| 84 |
+
|
| 85 |
+
## Algorithm
|
| 86 |
+
|
| 87 |
+
RAGEN introduces a reinforcement learning framework to train reasoning-capable LLM agents that can operate in interactive, stochastic environments.
|
| 88 |
+
|
| 89 |
+
<p align="center"><img src="public/starpo_logo.png" width="800px" alt="StarPO Framework" /></p>
|
| 90 |
+
<p align="center" style="font-size: 16px; max-width: 800px; margin: 0 auto;">
|
| 91 |
+
The StarPO (State-Thinking-Action-Reward Policy Optimization) framework with two interleaved stages: <b>rollout stage</b> and <b>update stage</b>. LLM iteratively generates reasoning-guided actions to interact with the environment to obtain trajectory-level rewards for LLM update to jointly optimize reasoning and action strategies.
|
| 92 |
+
</p>
|
| 93 |
+
|
| 94 |
+
The framework consists of two key components:
|
| 95 |
+
|
| 96 |
+
### > MDP Formulation
|
| 97 |
+
We formulate agent-environment interactions as Markov Decision Processes (MDPs) where states and actions are token sequences, allowing LLMs to reason over environment dynamics. At time t, state $s_t$ transitions to the next state through action $a_t$ following a transition function. The policy generates actions given the trajectory history. The objective is to maximize expected cumulative rewards across multiple interaction turns.
|
| 98 |
+
|
| 99 |
+
### > StarPO: Reinforcing Reasoning via Trajectory-Level Optimization
|
| 100 |
+
StarPO is a general RL framework for optimizing entire multi-turn interaction trajectories for LLM agents.
|
| 101 |
+
The algorithm alternates between two phases:
|
| 102 |
+
|
| 103 |
+
#### Rollout Stage: Reasoning-Interaction Trajectories
|
| 104 |
+
Given an initial state, the LLM generates multiple trajectories. At each step, the model receives the trajectory history and generates a reasoning-guided action: `<think>...</think><ans> action </ans>`. The environment receives the action and returns feedback (reward and next state).
|
| 105 |
+
|
| 106 |
+
#### Update Stage: Multi-turn Trajectory Optimization
|
| 107 |
+
After generating trajectories, we train LLMs to optimize expected rewards. Instead of step-by-step optimization, StarPO optimizes entire trajectories using importance sampling. This approach enables long-horizon reasoning while maintaining computational efficiency.
|
| 108 |
+
StarPO supports multiple optimization strategies:
|
| 109 |
+
- PPO: We estimate token-level advantages using a value function over trajectories
|
| 110 |
+
- GRPO: We assign normalized reward to the full trajectory
|
| 111 |
+
|
| 112 |
+
Rollout and update stages interleave in StarPO, enabling both online and offline learning.
|
| 113 |
+
|
| 114 |
+
<!--
|
| 115 |
+
### > Reward Normalization Strategies
|
| 116 |
+
We implement three progressive normalization strategies to stabilize training:
|
| 117 |
+
1. **ARPO**: Preserves raw rewards directly
|
| 118 |
+
2. **BRPO**: Normalizes rewards across each training batch using batch statistics
|
| 119 |
+
3. **GRPO**: Normalizes within prompt groups to balance learning across varying task difficulties
|
| 120 |
+
-->
|
| 121 |
+
|
| 122 |
+
## Environment Setup
|
| 123 |
+
For detailed setup instructions, please check our [documentation](https://ragen-doc.readthedocs.io/). Here's a quick start guide:
|
| 124 |
+
|
| 125 |
+
```bash
|
| 126 |
+
# Setup environment for RAGEN
|
| 127 |
+
bash scripts/setup_ragen.sh
|
| 128 |
+
```
|
| 129 |
+
|
| 130 |
+
If this fails, you can follow the manual setup instructions in `scripts/setup_ragen.md`.
|
| 131 |
+
|
| 132 |
+
### Optional Dependencies
|
| 133 |
+
|
| 134 |
+
RAGEN supports optional environment-specific dependencies. You can install only the components you need:
|
| 135 |
+
|
| 136 |
+
```bash
|
| 137 |
+
pip install -e . # Base installation (core functionality only)
|
| 138 |
+
pip install -e ".[webshop]" # Include WebShop environment dependencies
|
| 139 |
+
pip install -e ".[lean]" # Include Lean environment dependencies
|
| 140 |
+
pip install -e ".[all]" # Install all optional dependencies
|
| 141 |
+
pip install -e ".[webshop,lean]" # Or combine multiple extras
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
+
## Training Models
|
| 145 |
+
Here's how to train models with RAGEN:
|
| 146 |
+
|
| 147 |
+
### Export variables and train
|
| 148 |
+
We provide default configuration in `config/base.yaml`. This file includes symbolic links to:
|
| 149 |
+
- `config/ppo_trainer.yaml`
|
| 150 |
+
- `config/envs.yaml`
|
| 151 |
+
|
| 152 |
+
The base configuration automatically inherits all contents from these two config files, creating a unified configuration system.
|
| 153 |
+
|
| 154 |
+
To train:
|
| 155 |
+
|
| 156 |
+
```bash
|
| 157 |
+
python train.py --config-name base
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
### Parameter efficient training with LoRA
|
| 162 |
+
|
| 163 |
+
### Saving compute
|
| 164 |
+
By default our code is runnable on A100 80GB machines. If you are using machine with lower memory (e.g. RTX 4090), please consider adapting below parameters, like follows (performance might change due to smaller batch size and shorter context length):
|
| 165 |
+
```bash
|
| 166 |
+
python train.py \
|
| 167 |
+
micro_batch_size_per_gpu=1 \
|
| 168 |
+
ppo_mini_batch_size=8 \
|
| 169 |
+
actor_rollout_ref.rollout.max_model_len=2048 \
|
| 170 |
+
actor_rollout_ref.rollout.response_length=128
|
| 171 |
+
```
|
| 172 |
+
|
| 173 |
+
#### Parameter efficient training with LoRA
|
| 174 |
+
We provide a default configuration with LoRA enabled in `config/base-lora.yaml`. To customize the LoRA settings, see the the `lora` section at the top of the configuration file. The current settings are:
|
| 175 |
+
|
| 176 |
+
```yaml
|
| 177 |
+
lora rank: 64
|
| 178 |
+
lora alpha: 64
|
| 179 |
+
actor learning rate: 1e-5
|
| 180 |
+
critic learning rate: 1e-4
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
<!--
|
| 184 |
+
## Supervised Finetuning (Optional)
|
| 185 |
+
For supervised finetuning with LoRA:
|
| 186 |
+
|
| 187 |
+
1. Create supervised finetuning data:
|
| 188 |
+
```bash
|
| 189 |
+
bash sft/generate_data.sh <env_type>
|
| 190 |
+
```
|
| 191 |
+
|
| 192 |
+
2. Finetune the model:
|
| 193 |
+
```bash
|
| 194 |
+
bash sft/finetune_lora.sh <env_type> <num_gpus> <save_path>
|
| 195 |
+
```
|
| 196 |
+
|
| 197 |
+
3. Merge LoRA weights with the base model:
|
| 198 |
+
```bash
|
| 199 |
+
python sft/utils/merge_lora.py \
|
| 200 |
+
--base_model_name <base_model_name> \
|
| 201 |
+
--lora_model_path <lora_model_path> \
|
| 202 |
+
--output_path <output_path>
|
| 203 |
+
```
|
| 204 |
+
-->
|
| 205 |
+
|
| 206 |
+
## Visualization
|
| 207 |
+
Please check the `val/generations` metric in your wandb dashboard to see the trajectories generated by the model throughout training. Check this [relevant issue](https://github.com/RAGEN-AI/RAGEN/issues/84) for more information.
|
| 208 |
+
|
| 209 |
+
|
| 210 |
+
## Performance
|
| 211 |
+
|
| 212 |
+
We evaluate RAGEN across multiple environments. Below are results Qwen-2.5-0.5B-Instruct on Sokoban, Frozenlake, Bandit, and Spatial.
|
| 213 |
+
- No KL loss or KL penalty was applied during training
|
| 214 |
+
- We selectively retained only the top 25% of trajectories that successfully completed their respective tasks
|
| 215 |
+
|
| 216 |
+
<p align="center" style="display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 20px; max-width: 500px; margin: 0 auto;">
|
| 217 |
+
<img src="public/exp1.png" width="250px" alt="Bandit" />
|
| 218 |
+
<img src="public/exp2.png" width="250px" alt="Simple Sokoban" />
|
| 219 |
+
<img src="public/exp3.png" width="250px" alt="Frozen lake" />
|
| 220 |
+
</p>
|
| 221 |
+
|
| 222 |
+
We demonstrate RAGEN's robust generalization ability by training on simple Sokoban environments (6×6 with 1 box) and successfully evaluating performance on:
|
| 223 |
+
- Larger Sokoban environments (8×8 with 2 boxes)
|
| 224 |
+
- Simple Sokoban with alternative grid vocabulary representations
|
| 225 |
+
- FrozenLake environments
|
| 226 |
+
|
| 227 |
+
<p align="center" style="display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 20px; max-width: 500px; margin: 0 auto;">
|
| 228 |
+
<img src="public/exp4.png" width="250px" alt="Larger Sokoban" />
|
| 229 |
+
<img src="public/exp5.png" width="250px" alt="Sokoban with Different Grid Vocabulary" />
|
| 230 |
+
<img src="public/exp6.png" width="250px" alt="Frozen lake" />
|
| 231 |
+
</p>
|
| 232 |
+
|
| 233 |
+
Key observations:
|
| 234 |
+
- By using no KL and filtering out failed trajectories, we can achieve better and stable performance
|
| 235 |
+
- Generalization results highlight RAGEN's capacity to transfer learned policies across varying environment complexities, representations, and domains.
|
| 236 |
+
|
| 237 |
+
## Evaluation
|
| 238 |
+
RAGEN provides a easy way to evaluate a model:
|
| 239 |
+
```bash
|
| 240 |
+
python -m ragen.llm_agent.agent_proxy --config-name <eval_config>
|
| 241 |
+
```
|
| 242 |
+
The proxy now loads `config/eval.yaml` by default, which only keeps the rollout-specific knobs required for evaluation. You can still point to any other file via `--config-name`. Each evaluation config supports an `output` block so you can control where rollouts are stored and which fields are persisted:
|
| 243 |
+
|
| 244 |
+
```yaml
|
| 245 |
+
output:
|
| 246 |
+
dir: results/eval
|
| 247 |
+
filename: val_rollouts.pkl
|
| 248 |
+
append_timestamp: true # include run timestamp in the file name
|
| 249 |
+
keep_batch_keys: ["rm_scores", "responses"] # set to null to keep everything
|
| 250 |
+
keep_non_tensor_keys: null
|
| 251 |
+
keep_meta_info: true
|
| 252 |
+
```
|
| 253 |
+
|
| 254 |
+
With this configuration the proxy filters the `DataProto` before saving (handy if you want to drop large tensors such as log-probs) and places the artifact directly under `results/eval`.
|
| 255 |
+
You only need to set model and environment to evaluate in `config/<eval_config>.yaml`.
|
| 256 |
+
To limit how many previous turns the model sees during evaluation, you can set `agent_proxy.max_context_window` in your config file.
|
| 257 |
+
|
| 258 |
+
|
| 259 |
+
<!--
|
| 260 |
+
## Example Trajectories
|
| 261 |
+
|
| 262 |
+
Visualization of agent reasoning on the Sokoban task:
|
| 263 |
+
|
| 264 |
+
<p align="center" style="display: flex; justify-content: center; gap: 10px;">
|
| 265 |
+
<img src="./public/step_1.png" width="200px" alt="Step 1" />
|
| 266 |
+
<img src="./public/step_2.png" width="200px" alt="Step 2" />
|
| 267 |
+
</p>
|
| 268 |
+
|
| 269 |
+
The visualizations show how the agent reasons through sequential steps to solve the puzzle.
|
| 270 |
+
|
| 271 |
+
## Case Studies
|
| 272 |
+
We provide several case studies showing the model's behavior:
|
| 273 |
+
- [Reward hacking](https://github.com/ZihanWang314/agent-r1/blob/main/cases/reward_hacking.txt)
|
| 274 |
+
- [Challenging moments](https://github.com/ZihanWang314/agent-r1/blob/main/cases/suck_moment.txt)
|
| 275 |
+
|
| 276 |
+
More case studies will be added to showcase both successful reasoning patterns and failure modes.
|
| 277 |
+
-->
|
| 278 |
+
|
| 279 |
+
## Modular System Design of RAGEN
|
| 280 |
+
|
| 281 |
+
We implement RAGEN as a modular system: there are three main modules: **Environment State Manager** (`ragen/llm_agent/es_manager.py`), **Context Manager** (`ragen/llm_agent/ctx_manager.py`), and **Agent Proxy** (`ragen/llm_agent/agent_proxy.py`).
|
| 282 |
+
|
| 283 |
+
- Environment State Manager (**es_manager**):
|
| 284 |
+
- Supports multiple environments (different environments, same environment different seeds, same environment same seed)
|
| 285 |
+
- Training seeds are controlled via `seed.train` in the config. The manager increments this seed each reset so runs are deterministic.
|
| 286 |
+
- Records states of each environment during rollout
|
| 287 |
+
- Processes actions from **ctx_manager**, executes step, and returns action results (observations) to **ctx_manager** in a batch-wise manner
|
| 288 |
+
- Context Manager (**ctx_manager**):
|
| 289 |
+
- Parses raw agent tokens into structured actions for the **es_manager**
|
| 290 |
+
- Formats observation from **es_manager**, parses and formulates them for following rollout of agent.
|
| 291 |
+
- Supports a `max_context_window` hyperparameter, which limits how many previous turns of interaction history are retained in the model’s input.
|
| 292 |
+
- Gathers final rollout trajectories and compiles them into tokens, attention masks, reward scores, and loss masks for llm updating.
|
| 293 |
+
- Agent Proxy (**agent_proxy**): Serves as the interface for executing single or multi-round rollouts
|
| 294 |
+
|
| 295 |
+
## Adding Custom Environments
|
| 296 |
+
|
| 297 |
+
To add a new environment to our framework:
|
| 298 |
+
|
| 299 |
+
1. Implement an OpenAI Gym-compatible environment in `ragen/env/new_env/env.py` with these required methods:
|
| 300 |
+
- `step(action)`: Process actions and return next state
|
| 301 |
+
- `reset(seed)`: Initialize environment with new seed
|
| 302 |
+
- `render()`: Return current state observation
|
| 303 |
+
- `close()`: Clean up resources
|
| 304 |
+
|
| 305 |
+
2. Define environment configuration in `ragen/env/new_env/config.py`
|
| 306 |
+
|
| 307 |
+
3. Register your environment in `config/envs.yaml`:
|
| 308 |
+
```yaml
|
| 309 |
+
custom_envs:
|
| 310 |
+
- NewEnvironment # Tag
|
| 311 |
+
- env_type: new_env # Must match environment class name
|
| 312 |
+
- max_actions_per_traj: 50 # Example value
|
| 313 |
+
- env_instruction: "Your environment instructions here"
|
| 314 |
+
- parallel_friendly: false # Set to true if your environment supports parallel execution.
|
| 315 |
+
- max_workers: 128 # If parallel_friendly=True, max_workers threads will be used.
|
| 316 |
+
- env_config: {} # Configuration options from config.py
|
| 317 |
+
```
|
| 318 |
+
(Hint: Due to the extra time cost associated with using a thread pool, there is a trade-off between the pool's overhead and the speed of the environment itself. It is recommended to enable the parallelism only for complex environments. Meanwhile, running the RNG-dependent environments inside shared thread pools means multiple workers touch Python’s global random state concurrently, so even with the same seed, interleaving differs per run when setting `parallel_friendly=True`.)
|
| 319 |
+
|
| 320 |
+
4. Add the environment tag to the `es_manager` section in `config/base.yaml`
|
| 321 |
+
|
| 322 |
+
## Using RAGEN with dstack
|
| 323 |
+
|
| 324 |
+
[dstackai/dstack](https://github.com/dstackai/dstack) is an open-source container orchestrator that simplifies distributed training across cloud providers and on-premises environments
|
| 325 |
+
without the need to use K8S or Slurm.
|
| 326 |
+
|
| 327 |
+
### 1. Create fleet
|
| 328 |
+
|
| 329 |
+
Before submitting distributed training jobs, create a `dstack` [fleet](https://dstack.ai/docs/concepts/fleets).
|
| 330 |
+
|
| 331 |
+
### 2. Run a Ray cluster task
|
| 332 |
+
|
| 333 |
+
Once the fleet is created, define and apply a Ray cluster task:
|
| 334 |
+
|
| 335 |
+
```shell
|
| 336 |
+
$ dstack apply -f examples/distributed-training/ray-ragen/.dstack.yml
|
| 337 |
+
```
|
| 338 |
+
|
| 339 |
+
You can find the task configuration example at [`examples/distributed-training/ray-ragen/.dstack.yml`](https://github.com/dstackai/dstack/blob/master/examples/distributed-training/ray-ragen/.dstack.yml).
|
| 340 |
+
|
| 341 |
+
The `dstack apply` command will provision the Ray cluster with all dependencies and forward the Ray dashboard port to `localhost:8265`.
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
### 3. Submit a training job
|
| 345 |
+
|
| 346 |
+
Now you can submit a training job locally to the Ray cluster:
|
| 347 |
+
|
| 348 |
+
```shell
|
| 349 |
+
$ RAY_ADDRESS=http://localhost:8265
|
| 350 |
+
$ ray job submit \
|
| 351 |
+
...
|
| 352 |
+
```
|
| 353 |
+
|
| 354 |
+
See the full [RAGEN+Ray example](https://dstack.ai/examples/distributed-training/ray-ragen/).
|
| 355 |
+
|
| 356 |
+
For more details on how `dstack` can be used for distributed training, check out the [Clusters](https://dstack.ai/docs/guides/clusters/) guide.
|
| 357 |
+
|
| 358 |
+
## Feedback
|
| 359 |
+
We welcome all forms of feedback! Please raise an issue for bugs, questions, or suggestions. This helps our team address common problems efficiently and builds a more productive community.
|
| 360 |
+
|
| 361 |
+
## Awesome work powered or inspired by RAGEN
|
| 362 |
+
- [ROLL](https://github.com/alibaba/ROLL): An Efficient and User-Friendly Scaling Library for Reinforcement Learning with Large Language Models
|
| 363 |
+
- [VAGEN](https://github.com/RAGEN-AI/VAGEN): Training Visual Agents with multi-turn reinforcement learning
|
| 364 |
+
- [Search-R1](https://github.com/PeterGriffinJin/Search-R1): Train your LLMs to reason and call a search engine with reinforcement learning
|
| 365 |
+
- [ZeroSearch](https://github.com/Alibaba-nlp/ZeroSearch): Incentivize the Search Capability of LLMs without Searching
|
| 366 |
+
- [Agent-R1](https://github.com/0russwest0/Agent-R1): Training Powerful LLM Agents with End-to-End Reinforcement Learning
|
| 367 |
+
- [OpenManus-RL](https://github.com/OpenManus/OpenManus-RL): A live stream development of RL tunning for LLM agents
|
| 368 |
+
- [MetaSpatial](https://github.com/PzySeere/MetaSpatial): Reinforcing 3D Spatial Reasoning in VLMs for the Metaverse
|
| 369 |
+
- [s3](https://github.com/pat-jj/s3): Efficient Yet Effective Search Agent Training via Reinforcement Learning
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
## Contributors
|
| 373 |
+
|
| 374 |
+
[**Zihan Wang**\*](https://zihanwang314.github.io/), [**Kangrui Wang**\*](https://jameskrw.github.io/), [**Qineng Wang**\*](https://qinengwang-aiden.github.io/), [**Pingyue Zhang**\*](https://williamzhangsjtu.github.io/), [**Linjie Li**\*](https://scholar.google.com/citations?user=WR875gYAAAAJ&hl=en), [**Zhengyuan Yang**](https://zyang-ur.github.io/), [**Xing Jin**](https://openreview.net/profile?id=~Xing_Jin3), [**Kefan Yu**](https://www.linkedin.com/in/kefan-yu-22723a25b/en/), [**Minh Nhat Nguyen**](https://www.linkedin.com/in/menhguin/?originalSubdomain=sg), [**Licheng Liu**](https://x.com/liulicheng10), [**Eli Gottlieb**](https://www.linkedin.com/in/eli-gottlieb1/), [**Yiping Lu**](https://2prime.github.io), [**Kyunghyun Cho**](https://kyunghyuncho.me/), [**Jiajun Wu**](https://jiajunwu.com/), [**Li Fei-Fei**](https://profiles.stanford.edu/fei-fei-li), [**Lijuan Wang**](https://www.microsoft.com/en-us/research/people/lijuanw/), [**Yejin Choi**](https://homes.cs.washington.edu/~yejin/), [**Manling Li**](https://limanling.github.io/)
|
| 375 |
+
|
| 376 |
+
*:Equal Contribution.
|
| 377 |
+
|
| 378 |
+
## Acknowledgements
|
| 379 |
+
We thank the [DeepSeek](https://github.com/deepseek-ai/DeepSeek-R1) team for providing the DeepSeek-R1 model and early conceptual inspirations. We are grateful to the [veRL](https://github.com/volcengine/verl) team for their infrastructure support. We thank the [TinyZero](https://github.com/Jiayi-Pan/TinyZero) team for their discoveries that informed our initial exploration. We would like to appreciate insightful discussions with Han Liu, Xinyu Xing, Li Erran Li, John Schulman, Akari Asai, Eiso Kant, Lu Lu, Runxin Xu, Huajian Xin, Zijun Liu, Weiyi Liu, Weimin Wu, Yibo Wen, Jiarui Liu, Lorenzo Xiao, Ishan Mukherjee, Anabella Isaro, Haosen Sun, How-Yeh Wan, Lester Xue, Matthew Khoriaty, Haoxiang Sun, Jiajun Liu.
|
| 380 |
+
|
| 381 |
+
## Star History
|
| 382 |
+
|
| 383 |
+
[](https://www.star-history.com/#ragen-ai/ragen&Date)
|
| 384 |
+
|
| 385 |
+
## Citation
|
| 386 |
+
If you find RAGEN useful, we would appreciate it if you consider citing our work:
|
| 387 |
+
```md
|
| 388 |
+
@misc{ragen,
|
| 389 |
+
title={RAGEN: Understanding Self-Evolution in LLM Agents via Multi-Turn Reinforcement Learning},
|
| 390 |
+
author={Zihan Wang and Kangrui Wang and Qineng Wang and Pingyue Zhang and Linjie Li and Zhengyuan Yang and Xing Jin and Kefan Yu and Minh Nhat Nguyen and Licheng Liu and Eli Gottlieb and Yiping Lu and Kyunghyun Cho and Jiajun Wu and Li Fei-Fei and Lijuan Wang and Yejin Choi and Manling Li},
|
| 391 |
+
year={2025},
|
| 392 |
+
eprint={2504.20073},
|
| 393 |
+
archivePrefix={arXiv},
|
| 394 |
+
primaryClass={cs.LG},
|
| 395 |
+
url={https://arxiv.org/abs/2504.20073},
|
| 396 |
+
}
|
| 397 |
+
```
|
docs/reference_mutual_information_metrics.md
ADDED
|
@@ -0,0 +1,490 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Mutual Information Metrics for Collapse Detection
|
| 2 |
+
|
| 3 |
+
This document provides a comprehensive explanation of the mutual information (MI) based metrics used in RAGEN for detecting training collapse phenomena.
|
| 4 |
+
|
| 5 |
+
## 1. Overview: Two Core Metrics
|
| 6 |
+
|
| 7 |
+
We focus on two diagnostic quantities:
|
| 8 |
+
|
| 9 |
+
| Quantity | Meaning | Diagnostic Metric |
|
| 10 |
+
|--------------|------------|-------------------|
|
| 11 |
+
| **Within-input variability** | How much reasoning varies under the same input | $H(Z \mid X)$ |
|
| 12 |
+
| **Across-input dependence** | How much reasoning still depends on the input | $I(X; Z)$ |
|
| 13 |
+
|
| 14 |
+
**Key Insight**: We compute MI under the batch's empirical input distribution (uniform over prompts), not the true $p(x)$. This is exactly what's needed for diagnosing whether reasoning remains input-dependent inside a training batch.
|
| 15 |
+
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
## 2. Design Decision: Partitioning $X$ and $Z$
|
| 19 |
+
|
| 20 |
+
The choice of how to partition the sequence into conditioning context $X$ and reasoning $Z$ is crucial for meaningful collapse detection. The partition answers: **"Which segment of generation depends on which segment of input context?"**
|
| 21 |
+
|
| 22 |
+
### 2.1 Design Goal
|
| 23 |
+
|
| 24 |
+
We want to measure whether the reasoning content becomes increasingly input-independent (i.e., ignoring the environment state and producing generic outputs), while also tracking how much variability remains under the same input.
|
| 25 |
+
|
| 26 |
+
### 2.2 Recommended Partition
|
| 27 |
+
|
| 28 |
+
For a typical agent turn with structure:
|
| 29 |
+
```
|
| 30 |
+
[System Prompt] [User: State] [Assistant:] <think> reasoning content </think> <answer> action </answer>
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
We define:
|
| 34 |
+
|
| 35 |
+
| Variable | Content | Rationale |
|
| 36 |
+
|----------|---------|-----------|
|
| 37 |
+
| **$X$** | System prompt + User turn (state) + Assistant prefix + `<think>` tag | Everything the model sees *before* generating reasoning content |
|
| 38 |
+
| **$Z$** | Reasoning content tokens (between `<think>` and `</think>`, **excluding both tags**) | The actual reasoning we want to measure dependency for |
|
| 39 |
+
|
| 40 |
+
### 2.3 Why Include `<think>` in $X$?
|
| 41 |
+
|
| 42 |
+
The `<think>` tag should be part of $X$ (conditioning context), not $Z$ (reasoning):
|
| 43 |
+
|
| 44 |
+
1. **Semantic role**: `<think>` is a control token meaning "start generating reasoning" — it's a boundary marker, not reasoning content itself.
|
| 45 |
+
|
| 46 |
+
2. **Near-constant token**: `<think>` appears identically in every sample, so including it in $Z$ would:
|
| 47 |
+
- Add no discriminative information between prompts
|
| 48 |
+
- Dilute entropy/MI statistics with high-probability constant tokens
|
| 49 |
+
|
| 50 |
+
3. **Clean separation**: With `<think>` in $X$, the partition becomes: "everything before reasoning starts" vs "reasoning content itself"
|
| 51 |
+
|
| 52 |
+
### 2.4 Why Exclude `</think>` from $Z$?
|
| 53 |
+
|
| 54 |
+
The `</think>` closing tag should also be excluded from $Z$:
|
| 55 |
+
|
| 56 |
+
1. **Structural boundary**: Like `<think>`, it's a format token, not reasoning content.
|
| 57 |
+
|
| 58 |
+
2. **Format stability signal**: If `</think>` is included in $Z$, MI/entropy metrics would conflate:
|
| 59 |
+
- Reasoning content dependency (what we want)
|
| 60 |
+
- Format stability (whether the model reliably closes tags)
|
| 61 |
+
|
| 62 |
+
3. **Cleaner interpretation**: Excluding both tags means $Z$ purely measures "does the reasoning *content* depend on the input state?"
|
| 63 |
+
|
| 64 |
+
### 2.5 Implementation Mapping
|
| 65 |
+
|
| 66 |
+
In the codebase, this corresponds to:
|
| 67 |
+
|
| 68 |
+
| Field | Content |
|
| 69 |
+
|-------|---------|
|
| 70 |
+
| `first_turn_prompt_ids` | Tokens up to and including `<think>` |
|
| 71 |
+
| `first_turn_reasoning_ids` | Reasoning content tokens only (no `<think>`, no `</think>`) |
|
| 72 |
+
|
| 73 |
+
---
|
| 74 |
+
|
| 75 |
+
## 3. Notation and Definitions
|
| 76 |
+
|
| 77 |
+
### 3.1 Random Variables
|
| 78 |
+
|
| 79 |
+
| Symbol | Description |
|
| 80 |
+
|--------|-------------|
|
| 81 |
+
| $X$ | Input context: system prompt + user turn + assistant prefix + `<think>` |
|
| 82 |
+
| $Z$ | Reasoning content tokens (between `<think>` and `</think>`, excluding tags) |
|
| 83 |
+
| $x_j$ | The $j$-th unique prompt in the batch, $j \in \{1, \ldots, N\}$ |
|
| 84 |
+
| $z_{i,k}$ | The $k$-th reasoning sample for trajectory $i$ |
|
| 85 |
+
| $N$ | Number of unique prompts in the batch |
|
| 86 |
+
| $K$ | Number of reasoning samples per prompt (group size) |
|
| 87 |
+
|
| 88 |
+
### 3.2 Probability Distributions
|
| 89 |
+
|
| 90 |
+
| Symbol | Definition | Description |
|
| 91 |
+
|--------|------------|-------------|
|
| 92 |
+
| $p(z \mid x)$ | $\prod_{t=1}^{T} p_\theta(z_t \mid x, z_{1:t-1})$ | Conditional probability of reasoning $z$ given prompt $x$ under policy $\pi_\theta$ |
|
| 93 |
+
| $p_{\text{mix}}(z)$ | $\frac{1}{N} \sum_{j=1}^{N} p(z \mid x_j)$ | Marginal probability under uniform prompt mixture |
|
| 94 |
+
| $\hat{p}(x)$ | $\frac{1}{N}$ | Empirical (uniform) distribution over batch prompts |
|
| 95 |
+
|
| 96 |
+
---
|
| 97 |
+
|
| 98 |
+
## 4. Core Information-Theoretic Quantities
|
| 99 |
+
|
| 100 |
+
### 4.1 Conditional Entropy $H(Z \mid X)$
|
| 101 |
+
|
| 102 |
+
**Definition**: The expected uncertainty in the reasoning $Z$ given the prompt $X$.
|
| 103 |
+
|
| 104 |
+
$$H(Z \mid X) = -\mathbb{E}_{x \sim \hat{p}(x)} \mathbb{E}_{z \sim p(z|x)} \left[ \log p(z \mid x) \right]$$
|
| 105 |
+
|
| 106 |
+
**Estimation**: Using sampled (prompt, reasoning) pairs:
|
| 107 |
+
|
| 108 |
+
$$\hat{H}(Z \mid X) = -\frac{1}{NK} \sum_{i,k} \log p(z_{i,k} \mid x_i)$$
|
| 109 |
+
|
| 110 |
+
**Interpretation**:
|
| 111 |
+
- **High $H(Z \mid X)$**: Model generates diverse responses for each prompt (stochastic policy)
|
| 112 |
+
- **Low $H(Z \mid X)$**: Model generates deterministic/repetitive responses for each prompt
|
| 113 |
+
|
| 114 |
+
**Code Reference** (`collapse_metrics.py:675-700`):
|
| 115 |
+
```python
|
| 116 |
+
conditional_entropy = -matched.mean().item() # H(Z|X) estimate
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
### 4.2 Marginal Entropy $H(Z)$
|
| 120 |
+
|
| 121 |
+
**Definition**: The total entropy of reasoning under the marginal distribution.
|
| 122 |
+
|
| 123 |
+
$$H(Z) = -\mathbb{E}_{z \sim p_{\text{mix}}(z)} \left[ \log p_{\text{mix}}(z) \right]$$
|
| 124 |
+
|
| 125 |
+
**Estimation**: Using the mixture distribution:
|
| 126 |
+
|
| 127 |
+
$$\hat{H}(Z) = -\frac{1}{NK} \sum_{i,k} \log p_{\text{mix}}(z_{i,k})$$
|
| 128 |
+
|
| 129 |
+
where:
|
| 130 |
+
|
| 131 |
+
$$p_{\text{mix}}(z) = \frac{1}{N} \sum_{j=1}^{N} p(z \mid x_j)$$
|
| 132 |
+
|
| 133 |
+
**Code Reference** (`collapse_metrics.py:675-700`):
|
| 134 |
+
```python
|
| 135 |
+
reasoning_entropy = -marginal.mean().item() # H(Z) estimate
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
### 4.3 Mutual Information $I(X; Z)$
|
| 139 |
+
|
| 140 |
+
**Definition**: The amount of information that the reasoning $Z$ contains about the prompt $X$.
|
| 141 |
+
|
| 142 |
+
$$I(X; Z) = H(Z) - H(Z \mid X)$$
|
| 143 |
+
|
| 144 |
+
Equivalently:
|
| 145 |
+
|
| 146 |
+
$$I(X; Z) = \mathbb{E}_{x, z} \left[ \log \frac{p(z \mid x)}{p_{\text{mix}}(z)} \right]$$
|
| 147 |
+
|
| 148 |
+
**Estimation**:
|
| 149 |
+
|
| 150 |
+
$$\hat{I}(X; Z) = \frac{1}{NK} \sum_{i,k} \left[ \log p(z_{i,k} \mid x_i) - \log p_{\text{mix}}(z_{i,k}) \right]$$
|
| 151 |
+
|
| 152 |
+
**Interpretation**:
|
| 153 |
+
- **High $I(X; Z)$**: Reasoning is input-dependent (healthy)
|
| 154 |
+
- **Low $I(X; Z)$**: Reasoning has weak input dependence
|
| 155 |
+
- **Upper Bound**: $I(X; Z) \leq H(X) = \log N$ (when $X$ is uniform)
|
| 156 |
+
|
| 157 |
+
**Practical Note on Negative Values**:
|
| 158 |
+
- The true mutual information satisfies $I(X; Z) \geq 0$.
|
| 159 |
+
- Our logged `mi_estimate` and `mi_seq_estimate` are finite-sample Monte Carlo estimates, not exact MI.
|
| 160 |
+
- Because they average noisy sample terms of the form $\log p(z \mid x) - \log p_{\text{mix}}(z)$, they can temporarily dip below zero when the true MI is near zero or the sampled batch is noisy.
|
| 161 |
+
- In practice, a small negative value should usually be read as "approximately zero input dependence within estimation noise," not as a violation of information theory.
|
| 162 |
+
|
| 163 |
+
**Code Reference** (`collapse_metrics.py:563-590`):
|
| 164 |
+
```python
|
| 165 |
+
def _compute_mi_estimate(self, matched, marginal, N_prompts):
|
| 166 |
+
mi = matched.mean().item() - marginal.mean().item()
|
| 167 |
+
return {
|
| 168 |
+
"collapse/mi_estimate": mi,
|
| 169 |
+
"collapse/mi_upper_bound": math.log(N_prompts),
|
| 170 |
+
}
|
| 171 |
+
```
|
| 172 |
+
|
| 173 |
+
---
|
| 174 |
+
|
| 175 |
+
## 5. Computation Pipeline
|
| 176 |
+
|
| 177 |
+
### 5.1 Cross Log-Probability Matrix
|
| 178 |
+
|
| 179 |
+
For each reasoning $z_{i,k}$ and each prompt $x_j$, we compute the cross log-probability:
|
| 180 |
+
|
| 181 |
+
$$\ell_j(z_{i,k}) = \log p(z_{i,k} \mid x_j) = \sum_{t=1}^{T} \log p_\theta(z_{i,k,t} \mid x_j, z_{i,k,1:t-1})$$
|
| 182 |
+
|
| 183 |
+
This forms a matrix $\mathbf{L} \in \mathbb{R}^{NK \times N}$ where:
|
| 184 |
+
- Rows index (trajectory, sample) pairs
|
| 185 |
+
- Columns index unique prompts
|
| 186 |
+
|
| 187 |
+
**Code Reference** (`collapse_metrics.py:452-546`):
|
| 188 |
+
```python
|
| 189 |
+
def _compute_cross_log_probs(self, ...):
|
| 190 |
+
"""
|
| 191 |
+
For each reasoning z_{i,k} and each prompt x_j:
|
| 192 |
+
1. Construct sequence [x_j | z_{i,k}]
|
| 193 |
+
2. Compute teacher-forcing log prob
|
| 194 |
+
3. Sum over reasoning tokens → ℓ_j(z_{i,k})
|
| 195 |
+
"""
|
| 196 |
+
cross_log_probs = torch.zeros(NK, N, device=device) # per-token mean
|
| 197 |
+
cross_log_probs_sum = torch.zeros(NK, N, device=device) # per-sequence sum
|
| 198 |
+
```
|
| 199 |
+
|
| 200 |
+
### 5.2 Matched vs Marginal Log-Probabilities
|
| 201 |
+
|
| 202 |
+
**Matched**: Log-probability of reasoning under its true prompt:
|
| 203 |
+
$$\text{matched}_{i,k} = \ell_i(z_{i,k}) = \log p(z_{i,k} \mid x_i)$$
|
| 204 |
+
|
| 205 |
+
**Marginal**: Log-probability under uniform prompt mixture:
|
| 206 |
+
$$\text{marginal}_{i,k} = \log p_{\text{mix}}(z_{i,k}) = \log \left( \frac{1}{N} \sum_{j=1}^{N} \exp(\ell_j(z_{i,k})) \right)$$
|
| 207 |
+
|
| 208 |
+
Using log-sum-exp for numerical stability:
|
| 209 |
+
$$\text{marginal}_{i,k} = \text{logsumexp}_j(\ell_j(z_{i,k})) - \log N$$
|
| 210 |
+
|
| 211 |
+
**Code Reference** (`collapse_metrics.py:548-561`):
|
| 212 |
+
```python
|
| 213 |
+
def _compute_log_prob_stats(self, cross_log_probs, col_ids):
|
| 214 |
+
NK, N = cross_log_probs.shape
|
| 215 |
+
matched = cross_log_probs[torch.arange(NK), col_ids] # diagonal elements
|
| 216 |
+
marginal = torch.logsumexp(cross_log_probs, dim=1) - math.log(N)
|
| 217 |
+
return matched, marginal
|
| 218 |
+
```
|
| 219 |
+
|
| 220 |
+
---
|
| 221 |
+
|
| 222 |
+
## 6. Per-Token vs Per-Sequence Metrics
|
| 223 |
+
|
| 224 |
+
We compute two variants of each metric:
|
| 225 |
+
|
| 226 |
+
| Variant | Normalization | Use Case |
|
| 227 |
+
|---------|--------------|----------|
|
| 228 |
+
| **Per-token** (`_est`) | Divide by sequence length | Length-invariant comparison |
|
| 229 |
+
| **Per-sequence** (`_seq_est`) | Sum over tokens | Total information content |
|
| 230 |
+
|
| 231 |
+
### 6.1 Per-Token (Length-Normalized)
|
| 232 |
+
|
| 233 |
+
$$\bar{\ell}_j(z) = \frac{1}{T} \sum_{t=1}^{T} \log p(z_t \mid x_j, z_{1:t-1})$$
|
| 234 |
+
|
| 235 |
+
This reduces length bias when comparing reasoning of different lengths.
|
| 236 |
+
|
| 237 |
+
### 6.2 Per-Sequence (Sum)
|
| 238 |
+
|
| 239 |
+
$$\ell_j(z) = \sum_{t=1}^{T} \log p(z_t \mid x_j, z_{1:t-1})$$
|
| 240 |
+
|
| 241 |
+
This captures total log-probability without normalization.
|
| 242 |
+
|
| 243 |
+
**Base Metric Suffixes**:
|
| 244 |
+
- `collapse/mi_estimate` — Per-token MI
|
| 245 |
+
- `collapse/mi_seq_estimate` — Per-sequence MI
|
| 246 |
+
- `collapse/conditional_entropy_est` — Per-token $H(Z|X)$
|
| 247 |
+
- `collapse/conditional_entropy_seq_est` — Per-sequence $H(Z|X)$
|
| 248 |
+
- `collapse/reasoning_entropy_est` — Per-token $H(Z)$
|
| 249 |
+
- `collapse/reasoning_entropy_seq_est` — Per-sequence $H(Z)$
|
| 250 |
+
|
| 251 |
+
These are the raw suffixes produced inside `_compute_metrics_for_pairs`. In logged outputs, they are usually namespaced as `collapse_first_turn_sample/<suffix>` or `collapse_trajectory_sample/<suffix>`.
|
| 252 |
+
|
| 253 |
+
---
|
| 254 |
+
|
| 255 |
+
## 7. Additional Diagnostic Metrics
|
| 256 |
+
|
| 257 |
+
### 7.1 Retrieval Accuracy
|
| 258 |
+
|
| 259 |
+
**Definition**: Fraction of samples where the highest cross-log-probability matches the true prompt.
|
| 260 |
+
If multiple prompts are identical (same tokenized prompt text), they are treated as equivalent columns, and any of those columns counts as correct for retrieval accuracy and chance.
|
| 261 |
+
|
| 262 |
+
$$\text{Acc} = \frac{1}{NK} \sum_{i,k} \mathbf{1}\left[ \arg\max_j \ell_j(z_{i,k}) = i \right]$$
|
| 263 |
+
|
| 264 |
+
**Interpretation**:
|
| 265 |
+
- **High Accuracy** ($\approx 1$): Reasoning is highly prompt-specific
|
| 266 |
+
- **Chance Level** ($\approx 1/N$): Reasoning is prompt-independent
|
| 267 |
+
|
| 268 |
+
**Code Reference** (`collapse_metrics.py:592-673`):
|
| 269 |
+
```python
|
| 270 |
+
def _compute_retrieval_accuracy(self, cross_log_probs, col_ids, N_prompts):
|
| 271 |
+
predicted_cols = torch.argmax(cross_log_probs, dim=1)
|
| 272 |
+
correct = (predicted_cols == col_ids).float()
|
| 273 |
+
accuracy = correct.mean().item()
|
| 274 |
+
chance_level = 1.0 / N_prompts
|
| 275 |
+
```
|
| 276 |
+
|
| 277 |
+
**Base Metric Suffixes**:
|
| 278 |
+
- `collapse/retrieval_accuracy` — Top-1 accuracy
|
| 279 |
+
- `collapse/retrieval_accuracy@k` — Top-k accuracy (k ∈ {2, 4, 8})
|
| 280 |
+
- `collapse/retrieval_chance_level` — Expected accuracy under random guessing
|
| 281 |
+
- `collapse/retrieval_above_chance` — Accuracy improvement over chance
|
| 282 |
+
- `collapse/retrieval_chance_level@k` — Expected top-k accuracy under random guessing
|
| 283 |
+
- `collapse/retrieval_above_chance@k` — Top-k accuracy improvement over chance
|
| 284 |
+
|
| 285 |
+
### 7.2 MI Z-Score
|
| 286 |
+
|
| 287 |
+
**Definition**: Standardized MI using the marginal log-probability standard deviation.
|
| 288 |
+
|
| 289 |
+
$$\text{MI-ZScore} = \frac{\text{matched} - \text{marginal}}{\sigma_{\text{marginal}} + \epsilon}$$
|
| 290 |
+
|
| 291 |
+
where $\sigma_{\text{marginal}} = \text{std}(\text{marginal}_{i,k})$ and $\epsilon = 10^{-3}$ for stability.
|
| 292 |
+
|
| 293 |
+
**Interpretation**: Measures how many standard deviations the matched log-prob is above the marginal. More robust to scale changes during training.
|
| 294 |
+
|
| 295 |
+
**Practical Note on Extreme Negative Z-Scores**:
|
| 296 |
+
- Negative `mi_zscore*` values are normal; they simply mean the matched log-prob is below the marginal baseline on that batch.
|
| 297 |
+
- Very large-magnitude values, especially for `mi_zscore_seq`, often happen when `marginal_std` or `marginal_std_seq` becomes very small, so the normalization denominator is close to `std_eps`.
|
| 298 |
+
- When this happens, interpret `mi_zscore*` together with `marginal_std*` and `mi_estimate` rather than in isolation.
|
| 299 |
+
|
| 300 |
+
**Code Reference** (`collapse_metrics.py:302-320`):
|
| 301 |
+
```python
|
| 302 |
+
marginal_std = marginal.std(unbiased=False)
|
| 303 |
+
metrics["collapse/mi_zscore"] = ((matched - marginal) / (marginal_std + self.std_eps)).mean().item()
|
| 304 |
+
```
|
| 305 |
+
|
| 306 |
+
### 7.3 EMA-Normalized MI Z-Score
|
| 307 |
+
|
| 308 |
+
To handle variance drift during training, we track an exponential moving average of the marginal standard deviation:
|
| 309 |
+
|
| 310 |
+
$$\sigma_{\text{EMA}}^{(t)} = \alpha \cdot \sigma_{\text{EMA}}^{(t-1)} + (1 - \alpha) \cdot \sigma_{\text{marginal}}^{(t)}$$
|
| 311 |
+
|
| 312 |
+
where $\alpha = 0.9$ (default decay rate).
|
| 313 |
+
|
| 314 |
+
**Base Metric Suffixes**:
|
| 315 |
+
- `collapse/marginal_std` — Current batch marginal std
|
| 316 |
+
- `collapse/marginal_std_seq` — Current batch marginal std (per-sequence)
|
| 317 |
+
- `collapse/marginal_std_ema` — EMA of marginal std
|
| 318 |
+
- `collapse/mi_zscore_ema` — MI Z-score normalized by EMA std
|
| 319 |
+
- `collapse/marginal_std_ema_seq` — EMA of marginal std (per-sequence)
|
| 320 |
+
- `collapse/mi_zscore_seq` — MI Z-score (per-sequence)
|
| 321 |
+
- `collapse/mi_zscore_ema_seq` — MI Z-score normalized by EMA std (per-sequence)
|
| 322 |
+
|
| 323 |
+
---
|
| 324 |
+
|
| 325 |
+
## 8. Multi-Turn Sampling Strategies
|
| 326 |
+
|
| 327 |
+
For multi-turn trajectories, we support two sampling strategies:
|
| 328 |
+
|
| 329 |
+
### 8.1 Trajectory-Uniform Sampling
|
| 330 |
+
|
| 331 |
+
**Probability**: $\Pr(m, t) = \frac{1}{M} \cdot \frac{1}{T_m}$
|
| 332 |
+
|
| 333 |
+
- First sample trajectory $m$ uniformly
|
| 334 |
+
- Then sample turn $t$ uniformly within trajectory
|
| 335 |
+
- Each trajectory has equal weight regardless of length
|
| 336 |
+
|
| 337 |
+
**Code Reference** (`collapse_metrics.py:780-813`):
|
| 338 |
+
```python
|
| 339 |
+
def _sample_trajectory_uniform(self, ...):
|
| 340 |
+
"""Each trajectory has equal weight regardless of length."""
|
| 341 |
+
for _ in range(num_to_sample):
|
| 342 |
+
m = np.random.randint(M) # uniform over trajectories
|
| 343 |
+
t = np.random.randint(turn_counts[m]) # uniform over turns
|
| 344 |
+
```
|
| 345 |
+
|
| 346 |
+
### 8.2 Turn-Uniform Sampling (Disabled by Default)
|
| 347 |
+
|
| 348 |
+
**Probability**: $\Pr(m, t) = \frac{1}{\sum_m T_m}$
|
| 349 |
+
|
| 350 |
+
- Uniform over all (trajectory, turn) pairs
|
| 351 |
+
- Longer trajectories contribute more samples
|
| 352 |
+
|
| 353 |
+
---
|
| 354 |
+
|
| 355 |
+
## 9. Summary of All Logged Metrics
|
| 356 |
+
|
| 357 |
+
The code logs metrics in two layers:
|
| 358 |
+
|
| 359 |
+
1. **Sample-scoped diagnostic metrics**: computed on sampled $(x, z)$ pairs, then namespaced by sampling strategy.
|
| 360 |
+
2. **Global coverage / timing metrics**: logged directly without an additional sample prefix.
|
| 361 |
+
|
| 362 |
+
### 9.1 W&B Namespace Patterns
|
| 363 |
+
|
| 364 |
+
| Logged Key Pattern | When It Appears | Meaning |
|
| 365 |
+
|--------------------|-----------------|---------|
|
| 366 |
+
| `collapse_first_turn_sample/<suffix>` | `first_turn_enabled=True` and first-turn data exists | Diagnostics computed on first-turn $(x, z)$ pairs |
|
| 367 |
+
| `collapse_trajectory_sample/<suffix>` | `multi_turn_enabled=True` and multi-turn data exists | Diagnostics computed on trajectory-uniform multi-turn samples |
|
| 368 |
+
| `collapse_turn_sample/<suffix>` | Code path exists, but currently disabled by default | Diagnostics computed on turn-uniform multi-turn samples |
|
| 369 |
+
| `collapse/valid_thinking_rate` | `turn_counts_total` and `turn_counts` are available | Fraction of valid reasoning turns among all turns |
|
| 370 |
+
| `collapse/first_turn_num_total` | First-turn metrics enabled and data exists | Number of first-turn candidates before filtering empty reasoning |
|
| 371 |
+
| `collapse/first_turn_num_valid` | First-turn metrics enabled and data exists | Number of first-turn samples with non-empty reasoning |
|
| 372 |
+
| `collapse/first_turn_valid_rate` | First-turn metrics enabled and data exists | Valid first-turn fraction |
|
| 373 |
+
| `timing_s/collapse_multi_turn_step` | `multi_turn_enabled=True` | Wall-clock time for the multi-turn collapse pass |
|
| 374 |
+
| `timing_s/collapse_first_turn_step` | `first_turn_enabled=True` | Wall-clock time for the first-turn collapse pass |
|
| 375 |
+
|
| 376 |
+
The suffix tables below describe the metric families that can appear under `collapse_first_turn_sample/`, `collapse_trajectory_sample/`, and, if re-enabled, `collapse_turn_sample/`.
|
| 377 |
+
|
| 378 |
+
### 9.2 Core Information Metrics
|
| 379 |
+
|
| 380 |
+
| Suffix | Formula / Definition | Typical Reading |
|
| 381 |
+
|--------|----------------------|-----------------|
|
| 382 |
+
| `mi_estimate` | $\mathbb{E}[\log p(z \mid x) - \log p_{\text{mix}}(z)]$ | Higher means stronger input dependence |
|
| 383 |
+
| `mi_seq_estimate` | Sequence-sum version of MI | Same as above, but not length-normalized |
|
| 384 |
+
| `mi_upper_bound` | $\log N$ | Theoretical ceiling given $N$ unique prompts |
|
| 385 |
+
| `conditional_entropy_est` | $-\mathbb{E}[\log p(z \mid x)]$ | Higher means more within-input variability |
|
| 386 |
+
| `conditional_entropy_seq_est` | Sequence-sum version of $H(Z \mid X)$ | Total within-input uncertainty per sequence |
|
| 387 |
+
| `reasoning_entropy_est` | $-\mathbb{E}[\log p_{\text{mix}}(z)]$ | Total marginal diversity across prompts |
|
| 388 |
+
| `reasoning_entropy_seq_est` | Sequence-sum version of $H(Z)$ | Total marginal uncertainty per sequence |
|
| 389 |
+
| `matched_log_prob_mean` | $\mathbb{E}[\log p(z \mid x)]$ | Less negative is better fit to the true prompt |
|
| 390 |
+
| `marginal_log_prob_mean` | $\mathbb{E}[\log p_{\text{mix}}(z)]$ | Less negative means the response is broadly likely under the prompt mixture |
|
| 391 |
+
|
| 392 |
+
Example W&B keys:
|
| 393 |
+
- `collapse_first_turn_sample/mi_estimate`
|
| 394 |
+
- `collapse_trajectory_sample/conditional_entropy_est`
|
| 395 |
+
- `collapse_first_turn_sample/reasoning_entropy_seq_est`
|
| 396 |
+
|
| 397 |
+
### 9.3 Retrieval Metrics
|
| 398 |
+
|
| 399 |
+
| Suffix | Definition | Typical Reading |
|
| 400 |
+
|--------|------------|-----------------|
|
| 401 |
+
| `retrieval_accuracy` | Top-1 prompt retrieval accuracy from cross log-probs | Higher means reasoning is more prompt-specific |
|
| 402 |
+
| `retrieval_accuracy@2`, `@4`, `@8` | Top-k retrieval accuracy | Higher means prompt identity is easier to recover |
|
| 403 |
+
| `retrieval_chance_level` | Expected top-1 accuracy under random guessing | Baseline for comparison |
|
| 404 |
+
| `retrieval_chance_level@2`, `@4`, `@8` | Expected top-k accuracy under random guessing | Top-k baseline |
|
| 405 |
+
| `retrieval_above_chance` | `retrieval_accuracy - retrieval_chance_level` | Positive margin over chance |
|
| 406 |
+
| `retrieval_above_chance@2`, `@4`, `@8` | Top-k accuracy minus top-k chance | Positive margin over chance |
|
| 407 |
+
|
| 408 |
+
Example W&B keys:
|
| 409 |
+
- `collapse_first_turn_sample/retrieval_accuracy`
|
| 410 |
+
- `collapse_trajectory_sample/retrieval_accuracy@4`
|
| 411 |
+
- `collapse_first_turn_sample/retrieval_above_chance@8`
|
| 412 |
+
|
| 413 |
+
### 9.4 Variance-Normalized Metrics
|
| 414 |
+
|
| 415 |
+
| Suffix | Definition | Typical Reading |
|
| 416 |
+
|--------|------------|-----------------|
|
| 417 |
+
| `marginal_std` | $\text{std}(\text{marginal})$ | Current-batch spread of marginal log-probs |
|
| 418 |
+
| `marginal_std_seq` | Sequence-sum version of `marginal_std` | Current-batch spread on total log-prob scale |
|
| 419 |
+
| `marginal_std_ema` | EMA of `marginal_std` | Smoothed normalization scale |
|
| 420 |
+
| `marginal_std_ema_seq` | EMA of `marginal_std_seq` | Smoothed sequence-scale normalization |
|
| 421 |
+
| `mi_zscore` | $(\text{matched} - \text{marginal}) / (\text{marginal\_std} + \epsilon)$ | Standardized MI, batch-normalized |
|
| 422 |
+
| `mi_zscore_seq` | Sequence-sum version of `mi_zscore` | Standardized sequence-scale MI |
|
| 423 |
+
| `mi_zscore_ema` | MI normalized by `marginal_std_ema` | More stable across training drift |
|
| 424 |
+
| `mi_zscore_ema_seq` | Sequence-sum version of `mi_zscore_ema` | Stable sequence-scale normalization |
|
| 425 |
+
|
| 426 |
+
### 9.5 Directly Logged Coverage and Timing Metrics
|
| 427 |
+
|
| 428 |
+
| Logged Key | Meaning |
|
| 429 |
+
|------------|---------|
|
| 430 |
+
| `collapse/valid_thinking_rate` | Share of valid reasoning turns among all recorded turns |
|
| 431 |
+
| `collapse/first_turn_num_total` | Count of first-turn entries before removing empty reasoning |
|
| 432 |
+
| `collapse/first_turn_num_valid` | Count of first-turn entries with non-empty reasoning |
|
| 433 |
+
| `collapse/first_turn_valid_rate` | `first_turn_num_valid / first_turn_num_total` |
|
| 434 |
+
| `timing_s/collapse_multi_turn_step` | Time spent computing multi-turn collapse metrics on this step |
|
| 435 |
+
| `timing_s/collapse_first_turn_step` | Time spent computing first-turn collapse metrics on this step |
|
| 436 |
+
|
| 437 |
+
---
|
| 438 |
+
|
| 439 |
+
## 10. Configuration Parameters
|
| 440 |
+
|
| 441 |
+
| Parameter | Default | Description |
|
| 442 |
+
|-----------|---------|-------------|
|
| 443 |
+
| `compute_freq` | 5 | Compute metrics every N steps |
|
| 444 |
+
| `micro_batch_size` | 128 | Batch size for cross-scoring |
|
| 445 |
+
| `first_turn_enabled` | True | Compute first-turn metrics |
|
| 446 |
+
| `multi_turn_enabled` | True | Enable multi-turn sampling |
|
| 447 |
+
| `num_samples` | 64 | Number of $(x, z)$ pairs to sample |
|
| 448 |
+
| `std_eps` | 1e-3 | Stability constant for std normalization |
|
| 449 |
+
| `ema_decay` | 0.9 | EMA decay for cross-time std tracking |
|
| 450 |
+
|
| 451 |
+
**Configuration in `base.yaml`** (`base.yaml:135-139`):
|
| 452 |
+
```yaml
|
| 453 |
+
collapse_detection:
|
| 454 |
+
compute_freq: 5
|
| 455 |
+
micro_batch_size: 128
|
| 456 |
+
first_turn_enabled: true
|
| 457 |
+
multi_turn_enabled: true
|
| 458 |
+
num_samples: 64
|
| 459 |
+
```
|
| 460 |
+
|
| 461 |
+
---
|
| 462 |
+
|
| 463 |
+
## 11. Mathematical Derivations
|
| 464 |
+
|
| 465 |
+
### 11.1 MI Estimation via Importance Sampling
|
| 466 |
+
|
| 467 |
+
The mutual information is:
|
| 468 |
+
|
| 469 |
+
$$I(X; Z) = \mathbb{E}_{p(x,z)} \left[ \log \frac{p(z \mid x)}{p(z)} \right]$$
|
| 470 |
+
|
| 471 |
+
Under the empirical distribution $\hat{p}(x) = 1/N$ (uniform over batch prompts):
|
| 472 |
+
|
| 473 |
+
$$I(X; Z) = \mathbb{E}_{x \sim \hat{p}(x)} \mathbb{E}_{z \sim p(z|x)} \left[ \log \frac{p(z \mid x)}{p_{\text{mix}}(z)} \right]$$
|
| 474 |
+
|
| 475 |
+
where $p_{\text{mix}}(z) = \sum_j \hat{p}(x_j) p(z \mid x_j) = \frac{1}{N} \sum_j p(z \mid x_j)$.
|
| 476 |
+
|
| 477 |
+
Monte Carlo estimate with $K$ samples per prompt:
|
| 478 |
+
|
| 479 |
+
$$\hat{I}(X; Z) = \frac{1}{NK} \sum_{i=1}^{N} \sum_{k=1}^{K} \left[ \log p(z_{i,k} \mid x_i) - \log p_{\text{mix}}(z_{i,k}) \right]$$
|
| 480 |
+
|
| 481 |
+
### 11.2 Information-Theoretic Identity
|
| 482 |
+
|
| 483 |
+
The fundamental identity relating our metrics:
|
| 484 |
+
|
| 485 |
+
$$I(X; Z) = H(Z) - H(Z \mid X)$$
|
| 486 |
+
|
| 487 |
+
This means:
|
| 488 |
+
- If $H(Z|X)$ drops but $H(Z)$ stays constant → MI increases (good)
|
| 489 |
+
- If both $H(Z)$ and $H(Z|X)$ drop equally → MI stays constant
|
| 490 |
+
- If $H(Z) \to H(Z|X)$ → MI → 0 (input dependence vanishes)
|
gradient_analysis/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Gradient Analysis Plotting
|
| 2 |
+
|
| 3 |
+
This folder contains the plotting utilities for the gradient-analysis workflow.
|
| 4 |
+
|
| 5 |
+
There are two plotting entry points:
|
| 6 |
+
|
| 7 |
+
1. [plot_gradient_analysis.py](./plot_gradient_analysis.py)
|
| 8 |
+
- pulls one W&B run directly
|
| 9 |
+
- exports local `json` / `csv`
|
| 10 |
+
- writes per-step PNG plots
|
| 11 |
+
|
| 12 |
+
2. [plot_icml_steps.py](./plot_icml_steps.py)
|
| 13 |
+
- builds a fixed 3-step comparison figure from already-exported `metrics.json` files
|
| 14 |
+
- intended for paper-style summary figures
|
| 15 |
+
|
| 16 |
+
For the training-side workflow and arguments, see:
|
| 17 |
+
- [docs/guide_gradient_analysis.md](../docs/guide_gradient_analysis.md)
|
| 18 |
+
|
| 19 |
+
Current default training behavior from [config/base.yaml](../config/base.yaml):
|
| 20 |
+
- `trainer.gradient_analysis_mode=True`
|
| 21 |
+
- `trainer.gradient_analysis_every=50`
|
| 22 |
+
- `trainer.gradient_analysis_env_groups=null`
|
| 23 |
+
- `trainer.gradient_analysis_group_size=null`
|
| 24 |
+
- `trainer.exit_after_gradient_analysis=False`
|
| 25 |
+
|
| 26 |
+
## Typical Workflow
|
| 27 |
+
|
| 28 |
+
### 1. Run one analysis job
|
| 29 |
+
|
| 30 |
+
Example helper runner:
|
| 31 |
+
|
| 32 |
+
```bash
|
| 33 |
+
bash scripts/runs/run_sokoban_ppo_filter_grad_analysis.sh \
|
| 34 |
+
--gpus 0,1,2,3,4,5,6,7
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
That job:
|
| 38 |
+
- trains for `101` steps
|
| 39 |
+
- validates before training and every `10` steps
|
| 40 |
+
- runs gradient analysis at steps `1`, `51`, and `101`
|
| 41 |
+
- uses a training batch of `8x16`
|
| 42 |
+
- uses a separate gradient-analysis batch of `128x16`
|
| 43 |
+
|
| 44 |
+
### 2. List available analysis steps in W&B
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 48 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 49 |
+
--list-steps
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
### 3. Plot all analysis steps from that run
|
| 53 |
+
|
| 54 |
+
```bash
|
| 55 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 56 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id>
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Default output directory:
|
| 60 |
+
|
| 61 |
+
```text
|
| 62 |
+
gradient_analysis_outputs/<run_name>_<run_id>/
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
### 4. Plot only one step
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 69 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 70 |
+
--step 1
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
### 5. Choose your own output directory
|
| 74 |
+
|
| 75 |
+
```bash
|
| 76 |
+
python gradient_analysis/plot_gradient_analysis.py \
|
| 77 |
+
--wandb-path deimos-xing/ragen_gradient_analysis/<run_id> \
|
| 78 |
+
--step 1 \
|
| 79 |
+
--output-dir gradient_analysis_outputs/my_custom_dir
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
## Files Produced By `gradient_analysis/plot_gradient_analysis.py`
|
| 83 |
+
|
| 84 |
+
For each selected step, the script writes:
|
| 85 |
+
|
| 86 |
+
- `gradient_analysis_summary_step_<N>.png`
|
| 87 |
+
- `gradient_analysis_plots_step_<N>.png`
|
| 88 |
+
- `gradient_analysis_loss_plots_step_<N>.png`
|
| 89 |
+
- `gradient_analysis_reward_std_step_<N>.png`
|
| 90 |
+
- `gradient_analysis_normed_grads_step_<N>.png`
|
| 91 |
+
- `gradient_analysis_metrics_step_<N>.json`
|
| 92 |
+
- `gradient_analysis_bucket_rv_table_step_<N>.csv`
|
| 93 |
+
|
| 94 |
+
The `metrics.json` export is the bridge to the paper-style plotting script.
|
| 95 |
+
|
| 96 |
+
## Building A 3-Step Comparison Figure
|
| 97 |
+
|
| 98 |
+
If you have three exported step directories and want the fixed grid figure:
|
| 99 |
+
|
| 100 |
+
```bash
|
| 101 |
+
python gradient_analysis/plot_icml_steps.py \
|
| 102 |
+
--mode ppo \
|
| 103 |
+
--step0-dir /path/to/step0 \
|
| 104 |
+
--step20-dir /path/to/step20 \
|
| 105 |
+
--step40-dir /path/to/step40 \
|
| 106 |
+
--out gradient_analysis_outputs/ppo_step0_20_40.png
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
Each step directory must contain:
|
| 110 |
+
|
| 111 |
+
```text
|
| 112 |
+
metrics.json
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
If your exported file is named `gradient_analysis_metrics_step_<N>.json`, copy or rename it to `metrics.json` inside each step directory before calling `plot_icml_steps.py`.
|
| 116 |
+
|
| 117 |
+
## What To Inspect First
|
| 118 |
+
|
| 119 |
+
For a new run, start with:
|
| 120 |
+
|
| 121 |
+
1. `gradient_analysis_summary_step_<N>.png`
|
| 122 |
+
2. `gradient_analysis_plots_step_<N>.png`
|
| 123 |
+
3. `gradient_analysis_metrics_step_<N>.json`
|
| 124 |
+
|
| 125 |
+
Those three are usually enough to tell:
|
| 126 |
+
- how many buckets were populated
|
| 127 |
+
- whether task gradients dominate regularizer gradients
|
| 128 |
+
- whether gradient magnitude is monotonic or non-monotonic in reward variance
|
gradient_analysis/plot_gradient_analysis.py
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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+
import os
|
| 5 |
+
|
| 6 |
+
import matplotlib.pyplot as plt
|
| 7 |
+
import wandb
|
| 8 |
+
|
| 9 |
+
DEFAULT_BUCKETS = [
|
| 10 |
+
"bucket_1",
|
| 11 |
+
"bucket_2",
|
| 12 |
+
"bucket_3",
|
| 13 |
+
"bucket_4",
|
| 14 |
+
"bucket_5",
|
| 15 |
+
"bucket_6",
|
| 16 |
+
]
|
| 17 |
+
COMPONENTS = ["kl", "entropy", "task"]
|
| 18 |
+
LOSS_COMPONENTS = ["policy", "entropy", "kl", "total"]
|
| 19 |
+
|
| 20 |
+
def _sanitize_dir_name(name: str) -> str:
|
| 21 |
+
return "".join(c if c.isalnum() or c in ("-", "_") else "_" for c in name)
|
| 22 |
+
|
| 23 |
+
def _bucket_sort_key(bucket_name: str):
|
| 24 |
+
if bucket_name.startswith("bucket_"):
|
| 25 |
+
suffix = bucket_name.split("_", 1)[1]
|
| 26 |
+
if suffix.isdigit():
|
| 27 |
+
return (0, int(suffix))
|
| 28 |
+
return (1, bucket_name)
|
| 29 |
+
|
| 30 |
+
def _extract_buckets(metric_source: dict) -> list[str]:
|
| 31 |
+
buckets = set()
|
| 32 |
+
for key in metric_source.keys():
|
| 33 |
+
if not key.startswith("grad_norm/bucket_"):
|
| 34 |
+
continue
|
| 35 |
+
parts = key.split("/")
|
| 36 |
+
if len(parts) >= 2:
|
| 37 |
+
buckets.add(parts[1])
|
| 38 |
+
if not buckets:
|
| 39 |
+
return DEFAULT_BUCKETS
|
| 40 |
+
return sorted(buckets, key=_bucket_sort_key)
|
| 41 |
+
|
| 42 |
+
def get_bucket_label(bucket_name):
|
| 43 |
+
"""Formats bucket names for the plot axis."""
|
| 44 |
+
if bucket_name.startswith("bucket_"):
|
| 45 |
+
return bucket_name.replace("_", " ")
|
| 46 |
+
return bucket_name
|
| 47 |
+
|
| 48 |
+
def main():
|
| 49 |
+
parser = argparse.ArgumentParser(
|
| 50 |
+
description="Plot gradient-analysis metrics from a W&B run.",
|
| 51 |
+
epilog=(
|
| 52 |
+
"Examples:\n"
|
| 53 |
+
" python gradient_analysis/plot_gradient_analysis.py --wandb-path entity/project/run_id\n"
|
| 54 |
+
" python gradient_analysis/plot_gradient_analysis.py --wandb-path entity/project/run_id --step 1\n"
|
| 55 |
+
" python gradient_analysis/plot_gradient_analysis.py --wandb-path entity/project/run_id "
|
| 56 |
+
"--output-dir gradient_analysis_outputs/my_run\n"
|
| 57 |
+
" python gradient_analysis/plot_gradient_analysis.py --wandb-path entity/project/run_id --list-steps"
|
| 58 |
+
),
|
| 59 |
+
formatter_class=argparse.RawTextHelpFormatter,
|
| 60 |
+
)
|
| 61 |
+
parser.add_argument(
|
| 62 |
+
"--wandb-path",
|
| 63 |
+
required=True,
|
| 64 |
+
help="W&B run path like entity/project/run_id",
|
| 65 |
+
)
|
| 66 |
+
parser.add_argument(
|
| 67 |
+
"--output-dir",
|
| 68 |
+
default=None,
|
| 69 |
+
help=(
|
| 70 |
+
"Directory for generated plots and exported metrics. "
|
| 71 |
+
"Defaults to gradient_analysis_outputs/<run_name>_<run_id>."
|
| 72 |
+
),
|
| 73 |
+
)
|
| 74 |
+
parser.add_argument(
|
| 75 |
+
"--step",
|
| 76 |
+
dest="steps",
|
| 77 |
+
type=int,
|
| 78 |
+
nargs="+",
|
| 79 |
+
default=None,
|
| 80 |
+
help="One or more training steps to plot. Default: all available gradient-analysis steps.",
|
| 81 |
+
)
|
| 82 |
+
parser.add_argument(
|
| 83 |
+
"--list-steps",
|
| 84 |
+
action="store_true",
|
| 85 |
+
help="List available gradient-analysis steps in the run and exit.",
|
| 86 |
+
)
|
| 87 |
+
args = parser.parse_args()
|
| 88 |
+
|
| 89 |
+
print(f"Connecting to WandB run: {args.wandb_path}...")
|
| 90 |
+
api = wandb.Api()
|
| 91 |
+
try:
|
| 92 |
+
run = api.run(args.wandb_path)
|
| 93 |
+
except Exception as e:
|
| 94 |
+
print(f"Error accessing run: {e}")
|
| 95 |
+
return
|
| 96 |
+
|
| 97 |
+
summary = run.summary
|
| 98 |
+
step_metrics = {}
|
| 99 |
+
available_steps = set()
|
| 100 |
+
for row in run.scan_history():
|
| 101 |
+
bucket_items = [(k, v) for k, v in row.items() if k.startswith("grad_norm/bucket_")]
|
| 102 |
+
has_bucket_metrics = any(v is not None for _, v in bucket_items)
|
| 103 |
+
has_nonzero_bucket_metrics = any((v is not None and v != 0) for _, v in bucket_items)
|
| 104 |
+
if not has_bucket_metrics or not has_nonzero_bucket_metrics:
|
| 105 |
+
continue
|
| 106 |
+
step = row.get("_step")
|
| 107 |
+
if step is None:
|
| 108 |
+
continue
|
| 109 |
+
available_steps.add(step)
|
| 110 |
+
if step not in step_metrics:
|
| 111 |
+
step_metrics[step] = {}
|
| 112 |
+
for k, v in row.items():
|
| 113 |
+
if v is None:
|
| 114 |
+
continue
|
| 115 |
+
step_metrics[step][k] = v
|
| 116 |
+
|
| 117 |
+
if available_steps:
|
| 118 |
+
print(f"Found grad_norm bucket metrics at steps: {sorted(available_steps)}")
|
| 119 |
+
else:
|
| 120 |
+
print("Warning: no grad_norm metrics found in history; falling back to run summary.")
|
| 121 |
+
step_metrics = {"summary": summary}
|
| 122 |
+
|
| 123 |
+
if args.list_steps:
|
| 124 |
+
if available_steps:
|
| 125 |
+
print("Available gradient-analysis steps:")
|
| 126 |
+
for step in sorted(available_steps):
|
| 127 |
+
print(step)
|
| 128 |
+
else:
|
| 129 |
+
print("No gradient-analysis steps found.")
|
| 130 |
+
return
|
| 131 |
+
|
| 132 |
+
default_dir = os.path.join(
|
| 133 |
+
"gradient_analysis_outputs",
|
| 134 |
+
f"{_sanitize_dir_name(run.name)}_{run.id}",
|
| 135 |
+
)
|
| 136 |
+
output_dir = args.output_dir or default_dir
|
| 137 |
+
os.makedirs(output_dir, exist_ok=True)
|
| 138 |
+
titles = {
|
| 139 |
+
"kl": "KL Gradient Norm",
|
| 140 |
+
"entropy": "Entropy Gradient Norm",
|
| 141 |
+
"task": "Task (Policy) Gradient Norm"
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
colors = ["#3498db", "#2ecc71", "#e74c3c"] # Blue, Green, Red
|
| 145 |
+
loss_titles = {
|
| 146 |
+
"policy": "Policy (Task) Loss",
|
| 147 |
+
"entropy": "Entropy Loss",
|
| 148 |
+
"kl": "KL Loss",
|
| 149 |
+
"total": "Total Loss",
|
| 150 |
+
}
|
| 151 |
+
loss_colors = ["#8e44ad", "#27ae60", "#2980b9", "#c0392b"] # Purple, Green, Blue, Red
|
| 152 |
+
norm_titles = {
|
| 153 |
+
"kl": "KL Grad Norm (Per Sample vs Per Token)",
|
| 154 |
+
"entropy": "Entropy Grad Norm (Per Sample vs Per Token)",
|
| 155 |
+
"task": "Task Grad Norm (Per Sample vs Per Token)",
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
steps_to_plot = sorted(step_metrics.keys(), key=lambda x: (isinstance(x, str), x))
|
| 159 |
+
if args.steps is not None:
|
| 160 |
+
requested_steps = set(args.steps)
|
| 161 |
+
steps_to_plot = [s for s in steps_to_plot if s in requested_steps]
|
| 162 |
+
if not steps_to_plot:
|
| 163 |
+
print(f"Error: none of the requested steps {sorted(requested_steps)} were found.")
|
| 164 |
+
return
|
| 165 |
+
|
| 166 |
+
for step_key in steps_to_plot:
|
| 167 |
+
metric_source = step_metrics[step_key]
|
| 168 |
+
buckets = _extract_buckets(metric_source)
|
| 169 |
+
x_labels = [get_bucket_label(b) for b in buckets]
|
| 170 |
+
step_tag = f"step_{step_key}"
|
| 171 |
+
output_file = os.path.join(output_dir, f"gradient_analysis_plots_{step_tag}.png")
|
| 172 |
+
output_file_loss = os.path.join(output_dir, f"gradient_analysis_loss_plots_{step_tag}.png")
|
| 173 |
+
output_file_rv = os.path.join(output_dir, f"gradient_analysis_reward_std_{step_tag}.png")
|
| 174 |
+
output_file_normed = os.path.join(output_dir, f"gradient_analysis_normed_grads_{step_tag}.png")
|
| 175 |
+
output_file_summary = os.path.join(output_dir, f"gradient_analysis_summary_{step_tag}.png")
|
| 176 |
+
output_metrics_json = os.path.join(output_dir, f"gradient_analysis_metrics_{step_tag}.json")
|
| 177 |
+
output_rv_table = os.path.join(output_dir, f"gradient_analysis_bucket_rv_table_{step_tag}.csv")
|
| 178 |
+
|
| 179 |
+
# Create subplots for gradient norms
|
| 180 |
+
fig, axes = plt.subplots(1, 3, figsize=(20, 6))
|
| 181 |
+
plt.subplots_adjust(wspace=0.3, top=0.62, bottom=0.12)
|
| 182 |
+
|
| 183 |
+
bucket_rv = {
|
| 184 |
+
b: {
|
| 185 |
+
"mean": metric_source.get(f"grad_norm/{b}/reward_std_mean", 0),
|
| 186 |
+
"min": metric_source.get(f"grad_norm/{b}/reward_std_min", 0),
|
| 187 |
+
"max": metric_source.get(f"grad_norm/{b}/reward_std_max", 0),
|
| 188 |
+
}
|
| 189 |
+
for b in buckets
|
| 190 |
+
}
|
| 191 |
+
bucket_rv_values = {b: [] for b in buckets}
|
| 192 |
+
table_keys = [f"grad_norm/{b}/group_rv_table" for b in buckets]
|
| 193 |
+
for row in run.scan_history(keys=["_step", *table_keys]):
|
| 194 |
+
if row.get("_step") != step_key:
|
| 195 |
+
continue
|
| 196 |
+
for b in buckets:
|
| 197 |
+
key = f"grad_norm/{b}/group_rv_table"
|
| 198 |
+
table_meta = row.get(key)
|
| 199 |
+
if not isinstance(table_meta, dict) or "path" not in table_meta:
|
| 200 |
+
continue
|
| 201 |
+
table_path = table_meta["path"]
|
| 202 |
+
try:
|
| 203 |
+
file_ref = run.file(table_path)
|
| 204 |
+
local_path = file_ref.download(replace=True).name
|
| 205 |
+
with open(local_path, "r") as f:
|
| 206 |
+
table_json = json.load(f)
|
| 207 |
+
# table_json has keys: columns, data
|
| 208 |
+
data_rows = table_json.get("data", [])
|
| 209 |
+
# columns: bucket, group_id, reward_std
|
| 210 |
+
for row_vals in data_rows:
|
| 211 |
+
if len(row_vals) >= 3:
|
| 212 |
+
bucket_rv_values[b].append(float(row_vals[2]))
|
| 213 |
+
except Exception:
|
| 214 |
+
continue
|
| 215 |
+
# Save raw metric snapshot and RV table values for this step
|
| 216 |
+
try:
|
| 217 |
+
with open(output_metrics_json, "w") as f:
|
| 218 |
+
json.dump(metric_source, f, indent=2, sort_keys=True)
|
| 219 |
+
except Exception as e:
|
| 220 |
+
print(f"Warning: failed to write metrics json: {e}")
|
| 221 |
+
|
| 222 |
+
try:
|
| 223 |
+
with open(output_rv_table, "w", newline="") as f:
|
| 224 |
+
writer = csv.writer(f)
|
| 225 |
+
writer.writerow(["bucket", "reward_std"])
|
| 226 |
+
for b in buckets:
|
| 227 |
+
for rv in bucket_rv_values[b]:
|
| 228 |
+
writer.writerow([b, rv])
|
| 229 |
+
except Exception as e:
|
| 230 |
+
print(f"Warning: failed to write rv table csv: {e}")
|
| 231 |
+
legend_lines = []
|
| 232 |
+
for label, bucket in zip(x_labels, buckets):
|
| 233 |
+
rv = bucket_rv.get(bucket, {})
|
| 234 |
+
legend_lines.append(
|
| 235 |
+
f"{label}: mean={rv.get('mean', 0):.3f} min={rv.get('min', 0):.3f} max={rv.get('max', 0):.3f}"
|
| 236 |
+
)
|
| 237 |
+
for ax, comp, color in zip(axes, COMPONENTS, colors):
|
| 238 |
+
y_values = []
|
| 239 |
+
for bucket in buckets:
|
| 240 |
+
key = f"grad_norm/{bucket}/{comp}"
|
| 241 |
+
val = metric_source.get(key, 0)
|
| 242 |
+
y_values.append(val)
|
| 243 |
+
|
| 244 |
+
bars = ax.bar(x_labels, y_values, color=color, alpha=0.8, edgecolor='black', linewidth=1)
|
| 245 |
+
ax.set_title(titles[comp], fontsize=16, fontweight='bold', pad=15)
|
| 246 |
+
ax.set_ylabel("Grad Norm Magnitude", fontsize=12)
|
| 247 |
+
ax.set_xlabel("Reward Variance Bucket", fontsize=12)
|
| 248 |
+
ax.grid(axis='y', linestyle='--', alpha=0.6)
|
| 249 |
+
|
| 250 |
+
for bar in bars:
|
| 251 |
+
height = bar.get_height()
|
| 252 |
+
ax.text(bar.get_x() + bar.get_width()/2., height + (max(y_values)*0.01 if y_values else 0.01),
|
| 253 |
+
f'{height:.4f}', ha='center', va='bottom', fontsize=10, fontweight='bold')
|
| 254 |
+
|
| 255 |
+
fig.suptitle(f"Gradient Norms - Run: {run.name} (Step {step_key})", fontsize=20, y=0.98)
|
| 256 |
+
fig.text(0.5, 0.88, "\n".join(legend_lines), ha="center", va="top", fontsize=8)
|
| 257 |
+
plt.savefig(output_file, bbox_inches='tight', dpi=300)
|
| 258 |
+
print(f"\nSuccess! Results visualization saved to: {os.path.abspath(output_file)}")
|
| 259 |
+
plt.close(fig)
|
| 260 |
+
|
| 261 |
+
# Create subplots for per-component losses
|
| 262 |
+
fig2, axes2 = plt.subplots(2, 2, figsize=(16, 10))
|
| 263 |
+
plt.subplots_adjust(hspace=0.35, wspace=0.25)
|
| 264 |
+
|
| 265 |
+
for ax, comp, color in zip(axes2.flatten(), LOSS_COMPONENTS, loss_colors):
|
| 266 |
+
y_values = []
|
| 267 |
+
for bucket in buckets:
|
| 268 |
+
key = f"grad_norm/{bucket}/loss/{comp}"
|
| 269 |
+
val = metric_source.get(key, 0)
|
| 270 |
+
y_values.append(val)
|
| 271 |
+
|
| 272 |
+
bars = ax.bar(x_labels, y_values, color=color, alpha=0.8, edgecolor="black", linewidth=1)
|
| 273 |
+
ax.set_title(loss_titles[comp], fontsize=14, fontweight="bold", pad=10)
|
| 274 |
+
ax.set_ylabel("Loss", fontsize=11)
|
| 275 |
+
ax.set_xlabel("Reward Variance Bucket", fontsize=11)
|
| 276 |
+
ax.grid(axis="y", linestyle="--", alpha=0.6)
|
| 277 |
+
|
| 278 |
+
for bar in bars:
|
| 279 |
+
height = bar.get_height()
|
| 280 |
+
ax.text(
|
| 281 |
+
bar.get_x() + bar.get_width() / 2.0,
|
| 282 |
+
height + (max(y_values) * 0.01 if y_values else 0.01),
|
| 283 |
+
f"{height:.4f}",
|
| 284 |
+
ha="center",
|
| 285 |
+
va="bottom",
|
| 286 |
+
fontsize=9,
|
| 287 |
+
fontweight="bold",
|
| 288 |
+
)
|
| 289 |
+
|
| 290 |
+
fig2.suptitle(f"Per-Component Losses - Run: {run.name} (Step {step_key})", fontsize=18, y=1.02)
|
| 291 |
+
plt.tight_layout()
|
| 292 |
+
plt.savefig(output_file_loss, bbox_inches="tight", dpi=300)
|
| 293 |
+
print(f"Success! Loss visualization saved to: {os.path.abspath(output_file_loss)}")
|
| 294 |
+
plt.close(fig2)
|
| 295 |
+
|
| 296 |
+
# Create plot for per-bucket mean reward variance (std)
|
| 297 |
+
rv_values = []
|
| 298 |
+
for bucket in buckets:
|
| 299 |
+
rv_values.append(metric_source.get(f"grad_norm/{bucket}/reward_std_mean", 0))
|
| 300 |
+
if any(v != 0 for v in rv_values):
|
| 301 |
+
fig3, ax3 = plt.subplots(1, 1, figsize=(10, 5))
|
| 302 |
+
bars = ax3.bar(x_labels, rv_values, color="#f39c12", alpha=0.85, edgecolor="black", linewidth=1)
|
| 303 |
+
ax3.set_title(f"Reward Std Mean by Bucket - Run: {run.name} (Step {step_key})", fontsize=14, fontweight="bold", pad=10)
|
| 304 |
+
ax3.set_ylabel("Reward Std (Mean)", fontsize=11)
|
| 305 |
+
ax3.set_xlabel("Reward Variance Bucket", fontsize=11)
|
| 306 |
+
ax3.grid(axis="y", linestyle="--", alpha=0.6)
|
| 307 |
+
for bar in bars:
|
| 308 |
+
height = bar.get_height()
|
| 309 |
+
ax3.text(
|
| 310 |
+
bar.get_x() + bar.get_width() / 2.0,
|
| 311 |
+
height + (max(rv_values) * 0.01 if rv_values else 0.01),
|
| 312 |
+
f"{height:.4f}",
|
| 313 |
+
ha="center",
|
| 314 |
+
va="bottom",
|
| 315 |
+
fontsize=9,
|
| 316 |
+
fontweight="bold",
|
| 317 |
+
)
|
| 318 |
+
plt.tight_layout()
|
| 319 |
+
plt.savefig(output_file_rv, bbox_inches="tight", dpi=300)
|
| 320 |
+
print(f"Success! Reward std visualization saved to: {os.path.abspath(output_file_rv)}")
|
| 321 |
+
plt.close(fig3)
|
| 322 |
+
else:
|
| 323 |
+
print(f"Warning: No reward std mean metrics found at step {step_key}; skipping reward std plot.")
|
| 324 |
+
|
| 325 |
+
# Create plots for per-sample and per-token grad norms (combined per component)
|
| 326 |
+
fig4, axes4 = plt.subplots(1, 3, figsize=(20, 6))
|
| 327 |
+
plt.subplots_adjust(wspace=0.3)
|
| 328 |
+
for ax, comp in zip(axes4, COMPONENTS):
|
| 329 |
+
per_sample = []
|
| 330 |
+
per_token = []
|
| 331 |
+
for bucket in buckets:
|
| 332 |
+
per_sample.append(metric_source.get(f"grad_norm/{bucket}/per_sample/{comp}", 0))
|
| 333 |
+
per_token.append(metric_source.get(f"grad_norm/{bucket}/per_token/{comp}", 0))
|
| 334 |
+
|
| 335 |
+
x = range(len(x_labels))
|
| 336 |
+
width = 0.38
|
| 337 |
+
bars1 = ax.bar([i - width / 2 for i in x], per_sample, width=width, label="per_sample", color="#16a085", alpha=0.85)
|
| 338 |
+
bars2 = ax.bar([i + width / 2 for i in x], per_token, width=width, label="per_token", color="#f39c12", alpha=0.85)
|
| 339 |
+
ax.set_xticks(list(x))
|
| 340 |
+
ax.set_xticklabels(x_labels)
|
| 341 |
+
ax.set_title(norm_titles[comp], fontsize=14, fontweight="bold", pad=10)
|
| 342 |
+
ax.set_ylabel("Grad Norm", fontsize=11)
|
| 343 |
+
ax.set_xlabel("Reward Variance Bucket", fontsize=11)
|
| 344 |
+
ax.grid(axis="y", linestyle="--", alpha=0.6)
|
| 345 |
+
ax.legend(frameon=False, fontsize=9)
|
| 346 |
+
|
| 347 |
+
for bar in list(bars1) + list(bars2):
|
| 348 |
+
height = bar.get_height()
|
| 349 |
+
ax.text(
|
| 350 |
+
bar.get_x() + bar.get_width() / 2.0,
|
| 351 |
+
height + (max(per_sample + per_token) * 0.01 if (per_sample + per_token) else 0.01),
|
| 352 |
+
f"{height:.4f}",
|
| 353 |
+
ha="center",
|
| 354 |
+
va="bottom",
|
| 355 |
+
fontsize=8,
|
| 356 |
+
)
|
| 357 |
+
|
| 358 |
+
fig4.suptitle(f"Normalized Grad Norms - Run: {run.name} (Step {step_key})", fontsize=18, y=1.03)
|
| 359 |
+
plt.tight_layout()
|
| 360 |
+
plt.savefig(output_file_normed, bbox_inches="tight", dpi=300)
|
| 361 |
+
print(f"Success! Normalized grad visualization saved to: {os.path.abspath(output_file_normed)}")
|
| 362 |
+
plt.close(fig4)
|
| 363 |
+
|
| 364 |
+
# Summary 3-panel plot with available aggregates
|
| 365 |
+
rv_means = [bucket_rv[b]["mean"] for b in buckets]
|
| 366 |
+
rv_mins = [bucket_rv[b]["min"] for b in buckets]
|
| 367 |
+
rv_maxs = [bucket_rv[b]["max"] for b in buckets]
|
| 368 |
+
task_grads = [metric_source.get(f"grad_norm/{b}/task", 0) for b in buckets]
|
| 369 |
+
kl_grads = [metric_source.get(f"grad_norm/{b}/kl", 0) for b in buckets]
|
| 370 |
+
ent_grads = [metric_source.get(f"grad_norm/{b}/entropy", 0) for b in buckets]
|
| 371 |
+
reg_grads = [k + e for k, e in zip(kl_grads, ent_grads)]
|
| 372 |
+
|
| 373 |
+
fig5, axes5 = plt.subplots(1, 3, figsize=(20, 6))
|
| 374 |
+
plt.subplots_adjust(wspace=0.35, top=0.80, bottom=0.15)
|
| 375 |
+
|
| 376 |
+
# Left: RV mean with min/max error bars per bucket
|
| 377 |
+
ax = axes5[0]
|
| 378 |
+
use_boxplot = any(bucket_rv_values[b] for b in buckets)
|
| 379 |
+
if use_boxplot:
|
| 380 |
+
data = [bucket_rv_values[b] for b in buckets]
|
| 381 |
+
data_mins = [min(v) if v else 0 for v in data]
|
| 382 |
+
data_maxs = [max(v) if v else 0 for v in data]
|
| 383 |
+
# sanity check: compare against logged min/max (per-sample)
|
| 384 |
+
mismatch = any(
|
| 385 |
+
abs(dm - rm) > 1e-3 or abs(dx - rx) > 1e-3
|
| 386 |
+
for dm, rm, dx, rx in zip(data_mins, rv_mins, data_maxs, rv_maxs)
|
| 387 |
+
)
|
| 388 |
+
if mismatch:
|
| 389 |
+
print(f"Warning: bucket RV table min/max mismatch at step {step_key}; falling back to error bars.")
|
| 390 |
+
use_boxplot = False
|
| 391 |
+
if use_boxplot:
|
| 392 |
+
ax.boxplot(data, tick_labels=x_labels, showfliers=False)
|
| 393 |
+
ax.set_title("RV by Bucket (Boxplot)", fontsize=13, fontweight="bold")
|
| 394 |
+
else:
|
| 395 |
+
# Guard against negative error bars from inconsistent min/max logging.
|
| 396 |
+
yerr = [
|
| 397 |
+
[max(0.0, m - lo) for m, lo in zip(rv_means, rv_mins)],
|
| 398 |
+
[max(0.0, hi - m) for m, hi in zip(rv_means, rv_maxs)],
|
| 399 |
+
]
|
| 400 |
+
ax.errorbar(x_labels, rv_means, yerr=yerr, fmt="o-", color="#6c5ce7", ecolor="#2d3436", capsize=4)
|
| 401 |
+
ax.set_title("RV by Bucket (Mean ± Min/Max)", fontsize=13, fontweight="bold")
|
| 402 |
+
ax.set_xlabel("Bucket")
|
| 403 |
+
ax.set_ylabel("Reward Variance (Std)")
|
| 404 |
+
ax.grid(axis="y", linestyle="--", alpha=0.5)
|
| 405 |
+
|
| 406 |
+
# Middle: task grad norm vs mean RV
|
| 407 |
+
ax = axes5[1]
|
| 408 |
+
ax.plot(rv_means, task_grads, "o-", color="#e67e22")
|
| 409 |
+
for i, (xv, yv) in enumerate(zip(rv_means, task_grads), start=1):
|
| 410 |
+
ax.text(xv, yv, f"Q{i}", fontsize=8, ha="left", va="bottom")
|
| 411 |
+
ax.set_title("Task Grad Norm vs RV Mean", fontsize=13, fontweight="bold")
|
| 412 |
+
ax.set_xlabel("RV Mean")
|
| 413 |
+
ax.set_ylabel("Task Grad Norm")
|
| 414 |
+
ax.grid(axis="y", linestyle="--", alpha=0.5)
|
| 415 |
+
mid_ylim = ax.get_ylim()
|
| 416 |
+
|
| 417 |
+
# Right: regularizer grad norm (KL+Entropy) vs mean RV
|
| 418 |
+
ax = axes5[2]
|
| 419 |
+
ax.plot(rv_means, reg_grads, "o-", color="#16a085")
|
| 420 |
+
for i, (xv, yv) in enumerate(zip(rv_means, reg_grads), start=1):
|
| 421 |
+
ax.text(xv, yv, f"Q{i}", fontsize=8, ha="left", va="bottom")
|
| 422 |
+
ax.set_title("Reg Grad Norm vs RV Mean (KL+Ent)", fontsize=13, fontweight="bold")
|
| 423 |
+
ax.set_xlabel("RV Mean")
|
| 424 |
+
ax.set_ylabel("KL+Entropy Grad Norm")
|
| 425 |
+
ax.set_ylim(0, 1)
|
| 426 |
+
ax.grid(axis="y", linestyle="--", alpha=0.5)
|
| 427 |
+
|
| 428 |
+
fig5.suptitle(f"Gradient Summary - Run: {run.name} (Step {step_key})", fontsize=16, y=0.98)
|
| 429 |
+
plt.tight_layout()
|
| 430 |
+
plt.savefig(output_file_summary, bbox_inches="tight", dpi=300)
|
| 431 |
+
print(f"Success! Summary visualization saved to: {os.path.abspath(output_file_summary)}")
|
| 432 |
+
plt.close(fig5)
|
| 433 |
+
|
| 434 |
+
print(f"All outputs written to: {os.path.abspath(output_dir)}")
|
| 435 |
+
|
| 436 |
+
|
| 437 |
+
if __name__ == "__main__":
|
| 438 |
+
main()
|
merge.sh
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
python -m verl.model_merger merge \
|
| 2 |
+
--backend fsdp \
|
| 3 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube1_withthink_fulltraj_sa_rl/global_step_50/actor \
|
| 4 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube1_withthink_fulltraj_sa_rl/global_step_50/qwen2.5_3b_actor_hf
|
| 5 |
+
|
| 6 |
+
python -m verl.model_merger merge \
|
| 7 |
+
--backend fsdp \
|
| 8 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube1_withthink_sa_rl/global_step_50/actor \
|
| 9 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube1_withthink_sa_rl/global_step_50/qwen2.5_3b_actor_hf
|
| 10 |
+
|
| 11 |
+
python -m verl.model_merger merge \
|
| 12 |
+
--backend fsdp \
|
| 13 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube1_withthink_sas_rl/global_step_50/actor \
|
| 14 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube1_withthink_sas_rl/global_step_50/qwen2.5_3b_actor_hf
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
python -m verl.model_merger merge \
|
| 19 |
+
--backend fsdp \
|
| 20 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube2_withthink_sa_rl/global_step_200/actor \
|
| 21 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube2_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 22 |
+
|
| 23 |
+
python -m verl.model_merger merge \
|
| 24 |
+
--backend fsdp \
|
| 25 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube2_withthink_fulltraj_sa_rl/global_step_200/actor \
|
| 26 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube2_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 27 |
+
|
| 28 |
+
python -m verl.model_merger merge \
|
| 29 |
+
--backend fsdp \
|
| 30 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube2_withthink_sas_rl/global_step_200/actor \
|
| 31 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube2_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
python -m verl.model_merger merge \
|
| 37 |
+
--backend fsdp \
|
| 38 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube3_withthink_fulltraj_sa_rl/global_step_200/actor \
|
| 39 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube3_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 40 |
+
|
| 41 |
+
python -m verl.model_merger merge \
|
| 42 |
+
--backend fsdp \
|
| 43 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube3_withthink_sa_rl/global_step_200/actor \
|
| 44 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube3_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 45 |
+
|
| 46 |
+
python -m verl.model_merger merge \
|
| 47 |
+
--backend fsdp \
|
| 48 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_rubikscube3_withthink_sas_rl/global_step_200/actor \
|
| 49 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_rubikscube3_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
python -m verl.model_merger merge \
|
| 56 |
+
--backend fsdp \
|
| 57 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban1_withthink_fulltraj_sa_rl/global_step_200/actor \
|
| 58 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban1_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 59 |
+
|
| 60 |
+
python -m verl.model_merger merge \
|
| 61 |
+
--backend fsdp \
|
| 62 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban1_withthink_sa_rl/global_step_200/actor \
|
| 63 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban1_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 64 |
+
|
| 65 |
+
python -m verl.model_merger merge \
|
| 66 |
+
--backend fsdp \
|
| 67 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban1_withthink_sas_rl/global_step_200/actor \
|
| 68 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban1_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
python -m verl.model_merger merge \
|
| 75 |
+
--backend fsdp \
|
| 76 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban2_withthink_fulltraj_sa_rl/global_step_200/actor \
|
| 77 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban2_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 78 |
+
|
| 79 |
+
python -m verl.model_merger merge \
|
| 80 |
+
--backend fsdp \
|
| 81 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban2_withthink_sa_rl/global_step_200/actor \
|
| 82 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban2_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 83 |
+
|
| 84 |
+
python -m verl.model_merger merge \
|
| 85 |
+
--backend fsdp \
|
| 86 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sokoban2_withthink_sas_rl/global_step_200/actor \
|
| 87 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sokoban2_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
python -m verl.model_merger merge \
|
| 94 |
+
--backend fsdp \
|
| 95 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sudoku_withthink_fulltraj_sa_rl/global_step_200/actor \
|
| 96 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sudoku_withthink_fulltraj_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 97 |
+
|
| 98 |
+
python -m verl.model_merger merge \
|
| 99 |
+
--backend fsdp \
|
| 100 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sudoku_withthink_sa_rl/global_step_200/actor \
|
| 101 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sudoku_withthink_sa_rl/global_step_200/qwen2.5_3b_actor_hf
|
| 102 |
+
|
| 103 |
+
python -m verl.model_merger merge \
|
| 104 |
+
--backend fsdp \
|
| 105 |
+
--local_dir /mnt/general/wanghy/RAGEN_v2/saves/qwen2.5_3B_it_sudoku_withthink_sas_rl/global_step_200/actor \
|
| 106 |
+
--target_dir /mnt/general/wanghy/RAGEN_v2/saves_hf/qwen2.5_3B_it_sudoku_withthink_sas_rl/global_step_200/qwen2.5_3b_actor_hf
|
outputs/2026-04-30/11-03-16/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
actor_rollout_ref:
|
| 2 |
+
actor:
|
| 3 |
+
optim:
|
| 4 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 5 |
+
lr: 1.0e-06
|
| 6 |
+
lr_warmup_steps_ratio: 0.0
|
| 7 |
+
total_training_steps: -1
|
| 8 |
+
weight_decay: 0.01
|
| 9 |
+
lr_warmup_steps: -1
|
| 10 |
+
betas:
|
| 11 |
+
- 0.9
|
| 12 |
+
- 0.999
|
| 13 |
+
clip_grad: 1.0
|
| 14 |
+
min_lr_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 200
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 1
|
| 489 |
+
save_freq: 100
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/share/model/Qwen/Qwen2.5-3B-Instruct
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- CoordSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- CoordSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 986 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 987 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 988 |
+
top_k: ${actor_rollout_ref.rollout.top_k}
|
| 989 |
+
kwargs: null
|
outputs/2026-04-30/11-03-16/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
outputs/2026-04-30/11-03-39/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
actor_rollout_ref:
|
| 2 |
+
actor:
|
| 3 |
+
optim:
|
| 4 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 5 |
+
lr: 1.0e-06
|
| 6 |
+
lr_warmup_steps_ratio: 0.0
|
| 7 |
+
total_training_steps: -1
|
| 8 |
+
weight_decay: 0.01
|
| 9 |
+
lr_warmup_steps: -1
|
| 10 |
+
betas:
|
| 11 |
+
- 0.9
|
| 12 |
+
- 0.999
|
| 13 |
+
clip_grad: 1.0
|
| 14 |
+
min_lr_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 200
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 8
|
| 489 |
+
save_freq: 100
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/share/model/Qwen/Qwen2.5-3B-Instruct
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- CoordSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- CoordSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 986 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 987 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 988 |
+
top_k: ${actor_rollout_ref.rollout.top_k}
|
| 989 |
+
kwargs: null
|
outputs/2026-04-30/13-11-58/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
outputs/2026-04-30/13-11-58/train.log
ADDED
|
File without changes
|
outputs/2026-04-30/14-13-32/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
+
optim:
|
| 4 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 5 |
+
lr: 1.0e-06
|
| 6 |
+
lr_warmup_steps_ratio: 0.0
|
| 7 |
+
total_training_steps: -1
|
| 8 |
+
weight_decay: 0.01
|
| 9 |
+
lr_warmup_steps: -1
|
| 10 |
+
betas:
|
| 11 |
+
- 0.9
|
| 12 |
+
- 0.999
|
| 13 |
+
clip_grad: 1.0
|
| 14 |
+
min_lr_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 200
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 8
|
| 489 |
+
save_freq: 100
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/share/model/Qwen/Qwen2.5-3B-Instruct
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- CoordSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- CoordSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 986 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 987 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 988 |
+
top_k: ${actor_rollout_ref.rollout.top_k}
|
| 989 |
+
kwargs: null
|
outputs/2026-04-30/14-13-32/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath:
|
| 109 |
+
- pkg://verl.trainer.config
|
| 110 |
+
callbacks: {}
|
| 111 |
+
output_subdir: .hydra
|
| 112 |
+
overrides:
|
| 113 |
+
hydra:
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 117 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 118 |
+
job:
|
| 119 |
+
name: train
|
| 120 |
+
chdir: null
|
| 121 |
+
override_dirname: actor_rollout_ref.rollout.rollout_filter_strategy=top_p,actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 122 |
+
id: ???
|
| 123 |
+
num: ???
|
| 124 |
+
config_name: _2_sokoban
|
| 125 |
+
env_set: {}
|
| 126 |
+
env_copy: []
|
| 127 |
+
config:
|
| 128 |
+
override_dirname:
|
| 129 |
+
kv_sep: '='
|
| 130 |
+
item_sep: ','
|
| 131 |
+
exclude_keys: []
|
| 132 |
+
runtime:
|
| 133 |
+
version: 1.3.2
|
| 134 |
+
version_base: '1.3'
|
| 135 |
+
cwd: /mnt/general/wanghy/RAGEN_v2
|
| 136 |
+
config_sources:
|
| 137 |
+
- path: hydra.conf
|
| 138 |
+
schema: pkg
|
| 139 |
+
provider: hydra
|
| 140 |
+
- path: /mnt/general/wanghy/RAGEN_v2/config
|
| 141 |
+
schema: file
|
| 142 |
+
provider: main
|
| 143 |
+
- path: /mnt/general/wanghy/RAGEN_v2/verl/verl/trainer/config
|
| 144 |
+
schema: file
|
| 145 |
+
provider: command-line
|
| 146 |
+
- path: verl.trainer.config
|
| 147 |
+
schema: pkg
|
| 148 |
+
provider: hydra.searchpath in main
|
| 149 |
+
- path: ''
|
| 150 |
+
schema: structured
|
| 151 |
+
provider: schema
|
| 152 |
+
output_dir: /mnt/general/wanghy/RAGEN_v2/outputs/2026-04-30/14-13-32
|
| 153 |
+
choices:
|
| 154 |
+
reward_model: dp_reward_model
|
| 155 |
+
critic: dp_critic
|
| 156 |
+
critic/../engine@critic.model.fsdp_config: fsdp
|
| 157 |
+
critic/../optim@critic.optim: fsdp
|
| 158 |
+
model@actor_rollout_ref.model: hf_model
|
| 159 |
+
rollout@actor_rollout_ref.rollout: rollout
|
| 160 |
+
ref@actor_rollout_ref.ref: dp_ref
|
| 161 |
+
ref/../engine@actor_rollout_ref.ref.fsdp_config: fsdp
|
| 162 |
+
data: legacy_data
|
| 163 |
+
actor@actor_rollout_ref.actor: dp_actor
|
| 164 |
+
actor/../engine@actor_rollout_ref.actor.fsdp_config: fsdp
|
| 165 |
+
actor/../optim@actor_rollout_ref.actor.optim: fsdp
|
| 166 |
+
hydra/env: default
|
| 167 |
+
hydra/callbacks: null
|
| 168 |
+
hydra/job_logging: default
|
| 169 |
+
hydra/hydra_logging: default
|
| 170 |
+
hydra/hydra_help: default
|
| 171 |
+
hydra/help: default
|
| 172 |
+
hydra/sweeper: basic
|
| 173 |
+
hydra/launcher: basic
|
| 174 |
+
hydra/output: default
|
| 175 |
+
verbose: false
|
outputs/2026-04-30/14-13-32/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
outputs/2026-04-30/19-02-13/.hydra/config.yaml
ADDED
|
@@ -0,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: -1
|
| 10 |
+
betas:
|
| 11 |
+
- 0.9
|
| 12 |
+
- 0.999
|
| 13 |
+
clip_grad: 1.0
|
| 14 |
+
min_lr_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 600
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 8
|
| 489 |
+
save_freq: 100
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/share/model/Qwen/Qwen2.5-3B-Instruct
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- CoordSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- CoordSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 986 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 987 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 988 |
+
top_k: ${actor_rollout_ref.rollout.top_k}
|
| 989 |
+
kwargs: null
|
outputs/2026-04-30/19-02-13/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath:
|
| 109 |
+
- pkg://verl.trainer.config
|
| 110 |
+
callbacks: {}
|
| 111 |
+
output_subdir: .hydra
|
| 112 |
+
overrides:
|
| 113 |
+
hydra:
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 117 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 118 |
+
job:
|
| 119 |
+
name: train
|
| 120 |
+
chdir: null
|
| 121 |
+
override_dirname: actor_rollout_ref.rollout.rollout_filter_strategy=top_p,actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 122 |
+
id: ???
|
| 123 |
+
num: ???
|
| 124 |
+
config_name: _2_sokoban
|
| 125 |
+
env_set: {}
|
| 126 |
+
env_copy: []
|
| 127 |
+
config:
|
| 128 |
+
override_dirname:
|
| 129 |
+
kv_sep: '='
|
| 130 |
+
item_sep: ','
|
| 131 |
+
exclude_keys: []
|
| 132 |
+
runtime:
|
| 133 |
+
version: 1.3.2
|
| 134 |
+
version_base: '1.3'
|
| 135 |
+
cwd: /mnt/general/wanghy/RAGEN_v2
|
| 136 |
+
config_sources:
|
| 137 |
+
- path: hydra.conf
|
| 138 |
+
schema: pkg
|
| 139 |
+
provider: hydra
|
| 140 |
+
- path: /mnt/general/wanghy/RAGEN_v2/config
|
| 141 |
+
schema: file
|
| 142 |
+
provider: main
|
| 143 |
+
- path: /mnt/general/wanghy/RAGEN_v2/verl/verl/trainer/config
|
| 144 |
+
schema: file
|
| 145 |
+
provider: command-line
|
| 146 |
+
- path: verl.trainer.config
|
| 147 |
+
schema: pkg
|
| 148 |
+
provider: hydra.searchpath in main
|
| 149 |
+
- path: ''
|
| 150 |
+
schema: structured
|
| 151 |
+
provider: schema
|
| 152 |
+
output_dir: /mnt/general/wanghy/RAGEN_v2/outputs/2026-04-30/19-02-13
|
| 153 |
+
choices:
|
| 154 |
+
reward_model: dp_reward_model
|
| 155 |
+
critic: dp_critic
|
| 156 |
+
critic/../engine@critic.model.fsdp_config: fsdp
|
| 157 |
+
critic/../optim@critic.optim: fsdp
|
| 158 |
+
model@actor_rollout_ref.model: hf_model
|
| 159 |
+
rollout@actor_rollout_ref.rollout: rollout
|
| 160 |
+
ref@actor_rollout_ref.ref: dp_ref
|
| 161 |
+
ref/../engine@actor_rollout_ref.ref.fsdp_config: fsdp
|
| 162 |
+
data: legacy_data
|
| 163 |
+
actor@actor_rollout_ref.actor: dp_actor
|
| 164 |
+
actor/../engine@actor_rollout_ref.actor.fsdp_config: fsdp
|
| 165 |
+
actor/../optim@actor_rollout_ref.actor.optim: fsdp
|
| 166 |
+
hydra/env: default
|
| 167 |
+
hydra/callbacks: null
|
| 168 |
+
hydra/job_logging: default
|
| 169 |
+
hydra/hydra_logging: default
|
| 170 |
+
hydra/hydra_help: default
|
| 171 |
+
hydra/help: default
|
| 172 |
+
hydra/sweeper: basic
|
| 173 |
+
hydra/launcher: basic
|
| 174 |
+
hydra/output: default
|
| 175 |
+
verbose: false
|
outputs/2026-04-30/19-02-13/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
outputs/2026-05-01/08-52-01/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
actor_rollout_ref:
|
| 2 |
+
actor:
|
| 3 |
+
optim:
|
| 4 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 5 |
+
lr: 1.0e-06
|
| 6 |
+
lr_warmup_steps_ratio: 0.0
|
| 7 |
+
total_training_steps: -1
|
| 8 |
+
weight_decay: 0.01
|
| 9 |
+
lr_warmup_steps: -1
|
| 10 |
+
betas:
|
| 11 |
+
- 0.9
|
| 12 |
+
- 0.999
|
| 13 |
+
clip_grad: 1.0
|
| 14 |
+
min_lr_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 600
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 8
|
| 489 |
+
save_freq: 100
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/share/model/Qwen/Qwen2.5-3B-Instruct
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- CoordSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- CoordSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 986 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 987 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 988 |
+
top_k: ${actor_rollout_ref.r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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath:
|
| 109 |
+
- pkg://verl.trainer.config
|
| 110 |
+
callbacks: {}
|
| 111 |
+
output_subdir: .hydra
|
| 112 |
+
overrides:
|
| 113 |
+
hydra:
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 117 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 118 |
+
job:
|
| 119 |
+
name: train
|
| 120 |
+
chdir: null
|
| 121 |
+
override_dirname: actor_rollout_ref.rollout.rollout_filter_strategy=top_p,actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 122 |
+
id: ???
|
| 123 |
+
num: ???
|
| 124 |
+
config_name: _2_sokoban
|
| 125 |
+
env_set: {}
|
| 126 |
+
env_copy: []
|
| 127 |
+
config:
|
| 128 |
+
override_dirname:
|
| 129 |
+
kv_sep: '='
|
| 130 |
+
item_sep: ','
|
| 131 |
+
exclude_keys: []
|
| 132 |
+
runtime:
|
| 133 |
+
version: 1.3.2
|
| 134 |
+
version_base: '1.3'
|
| 135 |
+
cwd: /mnt/general/wanghy/RAGEN_v2
|
| 136 |
+
config_sources:
|
| 137 |
+
- path: hydra.conf
|
| 138 |
+
schema: pkg
|
| 139 |
+
provider: hydra
|
| 140 |
+
- path: /mnt/general/wanghy/RAGEN_v2/config
|
| 141 |
+
schema: file
|
| 142 |
+
provider: main
|
| 143 |
+
- path: /mnt/general/wanghy/RAGEN_v2/verl/verl/trainer/config
|
| 144 |
+
schema: file
|
| 145 |
+
provider: command-line
|
| 146 |
+
- path: verl.trainer.config
|
| 147 |
+
schema: pkg
|
| 148 |
+
provider: hydra.searchpath in main
|
| 149 |
+
- path: ''
|
| 150 |
+
schema: structured
|
| 151 |
+
provider: schema
|
| 152 |
+
output_dir: /mnt/general/wanghy/RAGEN_v2/outputs/2026-05-01/08-52-01
|
| 153 |
+
choices:
|
| 154 |
+
reward_model: dp_reward_model
|
| 155 |
+
critic: dp_critic
|
| 156 |
+
critic/../engine@critic.model.fsdp_config: fsdp
|
| 157 |
+
critic/../optim@critic.optim: fsdp
|
| 158 |
+
model@actor_rollout_ref.model: hf_model
|
| 159 |
+
rollout@actor_rollout_ref.rollout: rollout
|
| 160 |
+
ref@actor_rollout_ref.ref: dp_ref
|
| 161 |
+
ref/../engine@actor_rollout_ref.ref.fsdp_config: fsdp
|
| 162 |
+
data: legacy_data
|
| 163 |
+
actor@actor_rollout_ref.actor: dp_actor
|
| 164 |
+
actor/../engine@actor_rollout_ref.actor.fsdp_config: fsdp
|
| 165 |
+
actor/../optim@actor_rollout_ref.actor.optim: fsdp
|
| 166 |
+
hydra/env: default
|
| 167 |
+
hydra/callbacks: null
|
| 168 |
+
hydra/job_logging: default
|
| 169 |
+
hydra/hydra_logging: default
|
| 170 |
+
hydra/hydra_help: default
|
| 171 |
+
hydra/help: default
|
| 172 |
+
hydra/sweeper: basic
|
| 173 |
+
hydra/launcher: basic
|
| 174 |
+
hydra/output: default
|
| 175 |
+
verbose: false
|
outputs/2026-05-01/08-52-01/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
outputs/2026-05-01/08-52-01/train.log
ADDED
|
File without changes
|
outputs/2026-05-11/10-46-20/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
outputs/2026-05-11/10-46-20/train.log
ADDED
|
File without changes
|
outputs/2026-05-11/10-52-37/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 1000
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 8
|
| 489 |
+
save_freq: -1
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- CoordSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- CoordSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath:
|
| 109 |
+
- pkg://verl.trainer.config
|
| 110 |
+
callbacks: {}
|
| 111 |
+
output_subdir: .hydra
|
| 112 |
+
overrides:
|
| 113 |
+
hydra:
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 117 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 118 |
+
- trainer.total_training_steps=1000
|
| 119 |
+
- model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|
| 120 |
+
job:
|
| 121 |
+
name: train
|
| 122 |
+
chdir: null
|
| 123 |
+
override_dirname: actor_rollout_ref.rollout.rollout_filter_strategy=top_p,actor_rollout_ref.rollout.rollout_filter_value=0.9,model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft,trainer.total_training_steps=1000
|
| 124 |
+
id: ???
|
| 125 |
+
num: ???
|
| 126 |
+
config_name: _2_sokoban
|
| 127 |
+
env_set: {}
|
| 128 |
+
env_copy: []
|
| 129 |
+
config:
|
| 130 |
+
override_dirname:
|
| 131 |
+
kv_sep: '='
|
| 132 |
+
item_sep: ','
|
| 133 |
+
exclude_keys: []
|
| 134 |
+
runtime:
|
| 135 |
+
version: 1.3.2
|
| 136 |
+
version_base: '1.3'
|
| 137 |
+
cwd: /mnt/general/wanghy/RAGEN_v2
|
| 138 |
+
config_sources:
|
| 139 |
+
- path: hydra.conf
|
| 140 |
+
schema: pkg
|
| 141 |
+
provider: hydra
|
| 142 |
+
- path: /mnt/general/wanghy/RAGEN_v2/config
|
| 143 |
+
schema: file
|
| 144 |
+
provider: main
|
| 145 |
+
- path: /mnt/general/wanghy/RAGEN_v2/verl/verl/trainer/config
|
| 146 |
+
schema: file
|
| 147 |
+
provider: command-line
|
| 148 |
+
- path: verl.trainer.config
|
| 149 |
+
schema: pkg
|
| 150 |
+
provider: hydra.searchpath in main
|
| 151 |
+
- path: ''
|
| 152 |
+
schema: structured
|
| 153 |
+
provider: schema
|
| 154 |
+
output_dir: /mnt/general/wanghy/RAGEN_v2/outputs/2026-05-11/10-52-37
|
| 155 |
+
choices:
|
| 156 |
+
reward_model: dp_reward_model
|
| 157 |
+
critic: dp_critic
|
| 158 |
+
critic/../engine@critic.model.fsdp_config: fsdp
|
| 159 |
+
critic/../optim@critic.optim: fsdp
|
| 160 |
+
model@actor_rollout_ref.model: hf_model
|
| 161 |
+
rollout@actor_rollout_ref.rollout: rollout
|
| 162 |
+
ref@actor_rollout_ref.ref: dp_ref
|
| 163 |
+
ref/../engine@actor_rollout_ref.ref.fsdp_config: fsdp
|
| 164 |
+
data: legacy_data
|
| 165 |
+
actor@actor_rollout_ref.actor: dp_actor
|
| 166 |
+
actor/../engine@actor_rollout_ref.actor.fsdp_config: fsdp
|
| 167 |
+
actor/../optim@actor_rollout_ref.actor.optim: fsdp
|
| 168 |
+
hydra/env: default
|
| 169 |
+
hydra/callbacks: null
|
| 170 |
+
hydra/job_logging: default
|
| 171 |
+
hydra/hydra_logging: default
|
| 172 |
+
hydra/hydra_help: default
|
| 173 |
+
hydra/help: default
|
| 174 |
+
hydra/sweeper: basic
|
| 175 |
+
hydra/launcher: basic
|
| 176 |
+
hydra/output: default
|
| 177 |
+
verbose: false
|
outputs/2026-05-11/10-52-37/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 3 |
+
- trainer.total_training_steps=1000
|
| 4 |
+
- model_path=/mnt/general/wanghy/LLaM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6 |
+
lr_warmup_steps_ratio: 0.0
|
| 7 |
+
total_training_steps: -1
|
| 8 |
+
weight_decay: 0.01
|
| 9 |
+
lr_warmup_steps: -1
|
| 10 |
+
betas:
|
| 11 |
+
- 0.9
|
| 12 |
+
- 0.999
|
| 13 |
+
clip_grad: 1.0
|
| 14 |
+
min_lr_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 1000
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 8
|
| 489 |
+
save_freq: -1
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- CoordSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- CoordSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 986 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 987 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 988 |
+
top_k: ${actor_rollout_ref.rollout.top_k}
|
| 989 |
+
kwargs: null
|
outputs/2026-05-11/11-23-48/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath:
|
| 109 |
+
- pkg://verl.trainer.config
|
| 110 |
+
callbacks: {}
|
| 111 |
+
output_subdir: .hydra
|
| 112 |
+
overrides:
|
| 113 |
+
hydra:
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 117 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 118 |
+
- trainer.total_training_steps=1000
|
| 119 |
+
- model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|
| 120 |
+
job:
|
| 121 |
+
name: train
|
| 122 |
+
chdir: null
|
| 123 |
+
override_dirname: actor_rollout_ref.rollout.rollout_filter_strategy=top_p,actor_rollout_ref.rollout.rollout_filter_value=0.9,model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft,trainer.total_training_steps=1000
|
| 124 |
+
id: ???
|
| 125 |
+
num: ???
|
| 126 |
+
config_name: _2_sokoban
|
| 127 |
+
env_set: {}
|
| 128 |
+
env_copy: []
|
| 129 |
+
config:
|
| 130 |
+
override_dirname:
|
| 131 |
+
kv_sep: '='
|
| 132 |
+
item_sep: ','
|
| 133 |
+
exclude_keys: []
|
| 134 |
+
runtime:
|
| 135 |
+
version: 1.3.2
|
| 136 |
+
version_base: '1.3'
|
| 137 |
+
cwd: /mnt/general/wanghy/RAGEN_v2
|
| 138 |
+
config_sources:
|
| 139 |
+
- path: hydra.conf
|
| 140 |
+
schema: pkg
|
| 141 |
+
provider: hydra
|
| 142 |
+
- path: /mnt/general/wanghy/RAGEN_v2/config
|
| 143 |
+
schema: file
|
| 144 |
+
provider: main
|
| 145 |
+
- path: /mnt/general/wanghy/RAGEN_v2/verl/verl/trainer/config
|
| 146 |
+
schema: file
|
| 147 |
+
provider: command-line
|
| 148 |
+
- path: verl.trainer.config
|
| 149 |
+
schema: pkg
|
| 150 |
+
provider: hydra.searchpath in main
|
| 151 |
+
- path: ''
|
| 152 |
+
schema: structured
|
| 153 |
+
provider: schema
|
| 154 |
+
output_dir: /mnt/general/wanghy/RAGEN_v2/outputs/2026-05-11/11-23-48
|
| 155 |
+
choices:
|
| 156 |
+
reward_model: dp_reward_model
|
| 157 |
+
critic: dp_critic
|
| 158 |
+
critic/../engine@critic.model.fsdp_config: fsdp
|
| 159 |
+
critic/../optim@critic.optim: fsdp
|
| 160 |
+
model@actor_rollout_ref.model: hf_model
|
| 161 |
+
rollout@actor_rollout_ref.rollout: rollout
|
| 162 |
+
ref@actor_rollout_ref.ref: dp_ref
|
| 163 |
+
ref/../engine@actor_rollout_ref.ref.fsdp_config: fsdp
|
| 164 |
+
data: legacy_data
|
| 165 |
+
actor@actor_rollout_ref.actor: dp_actor
|
| 166 |
+
actor/../engine@actor_rollout_ref.actor.fsdp_config: fsdp
|
| 167 |
+
actor/../optim@actor_rollout_ref.actor.optim: fsdp
|
| 168 |
+
hydra/env: default
|
| 169 |
+
hydra/callbacks: null
|
| 170 |
+
hydra/job_logging: default
|
| 171 |
+
hydra/hydra_logging: default
|
| 172 |
+
hydra/hydra_help: default
|
| 173 |
+
hydra/help: default
|
| 174 |
+
hydra/sweeper: basic
|
| 175 |
+
hydra/launcher: basic
|
| 176 |
+
hydra/output: default
|
| 177 |
+
verbose: false
|
outputs/2026-05-11/11-23-48/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 3 |
+
- trainer.total_training_steps=1000
|
| 4 |
+
- model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|
outputs/2026-05-11/11-23-48/train.log
ADDED
|
File without changes
|
outputs/2026-05-11/11-35-35/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
actor_rollout_ref:
|
| 2 |
+
actor:
|
| 3 |
+
optim:
|
| 4 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 5 |
+
lr: 1.0e-06
|
| 6 |
+
lr_warmup_steps_ratio: 0.0
|
| 7 |
+
total_training_steps: -1
|
| 8 |
+
weight_decay: 0.01
|
| 9 |
+
lr_warmup_steps: -1
|
| 10 |
+
betas:
|
| 11 |
+
- 0.9
|
| 12 |
+
- 0.999
|
| 13 |
+
clip_grad: 1.0
|
| 14 |
+
min_lr_ratio: 0.0
|
| 15 |
+
num_cycles: 0.5
|
| 16 |
+
warmup_style: constant
|
| 17 |
+
fsdp_config:
|
| 18 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 19 |
+
wrap_policy:
|
| 20 |
+
min_num_params: 0
|
| 21 |
+
param_offload: false
|
| 22 |
+
optimizer_offload: false
|
| 23 |
+
offload_policy: false
|
| 24 |
+
reshard_after_forward: true
|
| 25 |
+
fsdp_size: -1
|
| 26 |
+
forward_prefetch: false
|
| 27 |
+
model_dtype: fp32
|
| 28 |
+
use_orig_params: false
|
| 29 |
+
ulysses_sequence_parallel_size: 1
|
| 30 |
+
entropy_from_logits_with_chunking: false
|
| 31 |
+
use_torch_compile: true
|
| 32 |
+
entropy_checkpointing: false
|
| 33 |
+
forward_only: false
|
| 34 |
+
strategy: fsdp
|
| 35 |
+
_target_: verl.workers.config.FSDPActorConfig
|
| 36 |
+
strategy: fsdp
|
| 37 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 38 |
+
ppo_micro_batch_size: null
|
| 39 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 40 |
+
use_dynamic_bsz: false
|
| 41 |
+
ppo_max_token_len_per_gpu: 16384
|
| 42 |
+
clip_ratio: 0.2
|
| 43 |
+
clip_ratio_low: 0.2
|
| 44 |
+
clip_ratio_high: 0.28
|
| 45 |
+
freeze_vision_tower: false
|
| 46 |
+
policy_loss:
|
| 47 |
+
_target_: verl.workers.config.PolicyLossConfig
|
| 48 |
+
loss_mode: vanilla
|
| 49 |
+
clip_cov_ratio: 0.0002
|
| 50 |
+
clip_cov_lb: 1.0
|
| 51 |
+
clip_cov_ub: 5.0
|
| 52 |
+
kl_cov_ratio: 0.0002
|
| 53 |
+
ppo_kl_coef: 0.1
|
| 54 |
+
clip_ratio_c: 3.0
|
| 55 |
+
loss_agg_mode: token-mean
|
| 56 |
+
entropy_coeff: 0.001
|
| 57 |
+
tis_imp_ratio_cap: -1
|
| 58 |
+
use_kl_loss: false
|
| 59 |
+
use_torch_compile: true
|
| 60 |
+
kl_loss_coef: 0.0
|
| 61 |
+
kl_loss_type: kl
|
| 62 |
+
ppo_epochs: 1
|
| 63 |
+
shuffle: false
|
| 64 |
+
checkpoint:
|
| 65 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 66 |
+
save_contents:
|
| 67 |
+
- model
|
| 68 |
+
- optimizer
|
| 69 |
+
- extra
|
| 70 |
+
load_contents: ${.save_contents}
|
| 71 |
+
async_save: false
|
| 72 |
+
use_fused_kernels: ${oc.select:actor_rollout_ref.model.use_fused_kernels,false}
|
| 73 |
+
profiler:
|
| 74 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 75 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 76 |
+
enable: false
|
| 77 |
+
all_ranks: false
|
| 78 |
+
ranks: []
|
| 79 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 80 |
+
tool_config:
|
| 81 |
+
nsys:
|
| 82 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 83 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 84 |
+
npu:
|
| 85 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 86 |
+
contents: []
|
| 87 |
+
level: level1
|
| 88 |
+
analysis: true
|
| 89 |
+
discrete: false
|
| 90 |
+
torch:
|
| 91 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 92 |
+
step_start: 0
|
| 93 |
+
step_end: null
|
| 94 |
+
torch_memory:
|
| 95 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 96 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 97 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 98 |
+
grad_clip: 1.0
|
| 99 |
+
ulysses_sequence_parallel_size: 1
|
| 100 |
+
entropy_from_logits_with_chunking: false
|
| 101 |
+
entropy_checkpointing: false
|
| 102 |
+
use_remove_padding: ${oc.select:actor_rollout_ref.model.use_remove_padding,false}
|
| 103 |
+
use_ref: true
|
| 104 |
+
grpo_advantage_length_weight: ${grpo_advantage_length_weight}
|
| 105 |
+
filter_loss_scaling: none
|
| 106 |
+
ref:
|
| 107 |
+
strategy: ${actor_rollout_ref.actor.strategy}
|
| 108 |
+
use_torch_compile: ${oc.select:actor_rollout_ref.actor.use_torch_compile,true}
|
| 109 |
+
log_prob_micro_batch_size: null
|
| 110 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 111 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 112 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 113 |
+
profiler:
|
| 114 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 115 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 116 |
+
enable: false
|
| 117 |
+
all_ranks: false
|
| 118 |
+
ranks: []
|
| 119 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 120 |
+
tool_config:
|
| 121 |
+
nsys:
|
| 122 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 123 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 124 |
+
npu:
|
| 125 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 126 |
+
contents: []
|
| 127 |
+
level: level1
|
| 128 |
+
analysis: true
|
| 129 |
+
discrete: false
|
| 130 |
+
torch:
|
| 131 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 132 |
+
step_start: 0
|
| 133 |
+
step_end: null
|
| 134 |
+
torch_memory:
|
| 135 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 136 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 137 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 138 |
+
fsdp_config:
|
| 139 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 140 |
+
wrap_policy:
|
| 141 |
+
min_num_params: 0
|
| 142 |
+
param_offload: false
|
| 143 |
+
optimizer_offload: false
|
| 144 |
+
offload_policy: false
|
| 145 |
+
reshard_after_forward: true
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
forward_prefetch: false
|
| 148 |
+
model_dtype: fp32
|
| 149 |
+
use_orig_params: false
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
entropy_from_logits_with_chunking: false
|
| 152 |
+
use_torch_compile: true
|
| 153 |
+
entropy_checkpointing: false
|
| 154 |
+
forward_only: false
|
| 155 |
+
strategy: fsdp
|
| 156 |
+
model: null
|
| 157 |
+
ulysses_sequence_parallel_size: ${oc.select:actor_rollout_ref.actor.ulysses_sequence_parallel_size,1}
|
| 158 |
+
entropy_from_logits_with_chunking: false
|
| 159 |
+
entropy_checkpointing: false
|
| 160 |
+
rollout:
|
| 161 |
+
_target_: verl.workers.config.RolloutConfig
|
| 162 |
+
name: vllm
|
| 163 |
+
mode: sync
|
| 164 |
+
temperature: 1
|
| 165 |
+
top_k: -1
|
| 166 |
+
top_p: 1
|
| 167 |
+
prompt_length: 1
|
| 168 |
+
response_length: 400
|
| 169 |
+
dtype: bfloat16
|
| 170 |
+
gpu_memory_utilization: 0.8
|
| 171 |
+
ignore_eos: false
|
| 172 |
+
enforce_eager: true
|
| 173 |
+
cudagraph_capture_sizes: null
|
| 174 |
+
free_cache_engine: true
|
| 175 |
+
tensor_model_parallel_size: 1
|
| 176 |
+
data_parallel_size: 1
|
| 177 |
+
expert_parallel_size: 1
|
| 178 |
+
max_num_batched_tokens: 8192
|
| 179 |
+
max_model_len: 3600
|
| 180 |
+
max_num_seqs: 1024
|
| 181 |
+
enable_chunked_prefill: true
|
| 182 |
+
enable_prefix_caching: true
|
| 183 |
+
load_format: auto
|
| 184 |
+
log_prob_micro_batch_size: null
|
| 185 |
+
log_prob_micro_batch_size_per_gpu: ${log_prob_micro_batch_size_per_gpu}
|
| 186 |
+
log_prob_use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 187 |
+
log_prob_max_token_len_per_gpu: ${oc.select:actor_rollout_ref.actor.ppo_max_token_len_per_gpu,16384}
|
| 188 |
+
disable_log_stats: true
|
| 189 |
+
do_sample: true
|
| 190 |
+
'n': 1
|
| 191 |
+
over_sample_rate: 0
|
| 192 |
+
multi_stage_wake_up: false
|
| 193 |
+
engine_kwargs:
|
| 194 |
+
vllm: {}
|
| 195 |
+
sglang: {}
|
| 196 |
+
val_kwargs:
|
| 197 |
+
_target_: verl.workers.config.SamplingConfig
|
| 198 |
+
top_k: -1
|
| 199 |
+
top_p: 1.0
|
| 200 |
+
temperature: 0.5
|
| 201 |
+
'n': 1
|
| 202 |
+
do_sample: true
|
| 203 |
+
multi_turn:
|
| 204 |
+
_target_: verl.workers.config.MultiTurnConfig
|
| 205 |
+
enable: false
|
| 206 |
+
max_assistant_turns: null
|
| 207 |
+
tool_config_path: null
|
| 208 |
+
max_user_turns: null
|
| 209 |
+
max_parallel_calls: 1
|
| 210 |
+
max_tool_response_length: 256
|
| 211 |
+
tool_response_truncate_side: middle
|
| 212 |
+
interaction_config_path: null
|
| 213 |
+
use_inference_chat_template: false
|
| 214 |
+
tokenization_sanity_check_mode: strict
|
| 215 |
+
format: hermes
|
| 216 |
+
num_repeat_rollouts: null
|
| 217 |
+
calculate_log_probs: false
|
| 218 |
+
agent:
|
| 219 |
+
_target_: verl.workers.config.AgentLoopConfig
|
| 220 |
+
num_workers: 8
|
| 221 |
+
agent_loop_config_path: null
|
| 222 |
+
custom_async_server:
|
| 223 |
+
_target_: verl.workers.config.CustomAsyncServerConfig
|
| 224 |
+
path: null
|
| 225 |
+
name: null
|
| 226 |
+
update_weights_bucket_megabytes: 512
|
| 227 |
+
trace:
|
| 228 |
+
_target_: verl.workers.config.TraceConfig
|
| 229 |
+
backend: null
|
| 230 |
+
token2text: false
|
| 231 |
+
skip_rollout: false
|
| 232 |
+
skip_dump_dir: /tmp/rollout_dump
|
| 233 |
+
skip_tokenizer_init: true
|
| 234 |
+
profiler:
|
| 235 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 236 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 237 |
+
enable: ${oc.select:actor_rollout_ref.actor.profiler.enable,false}
|
| 238 |
+
all_ranks: ${oc.select:actor_rollout_ref.actor.profiler.all_ranks,false}
|
| 239 |
+
ranks: ${oc.select:actor_rollout_ref.actor.profiler.ranks,[]}
|
| 240 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 241 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 242 |
+
layered_summon: false
|
| 243 |
+
rollout_filter_value: 0.9
|
| 244 |
+
rollout_filter_strategy: top_p
|
| 245 |
+
rollout_filter_type: largest
|
| 246 |
+
rollout_filter_include_zero: true
|
| 247 |
+
rollout_filter_top_p_prob_mode: linear
|
| 248 |
+
rollout_filter_selection_eps: 0.01
|
| 249 |
+
rollout_filter_empty_stop_steps: 5
|
| 250 |
+
rollout_filter_metric: reward_variance
|
| 251 |
+
gradient_analysis_num_buckets: 6
|
| 252 |
+
gradient_analysis_bucket_mode: quantile
|
| 253 |
+
model:
|
| 254 |
+
_target_: verl.workers.config.HFModelConfig
|
| 255 |
+
path: ${model_path}
|
| 256 |
+
hf_config_path: null
|
| 257 |
+
tokenizer_path: null
|
| 258 |
+
use_shm: false
|
| 259 |
+
trust_remote_code: false
|
| 260 |
+
custom_chat_template: null
|
| 261 |
+
external_lib: null
|
| 262 |
+
override_config: {}
|
| 263 |
+
enable_gradient_checkpointing: true
|
| 264 |
+
enable_activation_offload: false
|
| 265 |
+
use_remove_padding: false
|
| 266 |
+
lora_rank: ${lora.rank}
|
| 267 |
+
lora_alpha: ${lora.alpha}
|
| 268 |
+
target_modules: ${lora.target_modules}
|
| 269 |
+
exclude_modules: null
|
| 270 |
+
use_liger: false
|
| 271 |
+
use_fused_kernels: false
|
| 272 |
+
fused_kernel_options:
|
| 273 |
+
impl_backend: torch
|
| 274 |
+
hybrid_engine: true
|
| 275 |
+
nccl_timeout: 600
|
| 276 |
+
data:
|
| 277 |
+
tokenizer: null
|
| 278 |
+
use_shm: false
|
| 279 |
+
train_files: ~/data/rlhf/gsm8k/train.parquet
|
| 280 |
+
val_files: ~/data/rlhf/gsm8k/test.parquet
|
| 281 |
+
prompt_key: prompt
|
| 282 |
+
reward_fn_key: data_source
|
| 283 |
+
max_prompt_length: null
|
| 284 |
+
max_response_length: null
|
| 285 |
+
train_batch_size: null
|
| 286 |
+
val_batch_size: null
|
| 287 |
+
return_raw_input_ids: false
|
| 288 |
+
return_raw_chat: false
|
| 289 |
+
return_full_prompt: false
|
| 290 |
+
shuffle: true
|
| 291 |
+
dataloader_num_workers: 8
|
| 292 |
+
validation_shuffle: false
|
| 293 |
+
filter_overlong_prompts: false
|
| 294 |
+
filter_overlong_prompts_workers: 1
|
| 295 |
+
truncation: error
|
| 296 |
+
image_key: images
|
| 297 |
+
video_key: videos
|
| 298 |
+
trust_remote_code: false
|
| 299 |
+
custom_cls:
|
| 300 |
+
path: null
|
| 301 |
+
name: null
|
| 302 |
+
return_multi_modal_inputs: true
|
| 303 |
+
sampler:
|
| 304 |
+
class_path: null
|
| 305 |
+
class_name: null
|
| 306 |
+
datagen:
|
| 307 |
+
path: null
|
| 308 |
+
name: null
|
| 309 |
+
apply_chat_template_kwargs: {}
|
| 310 |
+
critic:
|
| 311 |
+
optim:
|
| 312 |
+
_target_: verl.workers.config.FSDPOptimizerConfig
|
| 313 |
+
lr: 1.0e-05
|
| 314 |
+
lr_warmup_steps_ratio: 0.0
|
| 315 |
+
total_training_steps: -1
|
| 316 |
+
weight_decay: 0.01
|
| 317 |
+
lr_warmup_steps: -1
|
| 318 |
+
betas:
|
| 319 |
+
- 0.9
|
| 320 |
+
- 0.999
|
| 321 |
+
clip_grad: 1.0
|
| 322 |
+
min_lr_ratio: 0.0
|
| 323 |
+
num_cycles: 0.5
|
| 324 |
+
warmup_style: constant
|
| 325 |
+
model:
|
| 326 |
+
fsdp_config:
|
| 327 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 328 |
+
wrap_policy:
|
| 329 |
+
min_num_params: 0
|
| 330 |
+
param_offload: false
|
| 331 |
+
optimizer_offload: false
|
| 332 |
+
offload_policy: false
|
| 333 |
+
reshard_after_forward: true
|
| 334 |
+
fsdp_size: -1
|
| 335 |
+
forward_prefetch: false
|
| 336 |
+
model_dtype: fp32
|
| 337 |
+
use_orig_params: false
|
| 338 |
+
ulysses_sequence_parallel_size: 1
|
| 339 |
+
entropy_from_logits_with_chunking: false
|
| 340 |
+
use_torch_compile: true
|
| 341 |
+
entropy_checkpointing: false
|
| 342 |
+
forward_only: false
|
| 343 |
+
strategy: fsdp
|
| 344 |
+
path: ${model_path}
|
| 345 |
+
tokenizer_path: ${oc.select:actor_rollout_ref.model.path,"~/models/deepseek-llm-7b-chat"}
|
| 346 |
+
override_config: {}
|
| 347 |
+
external_lib: ${oc.select:actor_rollout_ref.model.external_lib,null}
|
| 348 |
+
trust_remote_code: ${oc.select:actor_rollout_ref.model.trust_remote_code,false}
|
| 349 |
+
_target_: verl.workers.config.FSDPCriticModelCfg
|
| 350 |
+
use_shm: false
|
| 351 |
+
enable_gradient_checkpointing: true
|
| 352 |
+
enable_activation_offload: false
|
| 353 |
+
use_remove_padding: false
|
| 354 |
+
lora_rank: ${lora.rank}
|
| 355 |
+
lora_alpha: ${lora.alpha}
|
| 356 |
+
target_modules: ${lora.target_modules}
|
| 357 |
+
_target_: verl.workers.config.FSDPCriticConfig
|
| 358 |
+
rollout_n: ${oc.select:actor_rollout_ref.rollout.n,1}
|
| 359 |
+
strategy: fsdp
|
| 360 |
+
enable: null
|
| 361 |
+
ppo_mini_batch_size: ${ppo_mini_batch_size}
|
| 362 |
+
ppo_micro_batch_size: null
|
| 363 |
+
ppo_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 364 |
+
use_dynamic_bsz: ${oc.select:actor_rollout_ref.actor.use_dynamic_bsz,false}
|
| 365 |
+
ppo_max_token_len_per_gpu: 32768
|
| 366 |
+
forward_max_token_len_per_gpu: ${.ppo_max_token_len_per_gpu}
|
| 367 |
+
ppo_epochs: ${oc.select:actor_rollout_ref.actor.ppo_epochs,1}
|
| 368 |
+
shuffle: ${oc.select:actor_rollout_ref.actor.shuffle,false}
|
| 369 |
+
cliprange_value: 0.5
|
| 370 |
+
loss_agg_mode: ${oc.select:actor_rollout_ref.actor.loss_agg_mode,token-mean}
|
| 371 |
+
checkpoint:
|
| 372 |
+
_target_: verl.trainer.config.CheckpointConfig
|
| 373 |
+
save_contents:
|
| 374 |
+
- model
|
| 375 |
+
- optimizer
|
| 376 |
+
- extra
|
| 377 |
+
load_contents: ${.save_contents}
|
| 378 |
+
async_save: false
|
| 379 |
+
profiler:
|
| 380 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 381 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 382 |
+
enable: false
|
| 383 |
+
all_ranks: false
|
| 384 |
+
ranks: []
|
| 385 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 386 |
+
tool_config:
|
| 387 |
+
nsys:
|
| 388 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 389 |
+
discrete: ${oc.select:global_profiler.global_tool_config.nsys.discrete}
|
| 390 |
+
npu:
|
| 391 |
+
_target_: verl.utils.profiler.config.NPUToolConfig
|
| 392 |
+
contents: []
|
| 393 |
+
level: level1
|
| 394 |
+
analysis: true
|
| 395 |
+
discrete: false
|
| 396 |
+
torch:
|
| 397 |
+
_target_: verl.utils.profiler.config.TorchProfilerToolConfig
|
| 398 |
+
step_start: 0
|
| 399 |
+
step_end: null
|
| 400 |
+
torch_memory:
|
| 401 |
+
_target_: verl.utils.profiler.config.TorchMemoryToolConfig
|
| 402 |
+
trace_alloc_max_entries: ${oc.select:global_profiler.global_tool_config.torch_memory.trace_alloc_max_entries,100000}
|
| 403 |
+
stack_depth: ${oc.select:global_profiler.global_tool_config.torch_memory.stack_depth,32}
|
| 404 |
+
forward_micro_batch_size: ${oc.select:.ppo_micro_batch_size,null}
|
| 405 |
+
forward_micro_batch_size_per_gpu: ${oc.select:.ppo_micro_batch_size_per_gpu,null}
|
| 406 |
+
ulysses_sequence_parallel_size: 1
|
| 407 |
+
grad_clip: 1.0
|
| 408 |
+
reward_model:
|
| 409 |
+
enable: false
|
| 410 |
+
enable_resource_pool: false
|
| 411 |
+
n_gpus_per_node: 0
|
| 412 |
+
nnodes: 0
|
| 413 |
+
strategy: fsdp
|
| 414 |
+
model:
|
| 415 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 416 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 417 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 418 |
+
trust_remote_code: false
|
| 419 |
+
use_shm: false
|
| 420 |
+
use_remove_padding: false
|
| 421 |
+
use_fused_kernels: ${actor_rollout_ref.model.use_fused_kernels}
|
| 422 |
+
fsdp_config:
|
| 423 |
+
_target_: verl.workers.config.FSDPEngineConfig
|
| 424 |
+
wrap_policy:
|
| 425 |
+
min_num_params: 0
|
| 426 |
+
param_offload: false
|
| 427 |
+
reshard_after_forward: true
|
| 428 |
+
fsdp_size: -1
|
| 429 |
+
forward_prefetch: false
|
| 430 |
+
micro_batch_size: null
|
| 431 |
+
micro_batch_size_per_gpu: null
|
| 432 |
+
max_length: null
|
| 433 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 434 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 435 |
+
reward_manager: naive
|
| 436 |
+
launch_reward_fn_async: false
|
| 437 |
+
sandbox_fusion:
|
| 438 |
+
url: null
|
| 439 |
+
max_concurrent: 64
|
| 440 |
+
memory_limit_mb: 1024
|
| 441 |
+
profiler:
|
| 442 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 443 |
+
tool: ${oc.select:global_profiler.tool,null}
|
| 444 |
+
enable: false
|
| 445 |
+
all_ranks: false
|
| 446 |
+
ranks: []
|
| 447 |
+
save_path: ${oc.select:global_profiler.save_path,null}
|
| 448 |
+
tool_config: ${oc.select:actor_rollout_ref.actor.profiler.tool_config,null}
|
| 449 |
+
ulysses_sequence_parallel_size: 1
|
| 450 |
+
custom_reward_function:
|
| 451 |
+
path: null
|
| 452 |
+
name: compute_score
|
| 453 |
+
algorithm:
|
| 454 |
+
_target_: verl.trainer.config.AlgoConfig
|
| 455 |
+
gamma: 1.0
|
| 456 |
+
lam: 1.0
|
| 457 |
+
adv_estimator: gae
|
| 458 |
+
norm_adv_by_std_in_grpo: true
|
| 459 |
+
use_kl_in_reward: false
|
| 460 |
+
kl_penalty: kl
|
| 461 |
+
kl_ctrl:
|
| 462 |
+
_target_: verl.trainer.config.KLControlConfig
|
| 463 |
+
type: fixed
|
| 464 |
+
kl_coef: 0.0
|
| 465 |
+
horizon: 10000
|
| 466 |
+
target_kl: 0.1
|
| 467 |
+
use_pf_ppo: false
|
| 468 |
+
pf_ppo:
|
| 469 |
+
reweight_method: pow
|
| 470 |
+
weight_pow: 2.0
|
| 471 |
+
high_level_gamma: 0.95
|
| 472 |
+
bi_level_gae: false
|
| 473 |
+
zero_task_advantage: false
|
| 474 |
+
soft_advantage_reweight: false
|
| 475 |
+
trainer:
|
| 476 |
+
balance_batch: true
|
| 477 |
+
total_epochs: 30
|
| 478 |
+
total_training_steps: 1000
|
| 479 |
+
project_name: ragen
|
| 480 |
+
experiment_name: sokoban-main
|
| 481 |
+
logger:
|
| 482 |
+
- console
|
| 483 |
+
- wandb
|
| 484 |
+
log_val_generations: 0
|
| 485 |
+
rollout_data_dir: null
|
| 486 |
+
validation_data_dir: null
|
| 487 |
+
nnodes: 1
|
| 488 |
+
n_gpus_per_node: 8
|
| 489 |
+
save_freq: -1
|
| 490 |
+
esi_redundant_time: 0
|
| 491 |
+
resume_mode: auto
|
| 492 |
+
resume_from_path: null
|
| 493 |
+
val_before_train: true
|
| 494 |
+
val_only: false
|
| 495 |
+
test_freq: 10
|
| 496 |
+
critic_warmup: 0
|
| 497 |
+
default_hdfs_dir: null
|
| 498 |
+
del_local_ckpt_after_load: false
|
| 499 |
+
default_local_dir: checkpoints/${trainer.project_name}/${trainer.experiment_name}
|
| 500 |
+
max_actor_ckpt_to_keep: 1
|
| 501 |
+
max_critic_ckpt_to_keep: 1
|
| 502 |
+
ray_wait_register_center_timeout: 300
|
| 503 |
+
device: cuda
|
| 504 |
+
use_legacy_worker_impl: auto
|
| 505 |
+
local_log_dir: results/
|
| 506 |
+
validation_steps: 1
|
| 507 |
+
generations_to_log_to_wandb:
|
| 508 |
+
val: 20
|
| 509 |
+
log_group_rv_table: false
|
| 510 |
+
gradient_analysis_mode: false
|
| 511 |
+
gradient_analysis_every: 50
|
| 512 |
+
gradient_analysis_env_groups: null
|
| 513 |
+
gradient_analysis_group_size: null
|
| 514 |
+
gradient_analysis_log_prefilter: false
|
| 515 |
+
gradient_analysis_only: false
|
| 516 |
+
exit_after_gradient_analysis: false
|
| 517 |
+
global_profiler:
|
| 518 |
+
_target_: verl.utils.profiler.ProfilerConfig
|
| 519 |
+
tool: null
|
| 520 |
+
steps: null
|
| 521 |
+
profile_continuous_steps: false
|
| 522 |
+
save_path: outputs/profile
|
| 523 |
+
global_tool_config:
|
| 524 |
+
nsys:
|
| 525 |
+
_target_: verl.utils.profiler.config.NsightToolConfig
|
| 526 |
+
discrete: false
|
| 527 |
+
controller_nsight_options:
|
| 528 |
+
trace: cuda,nvtx,cublas,ucx
|
| 529 |
+
cuda-memory-usage: 'true'
|
| 530 |
+
cuda-graph-trace: graph
|
| 531 |
+
worker_nsight_options:
|
| 532 |
+
trace: cuda,nvtx,cublas,ucx
|
| 533 |
+
cuda-memory-usage: 'true'
|
| 534 |
+
cuda-graph-trace: graph
|
| 535 |
+
capture-range: cudaProfilerApi
|
| 536 |
+
capture-range-end: null
|
| 537 |
+
kill: none
|
| 538 |
+
torch_memory:
|
| 539 |
+
trace_alloc_max_entries: 100000
|
| 540 |
+
stack_depth: 32
|
| 541 |
+
context: all
|
| 542 |
+
stacks: all
|
| 543 |
+
kw_args: {}
|
| 544 |
+
ray_kwargs:
|
| 545 |
+
ray_init:
|
| 546 |
+
num_cpus: null
|
| 547 |
+
timeline_json_file: null
|
| 548 |
+
custom_envs:
|
| 549 |
+
SimpleSokoban:
|
| 550 |
+
env_type: sokoban
|
| 551 |
+
max_actions_per_traj: 10
|
| 552 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 553 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 554 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 555 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 556 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 557 |
+
max_tokens: 100
|
| 558 |
+
parallel_friendly: false
|
| 559 |
+
max_workers: 32
|
| 560 |
+
env_config:
|
| 561 |
+
dim_x: 6
|
| 562 |
+
dim_y: 6
|
| 563 |
+
num_boxes: 1
|
| 564 |
+
max_steps: 100
|
| 565 |
+
LargerSokoban:
|
| 566 |
+
env_type: sokoban
|
| 567 |
+
max_actions_per_traj: 10
|
| 568 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 569 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 570 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 571 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 572 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 573 |
+
max_tokens: 100
|
| 574 |
+
parallel_friendly: false
|
| 575 |
+
max_workers: 32
|
| 576 |
+
env_config:
|
| 577 |
+
dim_x: 8
|
| 578 |
+
dim_y: 8
|
| 579 |
+
num_boxes: 2
|
| 580 |
+
max_steps: 100
|
| 581 |
+
search_depth: 10
|
| 582 |
+
SokobanDifferentGridVocab:
|
| 583 |
+
env_type: sokoban
|
| 584 |
+
max_actions_per_traj: 10
|
| 585 |
+
env_instruction: "You are solving the Sokoban puzzle. \nYou are the player and\
|
| 586 |
+
\ you need to push all boxes to targets. \nWhen you are right next to a box,\
|
| 587 |
+
\ you can push it by moving in the same direction. \nYou cannot push a box through\
|
| 588 |
+
\ a wall, and you cannot pull a box. \nThe answer should be a sequence of actions,\
|
| 589 |
+
\ like <answer>Right || Right || Up</answer>\n"
|
| 590 |
+
max_tokens: 100
|
| 591 |
+
parallel_friendly: false
|
| 592 |
+
max_workers: 32
|
| 593 |
+
env_config:
|
| 594 |
+
search_depth: 30
|
| 595 |
+
dim_x: 6
|
| 596 |
+
dim_y: 6
|
| 597 |
+
num_boxes: 1
|
| 598 |
+
max_steps: 100
|
| 599 |
+
grid_lookup:
|
| 600 |
+
0: W
|
| 601 |
+
1: .
|
| 602 |
+
2: G
|
| 603 |
+
3: C
|
| 604 |
+
4: B
|
| 605 |
+
5: A
|
| 606 |
+
6: '@'
|
| 607 |
+
grid_vocab:
|
| 608 |
+
W: wall
|
| 609 |
+
.: empty
|
| 610 |
+
G: target
|
| 611 |
+
C: box on target
|
| 612 |
+
B: box
|
| 613 |
+
A: player
|
| 614 |
+
'@': player on target
|
| 615 |
+
CoordSokoban:
|
| 616 |
+
env_type: sokoban
|
| 617 |
+
max_actions_per_traj: 10
|
| 618 |
+
env_instruction: "You are solving the Sokoban puzzle. You are the player and you\
|
| 619 |
+
\ need to push all boxes to targets.\nYou are provided with a symbol grid and\
|
| 620 |
+
\ the zero-indexed coordinates of the player, each box, and each target. \n\
|
| 621 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner\
|
| 622 |
+
\ (5, 5). \nWhen you are exactly next to a box, you can push it by moving in\
|
| 623 |
+
\ the same direction. \nYou cannot push a box through a wall, and you cannot\
|
| 624 |
+
\ pull a box.\nThe answer should be a sequence of actions, like <answer>Right\
|
| 625 |
+
\ || Right || Up</answer>.\n"
|
| 626 |
+
max_tokens: 120
|
| 627 |
+
parallel_friendly: false
|
| 628 |
+
max_workers: 32
|
| 629 |
+
env_config:
|
| 630 |
+
dim_x: 6
|
| 631 |
+
dim_y: 6
|
| 632 |
+
num_boxes: 1
|
| 633 |
+
max_steps: 100
|
| 634 |
+
observation_format: grid_coord
|
| 635 |
+
VisualSimpleSokoban:
|
| 636 |
+
env_type: sokoban
|
| 637 |
+
max_actions_per_traj: 10
|
| 638 |
+
env_instruction: You are solving the Sokoban puzzle. You are the player and you
|
| 639 |
+
need to push all boxes to targets. When you are right next to a box, you can
|
| 640 |
+
push it by moving in the same direction. You cannot push a box through a wall,
|
| 641 |
+
and you cannot pull a box. The answer should be a sequence of actions, like
|
| 642 |
+
<answer>Right || Right || Up</answer>
|
| 643 |
+
max_tokens: 100
|
| 644 |
+
parallel_friendly: false
|
| 645 |
+
max_workers: 32
|
| 646 |
+
env_config:
|
| 647 |
+
dim_x: 6
|
| 648 |
+
dim_y: 6
|
| 649 |
+
num_boxes: 1
|
| 650 |
+
max_steps: 100
|
| 651 |
+
render_mode: rgb_array
|
| 652 |
+
Alfworld:
|
| 653 |
+
env_type: alfworld
|
| 654 |
+
max_actions_per_traj: 50
|
| 655 |
+
parallel_friendly: false
|
| 656 |
+
max_workers: 1
|
| 657 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 658 |
+
|
| 659 |
+
Complete household tasks by navigating and interacting with objects.
|
| 660 |
+
|
| 661 |
+
|
| 662 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 663 |
+
process MUST be enclosed within <think> </think> tags.
|
| 664 |
+
|
| 665 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 666 |
+
for current step and present it within <answer>...</answer> tags.
|
| 667 |
+
|
| 668 |
+
'
|
| 669 |
+
max_tokens: 512
|
| 670 |
+
env_config:
|
| 671 |
+
eval_dataset: eval_in_distribution
|
| 672 |
+
AlfworldOOD:
|
| 673 |
+
env_type: alfworld
|
| 674 |
+
max_actions_per_traj: 50
|
| 675 |
+
parallel_friendly: false
|
| 676 |
+
max_workers: 1
|
| 677 |
+
env_instruction: 'You are an expert agent in the ALFRED Embodied Environment.
|
| 678 |
+
|
| 679 |
+
Complete household tasks by navigating and interacting with objects.
|
| 680 |
+
|
| 681 |
+
|
| 682 |
+
You should first reason step-by-step about the current situation. This reasoning
|
| 683 |
+
process MUST be enclosed within <think> </think> tags.
|
| 684 |
+
|
| 685 |
+
Once you''ve finished your reasoning, you should choose an admissible action
|
| 686 |
+
for current step and present it within <answer>...</answer> tags.
|
| 687 |
+
|
| 688 |
+
'
|
| 689 |
+
max_tokens: 512
|
| 690 |
+
env_config:
|
| 691 |
+
eval_dataset: eval_out_of_distribution
|
| 692 |
+
Countdown:
|
| 693 |
+
env_type: countdown
|
| 694 |
+
max_actions_per_traj: 1
|
| 695 |
+
env_instruction: 'You are solving the Countdown puzzle. You should use the num
|
| 696 |
+
list to create an equation that equals the target. Example answer format: <think>
|
| 697 |
+
To find an equation using [3, 5, 2] to get 4. Let''s check 2 + 5 = 7, 7 - 3
|
| 698 |
+
= 4. So the answer is 2 + 5 - 3 = 4. </think><answer>2 + 5 - 3</answer>'
|
| 699 |
+
max_tokens: 100
|
| 700 |
+
parallel_friendly: false
|
| 701 |
+
max_workers: 32
|
| 702 |
+
env_config: null
|
| 703 |
+
Bandit:
|
| 704 |
+
env_type: bandit
|
| 705 |
+
max_actions_per_traj: 1
|
| 706 |
+
env_instruction: ''
|
| 707 |
+
max_tokens: 100
|
| 708 |
+
parallel_friendly: false
|
| 709 |
+
max_workers: 32
|
| 710 |
+
env_config:
|
| 711 |
+
split: train
|
| 712 |
+
BanditTest:
|
| 713 |
+
env_type: bandit
|
| 714 |
+
max_actions_per_traj: 1
|
| 715 |
+
env_instruction: ''
|
| 716 |
+
max_tokens: 100
|
| 717 |
+
parallel_friendly: false
|
| 718 |
+
max_workers: 32
|
| 719 |
+
env_config:
|
| 720 |
+
split: test
|
| 721 |
+
DeepCoder:
|
| 722 |
+
env_type: deepcoder
|
| 723 |
+
max_actions_per_traj: 1
|
| 724 |
+
env_instruction: 'You are solving a coding task. Provide a complete Python function
|
| 725 |
+
solution only. Format: <answer>...</answer>'
|
| 726 |
+
max_tokens: 8000
|
| 727 |
+
parallel_friendly: true
|
| 728 |
+
max_workers: 32
|
| 729 |
+
env_config:
|
| 730 |
+
max_steps: 1
|
| 731 |
+
FrozenLake:
|
| 732 |
+
env_type: frozen_lake
|
| 733 |
+
max_actions_per_traj: 10
|
| 734 |
+
env_instruction: 'You are solving the FrozenLake puzzle. Forbid the whole and
|
| 735 |
+
go to the target. You may move to the unintended direction due to the slippery
|
| 736 |
+
ice. Example answer format: <think>To forbid the hole and go to the target,
|
| 737 |
+
I should go left then go up.</think><answer>Left || Up</answer>'
|
| 738 |
+
max_tokens: 100
|
| 739 |
+
parallel_friendly: false
|
| 740 |
+
max_workers: 32
|
| 741 |
+
env_config:
|
| 742 |
+
success_rate: 0.8
|
| 743 |
+
CoordFrozenLake:
|
| 744 |
+
env_type: frozen_lake
|
| 745 |
+
max_actions_per_traj: 10
|
| 746 |
+
env_instruction: 'You are solving the FrozenLake puzzle. The observation includes
|
| 747 |
+
both a symbol grid and zero-indexed coordinates for the start, goal, player,
|
| 748 |
+
and any holes.
|
| 749 |
+
|
| 750 |
+
Coordinates range from the top-left corner (0, 0) to the bottom-right corner
|
| 751 |
+
(5, 5).
|
| 752 |
+
|
| 753 |
+
Beware that the ice is slippery, so the agent might slide and end up in an unintended
|
| 754 |
+
tile.
|
| 755 |
+
|
| 756 |
+
Respond with a sequence of actions such as <answer>Left || Up || Up</answer>.
|
| 757 |
+
|
| 758 |
+
'
|
| 759 |
+
max_tokens: 120
|
| 760 |
+
parallel_friendly: false
|
| 761 |
+
max_workers: 32
|
| 762 |
+
env_config:
|
| 763 |
+
observation_format: grid_coord
|
| 764 |
+
success_rate: 0.8
|
| 765 |
+
MetamathQA:
|
| 766 |
+
env_type: metamathqa
|
| 767 |
+
max_actions_per_traj: 1
|
| 768 |
+
env_instruction: 'You are solving Math problems. '
|
| 769 |
+
max_tokens: 100
|
| 770 |
+
env_config: null
|
| 771 |
+
WebShopFull:
|
| 772 |
+
env_type: webshop
|
| 773 |
+
max_actions_per_traj: 15
|
| 774 |
+
env_instruction: You are an expert autonomous agent operating in the WebShop e‑commerce
|
| 775 |
+
environment.
|
| 776 |
+
max_tokens: 200
|
| 777 |
+
env_config:
|
| 778 |
+
dataset: full
|
| 779 |
+
WebShop:
|
| 780 |
+
env_type: webshop
|
| 781 |
+
max_actions_per_traj: 9
|
| 782 |
+
env_instruction: 'You are browsing an online shop. Based on the instruction, buy
|
| 783 |
+
a product that close to the production description. You need to search, read
|
| 784 |
+
the search results, pick a product, choose the size and color and buy. You should
|
| 785 |
+
only choose action from the available actions list provided later. Example
|
| 786 |
+
process: I need a gingko light and 20x20 pillow cover that is hand painted.
|
| 787 |
+
First search[gingko light 20x20 pillow cover hand painted], answer format: <answer>search[blanket
|
| 788 |
+
with fleece throw]</answer>. Valid answer is search[<keywords>] or click[<clickable>].'
|
| 789 |
+
max_tokens: 200
|
| 790 |
+
env_config:
|
| 791 |
+
dataset: small
|
| 792 |
+
Lean:
|
| 793 |
+
env_type: lean
|
| 794 |
+
max_actions_per_traj: 30
|
| 795 |
+
env_instruction: You are a Lean theorem prover. Given a Lean theorem statement,
|
| 796 |
+
propose a sequence of tactics that completes the proof. Think step by step about
|
| 797 |
+
which tactics to apply next. Provide tactics separated by '||', for example
|
| 798 |
+
<answer>intro || simp || rfl</answer>.
|
| 799 |
+
max_tokens: 512
|
| 800 |
+
parallel_friendly: true
|
| 801 |
+
max_workers: 32
|
| 802 |
+
env_config: null
|
| 803 |
+
SimpleSudoku:
|
| 804 |
+
env_type: sudoku
|
| 805 |
+
max_actions_per_traj: 20
|
| 806 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 807 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 808 |
+
|
| 809 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 810 |
+
shown as dots (.).
|
| 811 |
+
|
| 812 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 813 |
+
or <answer>2,3,5</answer>
|
| 814 |
+
|
| 815 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 816 |
+
if any occur.
|
| 817 |
+
|
| 818 |
+
'
|
| 819 |
+
max_tokens: 150
|
| 820 |
+
parallel_friendly: false
|
| 821 |
+
max_workers: 32
|
| 822 |
+
env_config:
|
| 823 |
+
grid_size: 9
|
| 824 |
+
difficulty: easy
|
| 825 |
+
render_format: with_feedback
|
| 826 |
+
show_conflicts: true
|
| 827 |
+
show_valid_numbers: true
|
| 828 |
+
max_steps: 81
|
| 829 |
+
MediumSudoku:
|
| 830 |
+
env_type: sudoku
|
| 831 |
+
max_actions_per_traj: 30
|
| 832 |
+
env_instruction: 'You are solving a Sudoku puzzle. Fill in the grid so that every
|
| 833 |
+
row, column, and 3x3 box contains the numbers 1-9 without repetition.
|
| 834 |
+
|
| 835 |
+
Initial cells are shown in [brackets] and cannot be modified. Empty cells are
|
| 836 |
+
shown as dots (.).
|
| 837 |
+
|
| 838 |
+
Place numbers one at a time using the format: <answer>place 5 at row 2 col 3</answer>
|
| 839 |
+
or <answer>2,3,5</answer>
|
| 840 |
+
|
| 841 |
+
The environment will provide feedback on valid/invalid moves and show conflicts
|
| 842 |
+
if any occur.
|
| 843 |
+
|
| 844 |
+
'
|
| 845 |
+
max_tokens: 150
|
| 846 |
+
parallel_friendly: false
|
| 847 |
+
max_workers: 32
|
| 848 |
+
env_config:
|
| 849 |
+
grid_size: 9
|
| 850 |
+
difficulty: medium
|
| 851 |
+
render_format: with_feedback
|
| 852 |
+
show_conflicts: true
|
| 853 |
+
show_valid_numbers: true
|
| 854 |
+
max_steps: 81
|
| 855 |
+
SearchQA:
|
| 856 |
+
env_type: search
|
| 857 |
+
max_actions_per_traj: 10
|
| 858 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 859 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 860 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 861 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 862 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 863 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 864 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 865 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 866 |
+
\ Platt]</answer>\n"
|
| 867 |
+
max_tokens: 300
|
| 868 |
+
parallel_friendly: true
|
| 869 |
+
max_workers: 32
|
| 870 |
+
env_config:
|
| 871 |
+
max_steps: 10
|
| 872 |
+
max_search_results: 5
|
| 873 |
+
SearchQAMock:
|
| 874 |
+
env_type: search
|
| 875 |
+
max_actions_per_traj: 10
|
| 876 |
+
env_instruction: "You are a search agent answering questions by searching for\
|
| 877 |
+
\ information.\nUse search[your query] to find relevant documents, and finish[your\
|
| 878 |
+
\ answer] to submit your final answer.\n\nYou should first reason step-by-step\
|
| 879 |
+
\ about the current situation. This reasoning process MUST be enclosed within\
|
| 880 |
+
\ <think> </think> tags.\nThen provide your action within <answer>...</answer>\
|
| 881 |
+
\ tags.\n\nExamples:\n <think>I need to find information about Ben Platt's\
|
| 882 |
+
\ father.</think><answer>search[Ben Platt father parent]</answer>\n <think>Based\
|
| 883 |
+
\ on the search results, Ben Platt's father is Henry Platt.</think><answer>finish[Henry\
|
| 884 |
+
\ Platt]</answer>\n"
|
| 885 |
+
max_tokens: 300
|
| 886 |
+
parallel_friendly: true
|
| 887 |
+
max_workers: 32
|
| 888 |
+
env_config:
|
| 889 |
+
max_steps: 10
|
| 890 |
+
max_search_results: 5
|
| 891 |
+
mock_mode: true
|
| 892 |
+
game_2048:
|
| 893 |
+
env_type: game_2048
|
| 894 |
+
max_actions_per_traj: 700
|
| 895 |
+
env_instruction: 'You are playing the 2048 game on a 4x4 grid. Merge equal tiles
|
| 896 |
+
by sliding Up, Right, Down, or Left.
|
| 897 |
+
|
| 898 |
+
If a move is invalid (no tiles move), a small penalty is applied. Respond with
|
| 899 |
+
a single action.
|
| 900 |
+
|
| 901 |
+
Example: <answer>Up</answer>
|
| 902 |
+
|
| 903 |
+
'
|
| 904 |
+
max_tokens: 8192
|
| 905 |
+
env_config: null
|
| 906 |
+
rubikscube:
|
| 907 |
+
env_type: rubikscube
|
| 908 |
+
max_actions_per_traj: 20
|
| 909 |
+
env_instruction: 'You are solving a 2x2 Rubik''s Cube (Pocket Cube). The goal
|
| 910 |
+
is to restore the cube so that each of the faces consists of a single, unique
|
| 911 |
+
color.
|
| 912 |
+
|
| 913 |
+
Available actions use standard Singmaster notation for face rotations: U, U'',
|
| 914 |
+
D, D'', L, L'', R, R'', F, F'', B, B''.
|
| 915 |
+
|
| 916 |
+
- Faces: U (Up), D (Down), L (Left), R (Right), F (Front), B (Back).
|
| 917 |
+
|
| 918 |
+
- Modifiers: A letter alone means 90° clockwise (e.g., ''R''). A letter with
|
| 919 |
+
prime ('') means 90° counter-clockwise (e.g., "R''").
|
| 920 |
+
|
| 921 |
+
Respond with a sequence of actions separated by "||".
|
| 922 |
+
|
| 923 |
+
Example: <answer>U</answer>
|
| 924 |
+
|
| 925 |
+
'
|
| 926 |
+
max_tokens: 96
|
| 927 |
+
env_config:
|
| 928 |
+
scramble_depth: 1
|
| 929 |
+
max_steps: 20
|
| 930 |
+
render_mode: text
|
| 931 |
+
system:
|
| 932 |
+
CUDA_VISIBLE_DEVICES: 0,1,2,3,4,5,6,7
|
| 933 |
+
seed:
|
| 934 |
+
train: 10000
|
| 935 |
+
val: 123
|
| 936 |
+
micro_batch_size_per_gpu: 1
|
| 937 |
+
log_prob_micro_batch_size_per_gpu: ${micro_batch_size_per_gpu}
|
| 938 |
+
ppo_mini_batch_size: 32
|
| 939 |
+
model_path: /mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|
| 940 |
+
enable_response_mask: true
|
| 941 |
+
grpo_advantage_length_weight: false
|
| 942 |
+
lora:
|
| 943 |
+
rank: 0
|
| 944 |
+
alpha: 64
|
| 945 |
+
target_modules: all-linear
|
| 946 |
+
agent_proxy:
|
| 947 |
+
context_window_mode: full
|
| 948 |
+
max_context_window: -1
|
| 949 |
+
batch_adjust_mode: copy
|
| 950 |
+
max_turn: 5
|
| 951 |
+
action_sep: '||'
|
| 952 |
+
max_actions_per_turn: 2
|
| 953 |
+
use_turn_scores: false
|
| 954 |
+
enable_think: true
|
| 955 |
+
reward_normalization:
|
| 956 |
+
grouping: state
|
| 957 |
+
method: identity
|
| 958 |
+
collapse_detection:
|
| 959 |
+
compute_freq: 5
|
| 960 |
+
micro_batch_size: 128
|
| 961 |
+
first_turn_enabled: true
|
| 962 |
+
multi_turn_enabled: true
|
| 963 |
+
num_samples: 64
|
| 964 |
+
es_manager:
|
| 965 |
+
format_penalty: -0.1
|
| 966 |
+
train:
|
| 967 |
+
env_groups: 8
|
| 968 |
+
group_size: 16
|
| 969 |
+
env_configs:
|
| 970 |
+
tags:
|
| 971 |
+
- SimpleSokoban
|
| 972 |
+
n_groups:
|
| 973 |
+
- 8
|
| 974 |
+
val:
|
| 975 |
+
env_groups: 512
|
| 976 |
+
group_size: 1
|
| 977 |
+
env_configs:
|
| 978 |
+
tags:
|
| 979 |
+
- SimpleSokoban
|
| 980 |
+
n_groups:
|
| 981 |
+
- 512
|
| 982 |
+
ctx_manager:
|
| 983 |
+
generation:
|
| 984 |
+
gen_config:
|
| 985 |
+
response_length: ${actor_rollout_ref.rollout.response_length}
|
| 986 |
+
temperature: ${actor_rollout_ref.rollout.temperature}
|
| 987 |
+
top_p: ${actor_rollout_ref.rollout.top_p}
|
| 988 |
+
top_k: ${actor_rollout_ref.rollout.top_k}
|
| 989 |
+
kwargs: null
|
outputs/2026-05-11/11-35-35/train.log
ADDED
|
File without changes
|
outputs/2026-05-11/11-38-43/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
hydra:
|
| 2 |
+
run:
|
| 3 |
+
dir: outputs/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 4 |
+
sweep:
|
| 5 |
+
dir: multirun/${now:%Y-%m-%d}/${now:%H-%M-%S}
|
| 6 |
+
subdir: ${hydra.job.num}
|
| 7 |
+
launcher:
|
| 8 |
+
_target_: hydra._internal.core_plugins.basic_launcher.BasicLauncher
|
| 9 |
+
sweeper:
|
| 10 |
+
_target_: hydra._internal.core_plugins.basic_sweeper.BasicSweeper
|
| 11 |
+
max_batch_size: null
|
| 12 |
+
params: null
|
| 13 |
+
help:
|
| 14 |
+
app_name: ${hydra.job.name}
|
| 15 |
+
header: '${hydra.help.app_name} is powered by Hydra.
|
| 16 |
+
|
| 17 |
+
'
|
| 18 |
+
footer: 'Powered by Hydra (https://hydra.cc)
|
| 19 |
+
|
| 20 |
+
Use --hydra-help to view Hydra specific help
|
| 21 |
+
|
| 22 |
+
'
|
| 23 |
+
template: '${hydra.help.header}
|
| 24 |
+
|
| 25 |
+
== Configuration groups ==
|
| 26 |
+
|
| 27 |
+
Compose your configuration from those groups (group=option)
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
$APP_CONFIG_GROUPS
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
== Config ==
|
| 34 |
+
|
| 35 |
+
Override anything in the config (foo.bar=value)
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
$CONFIG
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
${hydra.help.footer}
|
| 42 |
+
|
| 43 |
+
'
|
| 44 |
+
hydra_help:
|
| 45 |
+
template: 'Hydra (${hydra.runtime.version})
|
| 46 |
+
|
| 47 |
+
See https://hydra.cc for more info.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
== Flags ==
|
| 51 |
+
|
| 52 |
+
$FLAGS_HELP
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
== Configuration groups ==
|
| 56 |
+
|
| 57 |
+
Compose your configuration from those groups (For example, append hydra/job_logging=disabled
|
| 58 |
+
to command line)
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
$HYDRA_CONFIG_GROUPS
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
Use ''--cfg hydra'' to Show the Hydra config.
|
| 65 |
+
|
| 66 |
+
'
|
| 67 |
+
hydra_help: ???
|
| 68 |
+
hydra_logging:
|
| 69 |
+
version: 1
|
| 70 |
+
formatters:
|
| 71 |
+
simple:
|
| 72 |
+
format: '[%(asctime)s][HYDRA] %(message)s'
|
| 73 |
+
handlers:
|
| 74 |
+
console:
|
| 75 |
+
class: logging.StreamHandler
|
| 76 |
+
formatter: simple
|
| 77 |
+
stream: ext://sys.stdout
|
| 78 |
+
root:
|
| 79 |
+
level: INFO
|
| 80 |
+
handlers:
|
| 81 |
+
- console
|
| 82 |
+
loggers:
|
| 83 |
+
logging_example:
|
| 84 |
+
level: DEBUG
|
| 85 |
+
disable_existing_loggers: false
|
| 86 |
+
job_logging:
|
| 87 |
+
version: 1
|
| 88 |
+
formatters:
|
| 89 |
+
simple:
|
| 90 |
+
format: '[%(asctime)s][%(name)s][%(levelname)s] - %(message)s'
|
| 91 |
+
handlers:
|
| 92 |
+
console:
|
| 93 |
+
class: logging.StreamHandler
|
| 94 |
+
formatter: simple
|
| 95 |
+
stream: ext://sys.stdout
|
| 96 |
+
file:
|
| 97 |
+
class: logging.FileHandler
|
| 98 |
+
formatter: simple
|
| 99 |
+
filename: ${hydra.runtime.output_dir}/${hydra.job.name}.log
|
| 100 |
+
root:
|
| 101 |
+
level: INFO
|
| 102 |
+
handlers:
|
| 103 |
+
- console
|
| 104 |
+
- file
|
| 105 |
+
disable_existing_loggers: false
|
| 106 |
+
env: {}
|
| 107 |
+
mode: RUN
|
| 108 |
+
searchpath:
|
| 109 |
+
- pkg://verl.trainer.config
|
| 110 |
+
callbacks: {}
|
| 111 |
+
output_subdir: .hydra
|
| 112 |
+
overrides:
|
| 113 |
+
hydra:
|
| 114 |
+
- hydra.mode=RUN
|
| 115 |
+
task:
|
| 116 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 117 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 118 |
+
- trainer.total_training_steps=1000
|
| 119 |
+
- model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|
| 120 |
+
job:
|
| 121 |
+
name: train
|
| 122 |
+
chdir: null
|
| 123 |
+
override_dirname: actor_rollout_ref.rollout.rollout_filter_strategy=top_p,actor_rollout_ref.rollout.rollout_filter_value=0.9,model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft,trainer.total_training_steps=1000
|
| 124 |
+
id: ???
|
| 125 |
+
num: ???
|
| 126 |
+
config_name: _2_sokoban
|
| 127 |
+
env_set: {}
|
| 128 |
+
env_copy: []
|
| 129 |
+
config:
|
| 130 |
+
override_dirname:
|
| 131 |
+
kv_sep: '='
|
| 132 |
+
item_sep: ','
|
| 133 |
+
exclude_keys: []
|
| 134 |
+
runtime:
|
| 135 |
+
version: 1.3.2
|
| 136 |
+
version_base: '1.3'
|
| 137 |
+
cwd: /mnt/general/wanghy/RAGEN_v2
|
| 138 |
+
config_sources:
|
| 139 |
+
- path: hydra.conf
|
| 140 |
+
schema: pkg
|
| 141 |
+
provider: hydra
|
| 142 |
+
- path: /mnt/general/wanghy/RAGEN_v2/config
|
| 143 |
+
schema: file
|
| 144 |
+
provider: main
|
| 145 |
+
- path: /mnt/general/wanghy/RAGEN_v2/verl/verl/trainer/config
|
| 146 |
+
schema: file
|
| 147 |
+
provider: command-line
|
| 148 |
+
- path: verl.trainer.config
|
| 149 |
+
schema: pkg
|
| 150 |
+
provider: hydra.searchpath in main
|
| 151 |
+
- path: ''
|
| 152 |
+
schema: structured
|
| 153 |
+
provider: schema
|
| 154 |
+
output_dir: /mnt/general/wanghy/RAGEN_v2/outputs/2026-05-11/11-38-43
|
| 155 |
+
choices:
|
| 156 |
+
reward_model: dp_reward_model
|
| 157 |
+
critic: dp_critic
|
| 158 |
+
critic/../engine@critic.model.fsdp_config: fsdp
|
| 159 |
+
critic/../optim@critic.optim: fsdp
|
| 160 |
+
model@actor_rollout_ref.model: hf_model
|
| 161 |
+
rollout@actor_rollout_ref.rollout: rollout
|
| 162 |
+
ref@actor_rollout_ref.ref: dp_ref
|
| 163 |
+
ref/../engine@actor_rollout_ref.ref.fsdp_config: fsdp
|
| 164 |
+
data: legacy_data
|
| 165 |
+
actor@actor_rollout_ref.actor: dp_actor
|
| 166 |
+
actor/../engine@actor_rollout_ref.actor.fsdp_config: fsdp
|
| 167 |
+
actor/../optim@actor_rollout_ref.actor.optim: fsdp
|
| 168 |
+
hydra/env: default
|
| 169 |
+
hydra/callbacks: null
|
| 170 |
+
hydra/job_logging: default
|
| 171 |
+
hydra/hydra_logging: default
|
| 172 |
+
hydra/hydra_help: default
|
| 173 |
+
hydra/help: default
|
| 174 |
+
hydra/sweeper: basic
|
| 175 |
+
hydra/launcher: basic
|
| 176 |
+
hydra/output: default
|
| 177 |
+
verbose: false
|
outputs/2026-05-11/11-38-43/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- actor_rollout_ref.rollout.rollout_filter_strategy=top_p
|
| 2 |
+
- actor_rollout_ref.rollout.rollout_filter_value=0.9
|
| 3 |
+
- trainer.total_training_steps=1000
|
| 4 |
+
- model_path=/mnt/general/wanghy/LLaMA-Factory/saves/qwen3/full/sft/qwen2.5_3B_it_sokoban_box1_rft
|