Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dpo_ov7b.sh训练问题 #333

Open
zhanghang-official opened this issue Nov 5, 2024 · 0 comments
Open

dpo_ov7b.sh训练问题 #333

zhanghang-official opened this issue Nov 5, 2024 · 0 comments

Comments

@zhanghang-official
Copy link

1、train_dpo.py需要from data_processing.utils import load_jsonl, load_json,缺失data_processing文件
2、modality_lengths函数中要计算answer字段的长度,dpo数据集构造中没有answer字段
3、A800 80G显卡训练显存不够,如何优化
命令如下:
torchrun --nproc_per_node=8
llava/train/train_dpo.py
--deepspeed scripts/zero3.json
--model_name_or_path=${SFT_MODEL}
--dpo_alpha=1.0
--beta=${beta}
--gamma=0
--version $PROMPT_VERSION
--data_path=$DATA_PATH
--image_folder /raid/zhanghang02/llava_ov/images
--video_folder /raid/zhanghang02/llava_ov/videos
--mm_tunable_parts="mm_vision_tower,mm_mlp_adapter,mm_language_model"
--unfreeze_mm_vision_tower True
--vision_tower ${VISION_MODEL_VERSION}
--mm_projector_type mlp2x_gelu
--mm_vision_select_layer -2
--mm_use_im_start_end False
--mm_use_im_patch_token False
--group_by_modality_length True
--image_aspect_ratio anyres_max_9
--image_grid_pinpoints "(1x1),...,(6x6)"
--mm_patch_merge_type spatial_unpad
--bf16 True
--run_name $DPO_CLEAN_NAME
--output_dir $OUTPUT_DIR
--num_train_epochs $EPOCH
--per_device_train_batch_size 1
--per_device_eval_batch_size 1
--gradient_accumulation_steps 16
--evaluation_strategy "no"
--save_strategy "steps"
--save_steps 1000
--save_total_limit 1
--learning_rate 5e-7
--weight_decay 0.
--warmup_ratio 0.1
--lr_scheduler_type "cosine"
--logging_steps 1
--tf32 True
--model_max_length 32768
--gradient_checkpointing True
--dataloader_num_workers 4
--lazy_preprocess True
--report_to wandb
--dataloader_drop_last True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant