Repository navigation
Description
Sweep of tests/models/ on origin/main = 0dd8e8ab leaves four nodes red that no open PR covers. The two other red nodes in that sweep (test_cohere_compass.py ×2, test_unlimited_ocr.py) are already handled by #6337; these four are not.
Environment: Python 3.14.4, torch 2.15+cu132, transformers 5.23.0, one pinned RTX 4090 (SM 8.9, 48 GB), offline.
cd tests
CUDA_VISIBLE_DEVICES=3 PYTHONPATH=<clone>:<clone>/tests /root/venv/bin/python -m pytest \
models/test_muse_glimmer.py models/test_solar_open.py -q -rs -p no:cacheprovider1-2. test_muse_glimmer.py / test_solar_open.py::*_model_type_selects_definition
Both tests still monkeypatch auto.AutoConfig.from_pretrained, but gptqmodel.models.auto no longer re-exports AutoConfig; check_and_get_model_definition() now reads the config through the module-level load_model_config() helper. The tests die on the monkeypatch.setattr line before exercising the definition lookup:
models/test_muse_glimmer.py:26: in test_muse_glimmer_model_type_selects_definition
monkeypatch.setattr(auto.AutoConfig, "from_pretrained", lambda *args, **kwargs: fake_config)
E AttributeError: module 'gptqmodel.models.auto' has no attribute 'AutoConfig'
Same traceback at models/test_solar_open.py:83. Test-only staleness: the product path works (test_solar_open_local_checkpoint_selects_definition passes and the real 30B checkpoint resolves to MuseGlimmerQModel). The other model tests (test_solar_open2.py, test_deepseek_vl.py, test_openvla.py, …) already patch auto.load_model_config.
3. test_solar_open.py::test_solar_open_lazy_turtle_materializes_defused_expert_weights
The test builds its tiny source model from transformers.SolarOpenConfig / transformers.SolarOpenForCausalLM, then hands source.config to build_shell_model(SolarOpenQModel.loader, ...). Since #4620 every supported model loads through a LocalModelLoader whose config/model classes are the vendored 5.23 ports, and NativeForCausalLM._model_class() rejects a non-vendored config by design:
../gptqmodel/models/ports/native/auto/__init__.py:292: in _from_config
model_class = cls._model_class(config)
../gptqmodel/models/ports/native/auto/__init__.py:268: in _model_class
_require_vendored_config(config)
E TypeError: SolarOpenConfig is not a vendored GPT-QModel config; load it with NativeConfig
Test-only staleness: the sibling test_solar_open2.py already builds its tiny model from the port's own config/model classes.
4. test_muse_glimmer.py::TestMuseGlimmer::test_muse_glimmer
The test quantizes Muse-Glimmer-30B in the shared fast model-compat mode, which only quantizes the first 2 of 52 decoder layers; the saved checkpoint therefore still carries ~52 GB of bf16 weights. The reload then pins every shard to one GPU (device_map={"": "cuda:0"}, because EVAL_SINGLE_GPU defaults to True) and OOMs on a 48 GB card:
../gptqmodel/models/loader.py:4381: in from_quantized
load_checkpoint_in_model_then_tie_weights(...)
../gptqmodel/utils/model.py:4947: in load_checkpoint_in_model_then_tie_weights
accelerate.load_checkpoint_in_model(model, *args, **kwargs)
/root/venv/lib/python3.14/site-packages/safetensors/torch.py:360: in load_file
return f.get_tensors()
E torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 52.00 MiB.
GPU 0 has a total capacity of 47.45 GiB of which 25.81 MiB is free.
... this process has 43.59 GiB memory in use ...
The 30B class is the only large-model test that does not set EVAL_SINGLE_GPU = False; TestSolarOpen, TestAgnes, TestQwen3_8FlashNext and the other >48 GB classes all allow an auto device map so the reload can offload to CPU.
Fix
- Point the two definition-selection tests at
auto.load_model_config. - Build the Solar Open tiny fixture from the vendored
gptqmodel.models.ports.native.solar_openconfig/model. - Let
TestMuseGlimmerbuild anautodevice map (EVAL_SINGLE_GPU = False) so a multi-accelerator host can spread the checkpoint, and skip it with a precise reason when the host exposes < 56 GiB of accelerator memory: a single 48 GiB 4090 cannot hold the ~58 GB fast-mode checkpoint, and on a one-GPU host theautomap still resolves tocuda:0.
A PR will reference this issue with Fixes.
Activity
test(models): unbreak the four unowned muse_glimmer/solar_open nodes (M…