multimodalart HF Staff commited on
Commit
bdd4ff0
·
verified ·
1 Parent(s): ed1edfd

Delete OneEmo/scripts/train_sft_then_chord.sh with huggingface_hub

Browse files
OneEmo/scripts/train_sft_then_chord.sh DELETED
@@ -1,94 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
-
4
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5
- REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
6
- ROLLOUT_HOST="${ROLLOUT_HOST:-127.0.0.1}"
7
- ROLLOUT_PORT="${ROLLOUT_PORT:-8000}"
8
-
9
- MODEL_DIR="${MODEL_DIR:-/path/to/your/OneEmo/ckpts/inference_ckpts/sft/oneemo_p1_e5_20260525}"
10
- OUTPUT_DIR="${OUTPUT_DIR:-$REPO_ROOT/ckpts/training_ckpts/grpo_oneemo_chord}"
11
- export VIDEMO_SENTENCE_BERT_MODEL="$REPO_ROOT/ckpts/all-mpnet-base-v2"
12
-
13
- # CHORD is used here as an SFT anchor on the same task family as RL.
14
- # The sample counts below are chosen so that each SFT dataset uses roughly the
15
- # same sampling rate as its RL counterpart on the full dataset.
16
- IMAGE_MAX_TOKEN_NUM=1024 \
17
- VIDEO_MAX_TOKEN_NUM=128 \
18
- FPS_MAX_FRAMES=16 \
19
- FORCE_QWENVL_VIDEO_READER=decord \
20
- CUDA_VISIBLE_DEVICES=0 \
21
- NPROC_PER_NODE=1 \
22
- swift rlhf \
23
- --rlhf_type grpo \
24
- --model "$MODEL_DIR" \
25
- --dataset "$REPO_ROOT/datas/rl/dfew_msa.json#1000" \
26
- "$REPO_ROOT/datas/rl/dfew_mer.json#1200" \
27
- "$REPO_ROOT/datas/rl/mer2025ov.json#1000" \
28
- "$REPO_ROOT/datas/rl/mintrec.json#500" \
29
- "$REPO_ROOT/datas/rl/mintrec2.json#1200" \
30
- "$REPO_ROOT/datas/rl/mustard.json#160" \
31
- "$REPO_ROOT/datas/rl/urfunny.json#800" \
32
- "$REPO_ROOT/datas/rl/avamerg.json#2000" \
33
- "$REPO_ROOT/datas/rl/openr1psy.json#800" \
34
- --chord_sft_dataset "$REPO_ROOT/datas/sftnew/dfew_msa.json#3000" \
35
- "$REPO_ROOT/datas/sftnew/dfew_mer.json#3600" \
36
- "$REPO_ROOT/datas/sftnew/mercaptionplus.json#5000" \
37
- "$REPO_ROOT/datas/sftnew/mintrec.json#1200" \
38
- "$REPO_ROOT/datas/sftnew/mintrec2.json#3600" \
39
- "$REPO_ROOT/datas/sftnew/mustard.json#387" \
40
- "$REPO_ROOT/datas/sftnew/urfunny.json#1992" \
41
- "$REPO_ROOT/datas/sftnew/avamerg.json#8000" \
42
- "$REPO_ROOT/datas/sftnew/openr1psy.json#3000" \
43
- --chord_sft_per_device_train_batch_size 1 \
44
- --chord_mu_warmup_steps 500 \
45
- --chord_mu_decay_steps 6000 \
46
- --chord_mu_peak 0.5 \
47
- --chord_mu_valley 0.02 \
48
- --chord_enable_phi_function true \
49
- --load_from_cache_file true \
50
- --external_plugins "$REPO_ROOT/reward/reward_plugin.py" \
51
- --reward_funcs format process answer \
52
- --reward_weights 0.5 0.5 1.0 \
53
- --use_vllm true \
54
- --vllm_mode server \
55
- --vllm_server_host "$ROLLOUT_HOST" \
56
- --vllm_server_port "$ROLLOUT_PORT" \
57
- --vllm_tensor_parallel_size 1 \
58
- --gradient_accumulation_steps 8 \
59
- --max_length 1536 \
60
- --max_completion_length 1024 \
61
- --overlong_filter true \
62
- --num_train_epochs 5 \
63
- --per_device_train_batch_size 1 \
64
- --per_device_eval_batch_size 1 \
65
- --dataset_num_proc 2 \
66
- --dataloader_num_workers 2 \
67
- --num_generations 8 \
68
- --temperature 0.7 \
69
- --top_p 0.9 \
70
- --epsilon 0.2 \
71
- --beta 0.06 \
72
- --tuner_type lora \
73
- --lora_rank 16 \
74
- --lora_alpha 32 \
75
- --target_modules all-linear \
76
- --freeze_vit true \
77
- --freeze_aligner true \
78
- --torch_dtype bfloat16 \
79
- --gradient_checkpointing_kwargs '{"use_reentrant": false}' \
80
- --learning_rate 2e-6 \
81
- --lr_scheduler_type cosine \
82
- --new_special_tokens "$SCRIPT_DIR/task_tokens.txt" \
83
- --enable_thinking true \
84
- --output_dir "$OUTPUT_DIR" \
85
- --warmup_ratio 0.05 \
86
- --deepspeed zero2 \
87
- --save_strategy steps \
88
- --save_steps 1000 \
89
- --save_total_limit 20 \
90
- --log_completions true \
91
- --dynamic_sample true \
92
- --truncation_strategy delete \
93
- --overlong_filter true \
94
- --max_resample_times 5