Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- outputs/2026-06-10/17-45-11/main_ppo.log +0 -0
- outputs/2026-06-10/18-05-14/.hydra/hydra.yaml +212 -0
- outputs/2026-06-10/18-05-14/.hydra/overrides.yaml +58 -0
- outputs/2026-06-10/18-05-14/main_ppo.log +0 -0
- outputs/2026-06-10/18-11-44/.hydra/config.yaml +194 -0
- outputs/2026-06-10/18-11-44/.hydra/hydra.yaml +212 -0
- outputs/2026-06-10/18-11-44/.hydra/overrides.yaml +58 -0
- outputs/2026-06-10/18-11-44/main_ppo.log +0 -0
- outputs/2026-06-10/20-04-32/.hydra/config.yaml +194 -0
- outputs/2026-06-10/20-04-32/.hydra/hydra.yaml +212 -0
- outputs/2026-06-10/20-04-32/.hydra/overrides.yaml +58 -0
- outputs/2026-06-10/20-04-32/main_ppo.log +0 -0
- outputs/2026-06-11/17-43-38/.hydra/config.yaml +194 -0
- outputs/2026-06-11/17-43-38/.hydra/hydra.yaml +212 -0
- outputs/2026-06-11/17-43-38/.hydra/overrides.yaml +58 -0
- outputs/2026-06-11/17-43-38/main_ppo.log +0 -0
- outputs/2026-06-12/11-46-24/.hydra/config.yaml +194 -0
- outputs/2026-06-12/11-46-24/.hydra/hydra.yaml +207 -0
- outputs/2026-06-12/11-46-24/.hydra/overrides.yaml +53 -0
- outputs/2026-06-12/11-46-24/main_ppo.log +0 -0
- outputs/2026-06-12/11-58-35/.hydra/config.yaml +194 -0
- outputs/2026-06-12/11-58-35/.hydra/hydra.yaml +207 -0
- outputs/2026-06-12/11-58-35/.hydra/overrides.yaml +53 -0
- outputs/2026-06-12/11-58-35/main_ppo.log +0 -0
- outputs/2026-06-12/12-13-59/.hydra/config.yaml +194 -0
- outputs/2026-06-12/12-13-59/.hydra/hydra.yaml +208 -0
- outputs/2026-06-12/12-13-59/.hydra/overrides.yaml +54 -0
- outputs/2026-06-12/12-13-59/main_ppo.log +0 -0
- outputs/2026-06-12/12-25-46/.hydra/config.yaml +194 -0
- outputs/2026-06-12/12-25-46/.hydra/hydra.yaml +208 -0
- outputs/2026-06-12/12-25-46/.hydra/overrides.yaml +54 -0
- outputs/2026-06-12/12-25-46/main_ppo.log +0 -0
- outputs/2026-06-12/23-56-20/.hydra/config.yaml +194 -0
- outputs/2026-06-12/23-56-20/.hydra/hydra.yaml +210 -0
- outputs/2026-06-12/23-56-20/.hydra/overrides.yaml +56 -0
- outputs/2026-06-12/23-56-20/main_ppo.log +0 -0
- outputs/2026-06-15/05-35-55/.hydra/config.yaml +194 -0
- outputs/2026-06-15/05-35-55/.hydra/hydra.yaml +210 -0
- outputs/2026-06-15/05-35-55/.hydra/overrides.yaml +56 -0
- outputs/2026-06-15/05-35-55/main_ppo.log +0 -0
- outputs/2026-06-15/11-17-58/.hydra/config.yaml +194 -0
- outputs/2026-06-15/11-17-58/.hydra/overrides.yaml +56 -0
- outputs/2026-06-15/11-25-36/.hydra/hydra.yaml +210 -0
- verl/models/weight_loader_registry.py +38 -0
- verl/single_controller/base/decorator.py +410 -0
- verl/single_controller/base/megatron/worker.py +37 -0
- verl/single_controller/base/register_center/ray.py +29 -0
- verl/single_controller/base/worker.py +217 -0
- verl/single_controller/base/worker_group.py +198 -0
- verl/single_controller/ray/__init__.py +15 -0
outputs/2026-06-10/17-45-11/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-10/18-05-14/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 118 |
+
- data.train_batch_size=32
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=32
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=1
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=False
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.max_prompt_length=832
|
| 169 |
+
- data.max_response_length=512
|
| 170 |
+
- actor_rollout_ref.rollout.n=5
|
| 171 |
+
- trainer.test_freq=-1
|
| 172 |
+
- trainer.val_before_train=False
|
| 173 |
+
job:
|
| 174 |
+
name: main_ppo
|
| 175 |
+
chdir: null
|
| 176 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=32,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=1,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_prompt_length=832,data.max_response_length=1024,data.max_response_length=512,data.train_batch_size=32,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_files=./data/rats_uni_processed/test_small.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=-1,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=False,trainer.val_before_train=True,trainer.val_only=False,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 177 |
+
id: ???
|
| 178 |
+
num: ???
|
| 179 |
+
config_name: ppo_trainer
|
| 180 |
+
env_set: {}
|
| 181 |
+
env_copy: []
|
| 182 |
+
config:
|
| 183 |
+
override_dirname:
|
| 184 |
+
kv_sep: '='
|
| 185 |
+
item_sep: ','
|
| 186 |
+
exclude_keys: []
|
| 187 |
+
runtime:
|
| 188 |
+
version: 1.3.0
|
| 189 |
+
version_base: '1.3'
|
| 190 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 191 |
+
config_sources:
|
| 192 |
+
- path: hydra.conf
|
| 193 |
+
schema: pkg
|
| 194 |
+
provider: hydra
|
| 195 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 196 |
+
schema: file
|
| 197 |
+
provider: main
|
| 198 |
+
- path: ''
|
| 199 |
+
schema: structured
|
| 200 |
+
provider: schema
|
| 201 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-10/18-05-14
|
| 202 |
+
choices:
|
| 203 |
+
hydra/env: default
|
| 204 |
+
hydra/callbacks: null
|
| 205 |
+
hydra/job_logging: default
|
| 206 |
+
hydra/hydra_logging: default
|
| 207 |
+
hydra/hydra_help: default
|
| 208 |
+
hydra/help: default
|
| 209 |
+
hydra/sweeper: basic
|
| 210 |
+
hydra/launcher: basic
|
| 211 |
+
hydra/output: default
|
| 212 |
+
verbose: false
|
outputs/2026-06-10/18-05-14/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 4 |
+
- data.train_batch_size=32
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=32
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=1
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=False
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.max_prompt_length=832
|
| 55 |
+
- data.max_response_length=512
|
| 56 |
+
- actor_rollout_ref.rollout.n=5
|
| 57 |
+
- trainer.test_freq=-1
|
| 58 |
+
- trainer.val_before_train=False
|
outputs/2026-06-10/18-05-14/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-10/18-11-44/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: ./data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: ./data/rats_uni_processed/test_small.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 832
|
| 7 |
+
max_response_length: 512
|
| 8 |
+
train_batch_size: 32
|
| 9 |
+
val_batch_size: null
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 32
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: -1
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: false
|
| 186 |
+
val_before_train: false
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-10/18-11-44/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 118 |
+
- data.train_batch_size=32
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=32
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=False
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.max_prompt_length=832
|
| 169 |
+
- data.max_response_length=512
|
| 170 |
+
- actor_rollout_ref.rollout.n=5
|
| 171 |
+
- trainer.test_freq=-1
|
| 172 |
+
- trainer.val_before_train=False
|
| 173 |
+
job:
|
| 174 |
+
name: main_ppo
|
| 175 |
+
chdir: null
|
| 176 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=32,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_prompt_length=832,data.max_response_length=1024,data.max_response_length=512,data.train_batch_size=32,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_files=./data/rats_uni_processed/test_small.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=-1,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=False,trainer.val_before_train=True,trainer.val_only=False,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 177 |
+
id: ???
|
| 178 |
+
num: ???
|
| 179 |
+
config_name: ppo_trainer
|
| 180 |
+
env_set: {}
|
| 181 |
+
env_copy: []
|
| 182 |
+
config:
|
| 183 |
+
override_dirname:
|
| 184 |
+
kv_sep: '='
|
| 185 |
+
item_sep: ','
|
| 186 |
+
exclude_keys: []
|
| 187 |
+
runtime:
|
| 188 |
+
version: 1.3.0
|
| 189 |
+
version_base: '1.3'
|
| 190 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 191 |
+
config_sources:
|
| 192 |
+
- path: hydra.conf
|
| 193 |
+
schema: pkg
|
| 194 |
+
provider: hydra
|
| 195 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 196 |
+
schema: file
|
| 197 |
+
provider: main
|
| 198 |
+
- path: ''
|
| 199 |
+
schema: structured
|
| 200 |
+
provider: schema
|
| 201 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-10/18-11-44
|
| 202 |
+
choices:
|
| 203 |
+
hydra/env: default
|
| 204 |
+
hydra/callbacks: null
|
| 205 |
+
hydra/job_logging: default
|
| 206 |
+
hydra/hydra_logging: default
|
| 207 |
+
hydra/hydra_help: default
|
| 208 |
+
hydra/help: default
|
| 209 |
+
hydra/sweeper: basic
|
| 210 |
+
hydra/launcher: basic
|
| 211 |
+
hydra/output: default
|
| 212 |
+
verbose: false
|
outputs/2026-06-10/18-11-44/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 4 |
+
- data.train_batch_size=32
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=32
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=False
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.max_prompt_length=832
|
| 55 |
+
- data.max_response_length=512
|
| 56 |
+
- actor_rollout_ref.rollout.n=5
|
| 57 |
+
- trainer.test_freq=-1
|
| 58 |
+
- trainer.val_before_train=False
|
outputs/2026-06-10/18-11-44/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-10/20-04-32/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: ./data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: ./data/rats_uni_processed/test_small.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 832
|
| 7 |
+
max_response_length: 512
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: null
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: -1
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: false
|
| 186 |
+
val_before_train: false
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-10/20-04-32/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=False
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.max_prompt_length=832
|
| 169 |
+
- data.max_response_length=512
|
| 170 |
+
- actor_rollout_ref.rollout.n=5
|
| 171 |
+
- trainer.test_freq=-1
|
| 172 |
+
- trainer.val_before_train=False
|
| 173 |
+
job:
|
| 174 |
+
name: main_ppo
|
| 175 |
+
chdir: null
|
| 176 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_prompt_length=832,data.max_response_length=1024,data.max_response_length=512,data.train_batch_size=16,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_files=./data/rats_uni_processed/test_small.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=-1,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=False,trainer.val_before_train=True,trainer.val_only=False,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 177 |
+
id: ???
|
| 178 |
+
num: ???
|
| 179 |
+
config_name: ppo_trainer
|
| 180 |
+
env_set: {}
|
| 181 |
+
env_copy: []
|
| 182 |
+
config:
|
| 183 |
+
override_dirname:
|
| 184 |
+
kv_sep: '='
|
| 185 |
+
item_sep: ','
|
| 186 |
+
exclude_keys: []
|
| 187 |
+
runtime:
|
| 188 |
+
version: 1.3.0
|
| 189 |
+
version_base: '1.3'
|
| 190 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 191 |
+
config_sources:
|
| 192 |
+
- path: hydra.conf
|
| 193 |
+
schema: pkg
|
| 194 |
+
provider: hydra
|
| 195 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 196 |
+
schema: file
|
| 197 |
+
provider: main
|
| 198 |
+
- path: ''
|
| 199 |
+
schema: structured
|
| 200 |
+
provider: schema
|
| 201 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-10/20-04-32
|
| 202 |
+
choices:
|
| 203 |
+
hydra/env: default
|
| 204 |
+
hydra/callbacks: null
|
| 205 |
+
hydra/job_logging: default
|
| 206 |
+
hydra/hydra_logging: default
|
| 207 |
+
hydra/hydra_help: default
|
| 208 |
+
hydra/help: default
|
| 209 |
+
hydra/sweeper: basic
|
| 210 |
+
hydra/launcher: basic
|
| 211 |
+
hydra/output: default
|
| 212 |
+
verbose: false
|
outputs/2026-06-10/20-04-32/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=False
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.max_prompt_length=832
|
| 55 |
+
- data.max_response_length=512
|
| 56 |
+
- actor_rollout_ref.rollout.n=5
|
| 57 |
+
- trainer.test_freq=-1
|
| 58 |
+
- trainer.val_before_train=False
|
outputs/2026-06-10/20-04-32/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-11/17-43-38/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: ./data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: ./data/rats_uni_processed/test_small.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 832
|
| 7 |
+
max_response_length: 512
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: null
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: -1
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: false
|
| 186 |
+
val_before_train: false
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-11/17-43-38/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=False
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.max_prompt_length=832
|
| 169 |
+
- data.max_response_length=512
|
| 170 |
+
- actor_rollout_ref.rollout.n=5
|
| 171 |
+
- trainer.test_freq=-1
|
| 172 |
+
- trainer.val_before_train=False
|
| 173 |
+
job:
|
| 174 |
+
name: main_ppo
|
| 175 |
+
chdir: null
|
| 176 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_prompt_length=832,data.max_response_length=1024,data.max_response_length=512,data.train_batch_size=16,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_files=./data/rats_uni_processed/test_small.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=-1,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=False,trainer.val_before_train=True,trainer.val_only=False,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 177 |
+
id: ???
|
| 178 |
+
num: ???
|
| 179 |
+
config_name: ppo_trainer
|
| 180 |
+
env_set: {}
|
| 181 |
+
env_copy: []
|
| 182 |
+
config:
|
| 183 |
+
override_dirname:
|
| 184 |
+
kv_sep: '='
|
| 185 |
+
item_sep: ','
|
| 186 |
+
exclude_keys: []
|
| 187 |
+
runtime:
|
| 188 |
+
version: 1.3.0
|
| 189 |
+
version_base: '1.3'
|
| 190 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 191 |
+
config_sources:
|
| 192 |
+
- path: hydra.conf
|
| 193 |
+
schema: pkg
|
| 194 |
+
provider: hydra
|
| 195 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 196 |
+
schema: file
|
| 197 |
+
provider: main
|
| 198 |
+
- path: ''
|
| 199 |
+
schema: structured
|
| 200 |
+
provider: schema
|
| 201 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-11/17-43-38
|
| 202 |
+
choices:
|
| 203 |
+
hydra/env: default
|
| 204 |
+
hydra/callbacks: null
|
| 205 |
+
hydra/job_logging: default
|
| 206 |
+
hydra/hydra_logging: default
|
| 207 |
+
hydra/hydra_help: default
|
| 208 |
+
hydra/help: default
|
| 209 |
+
hydra/sweeper: basic
|
| 210 |
+
hydra/launcher: basic
|
| 211 |
+
hydra/output: default
|
| 212 |
+
verbose: false
|
outputs/2026-06-11/17-43-38/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=False
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.max_prompt_length=832
|
| 55 |
+
- data.max_response_length=512
|
| 56 |
+
- actor_rollout_ref.rollout.n=5
|
| 57 |
+
- trainer.test_freq=-1
|
| 58 |
+
- trainer.val_before_train=False
|
outputs/2026-06-11/17-43-38/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-12/11-46-24/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: ./data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: ./data/rats_uni_processed/test_small.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 1024
|
| 7 |
+
max_response_length: 1024
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: null
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: 10
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: true
|
| 186 |
+
val_before_train: true
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-12/11-46-24/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=True
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
job:
|
| 169 |
+
name: main_ppo
|
| 170 |
+
chdir: null
|
| 171 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_response_length=1024,data.train_batch_size=16,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_files=./data/rats_uni_processed/test_small.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=True,trainer.val_only=True,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 172 |
+
id: ???
|
| 173 |
+
num: ???
|
| 174 |
+
config_name: ppo_trainer
|
| 175 |
+
env_set: {}
|
| 176 |
+
env_copy: []
|
| 177 |
+
config:
|
| 178 |
+
override_dirname:
|
| 179 |
+
kv_sep: '='
|
| 180 |
+
item_sep: ','
|
| 181 |
+
exclude_keys: []
|
| 182 |
+
runtime:
|
| 183 |
+
version: 1.3.0
|
| 184 |
+
version_base: '1.3'
|
| 185 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 186 |
+
config_sources:
|
| 187 |
+
- path: hydra.conf
|
| 188 |
+
schema: pkg
|
| 189 |
+
provider: hydra
|
| 190 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 191 |
+
schema: file
|
| 192 |
+
provider: main
|
| 193 |
+
- path: ''
|
| 194 |
+
schema: structured
|
| 195 |
+
provider: schema
|
| 196 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-12/11-46-24
|
| 197 |
+
choices:
|
| 198 |
+
hydra/env: default
|
| 199 |
+
hydra/callbacks: null
|
| 200 |
+
hydra/job_logging: default
|
| 201 |
+
hydra/hydra_logging: default
|
| 202 |
+
hydra/hydra_help: default
|
| 203 |
+
hydra/help: default
|
| 204 |
+
hydra/sweeper: basic
|
| 205 |
+
hydra/launcher: basic
|
| 206 |
+
hydra/output: default
|
| 207 |
+
verbose: false
|
outputs/2026-06-12/11-46-24/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=True
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
outputs/2026-06-12/11-46-24/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-12/11-58-35/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: ./data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: ./data/rats_uni_processed/test_full.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 1024
|
| 7 |
+
max_response_length: 1024
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: null
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: 10
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: true
|
| 186 |
+
val_before_train: true
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-12/11-58-35/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_full.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=True
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
job:
|
| 169 |
+
name: main_ppo
|
| 170 |
+
chdir: null
|
| 171 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_response_length=1024,data.train_batch_size=16,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_files=./data/rats_uni_processed/test_full.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=True,trainer.val_only=True,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 172 |
+
id: ???
|
| 173 |
+
num: ???
|
| 174 |
+
config_name: ppo_trainer
|
| 175 |
+
env_set: {}
|
| 176 |
+
env_copy: []
|
| 177 |
+
config:
|
| 178 |
+
override_dirname:
|
| 179 |
+
kv_sep: '='
|
| 180 |
+
item_sep: ','
|
| 181 |
+
exclude_keys: []
|
| 182 |
+
runtime:
|
| 183 |
+
version: 1.3.0
|
| 184 |
+
version_base: '1.3'
|
| 185 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 186 |
+
config_sources:
|
| 187 |
+
- path: hydra.conf
|
| 188 |
+
schema: pkg
|
| 189 |
+
provider: hydra
|
| 190 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 191 |
+
schema: file
|
| 192 |
+
provider: main
|
| 193 |
+
- path: ''
|
| 194 |
+
schema: structured
|
| 195 |
+
provider: schema
|
| 196 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-12/11-58-35
|
| 197 |
+
choices:
|
| 198 |
+
hydra/env: default
|
| 199 |
+
hydra/callbacks: null
|
| 200 |
+
hydra/job_logging: default
|
| 201 |
+
hydra/hydra_logging: default
|
| 202 |
+
hydra/hydra_help: default
|
| 203 |
+
hydra/help: default
|
| 204 |
+
hydra/sweeper: basic
|
| 205 |
+
hydra/launcher: basic
|
| 206 |
+
hydra/output: default
|
| 207 |
+
verbose: false
|
outputs/2026-06-12/11-58-35/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_full.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=True
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
outputs/2026-06-12/11-58-35/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-12/12-13-59/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: ./data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: ./data/rats_uni_processed/test_small.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 1024
|
| 7 |
+
max_response_length: 1024
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: 128
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: 10
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: true
|
| 186 |
+
val_before_train: true
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-12/12-13-59/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=True
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.val_batch_size=128
|
| 169 |
+
job:
|
| 170 |
+
name: main_ppo
|
| 171 |
+
chdir: null
|
| 172 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_response_length=1024,data.train_batch_size=16,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_batch_size=128,data.val_files=./data/rats_uni_processed/test_small.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=True,trainer.val_only=True,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 173 |
+
id: ???
|
| 174 |
+
num: ???
|
| 175 |
+
config_name: ppo_trainer
|
| 176 |
+
env_set: {}
|
| 177 |
+
env_copy: []
|
| 178 |
+
config:
|
| 179 |
+
override_dirname:
|
| 180 |
+
kv_sep: '='
|
| 181 |
+
item_sep: ','
|
| 182 |
+
exclude_keys: []
|
| 183 |
+
runtime:
|
| 184 |
+
version: 1.3.0
|
| 185 |
+
version_base: '1.3'
|
| 186 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 187 |
+
config_sources:
|
| 188 |
+
- path: hydra.conf
|
| 189 |
+
schema: pkg
|
| 190 |
+
provider: hydra
|
| 191 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 192 |
+
schema: file
|
| 193 |
+
provider: main
|
| 194 |
+
- path: ''
|
| 195 |
+
schema: structured
|
| 196 |
+
provider: schema
|
| 197 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-12/12-13-59
|
| 198 |
+
choices:
|
| 199 |
+
hydra/env: default
|
| 200 |
+
hydra/callbacks: null
|
| 201 |
+
hydra/job_logging: default
|
| 202 |
+
hydra/hydra_logging: default
|
| 203 |
+
hydra/hydra_help: default
|
| 204 |
+
hydra/help: default
|
| 205 |
+
hydra/sweeper: basic
|
| 206 |
+
hydra/launcher: basic
|
| 207 |
+
hydra/output: default
|
| 208 |
+
verbose: false
|
outputs/2026-06-12/12-13-59/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_small.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=True
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.val_batch_size=128
|
outputs/2026-06-12/12-13-59/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-12/12-25-46/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: ./data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: ./data/rats_uni_processed/test_full.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 1024
|
| 7 |
+
max_response_length: 1024
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: 512
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: 10
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: true
|
| 186 |
+
val_before_train: true
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-12/12-25-46/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=./data/rats_uni_processed/test_full.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=True
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.val_batch_size=512
|
| 169 |
+
job:
|
| 170 |
+
name: main_ppo
|
| 171 |
+
chdir: null
|
| 172 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_response_length=1024,data.train_batch_size=16,data.train_files=./data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_batch_size=512,data.val_files=./data/rats_uni_processed/test_full.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=True,trainer.val_only=True,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 173 |
+
id: ???
|
| 174 |
+
num: ???
|
| 175 |
+
config_name: ppo_trainer
|
| 176 |
+
env_set: {}
|
| 177 |
+
env_copy: []
|
| 178 |
+
config:
|
| 179 |
+
override_dirname:
|
| 180 |
+
kv_sep: '='
|
| 181 |
+
item_sep: ','
|
| 182 |
+
exclude_keys: []
|
| 183 |
+
runtime:
|
| 184 |
+
version: 1.3.0
|
| 185 |
+
version_base: '1.3'
|
| 186 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 187 |
+
config_sources:
|
| 188 |
+
- path: hydra.conf
|
| 189 |
+
schema: pkg
|
| 190 |
+
provider: hydra
|
| 191 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 192 |
+
schema: file
|
| 193 |
+
provider: main
|
| 194 |
+
- path: ''
|
| 195 |
+
schema: structured
|
| 196 |
+
provider: schema
|
| 197 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-12/12-25-46
|
| 198 |
+
choices:
|
| 199 |
+
hydra/env: default
|
| 200 |
+
hydra/callbacks: null
|
| 201 |
+
hydra/job_logging: default
|
| 202 |
+
hydra/hydra_logging: default
|
| 203 |
+
hydra/hydra_help: default
|
| 204 |
+
hydra/help: default
|
| 205 |
+
hydra/sweeper: basic
|
| 206 |
+
hydra/launcher: basic
|
| 207 |
+
hydra/output: default
|
| 208 |
+
verbose: false
|
outputs/2026-06-12/12-25-46/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=./data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=./data/rats_uni_processed/test_full.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=True
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.val_batch_size=512
|
outputs/2026-06-12/12-25-46/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-12/23-56-20/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: /mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet
|
| 4 |
+
val_files: /mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 1024
|
| 7 |
+
max_response_length: 1024
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: 64
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_full_20260612_184427_exp3
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: -1
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: /mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3
|
| 185 |
+
val_only: false
|
| 186 |
+
val_before_train: false
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-12/23-56-20/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet
|
| 117 |
+
- data.val_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_full_20260612_184427_exp3
|
| 155 |
+
- trainer.default_local_dir=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=False
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.val_batch_size=64
|
| 169 |
+
- trainer.test_freq=-1
|
| 170 |
+
- trainer.val_before_train=False
|
| 171 |
+
job:
|
| 172 |
+
name: main_ppo
|
| 173 |
+
chdir: null
|
| 174 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_response_length=1024,data.train_batch_size=16,data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet,data.truncation=error,data.val_batch_size=64,data.val_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet,trainer.critic_warmup=0,trainer.default_local_dir=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3,trainer.experiment_name=anomseer_rats_uni_full_20260612_184427_exp3,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=-1,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=False,trainer.val_before_train=True,trainer.val_only=False,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 175 |
+
id: ???
|
| 176 |
+
num: ???
|
| 177 |
+
config_name: ppo_trainer
|
| 178 |
+
env_set: {}
|
| 179 |
+
env_copy: []
|
| 180 |
+
config:
|
| 181 |
+
override_dirname:
|
| 182 |
+
kv_sep: '='
|
| 183 |
+
item_sep: ','
|
| 184 |
+
exclude_keys: []
|
| 185 |
+
runtime:
|
| 186 |
+
version: 1.3.0
|
| 187 |
+
version_base: '1.3'
|
| 188 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 189 |
+
config_sources:
|
| 190 |
+
- path: hydra.conf
|
| 191 |
+
schema: pkg
|
| 192 |
+
provider: hydra
|
| 193 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 194 |
+
schema: file
|
| 195 |
+
provider: main
|
| 196 |
+
- path: ''
|
| 197 |
+
schema: structured
|
| 198 |
+
provider: schema
|
| 199 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-12/23-56-20
|
| 200 |
+
choices:
|
| 201 |
+
hydra/env: default
|
| 202 |
+
hydra/callbacks: null
|
| 203 |
+
hydra/job_logging: default
|
| 204 |
+
hydra/hydra_logging: default
|
| 205 |
+
hydra/hydra_help: default
|
| 206 |
+
hydra/help: default
|
| 207 |
+
hydra/sweeper: basic
|
| 208 |
+
hydra/launcher: basic
|
| 209 |
+
hydra/output: default
|
| 210 |
+
verbose: false
|
outputs/2026-06-12/23-56-20/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet
|
| 3 |
+
- data.val_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/models/Qwen2.5-VL-3B-Instruct
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_full_20260612_184427_exp3
|
| 41 |
+
- trainer.default_local_dir=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=False
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.val_batch_size=64
|
| 55 |
+
- trainer.test_freq=-1
|
| 56 |
+
- trainer.val_before_train=False
|
outputs/2026-06-12/23-56-20/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-15/05-35-55/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: /mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet
|
| 4 |
+
val_files: /mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 1024
|
| 7 |
+
max_response_length: 1024
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: 64
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 16
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_full_20260612_184427_exp3_full_eval
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: auto
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: -1
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: /mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3
|
| 185 |
+
val_only: true
|
| 186 |
+
val_before_train: true
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-15/05-35-55/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet
|
| 117 |
+
- data.val_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_full_20260612_184427_exp3_full_eval
|
| 155 |
+
- trainer.default_local_dir=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=True
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.total_epochs=1
|
| 163 |
+
- ts.use_sem_orth=True
|
| 164 |
+
- ts.adv_mix=0.3
|
| 165 |
+
- ts.similarity_method=ot
|
| 166 |
+
- ts.ot_eps=0.08
|
| 167 |
+
- ts.ot_n_iter=50
|
| 168 |
+
- data.val_batch_size=64
|
| 169 |
+
- trainer.test_freq=-1
|
| 170 |
+
- trainer.val_before_train=True
|
| 171 |
+
job:
|
| 172 |
+
name: main_ppo
|
| 173 |
+
chdir: null
|
| 174 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=16,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_response_length=1024,data.train_batch_size=16,data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet,data.truncation=error,data.val_batch_size=64,data.val_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet,trainer.critic_warmup=0,trainer.default_local_dir=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3,trainer.experiment_name=anomseer_rats_uni_full_20260612_184427_exp3_full_eval,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.save_freq=500,trainer.test_freq=-1,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=True,trainer.val_before_train=True,trainer.val_only=True,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 175 |
+
id: ???
|
| 176 |
+
num: ???
|
| 177 |
+
config_name: ppo_trainer
|
| 178 |
+
env_set: {}
|
| 179 |
+
env_copy: []
|
| 180 |
+
config:
|
| 181 |
+
override_dirname:
|
| 182 |
+
kv_sep: '='
|
| 183 |
+
item_sep: ','
|
| 184 |
+
exclude_keys: []
|
| 185 |
+
runtime:
|
| 186 |
+
version: 1.3.0
|
| 187 |
+
version_base: '1.3'
|
| 188 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 189 |
+
config_sources:
|
| 190 |
+
- path: hydra.conf
|
| 191 |
+
schema: pkg
|
| 192 |
+
provider: hydra
|
| 193 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 194 |
+
schema: file
|
| 195 |
+
provider: main
|
| 196 |
+
- path: ''
|
| 197 |
+
schema: structured
|
| 198 |
+
provider: schema
|
| 199 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-15/05-35-55
|
| 200 |
+
choices:
|
| 201 |
+
hydra/env: default
|
| 202 |
+
hydra/callbacks: null
|
| 203 |
+
hydra/job_logging: default
|
| 204 |
+
hydra/hydra_logging: default
|
| 205 |
+
hydra/hydra_help: default
|
| 206 |
+
hydra/help: default
|
| 207 |
+
hydra/sweeper: basic
|
| 208 |
+
hydra/launcher: basic
|
| 209 |
+
hydra/output: default
|
| 210 |
+
verbose: false
|
outputs/2026-06-15/05-35-55/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_full.parquet
|
| 3 |
+
- data.val_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/test_full.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=16
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_full_20260612_184427_exp3_full_eval
|
| 41 |
+
- trainer.default_local_dir=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=True
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.total_epochs=1
|
| 49 |
+
- ts.use_sem_orth=True
|
| 50 |
+
- ts.adv_mix=0.3
|
| 51 |
+
- ts.similarity_method=ot
|
| 52 |
+
- ts.ot_eps=0.08
|
| 53 |
+
- ts.ot_n_iter=50
|
| 54 |
+
- data.val_batch_size=64
|
| 55 |
+
- trainer.test_freq=-1
|
| 56 |
+
- trainer.val_before_train=True
|
outputs/2026-06-15/05-35-55/main_ppo.log
ADDED
|
File without changes
|
outputs/2026-06-15/11-17-58/.hydra/config.yaml
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
data:
|
| 2 |
+
tokenizer: null
|
| 3 |
+
train_files: /mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_quarter.parquet
|
| 4 |
+
val_files: /tmp/anomseer_eval_smoke.parquet
|
| 5 |
+
prompt_key: prompt
|
| 6 |
+
max_prompt_length: 1024
|
| 7 |
+
max_response_length: 1024
|
| 8 |
+
train_batch_size: 16
|
| 9 |
+
val_batch_size: 1
|
| 10 |
+
return_raw_input_ids: false
|
| 11 |
+
return_raw_chat: false
|
| 12 |
+
shuffle: true
|
| 13 |
+
filter_overlong_prompts: true
|
| 14 |
+
truncation: error
|
| 15 |
+
image_key: images
|
| 16 |
+
actor_rollout_ref:
|
| 17 |
+
hybrid_engine: true
|
| 18 |
+
model:
|
| 19 |
+
path: /mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface
|
| 20 |
+
external_lib: null
|
| 21 |
+
override_config: {}
|
| 22 |
+
enable_gradient_checkpointing: true
|
| 23 |
+
use_remove_padding: false
|
| 24 |
+
lora_rank: 0
|
| 25 |
+
lora_alpha: 16
|
| 26 |
+
lora_dropout: 0.0
|
| 27 |
+
lora_target_modules: q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj
|
| 28 |
+
actor:
|
| 29 |
+
strategy: fsdp
|
| 30 |
+
ppo_mini_batch_size: 16
|
| 31 |
+
ppo_micro_batch_size: null
|
| 32 |
+
ppo_micro_batch_size_per_gpu: 2
|
| 33 |
+
use_dynamic_bsz: false
|
| 34 |
+
ppo_max_token_len_per_gpu: 16384
|
| 35 |
+
grad_clip: 1.0
|
| 36 |
+
clip_ratio: 0.2
|
| 37 |
+
entropy_coeff: 0.001
|
| 38 |
+
use_kl_loss: true
|
| 39 |
+
use_torch_compile: true
|
| 40 |
+
kl_loss_coef: 0.001
|
| 41 |
+
kl_loss_type: low_var_kl
|
| 42 |
+
ppo_epochs: 1
|
| 43 |
+
shuffle: false
|
| 44 |
+
ulysses_sequence_parallel_size: 1
|
| 45 |
+
optim:
|
| 46 |
+
lr: 0.0001
|
| 47 |
+
lr_warmup_steps: -1
|
| 48 |
+
lr_warmup_steps_ratio: 0.0
|
| 49 |
+
min_lr_ratio: null
|
| 50 |
+
warmup_style: constant
|
| 51 |
+
total_training_steps: -1
|
| 52 |
+
fsdp_config:
|
| 53 |
+
wrap_policy:
|
| 54 |
+
min_num_params: 0
|
| 55 |
+
param_offload: false
|
| 56 |
+
optimizer_offload: false
|
| 57 |
+
fsdp_size: -1
|
| 58 |
+
ref:
|
| 59 |
+
fsdp_config:
|
| 60 |
+
param_offload: true
|
| 61 |
+
wrap_policy:
|
| 62 |
+
min_num_params: 0
|
| 63 |
+
log_prob_micro_batch_size: null
|
| 64 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 65 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 66 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 67 |
+
ulysses_sequence_parallel_size: ${actor_rollout_ref.actor.ulysses_sequence_parallel_size}
|
| 68 |
+
rollout:
|
| 69 |
+
name: vllm
|
| 70 |
+
temperature: 1.0
|
| 71 |
+
top_k: -1
|
| 72 |
+
top_p: 1
|
| 73 |
+
use_fire_sampling: false
|
| 74 |
+
prompt_length: ${data.max_prompt_length}
|
| 75 |
+
response_length: ${data.max_response_length}
|
| 76 |
+
dtype: bfloat16
|
| 77 |
+
gpu_memory_utilization: 0.4
|
| 78 |
+
ignore_eos: false
|
| 79 |
+
enforce_eager: false
|
| 80 |
+
free_cache_engine: false
|
| 81 |
+
load_format: dummy_dtensor
|
| 82 |
+
tensor_model_parallel_size: 2
|
| 83 |
+
max_num_batched_tokens: 8192
|
| 84 |
+
max_model_len: null
|
| 85 |
+
max_num_seqs: 1024
|
| 86 |
+
log_prob_micro_batch_size: null
|
| 87 |
+
log_prob_micro_batch_size_per_gpu: 8
|
| 88 |
+
log_prob_use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 89 |
+
log_prob_max_token_len_per_gpu: ${actor_rollout_ref.actor.ppo_max_token_len_per_gpu}
|
| 90 |
+
disable_log_stats: true
|
| 91 |
+
enable_chunked_prefill: false
|
| 92 |
+
do_sample: true
|
| 93 |
+
'n': 5
|
| 94 |
+
val_kwargs:
|
| 95 |
+
top_k: -1
|
| 96 |
+
top_p: 1.0
|
| 97 |
+
temperature: 0.4
|
| 98 |
+
'n': 1
|
| 99 |
+
do_sample: false
|
| 100 |
+
critic:
|
| 101 |
+
strategy: fsdp
|
| 102 |
+
optim:
|
| 103 |
+
lr: 1.0e-05
|
| 104 |
+
lr_warmup_steps_ratio: 0.0
|
| 105 |
+
min_lr_ratio: null
|
| 106 |
+
warmup_style: constant
|
| 107 |
+
total_training_steps: -1
|
| 108 |
+
model:
|
| 109 |
+
path: ~/models/deepseek-llm-7b-chat
|
| 110 |
+
tokenizer_path: ${actor_rollout_ref.model.path}
|
| 111 |
+
override_config: {}
|
| 112 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 113 |
+
enable_gradient_checkpointing: true
|
| 114 |
+
use_remove_padding: false
|
| 115 |
+
fsdp_config:
|
| 116 |
+
param_offload: false
|
| 117 |
+
optimizer_offload: false
|
| 118 |
+
wrap_policy:
|
| 119 |
+
min_num_params: 0
|
| 120 |
+
fsdp_size: -1
|
| 121 |
+
ppo_mini_batch_size: ${actor_rollout_ref.actor.ppo_mini_batch_size}
|
| 122 |
+
ppo_micro_batch_size: null
|
| 123 |
+
ppo_micro_batch_size_per_gpu: null
|
| 124 |
+
forward_micro_batch_size: ${critic.ppo_micro_batch_size}
|
| 125 |
+
forward_micro_batch_size_per_gpu: ${critic.ppo_micro_batch_size_per_gpu}
|
| 126 |
+
use_dynamic_bsz: ${actor_rollout_ref.actor.use_dynamic_bsz}
|
| 127 |
+
ppo_max_token_len_per_gpu: 32768
|
| 128 |
+
forward_max_token_len_per_gpu: ${critic.ppo_max_token_len_per_gpu}
|
| 129 |
+
ulysses_sequence_parallel_size: 1
|
| 130 |
+
ppo_epochs: ${actor_rollout_ref.actor.ppo_epochs}
|
| 131 |
+
shuffle: ${actor_rollout_ref.actor.shuffle}
|
| 132 |
+
grad_clip: 1.0
|
| 133 |
+
cliprange_value: 0.5
|
| 134 |
+
reward_model:
|
| 135 |
+
enable: false
|
| 136 |
+
strategy: fsdp
|
| 137 |
+
model:
|
| 138 |
+
input_tokenizer: ${actor_rollout_ref.model.path}
|
| 139 |
+
path: ~/models/FsfairX-LLaMA3-RM-v0.1
|
| 140 |
+
external_lib: ${actor_rollout_ref.model.external_lib}
|
| 141 |
+
use_remove_padding: false
|
| 142 |
+
fsdp_config:
|
| 143 |
+
wrap_policy:
|
| 144 |
+
min_num_params: 0
|
| 145 |
+
param_offload: false
|
| 146 |
+
fsdp_size: -1
|
| 147 |
+
micro_batch_size: null
|
| 148 |
+
micro_batch_size_per_gpu: null
|
| 149 |
+
max_length: null
|
| 150 |
+
ulysses_sequence_parallel_size: 1
|
| 151 |
+
use_dynamic_bsz: ${critic.use_dynamic_bsz}
|
| 152 |
+
forward_max_token_len_per_gpu: ${critic.forward_max_token_len_per_gpu}
|
| 153 |
+
reward_manager: naive
|
| 154 |
+
custom_reward_function:
|
| 155 |
+
path: null
|
| 156 |
+
name: compute_score
|
| 157 |
+
algorithm:
|
| 158 |
+
gamma: 1.0
|
| 159 |
+
lam: 1.0
|
| 160 |
+
adv_estimator: grpo
|
| 161 |
+
kl_penalty: kl
|
| 162 |
+
kl_ctrl:
|
| 163 |
+
type: fixed
|
| 164 |
+
kl_coef: 0.001
|
| 165 |
+
trainer:
|
| 166 |
+
balance_batch: true
|
| 167 |
+
total_epochs: 1
|
| 168 |
+
total_training_steps: null
|
| 169 |
+
project_name: anomseer
|
| 170 |
+
experiment_name: anomseer_rats_uni_2gpu
|
| 171 |
+
logger:
|
| 172 |
+
- console
|
| 173 |
+
val_generations_to_log_to_wandb: 0
|
| 174 |
+
nnodes: 1
|
| 175 |
+
n_gpus_per_node: 2
|
| 176 |
+
save_freq: 500
|
| 177 |
+
resume_mode: disable
|
| 178 |
+
resume_from_path: false
|
| 179 |
+
test_freq: -1
|
| 180 |
+
critic_warmup: 0
|
| 181 |
+
default_hdfs_dir: null
|
| 182 |
+
remove_previous_ckpt_in_save: false
|
| 183 |
+
del_local_ckpt_after_load: false
|
| 184 |
+
default_local_dir: checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 185 |
+
val_only: true
|
| 186 |
+
val_before_train: true
|
| 187 |
+
ts:
|
| 188 |
+
adv_mix: 0.3
|
| 189 |
+
use_sem_orth: true
|
| 190 |
+
similarity_method: ot
|
| 191 |
+
clip_temperature: 1.0
|
| 192 |
+
clip_pooling: mean
|
| 193 |
+
ot_eps: 0.08
|
| 194 |
+
ot_n_iter: 50
|
outputs/2026-06-15/11-17-58/.hydra/overrides.yaml
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
- algorithm.adv_estimator=grpo
|
| 2 |
+
- data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_quarter.parquet
|
| 3 |
+
- data.val_files=/tmp/anomseer_eval_smoke.parquet
|
| 4 |
+
- data.train_batch_size=16
|
| 5 |
+
- data.max_prompt_length=1024
|
| 6 |
+
- data.max_response_length=1024
|
| 7 |
+
- data.filter_overlong_prompts=True
|
| 8 |
+
- data.truncation=error
|
| 9 |
+
- data.image_key=images
|
| 10 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface
|
| 11 |
+
- actor_rollout_ref.model.lora_rank=0
|
| 12 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 13 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 14 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 15 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 16 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 17 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 18 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 19 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 20 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 21 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 22 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 23 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 24 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 25 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 26 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 27 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 28 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 29 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 30 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 31 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 32 |
+
- actor_rollout_ref.rollout.n=5
|
| 33 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 34 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 35 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 36 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 37 |
+
- trainer.critic_warmup=0
|
| 38 |
+
- trainer.logger=['console']
|
| 39 |
+
- trainer.project_name=anomseer
|
| 40 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 41 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 42 |
+
- trainer.n_gpus_per_node=2
|
| 43 |
+
- trainer.nnodes=1
|
| 44 |
+
- trainer.save_freq=500
|
| 45 |
+
- trainer.test_freq=10
|
| 46 |
+
- trainer.val_only=True
|
| 47 |
+
- trainer.val_before_train=True
|
| 48 |
+
- trainer.resume_mode=disable
|
| 49 |
+
- trainer.total_epochs=1
|
| 50 |
+
- ts.use_sem_orth=True
|
| 51 |
+
- ts.adv_mix=0.3
|
| 52 |
+
- ts.similarity_method=ot
|
| 53 |
+
- ts.ot_eps=0.08
|
| 54 |
+
- ts.ot_n_iter=50
|
| 55 |
+
- data.val_batch_size=1
|
| 56 |
+
- trainer.test_freq=-1
|
outputs/2026-06-15/11-25-36/.hydra/hydra.yaml
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
callbacks: {}
|
| 110 |
+
output_subdir: .hydra
|
| 111 |
+
overrides:
|
| 112 |
+
hydra:
|
| 113 |
+
- hydra.mode=RUN
|
| 114 |
+
task:
|
| 115 |
+
- algorithm.adv_estimator=grpo
|
| 116 |
+
- data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_quarter.parquet
|
| 117 |
+
- data.val_files=/tmp/anomseer_eval_smoke.parquet
|
| 118 |
+
- data.train_batch_size=16
|
| 119 |
+
- data.max_prompt_length=1024
|
| 120 |
+
- data.max_response_length=1024
|
| 121 |
+
- data.filter_overlong_prompts=True
|
| 122 |
+
- data.truncation=error
|
| 123 |
+
- data.image_key=images
|
| 124 |
+
- actor_rollout_ref.model.path=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface
|
| 125 |
+
- actor_rollout_ref.model.lora_rank=0
|
| 126 |
+
- actor_rollout_ref.model.lora_alpha=16
|
| 127 |
+
- actor_rollout_ref.model.lora_dropout=0.0
|
| 128 |
+
- actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj'
|
| 129 |
+
- actor_rollout_ref.actor.optim.lr=1e-4
|
| 130 |
+
- actor_rollout_ref.model.use_remove_padding=False
|
| 131 |
+
- actor_rollout_ref.actor.ppo_mini_batch_size=16
|
| 132 |
+
- actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2
|
| 133 |
+
- actor_rollout_ref.actor.use_kl_loss=True
|
| 134 |
+
- actor_rollout_ref.actor.kl_loss_coef=0.001
|
| 135 |
+
- actor_rollout_ref.actor.kl_loss_type=low_var_kl
|
| 136 |
+
- actor_rollout_ref.model.enable_gradient_checkpointing=True
|
| 137 |
+
- actor_rollout_ref.actor.fsdp_config.param_offload=False
|
| 138 |
+
- actor_rollout_ref.actor.fsdp_config.optimizer_offload=False
|
| 139 |
+
- actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8
|
| 140 |
+
- actor_rollout_ref.rollout.tensor_model_parallel_size=2
|
| 141 |
+
- actor_rollout_ref.rollout.name=vllm
|
| 142 |
+
- actor_rollout_ref.rollout.gpu_memory_utilization=0.4
|
| 143 |
+
- actor_rollout_ref.rollout.enable_chunked_prefill=False
|
| 144 |
+
- actor_rollout_ref.rollout.enforce_eager=False
|
| 145 |
+
- actor_rollout_ref.rollout.free_cache_engine=False
|
| 146 |
+
- actor_rollout_ref.rollout.n=5
|
| 147 |
+
- actor_rollout_ref.rollout.val_kwargs.do_sample=False
|
| 148 |
+
- actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8
|
| 149 |
+
- actor_rollout_ref.ref.fsdp_config.param_offload=True
|
| 150 |
+
- algorithm.kl_ctrl.kl_coef=0.001
|
| 151 |
+
- trainer.critic_warmup=0
|
| 152 |
+
- trainer.logger=['console']
|
| 153 |
+
- trainer.project_name=anomseer
|
| 154 |
+
- trainer.experiment_name=anomseer_rats_uni_2gpu
|
| 155 |
+
- trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu
|
| 156 |
+
- trainer.n_gpus_per_node=2
|
| 157 |
+
- trainer.nnodes=1
|
| 158 |
+
- trainer.save_freq=500
|
| 159 |
+
- trainer.test_freq=10
|
| 160 |
+
- trainer.val_only=True
|
| 161 |
+
- trainer.val_before_train=True
|
| 162 |
+
- trainer.resume_mode=disable
|
| 163 |
+
- trainer.total_epochs=1
|
| 164 |
+
- ts.use_sem_orth=True
|
| 165 |
+
- ts.adv_mix=0.3
|
| 166 |
+
- ts.similarity_method=ot
|
| 167 |
+
- ts.ot_eps=0.08
|
| 168 |
+
- ts.ot_n_iter=50
|
| 169 |
+
- data.val_batch_size=1
|
| 170 |
+
- trainer.test_freq=-1
|
| 171 |
+
job:
|
| 172 |
+
name: main_ppo
|
| 173 |
+
chdir: null
|
| 174 |
+
override_dirname: actor_rollout_ref.actor.fsdp_config.optimizer_offload=False,actor_rollout_ref.actor.fsdp_config.param_offload=False,actor_rollout_ref.actor.kl_loss_coef=0.001,actor_rollout_ref.actor.kl_loss_type=low_var_kl,actor_rollout_ref.actor.optim.lr=1e-4,actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=2,actor_rollout_ref.actor.ppo_mini_batch_size=16,actor_rollout_ref.actor.use_kl_loss=True,actor_rollout_ref.model.enable_gradient_checkpointing=True,actor_rollout_ref.model.lora_alpha=16,actor_rollout_ref.model.lora_dropout=0.0,actor_rollout_ref.model.lora_rank=0,actor_rollout_ref.model.lora_target_modules='q_proj,k_proj,v_proj,o_proj,gate_proj,up_proj,down_proj',actor_rollout_ref.model.path=/mnt/share01/sqk/AnomSeer/checkpoints/anomseer/anomseer_rats_uni_full_20260612_184427_exp3/global_step_1891/actor/huggingface,actor_rollout_ref.model.use_remove_padding=False,actor_rollout_ref.ref.fsdp_config.param_offload=True,actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.enable_chunked_prefill=False,actor_rollout_ref.rollout.enforce_eager=False,actor_rollout_ref.rollout.free_cache_engine=False,actor_rollout_ref.rollout.gpu_memory_utilization=0.4,actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=8,actor_rollout_ref.rollout.n=5,actor_rollout_ref.rollout.name=vllm,actor_rollout_ref.rollout.tensor_model_parallel_size=2,actor_rollout_ref.rollout.val_kwargs.do_sample=False,algorithm.adv_estimator=grpo,algorithm.kl_ctrl.kl_coef=0.001,data.filter_overlong_prompts=True,data.image_key=images,data.max_prompt_length=1024,data.max_response_length=1024,data.train_batch_size=16,data.train_files=/mnt/share01/sqk/AnomSeer/data/rats_uni_processed/train_quarter.parquet,data.truncation=error,data.val_batch_size=1,data.val_files=/tmp/anomseer_eval_smoke.parquet,trainer.critic_warmup=0,trainer.default_local_dir=checkpoints/anomseer/anomseer_rats_uni_2gpu,trainer.experiment_name=anomseer_rats_uni_2gpu,trainer.logger=['console'],trainer.n_gpus_per_node=2,trainer.nnodes=1,trainer.project_name=anomseer,trainer.resume_mode=disable,trainer.save_freq=500,trainer.test_freq=-1,trainer.test_freq=10,trainer.total_epochs=1,trainer.val_before_train=True,trainer.val_only=True,ts.adv_mix=0.3,ts.ot_eps=0.08,ts.ot_n_iter=50,ts.similarity_method=ot,ts.use_sem_orth=True
|
| 175 |
+
id: ???
|
| 176 |
+
num: ???
|
| 177 |
+
config_name: ppo_trainer
|
| 178 |
+
env_set: {}
|
| 179 |
+
env_copy: []
|
| 180 |
+
config:
|
| 181 |
+
override_dirname:
|
| 182 |
+
kv_sep: '='
|
| 183 |
+
item_sep: ','
|
| 184 |
+
exclude_keys: []
|
| 185 |
+
runtime:
|
| 186 |
+
version: 1.3.0
|
| 187 |
+
version_base: '1.3'
|
| 188 |
+
cwd: /mnt/share01/sqk/AnomSeer
|
| 189 |
+
config_sources:
|
| 190 |
+
- path: hydra.conf
|
| 191 |
+
schema: pkg
|
| 192 |
+
provider: hydra
|
| 193 |
+
- path: /mnt/share01/sqk/AnomSeer/verl/trainer/config
|
| 194 |
+
schema: file
|
| 195 |
+
provider: main
|
| 196 |
+
- path: ''
|
| 197 |
+
schema: structured
|
| 198 |
+
provider: schema
|
| 199 |
+
output_dir: /mnt/share01/sqk/AnomSeer/outputs/2026-06-15/11-25-36
|
| 200 |
+
choices:
|
| 201 |
+
hydra/env: default
|
| 202 |
+
hydra/callbacks: null
|
| 203 |
+
hydra/job_logging: default
|
| 204 |
+
hydra/hydra_logging: default
|
| 205 |
+
hydra/hydra_help: default
|
| 206 |
+
hydra/help: default
|
| 207 |
+
hydra/sweeper: basic
|
| 208 |
+
hydra/launcher: basic
|
| 209 |
+
hydra/output: default
|
| 210 |
+
verbose: false
|
verl/models/weight_loader_registry.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 Bytedance Ltd. and/or its affiliates
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
def get_weight_loader(arch: str):
|
| 17 |
+
from verl.models.llama.megatron.checkpoint_utils.llama_loader import load_state_dict_to_megatron_llama
|
| 18 |
+
from verl.models.qwen2.megatron.checkpoint_utils.qwen2_loader import load_state_dict_to_megatron_qwen2
|
| 19 |
+
_MODEL_WEIGHT_MEGATRON_LOADER_REGISTRY = {
|
| 20 |
+
'LlamaForCausalLM': load_state_dict_to_megatron_llama,
|
| 21 |
+
'Qwen2ForCausalLM': load_state_dict_to_megatron_qwen2,
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
if arch in _MODEL_WEIGHT_MEGATRON_LOADER_REGISTRY:
|
| 25 |
+
return _MODEL_WEIGHT_MEGATRON_LOADER_REGISTRY[arch]
|
| 26 |
+
raise ValueError(f"Model architectures {arch} loader are not supported for now. "
|
| 27 |
+
f"Supported architectures: {_MODEL_WEIGHT_MEGATRON_LOADER_REGISTRY.keys()}")
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def get_weight_saver(arch: str):
|
| 31 |
+
from verl.models.qwen2.megatron.checkpoint_utils.qwen2_saver import merge_megatron_ckpt_llama
|
| 32 |
+
_MODEL_WEIGHT_MEGATRON_SAVER_REGISTRY = {
|
| 33 |
+
'Qwen2ForCausalLM': merge_megatron_ckpt_llama,
|
| 34 |
+
}
|
| 35 |
+
if arch in _MODEL_WEIGHT_MEGATRON_SAVER_REGISTRY:
|
| 36 |
+
return _MODEL_WEIGHT_MEGATRON_SAVER_REGISTRY[arch]
|
| 37 |
+
raise ValueError(f"Model architectures {arch} saver are not supported for now. "
|
| 38 |
+
f"Supported architectures: {_MODEL_WEIGHT_MEGATRON_SAVER_REGISTRY.keys()}")
|
verl/single_controller/base/decorator.py
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 Bytedance Ltd. and/or its affiliates
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
from enum import Enum
|
| 16 |
+
from functools import wraps
|
| 17 |
+
from typing import Dict, List, Tuple
|
| 18 |
+
from types import FunctionType
|
| 19 |
+
from verl.protocol import DataProtoFuture
|
| 20 |
+
|
| 21 |
+
# here we add a magic number of avoid user-defined function already have this attribute
|
| 22 |
+
MAGIC_ATTR = 'attrs_3141562937'
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
class Dispatch(Enum):
|
| 26 |
+
RANK_ZERO = 0
|
| 27 |
+
ONE_TO_ALL = 1
|
| 28 |
+
ALL_TO_ALL = 2
|
| 29 |
+
MEGATRON_COMPUTE = 3
|
| 30 |
+
MEGATRON_PP_AS_DP = 4
|
| 31 |
+
MEGATRON_PP_ONLY = 5
|
| 32 |
+
MEGATRON_COMPUTE_PROTO = 6
|
| 33 |
+
MEGATRON_PP_AS_DP_PROTO = 7
|
| 34 |
+
DP_COMPUTE = 8
|
| 35 |
+
DP_COMPUTE_PROTO = 9
|
| 36 |
+
DP_COMPUTE_PROTO_WITH_FUNC = 10
|
| 37 |
+
DP_COMPUTE_METRIC = 11
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
class Execute(Enum):
|
| 41 |
+
ALL = 0
|
| 42 |
+
RANK_ZERO = 1
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def _split_args_kwargs_data_proto(chunks, *args, **kwargs):
|
| 46 |
+
from verl.protocol import DataProto, DataProtoFuture
|
| 47 |
+
splitted_args = []
|
| 48 |
+
for arg in args:
|
| 49 |
+
assert isinstance(arg, (DataProto, DataProtoFuture))
|
| 50 |
+
splitted_args.append(arg.chunk(chunks=chunks))
|
| 51 |
+
|
| 52 |
+
splitted_kwargs = {}
|
| 53 |
+
for key, val in kwargs.items():
|
| 54 |
+
assert isinstance(val, (DataProto, DataProtoFuture))
|
| 55 |
+
splitted_kwargs[key] = val.chunk(chunks=chunks)
|
| 56 |
+
|
| 57 |
+
return splitted_args, splitted_kwargs
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
def dispatch_one_to_all(worker_group, *args, **kwargs):
|
| 61 |
+
args = tuple([arg] * worker_group.world_size for arg in args)
|
| 62 |
+
kwargs = {k: [v] * worker_group.world_size for k, v in kwargs.items()}
|
| 63 |
+
return args, kwargs
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
def dispatch_all_to_all(worker_group, *args, **kwargs):
|
| 67 |
+
return args, kwargs
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def collect_all_to_all(worker_group, output):
|
| 71 |
+
return output
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
def dispatch_megatron_compute(worker_group, *args, **kwargs):
|
| 75 |
+
"""
|
| 76 |
+
User passes in dp data. The data is dispatched to all tp/pp ranks with the same dp
|
| 77 |
+
"""
|
| 78 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 79 |
+
assert isinstance(worker_group,
|
| 80 |
+
MegatronWorkerGroup), f'worker_group must be MegatronWorkerGroup, Got {type(worker_group)}'
|
| 81 |
+
|
| 82 |
+
all_args = []
|
| 83 |
+
for arg in args:
|
| 84 |
+
assert isinstance(arg, (Tuple, List)) and len(arg) == worker_group.dp_size
|
| 85 |
+
transformed_args = []
|
| 86 |
+
for i in range(worker_group.world_size):
|
| 87 |
+
local_dp_rank = worker_group.get_megatron_rank_info(rank=i).dp_rank
|
| 88 |
+
transformed_args.append(arg[local_dp_rank])
|
| 89 |
+
all_args.append(transformed_args)
|
| 90 |
+
all_args = tuple(all_args)
|
| 91 |
+
|
| 92 |
+
all_kwargs = {}
|
| 93 |
+
for k, v in kwargs.items():
|
| 94 |
+
assert isinstance(v, (Tuple, List)) and len(v) == worker_group.dp_size
|
| 95 |
+
transformed_v = []
|
| 96 |
+
for i in range(worker_group.world_size):
|
| 97 |
+
local_dp_rank = worker_group.get_megatron_rank_info(rank=i).dp_rank
|
| 98 |
+
transformed_v.append(v[local_dp_rank])
|
| 99 |
+
all_kwargs[k] = transformed_v
|
| 100 |
+
return all_args, all_kwargs
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
def collect_megatron_compute(worker_group, output):
|
| 104 |
+
"""
|
| 105 |
+
Only collect the data from the tp=0 and pp=last and every dp ranks
|
| 106 |
+
"""
|
| 107 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 108 |
+
assert isinstance(worker_group, MegatronWorkerGroup)
|
| 109 |
+
output_in_dp = []
|
| 110 |
+
pp_size = worker_group.get_megatron_global_info().pp_size
|
| 111 |
+
for global_rank in range(worker_group.world_size):
|
| 112 |
+
local_rank_info = worker_group.get_megatron_rank_info(rank=global_rank)
|
| 113 |
+
if local_rank_info.tp_rank == 0 and local_rank_info.pp_rank == pp_size - 1:
|
| 114 |
+
output_in_dp.append(output[global_rank])
|
| 115 |
+
return output_in_dp
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
def dispatch_megatron_compute_data_proto(worker_group, *args, **kwargs):
|
| 119 |
+
"""
|
| 120 |
+
All the args and kwargs must be DataProto. The batch will be chunked by dp_size and passed to each rank
|
| 121 |
+
"""
|
| 122 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 123 |
+
assert isinstance(worker_group, MegatronWorkerGroup)
|
| 124 |
+
|
| 125 |
+
splitted_args, splitted_kwargs = _split_args_kwargs_data_proto(worker_group.dp_size, *args, **kwargs)
|
| 126 |
+
return dispatch_megatron_compute(worker_group, *splitted_args, **splitted_kwargs)
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def _concat_data_proto_or_future(output: List):
|
| 130 |
+
from verl.protocol import DataProto, DataProtoFuture
|
| 131 |
+
import ray
|
| 132 |
+
|
| 133 |
+
# make sure all the elements in output has the same type
|
| 134 |
+
for o in output:
|
| 135 |
+
assert type(o) == type(output[0])
|
| 136 |
+
|
| 137 |
+
o = output[0]
|
| 138 |
+
|
| 139 |
+
if isinstance(o, DataProto):
|
| 140 |
+
return DataProto.concat(output)
|
| 141 |
+
elif isinstance(o, ray.ObjectRef):
|
| 142 |
+
return DataProtoFuture.concat(output)
|
| 143 |
+
else:
|
| 144 |
+
raise NotImplementedError
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
def collect_megatron_compute_data_proto(worker_group, output):
|
| 148 |
+
"""
|
| 149 |
+
Each output must be a DataProto. We concat the dim=0 of output
|
| 150 |
+
"""
|
| 151 |
+
from verl.protocol import DataProto
|
| 152 |
+
import ray
|
| 153 |
+
|
| 154 |
+
output = collect_megatron_compute(worker_group, output)
|
| 155 |
+
for o in output:
|
| 156 |
+
assert isinstance(o, (DataProto, ray.ObjectRef)), f"expecting {o} to be DataProto, but got {type(o)}"
|
| 157 |
+
|
| 158 |
+
return _concat_data_proto_or_future(output)
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
def dispatch_megatron_pp_as_dp(worker_group, *args, **kwargs):
|
| 162 |
+
"""
|
| 163 |
+
treat pp as dp.
|
| 164 |
+
"""
|
| 165 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 166 |
+
assert isinstance(worker_group, MegatronWorkerGroup)
|
| 167 |
+
|
| 168 |
+
pp_size = worker_group.pp_size
|
| 169 |
+
dp_size = worker_group.dp_size
|
| 170 |
+
|
| 171 |
+
pp_dp_size = pp_size * dp_size
|
| 172 |
+
|
| 173 |
+
all_args = []
|
| 174 |
+
for arg in args:
|
| 175 |
+
assert isinstance(arg, (List, Tuple)) and len(arg) == pp_dp_size
|
| 176 |
+
transformed_args = []
|
| 177 |
+
for i in range(worker_group.world_size):
|
| 178 |
+
local_dp_rank = worker_group.get_megatron_rank_info(rank=i).dp_rank
|
| 179 |
+
local_pp_rank = worker_group.get_megatron_rank_info(rank=i).pp_rank
|
| 180 |
+
# compute the rank in arg. Note that the order is dp then pp
|
| 181 |
+
# Also note that the outputs within a pp group will be firstly allgathered, then only the output of pp0 will be collected.
|
| 182 |
+
# For pp=2 dp=4, a batch of data "ABCDEFGH" should be dispatched and collected in below order:
|
| 183 |
+
# dispatch: pp_allgther: collect:
|
| 184 |
+
# dp 0 1 2 3 dp 0 1 2 3
|
| 185 |
+
# pp +---------+ pp +-------------+
|
| 186 |
+
# 0 | A C E G | 0 | AB CD EF GH | ABCDEFGH
|
| 187 |
+
# 1 | B D F H | 1 | AB CD EF GH |
|
| 188 |
+
# +---------+ +-------------+
|
| 189 |
+
arg_rank = local_dp_rank * worker_group.pp_size + local_pp_rank
|
| 190 |
+
|
| 191 |
+
transformed_args.append(arg[arg_rank])
|
| 192 |
+
all_args.append(transformed_args)
|
| 193 |
+
all_args = tuple(all_args)
|
| 194 |
+
|
| 195 |
+
all_kwargs = {}
|
| 196 |
+
for k, v in kwargs.items():
|
| 197 |
+
assert isinstance(v, (List, Tuple)) and len(v) == pp_dp_size, f'expect len(v)=={pp_dp_size}, got {len(v)}'
|
| 198 |
+
transformed_v = []
|
| 199 |
+
for i in range(worker_group.world_size):
|
| 200 |
+
local_dp_rank = worker_group.get_megatron_rank_info(rank=i).dp_rank
|
| 201 |
+
local_pp_rank = worker_group.get_megatron_rank_info(rank=i).pp_rank
|
| 202 |
+
# compute the rank in arg. Note that the order is dp then pp
|
| 203 |
+
arg_rank = local_dp_rank * worker_group.pp_size + local_pp_rank
|
| 204 |
+
transformed_v.append(v[arg_rank])
|
| 205 |
+
all_kwargs[k] = transformed_v
|
| 206 |
+
return all_args, all_kwargs
|
| 207 |
+
|
| 208 |
+
|
| 209 |
+
def collect_megatron_pp_as_dp(worker_group, output):
|
| 210 |
+
"""
|
| 211 |
+
treat pp as dp. Only collect data on tp=0
|
| 212 |
+
"""
|
| 213 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 214 |
+
assert isinstance(worker_group, MegatronWorkerGroup)
|
| 215 |
+
output_in_dp = []
|
| 216 |
+
for global_rank in range(worker_group.world_size):
|
| 217 |
+
local_rank_info = worker_group.get_megatron_rank_info(rank=global_rank)
|
| 218 |
+
if local_rank_info.tp_rank == 0 and local_rank_info.pp_rank == 0:
|
| 219 |
+
output_in_dp.append(output[global_rank])
|
| 220 |
+
return output_in_dp
|
| 221 |
+
|
| 222 |
+
|
| 223 |
+
def collect_megatron_pp_only(worker_group, output):
|
| 224 |
+
"""
|
| 225 |
+
Only collect output of megatron pp. This is useful when examine weight names as they are identical in tp/dp
|
| 226 |
+
"""
|
| 227 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 228 |
+
assert isinstance(worker_group, MegatronWorkerGroup)
|
| 229 |
+
output_in_pp = []
|
| 230 |
+
for global_rank in range(worker_group.world_size):
|
| 231 |
+
local_rank_info = worker_group.get_megatron_rank_info(rank=global_rank)
|
| 232 |
+
if local_rank_info.tp_rank == 0 and local_rank_info.dp_rank == 0:
|
| 233 |
+
output_in_pp.append(output[global_rank])
|
| 234 |
+
return output_in_pp
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
def dispatch_megatron_pp_as_dp_data_proto(worker_group, *args, **kwargs):
|
| 238 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 239 |
+
assert isinstance(worker_group, MegatronWorkerGroup)
|
| 240 |
+
|
| 241 |
+
pp_dp_size = worker_group.dp_size * worker_group.pp_size
|
| 242 |
+
splitted_args, splitted_kwargs = _split_args_kwargs_data_proto(pp_dp_size, *args, **kwargs)
|
| 243 |
+
return dispatch_megatron_pp_as_dp(worker_group, *splitted_args, **splitted_kwargs)
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
def collect_megatron_pp_as_dp_data_proto(worker_group, output):
|
| 247 |
+
from verl.protocol import DataProto
|
| 248 |
+
from verl.single_controller.base.megatron.worker_group import MegatronWorkerGroup
|
| 249 |
+
assert isinstance(worker_group, MegatronWorkerGroup)
|
| 250 |
+
|
| 251 |
+
output = collect_megatron_pp_as_dp(worker_group, output)
|
| 252 |
+
return _concat_data_proto_or_future(output)
|
| 253 |
+
|
| 254 |
+
|
| 255 |
+
def dispatch_dp_compute(worker_group, *args, **kwargs):
|
| 256 |
+
from verl.single_controller.base.worker_group import WorkerGroup
|
| 257 |
+
assert isinstance(worker_group, WorkerGroup)
|
| 258 |
+
for arg in args:
|
| 259 |
+
assert isinstance(arg, (Tuple, List)) and len(arg) == worker_group.world_size
|
| 260 |
+
for k, v in kwargs.items():
|
| 261 |
+
assert isinstance(v, (Tuple, List)) and len(v) == worker_group.world_size
|
| 262 |
+
return args, kwargs
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
def collect_dp_compute(worker_group, output):
|
| 266 |
+
from verl.single_controller.base.worker_group import WorkerGroup
|
| 267 |
+
assert isinstance(worker_group, WorkerGroup)
|
| 268 |
+
assert len(output) == worker_group.world_size
|
| 269 |
+
return output
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
def dispatch_dp_compute_data_proto(worker_group, *args, **kwargs):
|
| 273 |
+
from verl.single_controller.base.worker_group import WorkerGroup
|
| 274 |
+
assert isinstance(worker_group, WorkerGroup)
|
| 275 |
+
splitted_args, splitted_kwargs = _split_args_kwargs_data_proto(worker_group.world_size, *args, **kwargs)
|
| 276 |
+
return splitted_args, splitted_kwargs
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
def dispatch_dp_compute_data_proto_with_func(worker_group, *args, **kwargs):
|
| 280 |
+
from verl.single_controller.base.worker_group import WorkerGroup
|
| 281 |
+
assert isinstance(worker_group, WorkerGroup)
|
| 282 |
+
assert type(args[0]) == FunctionType # NOTE: The first one args is a function!
|
| 283 |
+
|
| 284 |
+
splitted_args, splitted_kwargs = _split_args_kwargs_data_proto(worker_group.world_size, *args[1:], **kwargs)
|
| 285 |
+
splitted_args_with_func = [[args[0]] * worker_group.world_size] + splitted_args
|
| 286 |
+
return splitted_args_with_func, splitted_kwargs
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
def collect_dp_compute_data_proto(worker_group, output):
|
| 290 |
+
from verl.protocol import DataProto
|
| 291 |
+
import ray
|
| 292 |
+
|
| 293 |
+
for o in output:
|
| 294 |
+
assert isinstance(o, (DataProto, ray.ObjectRef)), f"expecting {o} to be DataProto, but got {type(o)}"
|
| 295 |
+
|
| 296 |
+
output = collect_dp_compute(worker_group, output)
|
| 297 |
+
return _concat_data_proto_or_future(output)
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
def get_predefined_dispatch_fn(dispatch_mode):
|
| 301 |
+
predefined_dispatch_mode_fn = {
|
| 302 |
+
Dispatch.ONE_TO_ALL: {
|
| 303 |
+
'dispatch_fn': dispatch_one_to_all,
|
| 304 |
+
'collect_fn': collect_all_to_all,
|
| 305 |
+
},
|
| 306 |
+
Dispatch.ALL_TO_ALL: {
|
| 307 |
+
'dispatch_fn': dispatch_all_to_all,
|
| 308 |
+
'collect_fn': collect_all_to_all,
|
| 309 |
+
},
|
| 310 |
+
Dispatch.MEGATRON_COMPUTE: {
|
| 311 |
+
'dispatch_fn': dispatch_megatron_compute,
|
| 312 |
+
'collect_fn': collect_megatron_compute,
|
| 313 |
+
},
|
| 314 |
+
Dispatch.MEGATRON_PP_AS_DP: {
|
| 315 |
+
'dispatch_fn': dispatch_megatron_pp_as_dp,
|
| 316 |
+
'collect_fn': collect_megatron_pp_as_dp,
|
| 317 |
+
},
|
| 318 |
+
Dispatch.MEGATRON_PP_ONLY: {
|
| 319 |
+
'dispatch_fn': dispatch_one_to_all,
|
| 320 |
+
'collect_fn': collect_megatron_pp_only
|
| 321 |
+
},
|
| 322 |
+
Dispatch.MEGATRON_COMPUTE_PROTO: {
|
| 323 |
+
'dispatch_fn': dispatch_megatron_compute_data_proto,
|
| 324 |
+
'collect_fn': collect_megatron_compute_data_proto
|
| 325 |
+
},
|
| 326 |
+
Dispatch.MEGATRON_PP_AS_DP_PROTO: {
|
| 327 |
+
'dispatch_fn': dispatch_megatron_pp_as_dp_data_proto,
|
| 328 |
+
'collect_fn': collect_megatron_pp_as_dp_data_proto
|
| 329 |
+
},
|
| 330 |
+
Dispatch.DP_COMPUTE: {
|
| 331 |
+
'dispatch_fn': dispatch_dp_compute,
|
| 332 |
+
'collect_fn': collect_dp_compute
|
| 333 |
+
},
|
| 334 |
+
Dispatch.DP_COMPUTE_PROTO: {
|
| 335 |
+
'dispatch_fn': dispatch_dp_compute_data_proto,
|
| 336 |
+
'collect_fn': collect_dp_compute_data_proto
|
| 337 |
+
},
|
| 338 |
+
Dispatch.DP_COMPUTE_PROTO_WITH_FUNC: {
|
| 339 |
+
'dispatch_fn': dispatch_dp_compute_data_proto_with_func,
|
| 340 |
+
'collect_fn': collect_dp_compute_data_proto
|
| 341 |
+
},
|
| 342 |
+
Dispatch.DP_COMPUTE_METRIC: {
|
| 343 |
+
'dispatch_fn': dispatch_dp_compute_data_proto,
|
| 344 |
+
'collect_fn': collect_dp_compute
|
| 345 |
+
}
|
| 346 |
+
}
|
| 347 |
+
return predefined_dispatch_mode_fn[dispatch_mode]
|
| 348 |
+
|
| 349 |
+
|
| 350 |
+
def get_predefined_execute_fn(execute_mode):
|
| 351 |
+
"""
|
| 352 |
+
Note that here we only asks execute_all and execute_rank_zero to be implemented
|
| 353 |
+
Leave the choice of how these two functions handle argument 'blocking' to users
|
| 354 |
+
"""
|
| 355 |
+
predefined_execute_mode_fn = {
|
| 356 |
+
Execute.ALL: {
|
| 357 |
+
'execute_fn_name': 'execute_all'
|
| 358 |
+
},
|
| 359 |
+
Execute.RANK_ZERO: {
|
| 360 |
+
'execute_fn_name': 'execute_rank_zero'
|
| 361 |
+
}
|
| 362 |
+
}
|
| 363 |
+
return predefined_execute_mode_fn[execute_mode]
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
def _check_dispatch_mode(dispatch_mode):
|
| 367 |
+
assert isinstance(dispatch_mode,
|
| 368 |
+
(Dispatch, Dict)), f'dispatch_mode must be a Dispatch or a Dict. Got {dispatch_mode}'
|
| 369 |
+
if isinstance(dispatch_mode, Dict):
|
| 370 |
+
necessary_keys = ['dispatch_fn', 'collect_fn']
|
| 371 |
+
for key in necessary_keys:
|
| 372 |
+
assert key in dispatch_mode, f'key {key} should be in dispatch_mode if it is a dictionary'
|
| 373 |
+
|
| 374 |
+
|
| 375 |
+
def _check_execute_mode(execute_mode):
|
| 376 |
+
assert isinstance(execute_mode, Execute), f'execute_mode must be a Execute. Got {execute_mode}'
|
| 377 |
+
|
| 378 |
+
|
| 379 |
+
def _materialize_futures(*args, **kwargs):
|
| 380 |
+
new_args = []
|
| 381 |
+
for arg in args:
|
| 382 |
+
if isinstance(arg, DataProtoFuture):
|
| 383 |
+
arg = arg.get()
|
| 384 |
+
# add more type to materialize
|
| 385 |
+
new_args.append(arg)
|
| 386 |
+
for k, v in kwargs.items():
|
| 387 |
+
if isinstance(v, DataProtoFuture):
|
| 388 |
+
kwargs[k] = v.get()
|
| 389 |
+
|
| 390 |
+
new_args = tuple(new_args)
|
| 391 |
+
return new_args, kwargs
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
def register(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL, blocking=True, materialize_futures=True):
|
| 395 |
+
_check_dispatch_mode(dispatch_mode=dispatch_mode)
|
| 396 |
+
_check_execute_mode(execute_mode=execute_mode)
|
| 397 |
+
|
| 398 |
+
def decorator(func):
|
| 399 |
+
|
| 400 |
+
@wraps(func)
|
| 401 |
+
def inner(*args, **kwargs):
|
| 402 |
+
if materialize_futures:
|
| 403 |
+
args, kwargs = _materialize_futures(*args, **kwargs)
|
| 404 |
+
return func(*args, **kwargs)
|
| 405 |
+
|
| 406 |
+
attrs = {'dispatch_mode': dispatch_mode, 'execute_mode': execute_mode, 'blocking': blocking}
|
| 407 |
+
setattr(inner, MAGIC_ATTR, attrs)
|
| 408 |
+
return inner
|
| 409 |
+
|
| 410 |
+
return decorator
|
verl/single_controller/base/megatron/worker.py
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 Bytedance Ltd. and/or its affiliates
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
from verl.single_controller.base.worker import Worker, DistRankInfo, DistGlobalInfo
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
class MegatronWorker(Worker):
|
| 19 |
+
|
| 20 |
+
def __init__(self, cuda_visible_devices=None) -> None:
|
| 21 |
+
super().__init__(cuda_visible_devices)
|
| 22 |
+
|
| 23 |
+
def get_megatron_global_info(self):
|
| 24 |
+
from megatron.core import parallel_state as mpu
|
| 25 |
+
tp_size = mpu.get_tensor_model_parallel_world_size()
|
| 26 |
+
dp_size = mpu.get_data_parallel_world_size()
|
| 27 |
+
pp_size = mpu.get_pipeline_model_parallel_world_size()
|
| 28 |
+
info = DistGlobalInfo(tp_size=tp_size, dp_size=dp_size, pp_size=pp_size)
|
| 29 |
+
return info
|
| 30 |
+
|
| 31 |
+
def get_megatron_rank_info(self):
|
| 32 |
+
from megatron.core import parallel_state as mpu
|
| 33 |
+
tp_rank = mpu.get_tensor_model_parallel_rank()
|
| 34 |
+
dp_rank = mpu.get_data_parallel_rank()
|
| 35 |
+
pp_rank = mpu.get_pipeline_model_parallel_rank()
|
| 36 |
+
info = DistRankInfo(tp_rank=tp_rank, dp_rank=dp_rank, pp_rank=pp_rank)
|
| 37 |
+
return info
|
verl/single_controller/base/register_center/ray.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 Bytedance Ltd. and/or its affiliates
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
import ray
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
@ray.remote
|
| 19 |
+
class WorkerGroupRegisterCenter:
|
| 20 |
+
|
| 21 |
+
def __init__(self, rank_zero_info):
|
| 22 |
+
self.rank_zero_info = rank_zero_info
|
| 23 |
+
|
| 24 |
+
def get_rank_zero_info(self):
|
| 25 |
+
return self.rank_zero_info
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def create_worker_group_register_center(name, info):
|
| 29 |
+
return WorkerGroupRegisterCenter.options(name=name).remote(info)
|
verl/single_controller/base/worker.py
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 Bytedance Ltd. and/or its affiliates
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
"""
|
| 15 |
+
the class for Worker
|
| 16 |
+
"""
|
| 17 |
+
import os
|
| 18 |
+
import socket
|
| 19 |
+
from dataclasses import dataclass
|
| 20 |
+
from .decorator import register, Dispatch, Execute
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
@dataclass
|
| 24 |
+
class DistRankInfo:
|
| 25 |
+
tp_rank: int
|
| 26 |
+
dp_rank: int
|
| 27 |
+
pp_rank: int
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
@dataclass
|
| 31 |
+
class DistGlobalInfo:
|
| 32 |
+
tp_size: int
|
| 33 |
+
dp_size: int
|
| 34 |
+
pp_size: int
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
class WorkerHelper:
|
| 38 |
+
|
| 39 |
+
def _get_node_ip(self):
|
| 40 |
+
|
| 41 |
+
def get_node_ip_by_sdk():
|
| 42 |
+
if os.getenv("WG_BACKEND", None) == "ray":
|
| 43 |
+
import ray
|
| 44 |
+
return ray._private.services.get_node_ip_address()
|
| 45 |
+
else:
|
| 46 |
+
raise NotImplementedError("WG_BACKEND now just support ray mode.")
|
| 47 |
+
|
| 48 |
+
host_ipv4 = os.getenv("MY_HOST_IP", None)
|
| 49 |
+
host_ipv6 = os.getenv("MY_HOST_IPV6", None)
|
| 50 |
+
host_ip_by_env = host_ipv4 or host_ipv6
|
| 51 |
+
host_ip_by_sdk = get_node_ip_by_sdk()
|
| 52 |
+
|
| 53 |
+
host_ip = host_ip_by_env or host_ip_by_sdk
|
| 54 |
+
return host_ip
|
| 55 |
+
|
| 56 |
+
def _get_free_port(self):
|
| 57 |
+
with socket.socket() as sock:
|
| 58 |
+
sock.bind(('', 0))
|
| 59 |
+
return sock.getsockname()[1]
|
| 60 |
+
|
| 61 |
+
def get_availale_master_addr_port(self):
|
| 62 |
+
return self._get_node_ip(), str(self._get_free_port())
|
| 63 |
+
|
| 64 |
+
def _get_pid(self):
|
| 65 |
+
return
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
class WorkerMeta:
|
| 69 |
+
keys = [
|
| 70 |
+
"WORLD_SIZE", "RANK", "LOCAL_WORLD_SIZE", "LOCAL_RANK", "MASTER_ADDR", "MASTER_PORT", "CUDA_VISIBLE_DEVICES"
|
| 71 |
+
]
|
| 72 |
+
|
| 73 |
+
def __init__(self, store) -> None:
|
| 74 |
+
self._store = store
|
| 75 |
+
|
| 76 |
+
def to_dict(self):
|
| 77 |
+
return {f"_{key.lower()}": self._store.get(f"_{key.lower()}", None) for key in WorkerMeta.keys}
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
# we assume that in each WorkerGroup, there is a Master Worker
|
| 81 |
+
class Worker(WorkerHelper):
|
| 82 |
+
"""A (distributed) worker."""
|
| 83 |
+
|
| 84 |
+
def __new__(cls, *args, **kwargs):
|
| 85 |
+
instance = super().__new__(cls)
|
| 86 |
+
|
| 87 |
+
# note that here we use int to distinguish
|
| 88 |
+
disable_worker_init = int(os.environ.get('DISABLE_WORKER_INIT', 0))
|
| 89 |
+
if disable_worker_init:
|
| 90 |
+
return instance
|
| 91 |
+
|
| 92 |
+
rank = os.environ.get("RANK", None)
|
| 93 |
+
worker_group_prefix = os.environ.get("WG_PREFIX", None)
|
| 94 |
+
|
| 95 |
+
# when decorator @ray.remote applies, __new__ will be called while we don't want to apply _configure_before_init
|
| 96 |
+
if None not in [rank, worker_group_prefix] and 'ActorClass(' not in cls.__name__:
|
| 97 |
+
instance._configure_before_init(f"{worker_group_prefix}_register_center", int(rank))
|
| 98 |
+
|
| 99 |
+
return instance
|
| 100 |
+
|
| 101 |
+
def _configure_before_init(self, register_center_name: str, rank: int):
|
| 102 |
+
assert isinstance(rank, int), f"rank must be int, instead of {type(rank)}"
|
| 103 |
+
|
| 104 |
+
if rank == 0:
|
| 105 |
+
master_addr, master_port = self.get_availale_master_addr_port()
|
| 106 |
+
rank_zero_info = {
|
| 107 |
+
"MASTER_ADDR": master_addr,
|
| 108 |
+
"MASTER_PORT": master_port,
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
if os.getenv("WG_BACKEND", None) == "ray":
|
| 112 |
+
from verl.single_controller.base.register_center.ray import create_worker_group_register_center
|
| 113 |
+
self.register_center = create_worker_group_register_center(name=register_center_name,
|
| 114 |
+
info=rank_zero_info)
|
| 115 |
+
|
| 116 |
+
os.environ.update(rank_zero_info)
|
| 117 |
+
|
| 118 |
+
def __init__(self, cuda_visible_devices=None) -> None:
|
| 119 |
+
# construct a meta from envrionment variable. Note that the import must be inside the class because it is executed remotely
|
| 120 |
+
import os
|
| 121 |
+
|
| 122 |
+
###
|
| 123 |
+
# [SUPPORT AMD: torch]
|
| 124 |
+
import torch
|
| 125 |
+
###
|
| 126 |
+
|
| 127 |
+
###
|
| 128 |
+
# [SUPPORT AMD: torch]
|
| 129 |
+
if "AMD" in torch.cuda.get_device_name():
|
| 130 |
+
os.environ['CUDA_VISIBLE_DEVICES'] = os.environ.get('ROCR_VISIBLE_DEVICES')
|
| 131 |
+
os.environ['LOCAL_RANK'] = os.environ.get('RAY_LOCAL_RANK')
|
| 132 |
+
###
|
| 133 |
+
|
| 134 |
+
world_size = int(os.environ['WORLD_SIZE'])
|
| 135 |
+
rank = int(os.environ['RANK'])
|
| 136 |
+
self._rank = rank
|
| 137 |
+
self._world_size = world_size
|
| 138 |
+
|
| 139 |
+
master_addr = os.environ["MASTER_ADDR"]
|
| 140 |
+
master_port = os.environ["MASTER_PORT"]
|
| 141 |
+
|
| 142 |
+
local_world_size = int(os.getenv("LOCAL_WORLD_SIZE", "1"))
|
| 143 |
+
local_rank = int(os.getenv("LOCAL_RANK", "0"))
|
| 144 |
+
|
| 145 |
+
###
|
| 146 |
+
# [SUPPORT AMD: torch]
|
| 147 |
+
if "AMD" in torch.cuda.get_device_name():
|
| 148 |
+
self.local_rank = int(os.environ['LOCAL_RANK'])
|
| 149 |
+
###
|
| 150 |
+
|
| 151 |
+
###
|
| 152 |
+
# [SUPPORT AMD: torch]
|
| 153 |
+
if "AMD" in torch.cuda.get_device_name():
|
| 154 |
+
cuda_visible_devices = str(local_rank)
|
| 155 |
+
###
|
| 156 |
+
|
| 157 |
+
store = {
|
| 158 |
+
'_world_size': world_size,
|
| 159 |
+
'_rank': rank,
|
| 160 |
+
'_local_world_size': local_world_size,
|
| 161 |
+
'_local_rank': local_rank,
|
| 162 |
+
'_master_addr': master_addr,
|
| 163 |
+
'_master_port': master_port
|
| 164 |
+
}
|
| 165 |
+
if cuda_visible_devices is not None:
|
| 166 |
+
store['_cuda_visible_devices'] = cuda_visible_devices
|
| 167 |
+
|
| 168 |
+
meta = WorkerMeta(store=store)
|
| 169 |
+
self._configure_with_meta(meta=meta)
|
| 170 |
+
|
| 171 |
+
###
|
| 172 |
+
# [SUPPORT AMD: torch]
|
| 173 |
+
# torch.cuda.set_device(local_rank)
|
| 174 |
+
if "AMD" in torch.cuda.get_device_name():
|
| 175 |
+
torch.cuda.set_device(int(cuda_visible_devices))
|
| 176 |
+
###
|
| 177 |
+
|
| 178 |
+
def _configure_with_meta(self, meta: WorkerMeta):
|
| 179 |
+
"""
|
| 180 |
+
This function should only be called inside by WorkerGroup
|
| 181 |
+
"""
|
| 182 |
+
assert isinstance(meta, WorkerMeta)
|
| 183 |
+
self.__dict__.update(meta.to_dict()) # this is hacky
|
| 184 |
+
# print(f"__dict__: {self.__dict__}")
|
| 185 |
+
for key in WorkerMeta.keys:
|
| 186 |
+
val = self.__dict__.get(f"_{key.lower()}", None)
|
| 187 |
+
if val is not None:
|
| 188 |
+
# print(f"set {key} to {val}")
|
| 189 |
+
os.environ[key] = str(val)
|
| 190 |
+
os.environ["REDIS_STORE_SERVER_HOST"] = str(self._master_addr).replace("[", "").replace(
|
| 191 |
+
"]", "") if self._master_addr else ""
|
| 192 |
+
|
| 193 |
+
def get_master_addr_port(self):
|
| 194 |
+
return self._master_addr, self._master_port
|
| 195 |
+
|
| 196 |
+
def get_cuda_visible_devices(self):
|
| 197 |
+
import os
|
| 198 |
+
cuda_visible_devices = os.environ.get("CUDA_VISIBLE_DEVICES", "not set")
|
| 199 |
+
return cuda_visible_devices
|
| 200 |
+
|
| 201 |
+
@property
|
| 202 |
+
def world_size(self):
|
| 203 |
+
return self._world_size
|
| 204 |
+
|
| 205 |
+
@property
|
| 206 |
+
def rank(self):
|
| 207 |
+
return self._rank
|
| 208 |
+
|
| 209 |
+
@register(dispatch_mode=Dispatch.DP_COMPUTE_PROTO_WITH_FUNC)
|
| 210 |
+
def execute_with_func_generator(self, func, *args, **kwargs):
|
| 211 |
+
ret_proto = func(self, *args, **kwargs)
|
| 212 |
+
return ret_proto
|
| 213 |
+
|
| 214 |
+
@register(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.RANK_ZERO)
|
| 215 |
+
def execute_func_rank_zero(self, func, *args, **kwargs):
|
| 216 |
+
result = func(*args, **kwargs)
|
| 217 |
+
return result
|
verl/single_controller/base/worker_group.py
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 Bytedance Ltd. and/or its affiliates
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
"""
|
| 15 |
+
the class of WorkerGroup
|
| 16 |
+
"""
|
| 17 |
+
import logging
|
| 18 |
+
import threading
|
| 19 |
+
import signal
|
| 20 |
+
import time
|
| 21 |
+
from typing import List, Any, Callable, Dict
|
| 22 |
+
|
| 23 |
+
from .decorator import MAGIC_ATTR, Dispatch, get_predefined_dispatch_fn, get_predefined_execute_fn
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
class ResourcePool:
|
| 27 |
+
"""The resource pool with meta info such as world_size."""
|
| 28 |
+
|
| 29 |
+
def __init__(self, process_on_nodes=None, max_collocate_count: int = 10, n_gpus_per_node=8) -> None:
|
| 30 |
+
if process_on_nodes is None:
|
| 31 |
+
process_on_nodes = []
|
| 32 |
+
self._store = process_on_nodes
|
| 33 |
+
self.max_collocate_count = max_collocate_count
|
| 34 |
+
self.n_gpus_per_node = n_gpus_per_node # this is left for future huawei GPU that contains 16 GPUs per node
|
| 35 |
+
|
| 36 |
+
def add_node(self, process_count):
|
| 37 |
+
self._store.append(process_count)
|
| 38 |
+
|
| 39 |
+
@property
|
| 40 |
+
def world_size(self):
|
| 41 |
+
return sum(self._store)
|
| 42 |
+
|
| 43 |
+
def __call__(self) -> Any:
|
| 44 |
+
return self._store
|
| 45 |
+
|
| 46 |
+
@property
|
| 47 |
+
def store(self):
|
| 48 |
+
return self._store
|
| 49 |
+
|
| 50 |
+
def local_world_size_list(self) -> List[int]:
|
| 51 |
+
nested_local_world_size_list = [
|
| 52 |
+
[local_world_size for _ in range(local_world_size)] for local_world_size in self._store
|
| 53 |
+
]
|
| 54 |
+
return [item for row in nested_local_world_size_list for item in row]
|
| 55 |
+
|
| 56 |
+
def local_rank_list(self) -> List[int]:
|
| 57 |
+
nested_local_rank_list = [[i for i in range(local_world_size)] for local_world_size in self._store]
|
| 58 |
+
return [item for row in nested_local_rank_list for item in row]
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
class ClassWithInitArgs:
|
| 62 |
+
"""
|
| 63 |
+
This class stores a class constructor and the args/kwargs to construct the class.
|
| 64 |
+
It is used to instantiate the remote class.
|
| 65 |
+
"""
|
| 66 |
+
|
| 67 |
+
def __init__(self, cls, *args, **kwargs) -> None:
|
| 68 |
+
self.cls = cls
|
| 69 |
+
self.args = args
|
| 70 |
+
self.kwargs = kwargs
|
| 71 |
+
|
| 72 |
+
# def add_arg(self, arg):
|
| 73 |
+
# self.args += (arg,)
|
| 74 |
+
|
| 75 |
+
# def add_kwarg(self, key, value):
|
| 76 |
+
# self.kwargs[key] = value
|
| 77 |
+
|
| 78 |
+
def __call__(self) -> Any:
|
| 79 |
+
return self.cls(*self.args, **self.kwargs)
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
def check_workers_alive(workers: List, is_alive: Callable, gap_time: float = 1) -> None:
|
| 83 |
+
import time
|
| 84 |
+
while True:
|
| 85 |
+
for worker in workers:
|
| 86 |
+
if not is_alive(worker):
|
| 87 |
+
logging.warning(f"worker {worker} is not alive" + " sending signal to main thread")
|
| 88 |
+
signal.raise_signal(signal.SIGABRT)
|
| 89 |
+
time.sleep(gap_time)
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
class WorkerGroup:
|
| 93 |
+
"""A group of workers"""
|
| 94 |
+
|
| 95 |
+
def __init__(self, resource_pool: ResourcePool, **kwargs) -> None:
|
| 96 |
+
self._is_init_with_detached_workers = True if resource_pool is None else False
|
| 97 |
+
|
| 98 |
+
if resource_pool is not None:
|
| 99 |
+
# handle the case when WorkGroup is attached to an existing one
|
| 100 |
+
self._procecss_dispatch_config = resource_pool()
|
| 101 |
+
else:
|
| 102 |
+
self._procecss_dispatch_config = None
|
| 103 |
+
|
| 104 |
+
self._workers = []
|
| 105 |
+
self._worker_names = []
|
| 106 |
+
|
| 107 |
+
self._master_addr = None
|
| 108 |
+
self._master_port = None
|
| 109 |
+
|
| 110 |
+
self._checker_thread: threading.Thread = None
|
| 111 |
+
|
| 112 |
+
def _is_worker_alive(self, worker):
|
| 113 |
+
raise NotImplementedError(f"WorkerGroup._is_worker_alive called, should be implemented in derived class.")
|
| 114 |
+
|
| 115 |
+
def _block_until_all_workers_alive(self) -> None:
|
| 116 |
+
while True:
|
| 117 |
+
all_state = [self._is_worker_alive(worker) for worker in self._workers]
|
| 118 |
+
if False in all_state:
|
| 119 |
+
time.sleep(1)
|
| 120 |
+
else:
|
| 121 |
+
break
|
| 122 |
+
|
| 123 |
+
def start_worker_aliveness_check(self, every_n_seconds=1) -> None:
|
| 124 |
+
# before starting checking worker aliveness, make sure all workers are already alive
|
| 125 |
+
self._block_until_all_workers_alive()
|
| 126 |
+
|
| 127 |
+
self._checker_thread = threading.Thread(target=check_workers_alive,
|
| 128 |
+
args=(self._workers, self._is_worker_alive, every_n_seconds))
|
| 129 |
+
self._checker_thread.start()
|
| 130 |
+
|
| 131 |
+
@property
|
| 132 |
+
def world_size(self):
|
| 133 |
+
return len(self._workers)
|
| 134 |
+
|
| 135 |
+
# execute_all_async and execute_rank_zero_async should be implemented by RayWorkerGroup, TorchRPCWorkerGroup,
|
| 136 |
+
# MegatronWorkerGroup, XperfWorkerGroup should skip
|
| 137 |
+
|
| 138 |
+
def _bind_worker_method(self, user_defined_cls, func_generator):
|
| 139 |
+
"""
|
| 140 |
+
Bind the worker method to the WorkerGroup
|
| 141 |
+
"""
|
| 142 |
+
|
| 143 |
+
for method_name in dir(user_defined_cls):
|
| 144 |
+
|
| 145 |
+
try:
|
| 146 |
+
method = getattr(user_defined_cls, method_name)
|
| 147 |
+
assert callable(method), f"{method_name} in {user_defined_cls} is not callable"
|
| 148 |
+
except Exception as e:
|
| 149 |
+
# if it is a property, it will fail because Class doesn't have instance property
|
| 150 |
+
continue
|
| 151 |
+
|
| 152 |
+
if hasattr(method, MAGIC_ATTR):
|
| 153 |
+
# this method is decorated by register
|
| 154 |
+
attribute = getattr(method, MAGIC_ATTR)
|
| 155 |
+
assert isinstance(attribute, Dict), f'attribute must be a dictionary. Got {type(attribute)}'
|
| 156 |
+
assert 'dispatch_mode' in attribute, f'attribute must contain dispatch_mode in its key'
|
| 157 |
+
|
| 158 |
+
dispatch_mode = attribute['dispatch_mode']
|
| 159 |
+
execute_mode = attribute['execute_mode']
|
| 160 |
+
blocking = attribute['blocking']
|
| 161 |
+
|
| 162 |
+
# get dispatch fn
|
| 163 |
+
if isinstance(dispatch_mode, Dispatch):
|
| 164 |
+
# get default dispatch fn
|
| 165 |
+
fn = get_predefined_dispatch_fn(dispatch_mode=dispatch_mode)
|
| 166 |
+
dispatch_fn = fn['dispatch_fn']
|
| 167 |
+
collect_fn = fn['collect_fn']
|
| 168 |
+
else:
|
| 169 |
+
assert isinstance(dispatch_mode, dict)
|
| 170 |
+
assert 'dispatch_fn' in dispatch_mode
|
| 171 |
+
assert 'collect_fn' in dispatch_mode
|
| 172 |
+
dispatch_fn = dispatch_mode['dispatch_fn']
|
| 173 |
+
collect_fn = dispatch_mode['collect_fn']
|
| 174 |
+
|
| 175 |
+
# get execute_fn_name
|
| 176 |
+
execute_mode = get_predefined_execute_fn(execute_mode=execute_mode)
|
| 177 |
+
wg_execute_fn_name = execute_mode['execute_fn_name']
|
| 178 |
+
|
| 179 |
+
# get execute_fn from string
|
| 180 |
+
try:
|
| 181 |
+
execute_fn = getattr(self, wg_execute_fn_name)
|
| 182 |
+
assert callable(execute_fn), 'execute_fn must be callable'
|
| 183 |
+
except Exception as e:
|
| 184 |
+
print(f'execute_fn {wg_execute_fn_name} is invalid')
|
| 185 |
+
raise
|
| 186 |
+
|
| 187 |
+
# bind a new method to the RayWorkerGroup
|
| 188 |
+
func = func_generator(self,
|
| 189 |
+
method_name,
|
| 190 |
+
dispatch_fn=dispatch_fn,
|
| 191 |
+
collect_fn=collect_fn,
|
| 192 |
+
execute_fn=execute_fn,
|
| 193 |
+
blocking=blocking)
|
| 194 |
+
|
| 195 |
+
try:
|
| 196 |
+
setattr(self, method_name, func)
|
| 197 |
+
except Exception as e:
|
| 198 |
+
raise ValueError(f'Fail to set method_name {method_name}')
|
verl/single_controller/ray/__init__.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Copyright 2024 Bytedance Ltd. and/or its affiliates
|
| 2 |
+
#
|
| 3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 4 |
+
# you may not use this file except in compliance with the License.
|
| 5 |
+
# You may obtain a copy of the License at
|
| 6 |
+
#
|
| 7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 8 |
+
#
|
| 9 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 12 |
+
# See the License for the specific language governing permissions and
|
| 13 |
+
# limitations under the License.
|
| 14 |
+
|
| 15 |
+
from .base import RayResourcePool, RayClassWithInitArgs, RayWorkerGroup, create_colocated_worker_cls
|