Repository navigation
docs: load with placement=, not device_map= (removed in #6473) - #6530
Merged
Merged
Conversation
GPTQModel.load/from_pretrained/from_quantized raise TypeError for device_map= since #6473, but the DeepSeek-V4.1 examples still passed it and two multi-GPU paragraphs still recommended it. The examples are skip-listed (101B download), so nothing executed them. - Use placement="accel" in the three DeepSeek-V4.1 examples and refresh their NOT_EXECUTED_BLOCKS digests. - Point the multi-GPU prose at placement= and docs/weight-loader.md. - Add a static guard over every docs/README Python block (executed or skip-listed) that rejects Accelerate placement keywords on GPT-QModel loaders, plus a check that each loader really raises TypeError for each removed keyword. Fixes #6507 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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
Since #6473,
GPTQModel.load/from_pretrained/from_quantizedraiseTypeErrorfordevice_map=and the other Accelerate placement keywords. The DeepSeek-V4.1 docs still passeddevice_map="auto"in all three examples, and two multi-GPU paragraphs still recommended it. Those examples are inNOT_EXECUTED_BLOCKSbecause they download a 101B checkpoint, so the docs runner never caught the failure.Fixes #6507
What Changed
docs/deepseek-v41-module-inventory.md: the three examples useplacement="accel", and the prose describesplacement=/Placementwith a link todocs/weight-loader.md.docs/multi_gpu_quantization.md: the two paragraphs that recommendeddevice_map="auto"now point atplacement=.tests/test_docs_contract_refs.py:test_doc_loader_examples_use_placement_not_device_mapis a static AST guard over every Python block indocs/**andREADME.md, including skip-listed blocks. It rejectsGPTQModel.load/from_pretrained/from_quantizedcalls that passdevice_map,max_memory,offload_folder,offload_state_dictoroffload_buffers.test_gptqmodel_loaders_reject_accelerate_placement_kwargs(15 cases) checks that each loader really raisesTypeErrornaming the keyword, so the guard stays tied to the public API.docs/config-serialization.mdanddocs/checkpoint-owned-materialization.mdstill describe the pre-Remove accelerate: explicit WeightLoader for weight loading, placement and offload (#6471) #6473from_quantizeddevice_map resolution as mechanism history. Neither has a copyable example that calls the loader.Tests
Red, on
origin/mainc649fcb docs with the new test:Green, on this branch (CPU only,
CUDA_VISIBLE_DEVICES=""):I also checked that the replacement call works:
GPTQModel.load(<Qwen1.5-0.5B-Chat>, placement="accel", quantize_config=QuantizeConfig(bits=4, group_size=128))loads on a CPU-only host. The DeepSeek-V4.1 checkpoints themselves (101B) were not loaded, so that remains unverified.Measured Impact
Not applicable (docs and test only).
Model Support / Module Plan
Not applicable.
Logic Flow Documentation
Not applicable: docs and test only, with no control-flow change.
Review Requirements
Kernel Accuracy Requirements
Not applicable.
Notes
Found during the release-readiness sweep. The removed keywords are a breaking change in the next release, so every copyable example should show
placement=.🤖 Generated with Claude Code