fix(integrations): forward distributed sharding options - #41
Merged
Merged
Conversation
Expose the core distributed_sharded and shard strategy controls through Transformers, Diffusers models, and Diffusers pipelines. Add dependency-free API plumbing guards and document that the distributed loader applies to ordinary BF16 and FP32 packs as well as quantized packs.
Contributor
Author
|
@codex review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FlashPack's core loader already supports both rank-0 read+broadcast and one-shard-per-rank read+replicate for arbitrary packed dtypes. The high-level integrations did not expose that contract consistently:
distributed_shardedanddistributed_shard_strategy, so callers got rank-0 broadcast even when they requested sharded reads.**kwargs, but did not declare or explicitly forward them.This change makes both options first-class across all three high-level paths and documents that distributed loading works for ordinary BF16/FP32 packs as well as quantized packs.
Changes
FlashPackDiffusionPipelineandload_sub_model_flashpack.Test plan
uv run --extra dev pytest -q -m 'not network'— 244 passed, 4 skipped, 4 deselected..venv/bin/pre-commit run --all-files— all hooks passed.diffusers/transformersdependencies that are not in the dev extra.