Files
turboquant_plus/turboquant
brett b75813b0e1 fix: V-norm in memory_stats, SeedSequence PRNG, MSE compressed_size_bits
Subset of @brosequist's #90 commit 0fd5de9 — keeping the actual
fixes, deferring the streaming + serialization API surface until
a production caller exists.

Included:
- KVCacheCompressor.memory_stats() was omitting the float32 norm
  stored per V vector, inflating reported compression ratio. Adds
  v_bits_total += n_vectors * 32.
- TurboQuantMSE.compressed_size_bits() — was missing (TurboQuant
  already had it).
- Replaces seed + 1000 magic offset with
  np.random.SeedSequence(seed).spawn(2) for true PRNG independence
  between PolarQuant and QJL stages, and between K and V quantizers.

Deferred (not in this commit):
- compress_token() / get_compressed_cache() streaming API
- CompressedVector.to_bytes() / from_bytes() binary serialization
- CompressedKVCache.save() / load() npz serialization
2026-05-09 10:42:53 -05:00
..