Skip to content

[model][WIP]Support InternVL2_5 series - #7077

Closed
Kuangdd01 wants to merge 2702 commits into
hiyouga:mainfrom
Kuangdd01:internvl2_5
Closed

Kuangdd01 wants to merge 2702 commits into
hiyouga:mainfrom
Kuangdd01:internvl2_5

Conversation

@Kuangdd01

Copy link
Copy Markdown
Collaborator

What does this PR do?

may Fix #6322 #6432 #6236 #3802

  • But this PR 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 @BUAADreamer

hiyouga and others added 30 commits December 14, 2024 17:36
- Introduced a new model parameter `trust_remote_code`
- Set the default value of `trust_remote_code` to `False`
  to enhance security
Add trust_remote_code Parameter and Set Default to False
[model&template] add llama3.3 & support llama3 tool prompt
[template] support qwen2 tool template
Kuangdd01 and others added 23 commits February 26, 2025 16:53
* webui add swanlab link

* change callback name

* update

---------

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
* add bailing template

* add bailing template

* add bailing template

---------

Co-authored-by: chengshiwen.csw@antgroup.com <chengshiwen.csw@antgroup.com>
* Update pairwise.py

[data]Repair multimodal model dpo training

* Update pairwise.py

[data]repair multimodal model dpo training using deepcopy

* Update pairwise.py

* Update mm_plugin.py
Co-authored-by: zhangchuanhui <zhangchal@digitalchina.com>
* fix dataloader

* add test case

* fix type

* fix ci

* fix ci

* fix ci

* disable overwrite cache in ci
@hiyouga

hiyouga commented Mar 11, 2025 •

Copy link
Copy Markdown
Owner

Hello, we just used BFG repo cleaner to remove large files in this repo. Unfortunately, this operation accidentally made all PRs invalid. Could you please recreate the same PRs using the latest main branch at your convenience? Thank you so much for your understanding, and we sincerely apologize for any inconvenience this has brought to you.

P.S. You can set https://github.com/hiyouga/LLaMA-Factory-backup as the upstream to find the changes back.

@hiyouga hiyouga added invalid This doesn't seem right and removed pending This problem is yet to be addressed labels Mar 11, 2025
@Kuangdd01 Kuangdd01 mentioned this pull request Mar 11, 2025
2 tasks done
@Kuangdd01
Kuangdd01 deleted the internvl2_5 branch December 19, 2025 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InternVL2.5-8B finetuning