Commit 9f5c0b8
committed
Add HF Molmo2 loader and logit parity tests
- molmo2_loader.py: HF Molmo2 → MultimodalTransformer weight converter
(embedding split, fused QKV/MLP split, patch-embedding permute)
- molmo2_parity_test.py: vision-encoder parity vs HF reference
- molmo2_logits_parity_test.py: embedding + LM + full-pipeline logit parity
(4B/8B pass; O-7B skipped pending per-layer YaRN support)
- Fix transformers 5.x RoPE compat: re-register ROPE_INIT_FUNCTIONS['default']
and reinit non-persistent inv_freq buffers after from_pretrained fast-init1 parent 34ba65d commit 9f5c0b8
6 files changed
Lines changed: 1646 additions & 0 deletions
File tree
- src
- olmo_core/nn/vision
- test/nn/vision
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
26 | 28 | | |
0 commit comments