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

[Bug]设置use_packed_ds=True的时候报错 #879

Open
3 tasks
cqray1990 opened this issue Jan 26, 2025 · 0 comments
Open
3 tasks

[Bug]设置use_packed_ds=True的时候报错 #879

cqray1990 opened this issue Jan 26, 2025 · 0 comments

Comments

@cqray1990
Copy link

Checklist

  • 1. I have searched related issues but cannot get the expected help.
  • 2. The bug has not been fixed in the latest version.
  • 3. Please note that if the bug-related issue you submitted lacks corresponding environment info and a minimal reproducible demo, it will be challenging for us to reproduce and resolve the issue, reducing the likelihood of receiving feedback.

Describe the bug

设置use_packed_ds=True的时候报错

python3.10/site-packages/transformers/trainer.py", line 620, in init
raise ValueError(
ValueError: The train_dataset does not implement len, max_steps has to be specified. The number of steps needs to be known in advance for the learning rate scheduler.

Reproduction

--use-env
--nnodes=1
--node_rank=0
--master_addr=127.0.0.1
--nproc_per_node=1
--master_port=34229
internvl_chat_finetune.py
--model_name_or_path
/media/user/2.0TB/llmmodel/llam_factory/InternVL2_5-4B
--conv_style
"internvl2_5"
--use_fast_tokenizer
False
--output_dir
work_dirs/internvl_chat_v2_5/internvl2_5_4b_dynamic_res_2nd_finetune_lora
--meta_path
"./shell/data/internvl_1_2_finetune_custom.json"
--overwrite_output_dir
True
--force_image_size
448
--max_dynamic_patch
6
--down_sample_ratio
0.5
--drop_path_rate
0.0
--freeze_llm
True
--freeze_mlp
True
--freeze_backbone
True
--use_llm_lora
16
--vision_select_layer
-1
--dataloader_num_workers
4
--bf16
True
--num_train_epochs
1
--per_device_train_batch_size
1
--gradient_accumulation_steps
8
--evaluation_strategy
"no"
--save_strategy
"steps"
--save_steps
200
--save_total_limit
1
--learning_rate
4e-5
--weight_decay
0.01
--warmup_ratio
0.03
--lr_scheduler_type
"cosine"
--logging_steps
1
--max_seq_length
8192
--do_train
True
--grad_checkpoint
True
--group_by_length
True
--dynamic_image_size
True
--use_thumbnail
True
--ps_version
v2
--deepspeed
"zero_stage1_config.json"
--report_to
"tensorboard"

Environment

ubantu 20

Error traceback

@cqray1990 cqray1990 changed the title [Bug] [Bug]设置use_packed_ds=True的时候报错 Jan 26, 2025
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