sweet-search 2.3.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,8 +30,18 @@
30
30
  * before addon loads so
31
31
  * the Rust dtype policy
32
32
  * picks BF16/F16/F32 by
33
- * compute capability.
33
+ * compute capability and
34
+ * model family.
34
35
  * See mod.rs::optimal_dtype
36
+ * SWEET_SEARCH_NATIVE_DTYPE=f32|bf16|f16 Global dtype preference.
37
+ * On CUDA, BF16 is used for
38
+ * embeddings on Ampere+ but
39
+ * LI remains F32 for quality.
40
+ * SWEET_SEARCH_NATIVE_EMBED_DTYPE=f32|bf16|f16 Per-model diagnostic
41
+ * override for embeddings.
42
+ * SWEET_SEARCH_NATIVE_LI_DTYPE=f32|bf16|f16 Per-model diagnostic
43
+ * override; BF16/F16 LI is
44
+ * known to drift on CUDA.
35
45
  * CANDLE_METAL_COMPUTE_PER_BUFFER=<N> — candle default 50 (tuned)
36
46
  * CANDLE_METAL_COMMAND_POOL_SIZE=<N> — candle default 5 (tuned)
37
47
  */
@@ -87,7 +97,8 @@ export function pickCascadeDirForDevice(deviceKind, cascadeDirOverride, resolveC
87
97
  /**
88
98
  * Ensure `SWEET_SEARCH_CUDA_COMPUTE_CAP` is set for the current process
89
99
  * before the addon loads a CUDA model. The Rust `optimal_dtype` reads
90
- * this env var to pick BF16 on Ampere+ and F16/F32 on older GPUs.
100
+ * this env var to pick BF16 for the embedding model on Ampere+ while
101
+ * keeping ModernBERT LI on F32 unless explicitly overridden.
91
102
  *
92
103
  * Idempotent: honors an already-set value (useful for forcing a dtype
93
104
  * tier in benchmarks) and silently no-ops when there is no NVIDIA GPU.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sweet-search",
3
- "version": "2.3.0",
3
+ "version": "2.4.1",
4
4
  "description": "Sweet Search - SOTA Hybrid Code Search Engine with WASM CatBoost Query Router, Semantic/Lexical/Structural Search, and Multilingual Support",
5
5
  "type": "module",
6
6
  "main": "core/search/sweet-search.js",
@@ -13,7 +13,7 @@
13
13
  "author": "Marko Sladojevic <marko@panonit.com> (https://panonit.com)",
14
14
  "repository": {
15
15
  "type": "git",
16
- "url": "https://github.com/panonitorg/sweet-search"
16
+ "url": "git+https://github.com/panonitorg/sweet-search.git"
17
17
  },
18
18
  "bugs": {
19
19
  "url": "https://github.com/panonitorg/sweet-search/issues"
@@ -34,8 +34,8 @@
34
34
  "panonit"
35
35
  ],
36
36
  "bin": {
37
- "sweet-search": "./core/cli.js",
38
- "sweet-search-mcp": "./mcp/server.js"
37
+ "sweet-search": "core/cli.js",
38
+ "sweet-search-mcp": "mcp/server.js"
39
39
  },
40
40
  "files": [
41
41
  "core/*.js",
@@ -139,12 +139,12 @@
139
139
  "vitest": "^4.0.16"
140
140
  },
141
141
  "optionalDependencies": {
142
- "@sweet-search/native-darwin-arm64": "2.3.0",
143
- "@sweet-search/native-darwin-x64": "2.3.0",
144
- "@sweet-search/native-linux-arm64-gnu": "2.3.0",
145
- "@sweet-search/native-linux-arm64-gnu-cuda": "2.3.0",
146
- "@sweet-search/native-linux-x64-gnu": "2.3.0",
147
- "@sweet-search/native-linux-x64-gnu-cuda": "2.3.0"
142
+ "@sweet-search/native-darwin-arm64": "2.4.1",
143
+ "@sweet-search/native-darwin-x64": "2.4.1",
144
+ "@sweet-search/native-linux-arm64-gnu": "2.4.1",
145
+ "@sweet-search/native-linux-arm64-gnu-cuda": "2.4.1",
146
+ "@sweet-search/native-linux-x64-gnu": "2.4.1",
147
+ "@sweet-search/native-linux-x64-gnu-cuda": "2.4.1"
148
148
  },
149
149
  "engines": {
150
150
  "node": ">=18.0.0"