Skip to content

Optimize mtp tensor process by compiling layer names once for all - #1554

Merged
xin3he merged 4 commits into
mainfrom
xinhe/3-17
Mar 17, 2026
Merged

Optimize mtp tensor process by compiling layer names once for all#1554
xin3he merged 4 commits into
mainfrom
xinhe/3-17

Conversation

@xin3he

@xin3he xin3he commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Description

Got report that mtp process uses 10min for name matching and 5 min for WOQ [GLM-5]
Now the time usage reduces from 15min to 1min

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Other (please specify):

Related Issues

Fixes or relates to #

Checklist Before Submitting

  • My code has been tested locally.
  • Documentation has been updated as needed.
  • New or updated tests are included where applicable.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR targets performance bottlenecks in copy_missing_tensors_from_source / WOQ handling by reducing repeated regex compilation and improving observability during long-running missing-tensor copy + (optional) FP8 dequant + WOQ steps.

Changes:

  • Adds optional tqdm progress bars for loading missing tensors, FP8 dequantization, and WOQ quantization loops.
  • Improves logging by summarizing involved parent layer names (compressed numeric ranges).
  • Optimizes WOQ per-layer override resolution by pre-compiling regex patterns once and caching resolved layer configs.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread auto_round/utils/missing_tensors.py Outdated
Comment thread auto_round/utils/missing_tensors.py Outdated
Comment thread auto_round/utils/missing_tensors.py Outdated
Comment thread auto_round/utils/missing_tensors.py Outdated
Comment thread auto_round/utils/missing_tensors.py Outdated
Comment thread auto_round/utils/missing_tensors.py
@wenhuach21
wenhuach21 self-requested a review March 17, 2026 07:04
xin3he and others added 3 commits March 17, 2026 15:16
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Xin He <xin3.he@intel.com>
@chensuyue chensuyue added this to the 0.12.0 milestone Mar 17, 2026
@xin3he
xin3he merged commit 1111bcd into main Mar 17, 2026
29 checks passed
@xin3he
xin3he deleted the xinhe/3-17 branch March 17, 2026 08:42
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.

4 participants