verl icon indicating copy to clipboard operation
verl copied to clipboard

some bugs for multi-turn and tool call for recipe/fully_async_policy

Open jamescsq47 opened this issue 9 months ago • 3 comments

I try to run the code /verl/verl/experimental/fully_async_policy/shell/dapo_7b_async_retool.sh The result is really strange as all metrics seem not change. But the training in sync framework with the same setting is fine. Does anyone encounter same problems? Here is my script:

docker run -it -p 8080:8080 volcengine/sandbox-fusion:server-20250609

set -x

export RAY_DISABLE_OPENTELEMETRY=1 export VLLM_USE_V1=1 export PYTHONPATH=$PYTHONPATH:$PWD/recipe/retool export PYTHONPATH=$PYTHONPATH:$PWD export WANDB_MODE=online
export WANDB__SERVICE_WAIT=300 export WANDB_START_METHOD=thread

================= data/model/tool =================

HDFS_ROOT=${HDFS_ROOT:-$PWD} DATA_ROOT=${DATA_ROOT:-$PWD}

dapo_math_17k=/workspace/data/DAPO-Math-17k-data

aime_2024=/homes/siqic/data/AIME_2024

aime_2025=/workspace/data/aime_2025 model_path=$PWD/checkpoints/retool-multiturn-sft-qwen-2.5-7b-instruct/global_step_372_hf

train_files="['$dapo_math_17k']" test_files="['$aime_2025']"

tool

tool_config_path=$PWD/recipe/retool/sandbox_fusion_tool_config.yaml retool_path=$PWD/recipe/retool/retool.py

wandb / tensorboard

project_name=retool experiment_name=qwen2.5-7b_dapo_async_tool_0_8_False default_local_dir=$PWD/checkpoints/$experiment_name

================= algorithm =================

adv_estimator=grpo

use_kl_in_reward=False kl_coef=0.0 use_kl_loss=False kl_loss_coef=0.0

clip_ratio_low=0.2 clip_ratio_high=0.28

max_turns=8 max_prompt_length=2048 max_response_length=8192 actor_lr=1e-6

================= perfomance =================

infer_tp=4 # vllm train_sp=4 # train fsdp_size=4 # train offload=False

actor_max_token_len_per_gpu=$(( (max_prompt_length + max_response_length) * 1 )) log_prob_max_token_len_per_gpu=$(( actor_max_token_len_per_gpu * 4 ))

================= async policy =================

rollout_name="vllm" rollout_mode="async"

NNODES=${NNODES:-1} NGPUS_PER_NODE=${NGPUS_PER_NODE:-8} n_gpus_rollout=4 n_gpus_training=$((NGPUS_PER_NODE - n_gpus_rollout))

train_batch_size=0 ppo_mini_batch_size=16 gen_prompt_bsz=1 n_resp_per_prompt=8 n_resp_per_prompt_val=30 total_rollout_steps=$(((128*250))) test_freq=10 staleness_threshold=0 trigger_parameter_sync_step=8 require_batches=1 partial_rollout=False

