Skip to content

[Refactor] Move float8_handler initialization from TrainEngine to BaseModel#1517

Open
HAOCHENYE wants to merge 2 commits intogh/HAOCHENYE/17/basefrom
gh/HAOCHENYE/17/head
Open

[Refactor] Move float8_handler initialization from TrainEngine to BaseModel#1517
HAOCHENYE wants to merge 2 commits intogh/HAOCHENYE/17/basefrom
gh/HAOCHENYE/17/head

Conversation

@HAOCHENYE
Copy link
Collaborator

@HAOCHENYE HAOCHENYE commented Mar 2, 2026

Stack from ghstack (oldest at bottom):


  • Remove float8_handler as a direct attribute of TrainEngine
  • Add float8_handler as a lazy-initialized property in BaseModel
  • Move Float8Handler.build() logic to Float8Config.build()
  • Update _maybe_precompute_float8_dynamic_scale_for_fsdp to iterate through model modules

[ghstack-poisoned]
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Mar 2, 2026
…eModel

- Remove float8_handler as a direct attribute of TrainEngine
- Add float8_handler as a lazy-initialized property in BaseModel
- Move Float8Handler.build() logic to Float8Config.build()
- Update _maybe_precompute_float8_dynamic_scale_for_fsdp to iterate through model modules


ghstack-source-id: fdad8ec
Pull-Request: InternLM#1517
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Mar 3, 2026
…eModel

- Remove float8_handler as a direct attribute of TrainEngine
- Add float8_handler as a lazy-initialized property in BaseModel
- Move Float8Handler.build() logic to Float8Config.build()
- Update _maybe_precompute_float8_dynamic_scale_for_fsdp to iterate through model modules


ghstack-source-id: fdad8ec
Pull-Request: InternLM#1517
[ghstack-poisoned]
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Mar 3, 2026
…eModel

- Remove float8_handler as a direct attribute of TrainEngine
- Add float8_handler as a lazy-initialized property in BaseModel
- Move Float8Handler.build() logic to Float8Config.build()
- Update _maybe_precompute_float8_dynamic_scale_for_fsdp to iterate through model modules


ghstack-source-id: b3e7123
Pull-Request: InternLM#1517
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.

1 participant