Repository navigation
Description
Summary
tests/module_tree/test_deepseek_v41_flash.py is red on origin/main (0dd8e8abf): 7 failed, 9 errors, 4 passed, 5 skipped. All 16 non-passing nodes fail with the same exception:
TypeError: Unsupported DeepSeek V4.1 Flash load arguments: _gptqmodel_checkpoint_selection
This is a product regression, not a stale test or a missing checkpoint. The fixture builds a self-contained synthetic checkpoint in tmp_path; no /monster/data/model asset is involved.
Reproduction
cd tests
CUDA_VISIBLE_DEVICES="" PYTHONPATH=<clone>:<clone>/tests python -m pytest \
module_tree/test_deepseek_v41_flash.py -q -rs -p no:cacheprovider
Root cause
#6272 (commit 968e74c81, "refactor(loader): one immutable checkpoint selection for every consumer") introduced INTERNAL_CHECKPOINT_SELECTION_KWARG = "_gptqmodel_checkpoint_selection" in gptqmodel/utils/hf.py:65. The public entry points now resolve one CheckpointSelection and hand it to the model definition:
GPTQModel.from_quantizedpops it from caller kwargs (gptqmodel/models/auto.py:1364) and passes it tomodel_definition.from_quantized(...)(auto.py:1423).- The generic
BaseQModel.from_quantizedconsumes it (gptqmodel/models/loader.py:3312) and reuses the record.
DeepSeekV41FlashQModel is the only model definition that overrides from_quantized (gptqmodel/models/definitions/deepseek_v41_flash.py:65). #6272 did not update it, so the internal hand-off reaches its strict keyword check (deepseek_v41_flash.py:96-98) and is rejected as an unsupported user argument. Every V4.1 load raises before touching the checkpoint.
Evidence:
rg -ln "def from_quantized" gptqmodel/models/definitions/returns onlydeepseek_v41_flash.py.- Parent of
#6272(633c2f1e8): 20 passed, 5 skipped with the identical test file (no diff intests/module_tree/test_deepseek_v41_flash.pybetween633c2f1e8and0dd8e8abf). - HEAD (
0dd8e8abf): 7 failed, 9 errors, 4 passed, 5 skipped. - All 16 failures/errors carry the same
TypeError; no other exception type appears in the run.
Affected nodes (16)
9 ERROR (the model fixture):
test_v41_module_plan_accounts_for_loaded_decoder_weightstest_v41_attention_variants_and_chunked_cachetest_v41_engram_hash_uses_request_history_and_stops_at_imagestest_v41_mtp_forward_is_explicit_and_disabled_during_calibrationtest_v41_sparse_attention_uses_only_the_window_and_selected_valuestest_v41_vision_uses_published_alignment_and_routingtest_v41_partial_forward_does_not_advance_cachetest_v41_generation_uses_its_cachetest_v41_packed_projection_matches_independent_weights_and_retains_packed_storage
7 FAILED:
test_v41_public_load_uses_package_classestest_v41_load_reports_missing_source_projectiontest_v41_gptq_export_preserves_engram_and_mtptest_v41_q4nx_rejects_shared_expert_projectiontest_v41_marlin_backend_requires_cudatest_v41_q4nx_indexed_projection_load_save[128]test_v41_q4nx_index_requires_marker_in_payload[128]
The other 4 passing nodes and 5 CUDA-only skips never load a model.
Fix direction
DeepSeekV41FlashQModel.from_quantized must pop the internal kwarg and reuse the handed-off selection (checkpoint_selection.hub_kwargs) rather than rebuilding it from forwarded kwargs, so the config, shards, and tokenizer all read the checkpoint the caller selected. A regression test should load a nested checkpoint via GPTQModel.load(parent, subfolder="nested"); it fails both when the kwarg is rejected and when it is silently ignored.
A PR follows.
Activity
fix(deepseek_v41): consume the loader checkpoint-selection hand-off (M…