Skip to content

docs: DeepSeek-V4.1 and multi-GPU docs still pass device_map= to GPTQModel.load (TypeError since #6473) #6507

Done

Description

@Qubitium

Summary

Since #6473, GPTQModel.load() / from_pretrained() / from_quantized() raise TypeError for device_map= (and max_memory=, offload_folder=, ...). The replacement is placement= (docs/weight-loader.md). Several docs still tell users to pass device_map:

Doc Location Problem
docs/deepseek-v41-module-inventory.md all three Python examples (lines 15-18, 76-80, 108-112) GPTQModel.load(..., device_map="auto") raises TypeError
docs/deepseek-v41-module-inventory.md line 22 prose "device_map="auto" places whole decoder layers, and an explicit device map can pin those layers"
docs/multi_gpu_quantization.md line 50 prose "Loading an already-quantized model across GPUs ... can use device_map="auto""
docs/multi_gpu_quantization.md line 900 prose "Loading the quantized model with device_map="auto" installs ... AlignDevicesHook"

tests/test_docs_contract_refs.py does not catch it: the DeepSeek blocks are skip-listed in NOT_EXECUTED_BLOCKS because they download a 101B checkpoint, and no static check rejects the removed keywords.

Reproduction (audited commit c649fcb, CPU only)

from gptqmodel import GPTQModel
GPTQModel.load("facebook/opt-125m", device_map="auto")

Actual:

TypeError: GPTQModel.load() does not accept `device_map`: GPT-QModel does not consume Accelerate's placement arguments. Use placement= (gptqmodel.weight_loader.Placement).

Expected: the docs show the supported call, GPTQModel.load(..., placement="accel").

Impact

Users who copy the DeepSeek-V4.1 examples get a TypeError on the first line. The breaking change ships in the next release, so the docs should describe only placement=.

Proposed fix

  • Replace device_map="auto" with placement="accel" in the three examples and update their NOT_EXECUTED_BLOCKS digests.
  • Rewrite the prose in both docs to use placement=.
  • Add a static guard to tests/test_docs_contract_refs.py. For every Python block in docs/ and README.md, it rejects a GPTQModel.load/from_pretrained/from_quantized call that passes an Accelerate placement keyword, including skip-listed blocks. It also checks that the real API still raises TypeError for each of those keywords.

Found during the release-readiness sweep (packaging/docs area).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions