modelscope / modelscope/mcore-bridge

GLM5.2 微调调用dsa的时候,不开重计算参数不对齐,开启重计算是正常的

Open
#143 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
101
Forks
43
Avg merge
1d 23h
Merged PRs (30d)
23

Description

Checklist / 检查清单
  • I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
Image 如图,开启重计算的时候会走else分支,此时会判断是否为dsa并传入x 和qr,而不开重计算的时候不会传入,并且_checkpointed_attention_forward中也没有判断dsa的逻辑,导致调用接口失败 报错如下: Image
How to Reproduce / 如何复现

微调glm5.2,并且不开启recompute参数
--recompute_granularity full
--recompute_method uniform
--recompute_num_layers 1
若增加以上三个参数,则可以规避该问题

Additional Information / 补充信息

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing GLM5.2 fine-tuning with recompute disabled, then compare the DSA attention call with the recompute-enabled path. Trace _checkpointed_attention_forward and the dsa-specific x and qr arguments described in the report. Done means the no-recompute path no longer fails with the reported argument-alignment error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.