Skip to content

Commit 47d2683

Browse files
author
Jonathan Ellis
committed
add back actual grid options in comments
1 parent c1b5b23 commit 47d2683

File tree

1 file changed

+6
-5
lines changed
  • jvector-examples/src/main/java/io/github/jbellis/jvector/example

1 file changed

+6
-5
lines changed

jvector-examples/src/main/java/io/github/jbellis/jvector/example/Bench.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import io.github.jbellis.jvector.disk.OnDiskGraphIndex;
2121
import io.github.jbellis.jvector.disk.SimpleMappedReader;
2222
import io.github.jbellis.jvector.example.util.DataSet;
23-
import io.github.jbellis.jvector.example.util.DataSetCreator;
2423
import io.github.jbellis.jvector.example.util.DownloadHelper;
2524
import io.github.jbellis.jvector.example.util.Hdf5Loader;
2625
import io.github.jbellis.jvector.example.util.ReaderSupplierFactory;
@@ -191,12 +190,14 @@ private static ResultSummary performQueries(DataSet ds, RandomAccessVectorValues
191190
public static void main(String[] args) throws IOException {
192191
System.out.println("Heap space available is " + Runtime.getRuntime().maxMemory());
193192

194-
var mGrid = List.of(16);
195-
var efConstructionGrid = List.of(100);
196-
var efSearchGrid = List.of(1, 2, 3);
193+
var mGrid = List.of(16); // List.of(8, 12, 16, 24, 32, 48, 64);
194+
var efConstructionGrid = List.of(100); // List.of(60, 80, 100, 120, 160, 200, 400, 600, 800);
195+
var efSearchGrid = List.of(1, 2);
197196
List<Function<DataSet, VectorCompressor<?>>> compressionGrid = Arrays.asList(
198197
null, // uncompressed
199-
ds -> ProductQuantization.compute(ds.getBaseRavv(), ds.getDimension(), ds.similarityFunction == VectorSimilarityFunction.EUCLIDEAN));
198+
ds -> BinaryQuantization.compute(ds.getBaseRavv()),
199+
ds -> ProductQuantization.compute(ds.getBaseRavv(), ds.getDimension() / 4, ds.similarityFunction == VectorSimilarityFunction.EUCLIDEAN),
200+
ds -> ProductQuantization.compute(ds.getBaseRavv(), ds.getDimension() / 8, ds.similarityFunction == VectorSimilarityFunction.EUCLIDEAN));
200201

201202
// var grid2d = DataSetCreator.create2DGrid(4_000_000, 10_000, 100);
202203
// gridSearch(grid2d, compressionGrid, mGrid, efConstructionGrid, efSearchGrid);

0 commit comments

Comments
 (0)