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

[model][WIP] Support InternVL2_5 Series #7258

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kuangdd01
Copy link
Contributor

@Kuangdd01 Kuangdd01 commented Mar 11, 2025

What does this PR do?

Reopened PR #7077

may Fix #6322 #6432 #6236 #3802

  • But this PR is built upon the PR in Transformers. yonigozlan:add-intern-vl
  • The integration of this model into Transformers is still incomplete and may undergo further modifications.
  • The current code has been validated on 1B small size model and demo data.

Before submitting

some demo experiment on InternVL2_5-1B-MPO-hf

  1. video lora sft
### model
model_name_or_path: ../InternVL2_5-1B-MPO-hf
trust_remote_code: true

### method
stage: sft
do_train: true
finetuning_type: lora
lora_rank: 8
lora_target: all

### dataset
dataset: mllm_video_demo
# dataset: mllm_demo #, #identity,alpaca_en_demo  # video: mllm_video_demo
template: intern_vl
cutoff_len: 100000
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 4

### output
output_dir: saves/internvl-1b/lora/sft-test-demo-video
logging_steps: 1
save_steps: 500
plot_loss: true
overwrite_output_dir: true

### train
per_device_train_batch_size: 2
gradient_accumulation_steps: 1
learning_rate: 1.0e-4
num_train_epochs: 30.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
bf16: true
ddp_timeout: 180000000

### eval
# val_size: 0.1
# per_device_eval_batch_size: 1
# eval_strategy: steps
# eval_steps: 500

image

  1. mix data full sft
### model
model_name_or_path: /data_train/code/mllm/kuangdd/workspace/work/models/InternVL2_5-1B-MPO-hf
trust_remote_code: true

### method
stage: sft
do_train: true
finetuning_type: full


### dataset
dataset: mllm_demo, dentity, alpaca_en_demo  # video: mllm_video_demo
template: intern_vl
cutoff_len: 100000
max_samples: 1000
overwrite_cache: true
preprocessing_num_workers: 4

### output
output_dir: saves/internvl-1b/full/sft-test-demo
logging_steps: 1
save_steps: 500
plot_loss: true
overwrite_output_dir: true

### train
per_device_train_batch_size: 2
gradient_accumulation_steps: 1
learning_rate: 1.0e-4
num_train_epochs: 30.0
lr_scheduler_type: cosine
warmup_ratio: 0.1
bf16: true
ddp_timeout: 180000000

### eval
# val_size: 0.1
# per_device_eval_batch_size: 1
# eval_strategy: steps
# eval_steps: 500

image

@hiyouga hiyouga added the pending This problem is yet to be addressed label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending This problem is yet to be addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

InternVL2.5-8B finetuning
2 participants