forked from modelscope/ms-swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmoe_colocate_lora.sh
More file actions
54 lines (54 loc) · 1.52 KB
/
moe_colocate_lora.sh
File metadata and controls
54 lines (54 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
NPROC_PER_NODE=8 \
PYTORCH_CUDA_ALLOC_CONF='expandable_segments:True' \
megatron rlhf \
--rlhf_type grpo \
--model Qwen/Qwen3-30B-A3B-Instruct-2507 \
--load_safetensors true \
--save_safetensors true \
--merge_lora false \
--context_parallel_size 2 \
--tensor_model_parallel_size 2 \
--expert_model_parallel_size 4 \
--pipeline_model_parallel_size 2 \
--dataset open-r1/DAPO-Math-17k-Processed \
--max_epochs 1 \
--global_batch_size 64 \
--micro_batch_size 2 \
--steps_per_generation 2 \
--num_generations 8 \
--reward_funcs accuracy format \
--use_vllm true \
--vllm_mode colocate \
--vllm_gpu_memory_utilization 0.3 \
--vllm_tensor_parallel_size 4 \
--vllm_max_model_len 16384 \
--max_length 8192 \
--max_completion_length 8192 \
--train_type lora \
--lr 5e-5 \
--bf16 true \
--beta 0.00 \
--importance_sampling_level sequence \
--epsilon 3e-4 \
--epsilon_high 4e-4 \
--dynamic_sample false \
--overlong_filter true \
--loss_type grpo \
--sleep_level 2 \
--offload_model true \
--offload_bridge false \
--offload_optimizer true \
--log_interval 1 \
--recompute_granularity selective \
--finetune \
--num_workers 8 \
--dataset_num_proc 8 \
--no_save_optim \
--no_save_rng \
--attention_backend flash \
--temperature 1.0 \
--padding_free true \
--sequence_parallel true \
--log_completions true \
--report_to wandb