Added Ouro architecture adapter and integration tests for OuroForCausalLM#1488
Conversation
…ed-depth-adapter-(OuroForCausalLM) # Conflicts: # transformer_lens/tools/model_registry/generate_report.py
| | [`unit/model_bridge/supported_architectures/test_gemma2_adapter.py`:49](unit/model_bridge/supported_architectures/test_gemma2_adapter.py) | "Network/disk fetch of tiny Gemma2" | | ||
| | [`integration/model_bridge/test_bridge_integration.py`:801](integration/model_bridge/test_bridge_integration.py) | "Skip Gemma2 in CI to avoid timeout" | | ||
| | [`acceptance/model_bridge/compatibility/test_hook_completeness.py`:156](acceptance/model_bridge/compatibility/test_hook_completeness.py) | "Gemma2 too large for CI" | | ||
| | [`integration/model_bridge/test_ouro_adapter.py`](integration/model_bridge/test_ouro_adapter.py) module-level (+ `slow` marker) | "ByteDance/Ouro-1.4B: 2.8GB download + ~11GB RAM, too large for CI" | |
There was a problem hiding this comment.
Incredibly tiny nitpick, apologies, can you add the line number for the test to the link text similar to the other lines in this table?
|
This looks pretty good @Canonik! Just a couple small notes:
|
|
Thanks I’ll address these in a small follow-up commit. For |
…fication updates. Chore: formatting updates in .MD
Should be ready to merge :) |
|
Looks awesome! Thank you @Canonik, merging now |
|
Glad to hear 😊 |
Description
Adds a TransformerBridge architecture adapter for
OuroForCausalLM(ByteDance Ouro / LoopLM), a looped-depth "Universal Transformer" decoder: one weight-tied stack of 24 physical layers is appliedtotal_ut_steps=4times per forward pass, with a learned early-exit gate scored alongside the LM head.What"s included:
, including aprepare_loadingpatch for two transformers-v5 incompatibilities in the Ouro remote code (written against 4.55): the removedROPE_INIT_FUNCTIONS["default"]entry, and the missingcompute_default_rope_parametersstatic method that the v5_init_weightsmachinery expects on rotary classes. Both patches are scoped to the importedmodeling_ouro` module; the shared transformers dict is untouched."ouro"model_type fallback insources/transformers.py, and a"ByteDance/Ouro-"entry in_BRIDGE_REMOTE_CODE_PREFIXESinverify_models.pyso registry verification auto-enablestrust_remote_code.ByteDance/Ouro-1.4Bregistry row (status 0, null scores).slow+skipif(CI), QUARANTINES.md row) asserting logit parity against an independently loaded HF eager model at 1e-3, delegation identities, and the per-step hook firing count.Verified locally on real Ouro-1.4B weights: 11/11 integration tests pass. Loading requires
trust_remote_code=True; no new package dependencies.Note for reviewers: plain
AutoModelForCausalLM.from_pretrainedon Ouro is currently broken under transformers v5 regardless of TransformerLens (the upstream remote code readsconfig.pad_token_id, which v5 no longer materializes). The bridge load path already shims this generically; the reference fixture in the integration test mirrors the same shim.Fixes #1470
Type of change
Checklist: