Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tuannh982/hnsw-scala

HNSW vector search algorithm implementation in Scala
https://github.com/tuannh982/hnsw-scala

algorithm algorithms algorithms-and-data-structures ann approximate-nearest-neighbor-search datastructures datastructures-algorithms hnsw knn nearest-neighbors scala search-algorithm searching-algorithms vector-search vector-search-engine

Last synced: about 21 hours ago
JSON representation

HNSW vector search algorithm implementation in Scala

Awesome Lists containing this project

README

        

# hnsw-scala

HNSW algorithm implementations

## Implementations

| implementation | description | path |
|----------------|------------------------------------------------------------------------|-----------------------------------------------------------------------------|
| ref | the reference implementation from https://arxiv.org/pdf/1603.09320.pdf | [RefHnsw.scala](core/src/main/scala/io/github/tuannh982/hnsw/RefHnsw.scala) |
| | | |

## Parameters tuning

See [ExampleIntVecL2DF.scala](core%2Fsrc%2Fmain%2Fscala%2Fio%2Fgithub%2Ftuannh982%2Fhnsw%2Ftuning%2FExampleIntVecL2DF.scala)
for tuning example

## Benchmarks

### MacBook Pro, Apple M1 Pro 16GB RAM)

```shell
bin/sbt "bench/Jmh/run -i 10 -wi 2 -f1 -t10 -rf text"
```

```text
Benchmark Mode Cnt Score Error Units
RefHnswBench100000Vectors5Neighbors.query thrpt 10 8483.214 ± 240.390 ops/s
```