You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TEST] tests/test_local_model_paths.py red on main: the nine DummyQModel doubles never declared require_load_tokenizer (#4894 follow-up) #4923
main @ 5a13ec241 has 11 red nodes in tests/test_local_model_paths.py:
$ python -m pytest tests/test_local_model_paths.py -q
11 failed, 18 passed
E AttributeError: type object 'DummyQModel' has no attribute 'require_load_tokenizer'
Affected nodes: test_model_loader_requires_lazy_turtle_for_offload_to_disk, test_model_loader_uses_lazy_turtle_for_local_safetensors, test_model_loader_from_pretrained_forwards_dtype_kwarg, test_model_loader_from_pretrained_normalizes_direct_gguf_path, the two native_bonsai_fast_profiles_use_dense_path cases, native_bonsai_fast_auto_enables_fa2_on_cuda, native_bonsai_fast_keeps_explicit_attn_impl, the two native_bonsai_low_memory_redirects_with_backend cases, and falls_back_when_meta_shell_build_hits_meta_tensor_item.
Cause
#4894 (Decision Transformer) made the loader read cls.require_load_tokenizer:
gptqmodel/models/loader.py:2056 and :2691 — if cls.require_load_tokenizer:
gptqmodel/models/base.py:847 — require_load_tokenizer: bool = True (the BaseQModel default)
The nine DummyQModel doubles in tests/test_local_model_paths.py are bare classes that mirror BaseQModel's attributes by hand (require_dtype, require_fast_init, require_trust_remote_code, require_pkgs, support_offload_to_disk, ...) but were never updated with the new attribute. Real model classes all inherit the default, so this is a test-double gap, not a product bug — but it makes the file red on main and it will hit every branch that touches the loader.
Fix
Declare require_load_tokenizer = True on each DummyQModel (the BaseQModel default). With that, tests/test_local_model_paths.py goes to 29 passed.
A follow-up could make the doubles inherit from a shared stub or use getattr(cls, "require_load_tokenizer", True) in the loader, but the loader should keep treating a definition attribute as required for real classes.
Fixed by #4926 (squash-merged, 83f9180ac). The nine DummyQModel doubles now declare require_load_tokenizer = True (BaseQModel's default); tests/test_local_model_paths.py goes from 11 failed / 18 passed to 29 passed, with and without tokenicer 0.0.19 on the path.
Activity
Qubitium commentedon Nov 17, 2026
Agent claim:
agent-root-4923is working on this issue now.Qubitium commentedon Nov 17, 2026
Fixed by #4926 (squash-merged,
83f9180ac). The nineDummyQModeldoubles now declarerequire_load_tokenizer = True(BaseQModel's default);tests/test_local_model_paths.pygoes from 11 failed / 18 passed to 29 passed, with and without tokenicer 0.0.19 on the path.Merge branch 'transformers5-local-models' into transformers5-local-mo…
test(load): declare require_load_tokenizer on the DummyQModel doubles (…
fix(load): default an absent require_load_tokenizer to the text path (M…