Repository navigation
fix(loader): treat a None placement kwarg as absent - #6676
Merged
Merged
Conversation
_reject_accelerate_placement_kwargs rejected any occurrence of device_map/max_memory/offload_* even when the value was None. None is not a placement request, and evalution's GPTQModel engine passes its default device_map=None unconditionally, so every evalution-backed evaluation failed before loading the model. Keep the loud TypeError for real values and drop the None entries so they never reach Transformers. The existing docstring already describes the contract as "any non-None map". Co-Authored-By: Claude Opus 5.5 <[email protected]>
Qubitium
marked this pull request as ready for review
December 1, 2026 17:47
This was referenced Dec 1, 2026
Qubitium
added a commit
that referenced
this pull request
Dec 1, 2026
…#6682) The test requires chat-template ARC-Challenge acc_norm >= 0.34, but the same checkpoint has scored 0.3378839590443686 on GPU 3 since at least 4c5d902 (Oct 1): identical at aff56aa (parent of the device_map=None rejection), d2dfb93 (Transformers 5.23 port), 0071b1a (pre-port) and with #6676. The 0.34 floor is 0.15 binomial SE above the observed score (n=1172, SE=0.0138), so it is not a meaningful quality gate. The commented 0.3515 is the raw-prompt acc, not the chat-template acc_norm: the same checkpoint scores 0.3771 acc_norm without the chat template and 0.3379 with it; the backend spread with the chat template is only 0.17 points (Marlin 0.3379 vs ExLlamaV2/Torch 0.3396). Set the floor to 0.32 (1.3 SE below the observed score, just above the 95% one-sided lower bound 0.315) and record the measurements so the next adjustment is evidence-based. 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
_reject_accelerate_placement_kwargsrejected any occurrence of the removedAccelerate keys, including
None. ANonevalue is not a placement request,and integrations pass their defaults through unconditionally: evalution 0.0.17
calls
from
evalution.engines.gptqmodel_engine, so every evalution-backed evaluationfailed before the model was read:
This is red on
mainfortests/test_eval_runtime.py::TestEvalRuntime::test_eval_directand for the evalution-backed integration tests (
test_simple_quant.py,test_eval.py,test_mmlupro.py,test_quant_and_eora.py).What Changed
gptqmodel/models/loader.py: keep the loudTypeErrorfor every actualplacement value, but drop
Noneentries instead of rejecting them, so theremoved vocabulary never reaches Transformers.
tests/test_accelerate_isolation.py: pin both halves:Nonekeys areremoved, and each non-
Nonevalue still raises.No behavior changes for real placement requests;
device_map=Noneisequivalent to not passing the argument.
Tests
New regression test, red on
mainand green on the PR:With the fix,
test_eval_runtime.py::TestEvalRuntime::test_eval_directgetspast the
device_maprejection and reaches dataset loading (it then fails inthis offline sandbox because
allenai/ai2_arcis not cached under the temporaryHF home; no GPU is available here either). The TypeError is gone.
Full affected sets on the PR head:
Measured Impact
Not applicable: no VRAM, performance, or accuracy path changed.
Model Support / Module Plan
Not applicable: no model definition or module plan changed.
AWQ onboarding safety
Not applicable: no AWQ code changed.
Logic Flow Documentation
Not applicable: the change only narrows an argument guard; it does not alter a
resolution or selection flow.
Review Requirements
Kernel Accuracy Requirements
Not applicable: no kernel changed.
Notes
The alternative was to change evalution, but it is an external package and the
Nonedefault is a reasonable wrapper convention. The existing docstring intests/test_local_model_paths.pyalready describes the intended contract as"any non-None map".
🤖 Generated with Claude Code