aiharbor.msxf.local/aidev/modelscope:ubuntu22.04-cuda12.8.1-py311-torch2.10.0-vllm0.17.1-modelscope1.34.0-swift4.0.3
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
NPROC_PER_NODE=8 \
MAX_PIXELS=602112 \
MASTER_PORT=29600 \
megatron rlhf \
--rlhf_type grpo \
--model /models \
--save_safetensors true \
--context_parallel_size 1 \
--tensor_model_parallel_size 1 \
--pipeline_model_parallel_size 1 \
--dataset '/datasets/retro-swift.jsonl' \
--num_train_epochs 1 \
--global_batch_size 64 \
--micro_batch_size 2 \
--steps_per_generation 4 \
--num_generations 8 \
--external_plugins /files/v1.py \
--reward_funcs tag_count_reward strict_format_reward soft_format_reward \
--use_vllm true \
--vllm_mode colocate \
--vllm_gpu_memory_utilization 0.4 \
--vllm_max_model_len 10240 \
--max_length 8192 \
--max_completion_length 2048 \
--tuner_type full \
--lr 1e-6 \
--bf16 true \
--beta 0.001 \
--importance_sampling_level token \
--epsilon 0.2 \
--epsilon_high 0.2 \
--dynamic_sample false \
--overlong_filter true \
--loss_type grpo \
--sleep_level 2 \
--offload_model true \
--offload_bridge false \
--offload_optimizer 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 \--gradient_accumulation_fusion false \
--temperature 1.0 \
--system "You are an expert organic chemist. For the given product molecule, perform a rigorous retrosynthetic analysis to identify the most likely reactants. Please reason step by step, enclosing your reasoning traces between <think> and </think>, then place the final SMILES prediction(no extra words)." \
--padding_free true \
--log_completions true \
--report_to wandb \
--train_iters 100 \
--gradient_accumulation_fusion false \
--eval_steps 1000 \
--save_steps 1000