Commit Graph
4 Commits
Author SHA1 Message Date
Joseph MaglyandClaude Opus 5.5 5b4291eebe fix(numerics): accumulate bounded norms on the host
frobenius_norm_bounded added each chunk's CUDA result into a CPU
float64 tensor, which raises a device-mismatch RuntimeError for any
weight not on the CPU. Norm capture and restoration run whenever
norm_preserve is on, so every GPU run would have failed.

Accumulate into a Python float instead. That keeps float64
accumulation and works on CUDA and MPS (which has no float64). Widen
chunks straight to contiguous memory so a transposed chunk is not
copied a second time by reshape, and run the reduction under no_grad.

Add a CUDA conditional test that fails on the previous head and covers
the helper and the real capture/restore path on a CUDA layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:32:46 -05:00
Joseph Magly 21973c780f fix(checkpoint): require validated restore points throughout study lifecycle
(cherry picked from commit 72346504a49f2ceec4102f7f393159e3a6de0687)
2026-10-05 17:54:30 -04:00
Joseph Magly d1c0ee664d feat(abliteration): support safe offloaded weight surgery 2026-08-21 18:36:18 -04:00
Joseph Magly c1a1275291 ci: add conditional environment test gates 2026-08-14 14:29:14 -04:00