Skip to content

Commit c50d27f

Browse files
committed
good hyper parameters for the task2 spot dataset
1 parent 7163dce commit c50d27f

2 files changed

Lines changed: 11 additions & 67 deletions

File tree

python/benchmark_task2_spot.py

Lines changed: 7 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -34,74 +34,17 @@ class ModeConfig:
3434

3535

3636
MODES: list[ModeConfig] = [
37-
ModeConfig(
38-
name="mode3_no_flas",
39-
mode="mode3",
40-
label="Mode 3: FP32 Build & FP16 Explore (no FLAS)",
41-
settings="k_ext=64, k_graph=32, runs=1",
42-
max_dist="4000,8000",
43-
eps_search="0.25",
44-
num_runs=1,
45-
use_flas=False,
46-
),
47-
ModeConfig(
48-
name="mode3_flas",
49-
mode="mode3",
50-
label="Mode 3: FP32 Build & FP16 Explore (+ FLAS)",
51-
settings="k_ext=64, k_graph=32, runs=1",
52-
max_dist="4000,8000",
53-
eps_search="0.28",
54-
num_runs=1,
55-
use_flas=True,
56-
),
57-
ModeConfig(
58-
name="mode5_no_flas",
59-
mode="mode5",
60-
label="Mode 5: L2 Build (d+1) & FP16 IP Explore (no FLAS)",
61-
settings="k_ext=64, k_graph=32, runs=1",
62-
max_dist="2000,4000,8000",
63-
eps_search="0.18",
64-
num_runs=1,
65-
use_flas=False,
66-
),
6737
ModeConfig(
6838
name="mode5_flas",
6939
mode="mode5",
7040
label="Mode 5: L2 Build (d+1) & FP16 IP Explore (+ FLAS)",
71-
settings="k_ext=64, k_graph=32, runs=1",
72-
max_dist="2000,4000,8000",
73-
eps_search="0.18",
74-
num_runs=1,
75-
use_flas=True,
76-
),
77-
ModeConfig(
78-
name="mode4_flas",
79-
mode="mode4",
80-
label="Mode 4: L2 Build (d+1) & FP32 L2 Explore (+ FLAS)",
81-
settings="k_ext=64, k_graph=32, runs=1",
82-
max_dist="2000,4000,8000",
83-
eps_search="0.008",
84-
num_runs=1,
85-
use_flas=True,
86-
),
87-
ModeConfig(
88-
name="mode6_flas",
89-
mode="mode6",
90-
label="Mode 6: L2 Build (d+1) & FP16 L2 Explore (+ FLAS)",
91-
settings="k_ext=64, k_graph=32, runs=1",
92-
max_dist="2000,4000,8000",
93-
eps_search="0.007",
94-
num_runs=1,
95-
use_flas=True,
96-
),
97-
ModeConfig(
98-
name="mode7_flas",
99-
mode="mode7",
100-
label="Mode 7: L2 Build (d+2) & FP16 L2 Explore (+ FLAS)",
101-
settings="k_ext=64, k_graph=32, runs=1",
102-
max_dist="2000,4000,8000",
103-
eps_search="0.007",
104-
num_runs=1,
41+
settings="k_ext=48, k_graph=24, runs=100",
42+
max_dist="1400,1500,1600",
43+
k_graph="32",
44+
k_ext="64",
45+
eps_ext="0.1",
46+
eps_search="0.05,0.06,0.07,0.08,0.09",
47+
num_runs=100,
10548
use_flas=True,
10649
),
10750
]

submission/search.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434

3535
DEGLIB_BIN = os.environ.get("DEGLIB_BIN", "/usr/local/bin/deglib_sisap")
3636
ALGO = "deglib"
37-
THREADS = os.environ.get("DEGLIB_THREADS", "8")
37+
THREADS = str(os.environ.get("DEGLIB_THREADS") or os.cpu_count() or 1)
38+
print(f"[search.py] Using {THREADS} threads")
3839

3940
# --- per-dataset parameter profiles ------------------------------------------
4041
# Each dataset maps to a LIST of configs; every config is one binary invocation
@@ -96,8 +97,8 @@
9697
],
9798
# spot-check (14k vectors); smoke test only
9899
"llama-small": [
99-
dict(mode="mode5", k_graph=32, k_ext=64, eps_ext=0.001, build_threads=1, use_flas=True,
100-
num_runs=1, max_dist=[2000, 4000, 8000], eps_search=[0.2, 0.3]),
100+
dict(mode="mode5", k_graph=32, k_ext=64, eps_ext=0.1, build_threads=1, use_flas=True,
101+
num_runs=1, max_dist=[1400,1500,1600], eps_search=[0.05,0.06,0.07,0.08,0.09]),
101102
],
102103
}
103104

0 commit comments

Comments
 (0)