Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add _no_split_modules to some models #10308

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

a-r-r-o-w
Copy link
Member

Adds some of the missing _no_split_modules for internal blocks to Allegro, Hunyuan, CogVideoX and CogView. The tests seem to be passing for the ones modified here. Will look into the remaining in a separate PR - it seems to be happening on models that have a scale_shift_table or similar learned nn.Parameter

CUDA_VISIBLE_DEVICES="2,3" pytest -s tests/models/transformers/ -k test_m
odel_parallelism
FAILED tests/models/transformers/test_models_transformer_aura_flow.py::AuraFlowTransformerTests::test_model_parallelism - RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1! (when checking argum...
FAILED tests/models/transformers/test_models_transformer_sana.py::SanaTransformerTests::test_model_parallelism - RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0!

The number of layers in the test was modified because if we don't, all layers end up on same device and the test fails (because it expects both devices to be used)

@a-r-r-o-w a-r-r-o-w requested a review from DN6 December 19, 2024 22:05
@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.

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