Skip to content

Conversation

@a-r-r-o-w
Copy link
Contributor

@a-r-r-o-w a-r-r-o-w commented Jul 25, 2025

The current implementation, after many of the recent updates, is hard to understand or debug/reason through. There is also one code path that seems completely unused (see the removed self.offload_to_disk_path related changes and the call into self._onload_from_disk).

This PR tries to refactor and clean up some of the implementation so that implementing new changes is easier in the future.

Related to comment which I'm trying to debug through

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Looks super clean!

I just ran some benchmarks to confirm if the changes don't have any detrimental effect on the speed-memory trade-off (code) and they look alright to me.

Would maybe also run all the group offloading tests on the GPU, too.

Copy link
Collaborator

@DN6 DN6 left a comment

Choose a reason for hiding this comment

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

Nice 👍🏽

@a-r-r-o-w
Copy link
Contributor Author

@sayakpaul Could you take another look? added a test as well

Copy link
Member

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

🔥

@a-r-r-o-w a-r-r-o-w merged commit cfd6ec7 into main Aug 6, 2025
15 checks passed
@a-r-r-o-w a-r-r-o-w deleted the refactor/condense-group-offloading branch August 6, 2025 14:31
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.

5 participants