vector_kit 0.2.0 copy "vector_kit: ^0.2.0" to clipboard
vector_kit: ^0.2.0 copied to clipboard

SIMD-accelerated vector math for embeddings: dot product, cosine similarity, normalization, and top-k search over packed matrices.

0.2.0 #

  • Add QuantizedMatrix, an int8 form of VectorMatrix for corpora that no longer fit comfortably in memory. Each row is scaled so its largest component maps to 127 and stored as one byte per dimension. Measured on 5,000 rows of 768 dimensions: 14.6 MB becomes 3.7 MB, 3.92x smaller, while a search goes from 0.63 ms to 2.50 ms a query, 3.96x the time, because the byte rows cannot use the SIMD path the float rows do. It buys memory and costs throughput, which is the trade to make only when the corpus is the problem.
  • QuantizedMatrix.from leaves the source matrix usable, so recall can be measured against the exact ranking on real vectors. Recall@10 was 100% on the benchmark corpus, but that is an upper bound: uniformly random vectors sit far apart in high dimensions, and real embeddings cluster, which is where eight bits start confusing neighbours.

0.1.1 #

  • Docs: tightened the README wording and visuals.

Changelog #

0.1.0 #

  • Initial release.
  • SIMD dot product, cosine similarity, Euclidean distance, and normalization over Float32List, with fail-fast validation of lengths and non-finite components.
  • VectorMatrix: packed row-major storage with precomputed row norms, top-k cosine, dot product, and Euclidean search, and a VKT1 binary format for serialization.
0
likes
0
points
308
downloads

Documentation

Documentation

Publisher

verified publisherdeveloperyusuf.com

Weekly Downloads

SIMD-accelerated vector math for embeddings: dot product, cosine similarity, normalization, and top-k search over packed matrices.

Repository (GitHub)
View/report issues

Topics

#simd #vectors #embeddings #similarity #performance

License

unknown (license)

More

Packages that depend on vector_kit