Skip to content

Instantly share code, notes, and snippets.

@Lyken17
Created March 8, 2026 23:16
Show Gist options
  • Select an option

  • Save Lyken17/02511b17777670949662830de7d7d1dd to your computer and use it in GitHub Desktop.

Select an option

Save Lyken17/02511b17777670949662830de7d7d1dd to your computer and use it in GitHub Desktop.
verl_32k_parason.sh
PYTHONUNBUFFERED=1 \
python3 -m verl.trainer.main_ppo \
algorithm.adv_estimator=grpo \
data.train_files="<your data>" \
data.val_files="<your val>" \
data.filter_overlong_prompts=True \
data.train_batch_size=128 \
data.val_batch_size=512 \
data.max_prompt_length=9216 \
data.max_response_length=8192 \
actor_rollout_ref.model.path=$MODEL_PATH \
actor_rollout_ref.actor.optim.lr=1e-6 \
actor_rollout_ref.model.use_remove_padding=True \
actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=null \
actor_rollout_ref.actor.ppo_mini_batch_size=null \
actor_rollout_ref.actor.use_dynamic_bsz=True \
actor_rollout_ref.actor.ppo_max_token_len_per_gpu=10240 \
actor_rollout_ref.rollout.max_num_batched_tokens=10240 \
actor_rollout_ref.actor.use_kl_loss=False \
actor_rollout_ref.actor.kl_loss_coef=0 \
actor_rollout_ref.actor.kl_loss_type=low_var_kl \
actor_rollout_ref.actor.entropy_coeff=0 \
actor_rollout_ref.actor.clip_ratio_low=0.2 \
actor_rollout_ref.actor.clip_ratio_high=0.28 \
actor_rollout_ref.actor.ulysses_sequence_parallel_size=1 \
actor_rollout_ref.model.enable_gradient_checkpointing=True \
actor_rollout_ref.actor.fsdp_config.param_offload=True \
actor_rollout_ref.actor.fsdp_config.optimizer_offload=True \
actor_rollout_ref.actor.fsdp_config.fsdp_size=-1 \
actor_rollout_ref.actor.grad_clip=1.0 \
actor_rollout_ref.rollout.tensor_model_parallel_size=1 \
actor_rollout_ref.rollout.name=vllm \
actor_rollout_ref.rollout.temperature=1.0 \
actor_rollout_ref.rollout.top_p=1.0 \
actor_rollout_ref.rollout.top_k=-1 \
actor_rollout_ref.rollout.enable_chunked_prefill=True \
actor_rollout_ref.rollout.n=8 \
actor_rollout_ref.rollout.gpu_memory_utilization=0.8 \
actor_rollout_ref.rollout.val_kwargs.do_sample=True \
actor_rollout_ref.rollout.val_kwargs.temperature=1.0 \
actor_rollout_ref.rollout.val_kwargs.top_p=1.0 \
actor_rollout_ref.rollout.val_kwargs.n=8 \
actor_rollout_ref.ref.fsdp_config.param_offload=True \
actor_rollout_ref.rollout.enforce_eager=False \
actor_rollout_ref.rollout.free_cache_engine=True \
actor_rollout_ref.rollout.max_model_len=32768 \
actor_rollout_ref.rollout.mode=async \
algorithm.use_kl_in_reward=False \
algorithm.norm_adv_by_std_in_grpo=False \
trainer.critic_warmup=0 \
trainer.logger=['console','tensorboard','wandb'] \
trainer.project_name='parason' \
trainer.experiment_name="qwen3-8b-32k-trial-num" \
trainer.val_before_train=False \
trainer.n_gpus_per_node="8" \
trainer.nnodes="1" \
trainer.save_freq=10 \
trainer.test_freq=10 \
trainer.default_hdfs_dir=null \
trainer.total_epochs=30 \
data.return_raw_chat=True \
trainer.max_actor_ckpt_to_keep=3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment