Claude
658c762994
feat: add ruvector-dither crate and integrate thermorust+dither into exo
...
ruvector-dither (new crate):
- GoldenRatioDither: additive φ-sequence with best 1-D equidistribution
- PiDither: cyclic 256-entry π-byte table for deterministic weight dithering
- quantize_dithered / quantize_slice_dithered: drop-in pre-quantization offset
- quantize_to_code: integer-code variant for packed-weight use
- ChannelDither: per-channel pool seeded by (layer_id, channel_id) pairs
- DitherSource trait for generic dither composition
- 15 unit tests + 3 doctests; 4 Criterion benchmark groups
exo-backend-classical integration:
- ThermoLayer (thermo_layer.rs): Ising motif coherence gate using thermorust
- Runs Metropolis steps on clamped activations
- Returns ThermoSignal { lambda, magnetisation, dissipation_j, energy_after }
- λ-signal = −ΔE/|E₀|: positive means pattern is settling toward coherence
- DitheredQuantizer (dither_quantizer.rs): wraps ruvector-dither for exo tensors
- GoldenRatio or Pi kind, per-layer seeding, reset support
- Supports 3/5/7/8-bit quantization with ε-LSB dither amplitude
- 8 new unit tests across both modules; all 74 existing tests still pass
https://claude.ai/code/session_019Lt11HYsW1265X7jB7haoC
2026-02-27 14:30:26 +00:00