Skip to content

Sync model_registry sets with architecture_adapter_factory and add in…#1354

Merged
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
RecreationalMath:fix-registry-factory-sync
Jun 2, 2026
Merged

Sync model_registry sets with architecture_adapter_factory and add in…#1354
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
RecreationalMath:fix-registry-factory-sync

Conversation

@RecreationalMath
Copy link
Copy Markdown
Contributor

Description

Fixes #1350.

HF_SUPPORTED_ARCHITECTURES and CANONICAL_AUTHORS_BY_ARCH are documented to track adapters registered in architecture_adapter_factory.py, with internal-only adapters excluded. Qwen3MoeForCausalLM and BaichuanForCausalLM were wired in the factory but missing from one or both registry sets, so the scraper silently classified their models as unsupported.

Changes:

  • Add Qwen3MoeForCausalLM, BaichuanForCausalLM, and BaiChuanForCausalLM (Baichuan-1 casing) to HF_SUPPORTED_ARCHITECTURES.
  • Add Qwen3MoeForCausalLM: ["Qwen"] and BaiChuanForCausalLM: ["baichuan-inc"] to CANONICAL_AUTHORS_BY_ARCH.
  • Extend the module docstring's documented exclusion list to align with the factory's actual contents: add TransformerLensNative (introduced in Created a system for running Native models #1353) to the named internal-only group, and explicitly name the three factory-internal alias casings (Gemma1, Neo, NeoX) that route to canonical adapters under names HF does not emit (Gemma, GPTNeo, GPTNeoX).
  • Add a bidirectional invariant test (TestRegistrySyncedWithFactory) in tests/unit/tools/test_model_registry.py: every non-excluded factory key must be present in both registry sets, and every registry entry must have a matching factory adapter. While building this test, it surfaced TransformerLensNative (added in Created a system for running Native models #1353) as a third silent drift item alongside the originally-reported Qwen3-MoE and Baichuan omissions. Future adapter PRs that forget to update the registry will be flagged by this test in CI from now on.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

@jlarson4 jlarson4 merged commit 1ca5ada into TransformerLensOrg:dev Jun 2, 2026
24 checks passed
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.

2 participants