Uh oh!
There was an error while loading. Please reload this page.
[core] feat: support group offloading at the pipeline level - #12283
Conversation
| record_stream: bool = False, | ||
| low_cpu_mem_usage=False, | ||
| offload_to_disk_path: Optional[str] = None, | ||
| exclude_modules: Optional[Union[str, List[str]]] = None, |
There was a problem hiding this comment.
I think it's okay to expose this as an argument as opposed to how we do model_cpu_offload_seq, for example:
This is because model CPU offloading relies on a sequence for device management. I don't think we have that constraint in the case of group offloading.
HuggingFaceDocBuilderDev
commented
Sep 4, 2025
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. |
stevhliu
commented
Sep 4, 2025
Really neat how simplified this has become! 🎉 |
a-r-r-o-w
left a comment
There was a problem hiding this comment.
Nice! We could reduce LoC by creating a kwargs dict and passing into both branches, but definitely not a blocker
Tests look good but maybe the two could be combined into one to reduce total run count
init Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
What does this PR do?
to
Of course, if users still want to apply different offloading techniques to different model-level components, they can easily choose to do so. But IMO,
enable_group_offload()is an easier entrypoint.We can allow users to pass mappings like we do for
quant_mappinginPipelineQuantizationConfigin the future.Will request for reviews after CI.
TODOs