Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

MaxSim Benchmarks

ColBERT-style late-interaction scoring benchmarks comparing NumKong against ndarray.

Rust

Library Precision GSO/s
numkong::MaxSimPackedMatrix::score f32 → f64 1483.41
numkong::MaxSimPackedMatrix::score bf16 → f32 983.57
numkong::MaxSimPackedMatrix::score f16 → f32 980.33
ndarray Q @ Dᵀ max-reduce f32 → f32 58.37

Python

Library Precision GSO/s
numkong.maxsim_packed f32 → f64 2425.72
numpy matmul f32 → f32 1525.56
numkong.maxsim_packed bf16 → f32 1236.30
numkong.maxsim_packed f16 → f32 696.78

Run It

Rust

# Default 2048×2048×2048 workload
cargo bench --bench bench_maxsim --features bench_maxsim

# Smaller 128×128×256 workload
NUMWARS_DIMS_HEIGHT=128 NUMWARS_DIMS_WIDTH=128 NUMWARS_DIMS_DEPTH=256 \
cargo bench --bench bench_maxsim --features bench_maxsim

# Focus on one dtype
NUMWARS_FILTER="maxsim/f32" \
cargo bench --bench bench_maxsim --features bench_maxsim

Python

uv run --with numkong,numpy,tabulate,ml_dtypes python maxsim/bench.py