python3 -m verl.experimental.fully_async_policy.fully_async_main
algorithm.adv_estimator=$adv_estimator
algorithm.use_kl_in_reward=$use_kl_in_reward
algorithm.kl_ctrl.kl_coef=$kl_coef
data.train_files="$train_files"
data.val_files="$test_files"
data.return_raw_chat=True
data.train_batch_size=$train_batch_size
data.max_prompt_length=$max_prompt_length
data.max_response_length=$max_response_length
data.filter_overlong_prompts=True
data.truncation='error'
data.custom_cls.path=$retool_path
data.custom_cls.name=CustomRLHFDataset
custom_reward_function.path=$retool_path
custom_reward_function.name=compute_score
actor_rollout_ref.hybrid_engine=False
actor_rollout_ref.model.path=$model_path
actor_rollout_ref.model.use_remove_padding=True
actor_rollout_ref.model.enable_gradient_checkpointing=True
actor_rollout_ref.actor.use_kl_loss=$use_kl_loss
actor_rollout_ref.actor.kl_loss_coef=$kl_loss_coef
actor_rollout_ref.actor.clip_ratio_low=$clip_ratio_low
actor_rollout_ref.actor.clip_ratio_high=$clip_ratio_high
actor_rollout_ref.actor.clip_ratio_c=10.0
actor_rollout_ref.actor.optim.lr=$actor_lr
actor_rollout_ref.actor.use_dynamic_bsz=True
actor_rollout_ref.actor.ppo_mini_batch_size=$ppo_mini_batch_size
actor_rollout_ref.actor.ppo_max_token_len_per_gpu=$actor_max_token_len_per_gpu
actor_rollout_ref.actor.strategy=fsdp2
critic.strategy=fsdp2
actor_rollout_ref.actor.fsdp_config.fsdp_size=${fsdp_size}
actor_rollout_ref.actor.ulysses_sequence_parallel_size=$train_sp
actor_rollout_ref.actor.fsdp_config.param_offload=$offload
actor_rollout_ref.actor.fsdp_config.optimizer_offload=$offload
actor_rollout_ref.ref.log_prob_max_token_len_per_gpu=$log_prob_max_token_len_per_gpu
actor_rollout_ref.rollout.name=vllm
actor_rollout_ref.rollout.mode=async
actor_rollout_ref.rollout.tensor_model_parallel_size=$infer_tp
actor_rollout_ref.rollout.multi_turn.enable=True
actor_rollout_ref.rollout.multi_turn.max_user_turns=$max_turns
actor_rollout_ref.rollout.multi_turn.max_assistant_turns=$max_turns
actor_rollout_ref.rollout.multi_turn.tool_config_path=$tool_config_path
actor_rollout_ref.rollout.multi_turn.format=hermes
actor_rollout_ref.rollout.gpu_memory_utilization=0.5
actor_rollout_ref.rollout.n=$n_resp_per_prompt
actor_rollout_ref.rollout.val_kwargs.top_p=0.6
actor_rollout_ref.rollout.val_kwargs.temperature=1.0
actor_rollout_ref.rollout.val_kwargs.n=$n_resp_per_prompt_val
actor_rollout_ref.rollout.calculate_log_probs=True
trainer.logger=['wandb']
trainer.project_name=$project_name
trainer.experiment_name=$experiment_name
trainer.val_before_train=True
trainer.log_val_generations=20
trainer.save_freq=-1
trainer.default_local_dir=$default_local_dir
data.gen_batch_size=${gen_prompt_bsz}
trainer.nnodes=$NNODES
trainer.n_gpus_per_node=$n_gpus_training
rollout.nnodes=$NNODES
rollout.n_gpus_per_node=$n_gpus_rollout
rollout.total_rollout_steps=$total_rollout_steps
rollout.total_epochs=10
rollout.test_freq=$test_freq
async_training.staleness_threshold=$staleness_threshold
async_training.trigger_parameter_sync_step=$trigger_parameter_sync_step
async_training.require_batches=$require_batches
async_training.partial_rollout=$partial_rollout
+async_training.use_rollout_log_probs=True

Image Image Image

jamescsq47 avatar Feb 14 '26 12:02 jamescsq47

@jamescsq47 Please format your markdown. all yaml content is broken. guard them by ```

I encountered the simillar issue - score/mean doesn't grow event after 100+ steps. I will post more details later...

laohyx avatar Mar 06 '26 05:03 laohyx

For a period of time, the fully async parameter synchronization functionality in the main verl repository was in a broken state. You may now use the latest code for testing.

ArronHZG avatar Mar 13 '26 11:03 ArronHZG

For a period of time, the fully async parameter synchronization functionality in the main verl repository was in a broken state. You may now use the latest code for testing.

Does vllm support multi-turn tool_call yet?

chengtan369 avatar Mar 30 '26 09:03 chengtan369