Add Neo architecture adapter tests (closes #1302)#1381
Conversation
|
The failing check (Notebook Checks / Bridge_Evals_Demo) is unrelated to this PR - I only added tests/unit/model_bridge/supported_architectures/test_neo_adapter.py and demos/Direct_Path_Patching_Demo.ipynb. The Bridge_Evals_Demo notebook was not modified. All unit tests, type checks, format checks, compatibility checks (3.10/3.11/3.12), docstring tests, and coverage tests pass. |
|
If you refer to the recently created guide on writing unit test files for adapters, some of those config tests are not needed. Also, instead of checking membership of keys and checking count for the weight conversion section, it is better to use a set based check since it does both. Also refer to similar adapter test files for reference. Some may still have old patterns so the guide takes precedence. |
9b87a11 to
62b221f
Compare
Adds unit tests for NeoArchitectureAdapter as requested in #1302.
Covers config attributes, component mapping bridge types and HF module names, all 9 weight conversion keys, and NeoLinearTransposeConversion numerical correctness transpose roundtrip, shape, rearrange patterns for Q/K/V and O weights.
All 49 tests pass locally.
Type of change
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