Repository navigation
Conversation
Brings in #2019 (explicit dtype on the from-module path), #2020 (dtype, device and eval() on the no-weights path), #2021 and #2023. Conflicts resolved in _bridge_builder.py (one multi_gpu import; the docstring covers both the dtype cast and the device move), source.py (dev's load_weights docstring) and interchange.py (dev's random_init_bridge, since boot now applies dtype and device itself). Follow-ons forced by #2020: boot's no-weights device read-back and its test are dropped, because that path now moves the model and cfg.device follows the move; the random-init interchange test returns to dev's version. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
Description
device=moves a pre-loadedhf_model–boot_transformers(hf_model=..., device=...)recorded the request incfg.deviceand left the model where it was, socfg.devicenamed a device the weights were not on and string inputs, which are sent tocfg.device, failed at the first forward. The model is now moved to the devicebuild_bridge_from_moduleappliesdevice=too – it recorded the request without moving the supplied module, with the same mismatch. It now moves it, andcfg.devicereports where the parameters are.device_mapor quantizer raise – a model carryinghf_device_mapor a quantization config keeps the placement it was loaded with. Adevice=naming the device its input embedding is on is accepted, and any other raisesValueErrorwhere it used to be dropped or recorded.cfg.devicereportsmeta.Type of change
Checklist: