Skip to content

[BUG] #6386 forwards tokenizer=None into DeepSeek V4.1 Flash from_quantized; all 17 v41 module-tree tests fail #6403

Done

Description

@Qubitium

Fresh sweep of main = 1615accf9. Regression introduced by #6386 (e8e73276a): the whole file is green at 390a03229 (its parent), red at HEAD.

Root cause

#6386 added a tokenizer parameter to GPTQModel.load() and forwards it unconditionally:

m = cls.from_quantized(
    ...
    tokenizer=tokenizer,   # None by default
    ...
)

(gptqmodel/models/auto.py, load().)

DeepSeekV41FlashQModel.from_quantized() rejects any kwarg it does not recognize:

unsupported = set(kwargs) - selection.keys()
if unsupported:
    raise TypeError(f"Unsupported DeepSeek V4.1 Flash load arguments: {', '.join(sorted(unsupported))}")

so every load raises TypeError: Unsupported DeepSeek V4.1 Flash load arguments: tokenizer before the checkpoint is read. #6385 fixed the internal checkpoint-selection kwarg but not this one.

Repro

cd tests
CUDA_VISIBLE_DEVICES="" PYTHONPATH=<clone>:<clone>/tests /root/venv/bin/python -m pytest \
  module_tree/test_deepseek_v41_flash.py -q --tb=line -p no:cacheprovider
# 17 failed: TypeError: Unsupported DeepSeek V4.1 Flash load arguments: tokenizer

Same command on 390a03229 (parent of #6386): 17 passed.

Expected

Either do not forward tokenizer when it is None, or pop/accept it in DeepSeekV41FlashQModel.from_quantized() (the definition already loads its own tokenizer from the selected checkpoint).

Scope

All 17 nodes in module_tree/test_deepseek_v41_flash.py (fixture-level failure, so every test in the file errors).

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