Skip to content

Add GPT2 and Gpt2LM Head architecture adapter tests#1306

Merged
jlarson4 merged 6 commits into
TransformerLensOrg:devfrom
sunny1401:gpt2_model_bridge_adapted_tests
May 18, 2026
Merged

Add GPT2 and Gpt2LM Head architecture adapter tests#1306
jlarson4 merged 6 commits into
TransformerLensOrg:devfrom
sunny1401:gpt2_model_bridge_adapted_tests

Conversation

@sunny1401
Copy link
Copy Markdown

@sunny1401 sunny1401 commented May 15, 2026

Hi @jlarson4,

This PR adds tests for the GPT2 architecture adapter covering config defaults, weight conversions, component mappings, the QKVSplitRearrangeConversion, and factory registration.

Also added similar text for GPT2 LM Head Custom architecture

Tested with:

uv run --python 3.12 pytest tests/unit/model_bridge/supported_architectures/test_gpt2_adapter.py
Contributes to #1302

@sunny1401 sunny1401 changed the title add Gpt2 MOdel Bridge tests Add GPT2 and Gpt2LM Head architecture adapter tests May 16, 2026
@jlarson4
Copy link
Copy Markdown
Collaborator

Excellent work @sunny1401! This is very thorough, and exactly what I'm looking for with these adapter tests. Thank you for your contribution, merging

@jlarson4 jlarson4 merged commit 8e49aac into TransformerLensOrg:dev May 18, 2026
24 checks passed
@sunny1401 sunny1401 deleted the gpt2_model_bridge_adapted_tests branch May 18, 2026 16:20
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