feat: enable meta device targets in TransformerBridge device_map#1493
Open
hiro-nikaitou wants to merge 1 commit into
Open
feat: enable meta device targets in TransformerBridge device_map#1493hiro-nikaitou wants to merge 1 commit into
hiro-nikaitou wants to merge 1 commit into
Conversation
Part of TransformerLensOrg#1280. Enables 'meta' device targets in TransformerBridge device_map, building on the CPU support shipped in TransformerLensOrg#1459. - Remove 'meta' from _UNSUPPORTED_OFFLOAD_DEVICE_MAP_VALUES - Update docstrings and error messages to reflect meta support - Remove 'meta' from post-load hf_device_map validation (now warning only) - Update test: test_meta_value_in_device_map_rejected -> allowed Meta-offloaded parameters are skipped by cast_floating_params_to_dtype but may still cause forward-pass errors in Bridge-wrapped components that access offloaded tensors without Accelerate align_module_device. This is safe for config inspection (load_weights=False) and documented in resolve_device_map docstring. Disk offload remains blocked pending the hook-routing fix described in PR TransformerLensOrg#1459. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: hiro-nikaitou <vieteviete@proton.me>
3 tasks
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.
Part of #1280.
Enables device targets in TransformerBridge , building on the CPU support shipped in #1459.
Changes:
Limitations (documented in resolve_device_map docstring):
Meta-offloaded parameters are skipped by but may still cause forward-pass errors in Bridge-wrapped components that access offloaded tensors without Accelerate . This is safe for config inspection () and for users who understand the constraints.
Closes the portion of #1280. Disk offload remains blocked pending the hook-routing fix described in #1459.