[NPU] Fix load torch_dist weight error - #396
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors NPU-specific logic. In tools/convert_hf_to_torch_dist.py, it conditionally imports mindspeed.megatron_adaptor and updates the distributed process group initialization depending on whether an NPU is detected. In vime/utils/arguments.py, the default value for --megatron-to-hf-mode is simplified to always default to "raw". Feedback on these changes highlights that calling is_npu() at the module level in tools/convert_hf_to_torch_dist.py can raise a RuntimeError if no NPU device is available, and suggests wrapping the call in a try-except block to prevent import-time crashes.
Documentation build overview
47 files changed ·
|
floatlibai
force-pushed
the
fix/ref-load
branch
from
August 22, 2026 08:41
445b688 to
b93ff56
Compare
floatlibai
force-pushed
the
fix/ref-load
branch
from
August 31, 2026 11:35
f65520d to
9eff995
Compare
Meihan-chen
reviewed
Aug 31, 2026
floatlibai
force-pushed
the
fix/ref-load
branch
from
September 1, 2026 08:53
9eff995 to
319e76c
Compare
Meihan-chen
reviewed
Sep 2, 2026
floatlibai
force-pushed
the
fix/ref-load
branch
2 times, most recently
from
September 3, 2026 03:55
d0ba21e to
18d643c
Compare
Signed-off-by: flb_ <floatlibai@gmail.com>
Signed-off-by: flb_ <floatlibai@gmail.com>
Signed-off-by: flb_ <floatlibai@gmail.com>
Signed-off-by: flb_ <floatlibai@gmail.com>
Signed-off-by: flb_ <floatlibai@gmail.com>
Signed-off-by: flb_ <floatlibai@gmail.com>
Signed-off-by: flb_ <floatlibai@gmail.com>
Signed-off-by: flb_ <floatlibai@gmail.com>
floatlibai
force-pushed
the
fix/ref-load
branch
from
September 3, 2026 07:25
319ecbb to
81eff1f
Compare
Meihan-chen
approved these changes
Sep 3, 2026
Meihan-chen
added a commit
to Meihan-chen/vime
that referenced
this pull request
Sep 9, 2026
Revert f5b8491 (vllm-project#409) and the associated NPU adaptations in 7a27808 and 81ae79d. Defer Qwen3.5 validation to the next stage with a fresh, matched serving and training environment. Remove the NPU-only GDN interfaces, FLA bootstrap and serving isolation, forced spawn, dedicated scripts/tests/CI entry, and FLA build recipe. Restore the pre-409 Bridge pin and patch while preserving the common TransformerLayer implementation. Retain S7 vllm-project#385 training-stack migration, vllm-project#396 torch_dist/ref-load, Qwen3-VL fixes, and main Qwen3.5 model code. Serving patches and latest patches are unchanged. No installed environment is rolled back. Validation: 183 grouped CPU tests passed; Ruff and runner shell syntax passed; common-to-NPU Megatron and reverted Bridge patches pass clean-base apply checks. Existing basic E2E and torch_dist PASS logs are retained; no fresh post-revert E2E was run. Signed-off-by: Meihan-chen <zr010426ztt@outlook.com>
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.
This PR resolves #380 by implementing the following changes:
tools/convert_hf_to_torch_dist.pyscript.default_megatron_to_hf_modeback toraw.