Skip to content

GPTQModel engine passes device_map= to GPTQModel.load, which GPT-QModel main now rejects (TypeError) #153

Done

Description

@Qubitium

Summary

evalution.engines.gptqmodel_engine.load_gptqmodel_runtime always calls

gptqmodel_module.GPTQModel.load(model_id_or_path=..., device_map=config.device_map, device=..., ...)

Since ModelCloud/GPTQModel#6473 (Accelerate removal, now on GPT-QModel main), GPTQModel.load rejects every Accelerate placement keyword, including device_map=None, and takes placement= instead:

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

So every evalution.GPTQModel(...).build(Model(path=...)) call fails before loading anything when paired with current GPT-QModel. Evalution 0.0.17 through 0.0.20 (latest on PyPI) and main (a00fdc7) are all affected.

Reproduce

GPT-QModel main (c649fcb5f), Evalution 0.0.20, any quantized checkpoint:

import evalution
engine = evalution.GPTQModel(device="cuda:0")
engine.build(evalution.Model(path="<any GPTQ checkpoint>"))
# TypeError: GPTQModel.load() does not accept `device_map` ...

GPT-QModel's own eval-backed tests (tests/eval.py consumers such as tests/test_simple_quant.py, tests/test_requant_embed_lm_head_e2e.py) fail the same way.

Expected

Default (device_map=None) loads with device= only. An explicit device_map is translated to placement= when GPTQModel.load accepts it ("auto" -> "accel:auto"; device strings and module-path mappings pass through), and older GPT-QModel releases without placement= keep receiving device_map.

Fix PR to follow.

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