Skip to content

added olmo adapter test#1330

Merged
jlarson4 merged 2 commits into
TransformerLensOrg:devfrom
Rishik00:olmo-adapter-test-dev
Jun 5, 2026
Merged

added olmo adapter test#1330
jlarson4 merged 2 commits into
TransformerLensOrg:devfrom
Rishik00:olmo-adapter-test-dev

Conversation

@Rishik00
Copy link
Copy Markdown
Contributor

Description

Adds unit coverage for the OLMo architecture adapter.

Changes

  • Tests OLMo config defaults, component mapping, and HF module paths.
  • Verifies Q/K/V/O weight conversions use the right head counts for GQA.
  • Adds attention coverage for OLMo attention forward execution and Q/K/V/Z hook shapes.
  • Tests prepare_model() clamp patching and setup_component_testing() rotary/eager-attention wiring.
  • Checks factory registration for OlmoForCausalLM.

To run the test: uv run pytest tests\unit\model_bridge\supported_architectures\test_olmo_adapter.py
All tests have passed.

Relevant to Issue #1302 @jlarson4

Comment thread tests/unit/model_bridge/supported_architectures/test_olmo_adapter.py Outdated
@jlarson4
Copy link
Copy Markdown
Collaborator

Just one small artifact that slipped into your PR. Also, don't forget to run make check-format & resolve any issues to make sure your code passes CI!

@Rishik00
Copy link
Copy Markdown
Contributor Author

Rishik00 commented May 26, 2026

The CI passes cleanly. Will get the round tests added in a few hours.

@jlarson4
Copy link
Copy Markdown
Collaborator

jlarson4 commented Jun 5, 2026

@Rishik00 Another contributor, @TensorCruncher, accurately pointed out that architectures like Olmo do not at present require a roundtrip test. I am going to close and merge the PR as is, thank you for your work on this.

@jlarson4 jlarson4 merged commit c624e73 into TransformerLensOrg:dev Jun 5, 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