← All examples · Home

10. Corpus chunking (NFR-10)

A single GPU storage buffer is capped by maxStorageBufferBindingSize (128 MiB on many devices). The flat index spreads vectors across multiple chunks — each fits within the limit — and queries dispatch the distance kernel once per chunk. The result is identical to a single-buffer scan. The fp32 config runs everywhere (via the WASM CPU fallback); the int8/IVF configs are GPU-only and are skipped without WebGPU.

ready.