THUDM / THUDM/slime

[Bug] `assert config.no_sync_func is None` always gets hit second step

Open
#1,779 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
8.5k
Forks
1.3k
Avg merge
5h 36m
Merged PRs (30d)
22

Description

Bug Description

https://github.com/THUDM/slime/blob/5d7ca976039e738ebc2ed003a6f9312b00820810/slime/backends/megatron_utils/model.py#L524-L528

The first step it sets config.no_sync_func then the second step it crashes at the assert

Steps to Reproduce

Run any training with --overlap-grad-reduce

Expected Behavior

--overlap-grad-reduce works

Actual Behavior

Crashes 2nd step

Environment

any

Logs

Additional Context

No response

Pre-submission Checklist
  • I have read the CONTRIBUTING.md and understand the collaboration scope.
  • I have read the documentation and my issue is not addressed there.
  • I have searched for existing issues and this is not a duplicate.
  • I have provided a minimal, reproducible example.

Contributor guide

Open the contributing guide

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 at slime/backends/megatron_utils/model.py lines 524-528 and reproduce any training run with --overlap-grad-reduce. Trace how config.no_sync_func is set during the first step and why the assertion is reached on the second; done means the same training proceeds past step two without the crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.