Skip to content

Add ZLab I1 segmented checkpointing support - #2961

Merged
bghira merged 1 commit into
agent/segmented-checkpointing-z-imagefrom
agent/segmented-checkpointing-zlab-i1
Aug 3, 2026
Merged

Add ZLab I1 segmented checkpointing support#2961
bghira merged 1 commit into
agent/segmented-checkpointing-z-imagefrom
agent/segmented-checkpointing-zlab-i1

Conversation

@bghira

@bghira bghira commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Summary

Splits the ZLab I1 segmented checkpointing support model integration out of #2925.

  • applies the model-family checkpointing hooks and support flags
  • adds this family to the relevant safety-check allow-lists
  • keeps the shared runtime/docs in the base PR so this diff stays model-specific

Stack

Base branch: agent/segmented-checkpointing-z-image

Validation

  • .venv/bin/python -m unittest tests.test_segmented_checkpointing_model_support -v
  • .venv/bin/python -m unittest tests.test_zlab_i1_model -v
  • commit hooks: Black, isort, flake8, whitespace checks

@bghira
bghira requested a review from Copilot August 3, 2026 09:33
@bghira
bghira marked this pull request as ready for review August 3, 2026 09:33

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

Adds segmented checkpointing support for the ZLab I1 transformer family, integrating the shared segmented-checkpointing runtime hooks into the model implementation and ensuring the family is permitted by safety checks and covered by targeted tests.

Changes:

  • Implement segmented checkpointing execution in ZlabI1Transformer2DModel.forward() using checkpoint_sequential_state and should_checkpoint_block.
  • Add ZLab I1 to safety-check allow-lists for interval and segment-stride checkpointing controls.
  • Add/extend unit tests validating both the presence of checkpointing controls and the ZLab I1 transformer’s use of the sequential-state helper.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
simpletuner/helpers/models/zlab_i1/transformer.py Adds interval/stride fields + setters and integrates segmented checkpointing into the ZLab I1 forward pass.
simpletuner/helpers/training/default_settings/safety_check.py Allow-lists zlab_i1 for checkpoint interval and segment stride options.
tests/test_zlab_i1_model.py Adds a unit test asserting ZLab I1 segmented checkpointing routes through checkpoint_sequential_state.
tests/test_segmented_checkpointing_model_support.py Adds model-family support test coverage for ZLab I1 checkpointing controls.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bghira
bghira force-pushed the agent/segmented-checkpointing-zlab-i1 branch from 4047612 to 6c2bf83 Compare August 3, 2026 10:23
@bghira
bghira force-pushed the agent/segmented-checkpointing-zlab-i1 branch from 6c2bf83 to a2cda25 Compare August 3, 2026 10:45
@bghira
bghira force-pushed the agent/segmented-checkpointing-zlab-i1 branch from a2cda25 to d51fcec Compare August 3, 2026 15:30
@bghira
bghira force-pushed the agent/segmented-checkpointing-zlab-i1 branch from d51fcec to a32d87f Compare August 3, 2026 15:32
@bghira
bghira force-pushed the agent/segmented-checkpointing-zlab-i1 branch from a32d87f to ad41cde Compare August 3, 2026 15:33
@bghira
bghira force-pushed the agent/segmented-checkpointing-zlab-i1 branch from ad41cde to aa39320 Compare August 3, 2026 15:35
@bghira
bghira merged commit 3504e55 into main Aug 3, 2026
2 checks passed
@bghira
bghira deleted the agent/segmented-checkpointing-zlab-i1 branch August 3, 2026 15:36
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