Skip to content

Move older-style testers of 129 more models onto static small-config defaults - #50976

Merged
ydshieh merged 1 commit into
mainfrom
tarek-static-defaults-batch4
Nov 20, 2026
Merged

ydshieh merged 1 commit into
mainfrom
tarek-static-defaults-batch4

Conversation

@tarekziade

@tarekziade tarekziade commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #50972 — the first two commits here are #50972; review only the last one (diff). It is stacked because several testers here are Copied from testers migrated there.

Continues #50972: moves 159 more older-style testers, across 129 models (layoutlmv3, vjepa2, vitpose, glm4v, mimi, encodec, xlnet, moonshine, pix2struct, mpt, deit, vit_mae, …), onto ModelTesterConfigMixin, plus GraniteMoeHybridModelTester, which #50972 left out because it subclasses Bamba's tester (migrated here).

The pattern (as in #50916 and #50972)

  • Keyword defaults become a literal small_config_overrides (defaults = {}); values __init__ computed move to get_small_config_defaults(), keeping the old precedence. Sub-testers and objects stay in __init__; composites keep text_kwargs/vision_kwargs.
  • Each TestCase whose setUp builds the tester sets model_tester_class.
  • A subclass tester inherits its parent's values with defaults = {**Parent.defaults, **Parent.small_config_overrides} (a subclass's small_config_overrides replaces the parent's, it doesn't merge).
  • TestCases that built their tester with different arguments get a subclass tester instead: UniSpeechRobustModelTester, FunnelBaseModelTester, SeamlessM4TTextInputModelTester, NeoMMEForRetrievalModelTester, Chameleon's Vision2Seq tester, VideoPrism's classification tester. setUp arguments equal to the defaults are dropped (PP-OCR testers).
  • When the only caller passed a value (is_training=False on standalone decoders, batch_size=1 on slanext/SLANet), it is now the default. Parameters that were accepted but never stored are dropped. XLNet's __init__ ignored its arguments and hardcoded its values; the literal holds the values that took effect (num_hidden_layers: 3).

Left unchanged: the two nemotron_asr_streaming testers (they subclass Parakeet's testers, not migrated yet).

Proof

  • For all 161 tester classes, what the test suite builds (attributes, sub-testers, generated config) was snapshotted on 96227f0fd5 and on this branch: 158/161 identical and on the mixin with no static/runtime mismatch. The 3 others: the 2 unchanged Nemotron testers, and UniSpeechModelTester, whose only TestCase now builds UniSpeechRobustModelTester, identical to what it built before.
  • GraniteMoeHybridModelTester: identical to main.
  • tests/utils/test_model_tester_defaults.py: 12 passed. Building every TestCase with a model_tester_class across tests/models (527) gives no static/runtime mismatch.
  • Model tests on CPU (macOS) for every touched folder and the folders that import these testers (vision_encoder_decoder, vision_text_dual_encoder, rag, bark, granitemoehybrid, gradium_phonon_tts), -k "config or common_attributes or test_model" excluding tensor/expert-parallel tests: all pass, except failures identical on main (test_bc_cache_name_forward for the MultipleChoice heads of xlm and flaubert, test_training_gradient_accumulation for pocket_tts and gradium_phonon_tts, videoprism integration tests needing torchcodec). higgs_audio_v2_tokenizer's tests skip locally (no torchaudio).
  • utils/check_copies.py, ruff check and ruff format --check pass; git diff --check is clean.

🤖 Generated with Claude Code

@tarekziade tarekziade changed the title Move older-style testers of 130 more models onto static small-config defaults Move older-style testers of 129 more models onto static small-config defaults Nov 19, 2026
@tarekziade
tarekziade force-pushed the tarek-static-defaults-batch4 branch from d21159a to e7d84a1 Compare November 19, 2026 15:18
@tarekziade

Copy link
Copy Markdown
Collaborator Author

run-slow: aimv2, albert, altclip, aya_vision, bamba, bart, beit, big_bird, bigbird_pegasus, biogpt, bitnet, blenderbot, blip, bridgetower, canary, canine

@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@tarekziade
tarekziade changed the base branch from main to tarek-static-defaults-batch3 November 19, 2026 17:20
@tarekziade
tarekziade added this pull request to stack #50981 November 19, 2026 17:20
@github-actions

Copy link
Copy Markdown
Contributor

CI (Nvidia + AMD)

Nvidia · ✅ No new failures 🎉👏 · ⚙️ Workflow · 📊 Dashboard

Failures (8 pre-existing)

    Pre-existing failures (still failing) — 8 total:

        Same error (8):

        - bamba:
            tests/models/bamba/test_modeling_bamba.py::BambaModelIntegrationTest::test_simple_batched_generate_with_padding
            tests/models/bamba/test_modeling_bamba.py::BambaModelIntegrationTest::test_simple_generate

        - big_bird:
            tests/models/big_bird/test_modeling_big_bird.py::BigBirdModelIntegrationTest::test_fill_mask

        - bitnet:
            tests/models/bitnet/test_modeling_bitnet.py::BitNetIntegrationTest::test_model_logits

        - bridgetower:
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelIntegrationTest::test_constrastive_learning
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelIntegrationTest::test_image_and_text_retrieval
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelIntegrationTest::test_masked_language_modeling
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelTrainingTest::test_inference_interpolate_pos_encoding

AMD · ✅ No new failures 🎉👏 · ⚙️ Workflow · 📊 Dashboard

Failures (9 pre-existing)

    Pre-existing failures (still failing) — 9 total:

        Same error (9):

        - aya_vision:
            tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_generate_chat_template
            tests/models/aya_vision/test_modeling_aya_vision.py::AyaVisionIntegrationTest::test_small_model_integration_generate_text_only

        - bamba:
            tests/models/bamba/test_modeling_bamba.py::BambaModelIntegrationTest::test_simple_batched_generate_with_padding

        - big_bird:
            tests/models/big_bird/test_modeling_big_bird.py::BigBirdModelIntegrationTest::test_fill_mask

        - bitnet:
            tests/models/bitnet/test_modeling_bitnet.py::BitNetIntegrationTest::test_model_logits

        - bridgetower:
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelIntegrationTest::test_constrastive_learning
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelIntegrationTest::test_image_and_text_retrieval
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelIntegrationTest::test_masked_language_modeling
            tests/models/bridgetower/test_modeling_bridgetower.py::BridgeTowerModelTrainingTest::test_inference_interpolate_pos_encoding

@tarekziade
tarekziade added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Nov 19, 2026
@tarekziade
tarekziade added this pull request to the merge queue Nov 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 19, 2026
Base automatically changed from tarek-static-defaults-batch3 to main November 19, 2026 21:50
@tarekziade
tarekziade force-pushed the tarek-static-defaults-batch4 branch from e7d84a1 to 53ed6a3 Compare November 19, 2026 21:50
@tarekziade
tarekziade force-pushed the tarek-static-defaults-batch4 branch from 53ed6a3 to 1d44d04 Compare November 20, 2026 07:37
@github-actions

Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: aimv2, altclip, aya_vision, bamba, biogpt, bitnet, bridgetower, chameleon, cohere2_vision, colpali, colqwen2, conditional_detr, cosmos3_edge, cpmant, ctrl, cvt

@ydshieh
ydshieh merged commit 5e9b0c1 into main Nov 20, 2026
231 of 235 checks passed
@ydshieh
ydshieh deleted the tarek-static-defaults-batch4 branch November 20, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants