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

[TorchACC]support batch flattening collator #2499

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

eedalong
Copy link
Contributor

PR type

  • Bug Fix
  • New Feature
  • Document Updates
  • More Models or Datasets Support

PR information

Support batch flattening to avoid padding for better training performance and less memory usage. The function has the same behaviour with DataCollatorWithFlattening

Experiment results

Effectively reduce peak memory for ~25% and 50% maximum training throughput improvement.

@eedalong eedalong force-pushed the support_batch_flattening branch from 396032c to 148e85e Compare November 25, 2024 06:42
@eedalong eedalong closed this Nov 25, 2024
@eedalong eedalong reopened this Nov 25, 2024
@Jintao-Huang Jintao-Huang merged commit 6b30748 into modelscope:main Nov 25, 2024
3 of 4 checks passed
tastelikefeet added a commit that referenced this pull request Dec 3, 2024
…actor3

* commit '2bbc325ca789592197d2004bb0ffc47cc39c0317': (140 commits)
  fix
  fix
  update safe_ddp_context
  fix
  fix
  update row_processor
  support glm-edge & glm-edge-v (#2526)
  fix open-o1
  support qwq-32b-preview (#2520)
  support mPLUG-Owl3 241101 (#2515)
  fix latex-ocr (#2510)
  support batch flattening collator (#2499)
  fix eval_dataset no (#2497)
  Support marco o1 (#2496)
  Fix preprocess num proc (#2492)
  fix awq quant device_map (#2488)
  Update Common QA (#2475)
  fix kto (#2478)
  update padding strategy for persistent cache (#2464)
  fix qwen2vl pt infer (#2463)
  ...

# Conflicts:
#	docs/source/Instruction/命令行参数.md
#	docs/source/LLM/人类偏好对齐训练文档.md
#	docs/source/Multi-Modal/index.md
#	docs/source/Multi-Modal/qwen2-vl最佳实践.md
#	docs/source/Multi-Modal/人类偏好对齐训练文档.md
#	docs/source_en/Instruction/Command-line-parameters.md
#	docs/source_en/Instruction/Common-QA.md
#	docs/source_en/LLM/Human-Preference-Alignment-Training-Documentation.md
#	docs/source_en/Multi-Modal/qwen2-vl-best-practice.md
@Jintao-Huang Jintao-Huang changed the title support batch flattening collator [TorchACC]support batch flattening collator Dec 12, 2024
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

Successfully merging this pull request may close these issues.

2 participants