Commit d8d1a85
v3.46-trained: AMS_TRAINED_WEIGHTS shape-mismatch is warn+skip, not fatal
Root cause: 4.25 prefix_length_scaling_probe intentionally builds model_b with
L_mem doubled (default 8 -> 16). The checkpoint was trained with L_mem=8, so
L_mem-dependent tensors (e.g. mem_tokens[L_mem, d_LLM]) legitimately don't fit
model_b — this is not a corrupt/incompatible ckpt, it's a deliberate Cfg scan.
Old behavior: raise RuntimeError on any shape mismatch -> errored 4.25.
New behavior:
- Per-tensor shape mismatch is logged and skipped (first 5 detailed, rest summarized).
- Hard failure only when the ckpt had non-backbone content (>10 tensors) AND
zero tensors loaded — that is the §6 'wrong-SUT ckpt' pattern we must catch.
Keeps the §6 protection against loading v344_trained.pt / v348_stacked.pt against
a v3.46 SUT (they would mostly shape-mismatch and hit the loaded==0 guard), while
letting L_mem-scaling probes proceed.
Co-authored-by: FluffyAIcode <FluffyAIcode@users.noreply.github.com>1 parent 95a9ec1 commit d8d1a85
1 file changed
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2541 | 2541 | | |
2542 | 2542 | | |
2543 | 2543 | | |
| 2544 | + | |
2544 | 2545 | | |
2545 | 2546 | | |
2546 | 2547 | | |
2547 | 2548 | | |
2548 | | - | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
2549 | 2557 | | |
2550 | | - | |
2551 | | - | |
| 2558 | + | |
| 2559 | + | |
| 2560 | + | |
2552 | 2561 | | |
2553 | 2562 | | |
2554 | 2563 | | |
| |||
0 commit comments