SYSTEM_PROMPT="""You are a helpful math assistant. Solve the problem step by step and put your final answer within \\boxed{}."""

CUDA_VISIBLE_DEVICES=0,1 \
NPROC_PER_NODE=2 \
megatron rlhf \
    --rlhf_type grpo \
    --model Qwen/Qwen3.5-2B \
    --teacher_model Qwen/Qwen3.5-9B \
    --enable_thinking false \
    --save_safetensors true \
    --expert_model_parallel_size 1 \
    --tensor_model_parallel_size 2 \
    --pipeline_model_parallel_size 1 \
    --sequence_parallel true \
    --system "$SYSTEM_PROMPT" \
    --dataset modelscope/gsm8k \
    --num_train_epochs 1 \
    --global_batch_size 16 \
    --micro_batch_size 2 \
    --steps_per_generation 2 \
    --num_generations 1 \
    --use_vllm true \
    --vllm_mode colocate \
    --vllm_gpu_memory_utilization 0.6 \
    --vllm_tensor_parallel_size 1 \
    --vllm_max_model_len 12288 \
    --sleep_level 1 \
    --freeze_vit false \
    --max_length 4096 \
    --max_completion_length 2048 \
    --tuner_type lora \
    --lora_rank 8 \
    --lora_alpha 32 \
    --target_modules all-linear \
    --lr 3e-5 \
    --bf16 true \
    --beta 0 \
    --epsilon 0.2 \
    --epsilon_high 0.2 \
    --loss_type grpo \
    --offload_model true \
    --offload_bridge false \
    --offload_optimizer true \
    --log_rollout_offpolicy_metrics true \
    --logging_steps 1 \
    --recompute_granularity selective \
    --finetune \
    --dataloader_num_workers 8 \
    --dataset_num_proc 8 \
    --no_save_optim \
    --no_save_rng \
    --attention_backend flash \
    --temperature 1 \
    --padding_free false \
    --log_completions true \
    --report_to swanlab \
    --train_iters 1000 \
    --eval_steps 1000 \
    --save_steps 100 \
    --top_k 0 \
    --top_p 1
