@sweet-search/native-linux-x64-gnu-cuda 2.3.0

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.
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # @sweet-search/native-linux-x64-gnu-cuda
2
+
3
+ NVIDIA CUDA-enabled native binaries for [sweet-search](https://github.com/panonitorg/sweet-search) on Linux x86-64 (glibc).
4
+
5
+ This package is a platform-scoped `optionalDependency` of the main `sweet-search`
6
+ package. npm installs it automatically on matching hosts:
7
+
8
+ - `os === 'linux'`
9
+ - `cpu === 'x64'`
10
+ - `libc === 'glibc'` (Debian/Ubuntu/RHEL/SUSE — not Alpine/musl)
11
+
12
+ On non-matching platforms, npm silently skips this package.
13
+
14
+ ## What's inside
15
+
16
+ - `sweet-search-native.node` — napi-rs addon built with the `cuda,flash-attn`
17
+ Cargo features. Embedding + late-interaction inference dispatch to
18
+ candle-cuda when `libcuda.so.1` is present at runtime; otherwise the addon
19
+ fails to load and sweet-search falls back to the CPU-only
20
+ `@sweet-search/native-linux-x64-gnu` variant via
21
+ `core/infrastructure/native-resolver.js`.
22
+ - `sweet-search` — Rust CLI binary (identical to the non-CUDA Linux x64
23
+ package; the CUDA feature lives in the napi addon, not the CLI).
24
+
25
+ ## Runtime requirements
26
+
27
+ - Linux x86-64 with glibc ≥ 2.31 (Ubuntu 20.04 / Debian 11 / RHEL 9 or newer)
28
+ - NVIDIA driver ≥ 525 providing `libcuda.so.1`
29
+ - Compute capability ≥ 7.0 (Volta V100 / Turing T4 / Ampere A100, H100, RTX
30
+ 3090/4090 / Ada L4 / Hopper)
31
+ - `libcudart.so.12` from CUDA Toolkit 12.x — the binary is linked against
32
+ CUDA 12.2 at build time
33
+
34
+ Flash-attention kernels require SM 8.0+ (Ampere+). On SM 7.0/7.5 hardware the
35
+ flash-attn path is skipped at runtime and candle's naive attention is used
36
+ instead — the binary supports both paths.
37
+
38
+ ## Install
39
+
40
+ This package is normally installed automatically as an `optionalDependency`:
41
+
42
+ ```bash
43
+ npm install sweet-search
44
+ ```
45
+
46
+ On a Linux x64 host with a working NVIDIA driver, npm pulls this CUDA-enabled
47
+ addon, `core/infrastructure/native-resolver.js` prefers it over the plain
48
+ `@sweet-search/native-linux-x64-gnu` variant, and indexing uses the GPU.
49
+
50
+ ## Detecting whether CUDA is armed
51
+
52
+ Runtime detection is authoritative. Run `sweet-search init` — its report
53
+ prints one of:
54
+
55
+ - `NVIDIA GPU: <name> (CC x.y, N MB, driver M.m.p) — candle-cuda armed`
56
+ when this addon loaded cleanly and `nvidia-smi` + `Device::new_cuda(0)`
57
+ both succeeded.
58
+ - A warning that the standard CPU-only package should be installed when
59
+ the `-cuda` addon was resolved but failed to initialize (typically
60
+ missing `libcuda.so.1` or an incompatible driver).
61
+
62
+ `.sweet-search/config.json` records the decision under `runtime.hardware`
63
+ (`cudaAddonEnabled`, `cudaAvailable`, `cudaReason`, `candleGpuBackend`,
64
+ `inferenceBackendPreference`). See `docs/INIT_STRATEGY.md` → "CUDA Backend"
65
+ for the full contract.
66
+
67
+ ## Troubleshooting
68
+
69
+ To force-disable CUDA without uninstalling the package:
70
+
71
+ ```bash
72
+ export SWEET_SEARCH_CUDA=0 # or pass --skip-cuda to `sweet-search init`
73
+ ```
74
+
75
+ Parity between the CUDA path and the CPU reference is validated pre-release
76
+ with `node scripts/parity-cuda.js` (see `docs/INIT_STRATEGY.md` for the
77
+ check's min/mean thresholds).
package/manifest.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": 1,
3
+ "addon": "sweet-search-native.node",
4
+ "binary": "sweet-search"
5
+ }
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@sweet-search/native-linux-x64-gnu-cuda",
3
+ "version": "2.3.0",
4
+ "description": "Sweet Search native binaries for Linux x64 (glibc) with NVIDIA CUDA backend (candle-cuda + flash-attn, SM 7.0+)",
5
+ "os": ["linux"],
6
+ "cpu": ["x64"],
7
+ "libc": ["glibc"],
8
+ "files": [
9
+ "manifest.json",
10
+ "sweet-search-native.node",
11
+ "sweet-search",
12
+ "README.md"
13
+ ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "https://github.com/panonitorg/sweet-search"
17
+ },
18
+ "license": "Apache-2.0",
19
+ "author": "Marko Sladojevic <marko@panonit.com> (https://panonit.com)"
20
+ }
package/sweet-search ADDED
Binary file
Binary file