Skip to content

v3.0.1 — Mojo-First Runtime Fix

Choose a tag to compare

@wesleyscholl wesleyscholl released this 11 Mar 16:44
· 409 commits to main since this release

v3.0.1 — Mojo-First Runtime Fix

Vectro v3.0.0 advertised itself as "Mojo-first" but every quantization call at runtime silently fell through to Python/NumPy. This release fixes the entire dispatch chain.

What changed

Root cause fixed: All computation hot paths now route through the compiled vectro_quantizer binary instead of Python/NumPy fallbacks.

Component v3.0.0 (broken) v3.0.1 (fixed)
_quantize_with_mojo called NumPy _quantize_vectorized() calls _mojo_bridge.int8_quantize()
_quantize_batch_mojo called _quantize_batch_python() calls _mojo_bridge.int8_quantize()
quantize_nf4 pure NumPy calls _mojo_bridge.nf4_encode()
dequantize_nf4 pure NumPy calls _mojo_bridge.nf4_decode()
quantize_binary pure NumPy calls _mojo_bridge.bin_encode()
dequantize_binary pure NumPy calls _mojo_bridge.bin_decode()

New files

  • python/_mojo_bridge.py — unified subprocess dispatch helper; all hot paths call this single module
  • tests/test_mojo_bridge.py — 26 new tests covering INT8/NF4/Binary dispatch end-to-end

Build

pixi run build-mojo   # compile vectro_quantizer
pixi run selftest     # verify: INT8 MAE <0.02, NF4 MAE <0.10, Binary ±1
pixi run benchmark    # throughput: ~427k INT8 vec/s, ~1.19M reconstruct vec/s

Performance (Apple M-series, d=768)

  • INT8 quantize: ~427k vec/s
  • INT8 reconstruct: ~1.19M vec/s