From 50e90aa6ddc6028ca691c7f301452bd75a352c3a Mon Sep 17 00:00:00 2001 From: Joel Knighton Date: Fri, 29 Sep 2023 12:31:24 -0500 Subject: [PATCH] Adjust PQ clustering parameters based on experimentation --- .../io/github/jbellis/jvector/pq/ProductQuantization.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jvector-base/src/main/java/io/github/jbellis/jvector/pq/ProductQuantization.java b/jvector-base/src/main/java/io/github/jbellis/jvector/pq/ProductQuantization.java index a9e0a0ab7..ca6ce5463 100644 --- a/jvector-base/src/main/java/io/github/jbellis/jvector/pq/ProductQuantization.java +++ b/jvector-base/src/main/java/io/github/jbellis/jvector/pq/ProductQuantization.java @@ -39,8 +39,8 @@ */ public class ProductQuantization { static final int CLUSTERS = 256; // number of clusters per subspace = one byte's worth - private static final int K_MEANS_ITERATIONS = 12; - private static final int MAX_PQ_TRAINING_SET_SIZE = 256000; + private static final int K_MEANS_ITERATIONS = 6; + private static final int MAX_PQ_TRAINING_SET_SIZE = 128000; final float[][][] codebooks; final int M;