npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

v2.4.2

Published

Sweet Search native binaries for Linux x64 (glibc) with NVIDIA CUDA backend (candle-cuda + flash-attn, SM 7.0+)

Readme

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

NVIDIA CUDA-enabled native binaries for sweet-search on Linux x86-64 (glibc).

This package is a platform-scoped optionalDependency of the main sweet-search package. npm installs it automatically on matching hosts:

  • os === 'linux'
  • cpu === 'x64'
  • libc === 'glibc' (Debian/Ubuntu/RHEL/SUSE — not Alpine/musl)

On non-matching platforms, npm silently skips this package.

What's inside

  • sweet-search-native.node — napi-rs addon built with the cuda,flash-attn Cargo features. Embedding + late-interaction inference dispatch to candle-cuda when libcuda.so.1 is present at runtime; otherwise the addon fails to load and sweet-search falls back to the CPU-only @sweet-search/native-linux-x64-gnu variant via core/infrastructure/native-resolver.js.
  • sweet-search — Rust CLI binary (identical to the non-CUDA Linux x64 package; the CUDA feature lives in the napi addon, not the CLI).

Runtime requirements

  • Linux x86-64 with glibc ≥ 2.31 (Ubuntu 20.04 / Debian 11 / RHEL 9 or newer)
  • NVIDIA driver ≥ 525 providing libcuda.so.1
  • Compute capability ≥ 7.0 (Volta V100 / Turing T4 / Ampere A100, H100, RTX 3090/4090 / Ada L4 / Hopper)
  • libcudart.so.12 from CUDA Toolkit 12.x — the binary is linked against CUDA 12.2 at build time

Flash-attention kernels require SM 8.0+ (Ampere+). On SM 7.0/7.5 hardware the flash-attn path is skipped at runtime and candle's naive attention is used instead — the binary supports both paths.

Install

This package is normally installed automatically as an optionalDependency:

npm install sweet-search

On a Linux x64 host with a working NVIDIA driver, npm pulls this CUDA-enabled addon, core/infrastructure/native-resolver.js prefers it over the plain @sweet-search/native-linux-x64-gnu variant, and indexing uses the GPU.

Detecting whether CUDA is armed

Runtime detection is authoritative. Run sweet-search init — its report prints one of:

  • NVIDIA GPU: <name> (CC x.y, N MB, driver M.m.p) — candle-cuda armed when this addon loaded cleanly and nvidia-smi + Device::new_cuda(0) both succeeded.
  • A warning that the standard CPU-only package should be installed when the -cuda addon was resolved but failed to initialize (typically missing libcuda.so.1 or an incompatible driver).

.sweet-search/config.json records the decision under runtime.hardware (cudaAddonEnabled, cudaAvailable, cudaReason, candleGpuBackend, inferenceBackendPreference). See docs/INIT_STRATEGY.md → "CUDA Backend" for the full contract.

Troubleshooting

To force-disable CUDA without uninstalling the package:

export SWEET_SEARCH_CUDA=0    # or pass --skip-cuda to `sweet-search init`

Parity between the CUDA path and the CPU reference is validated pre-release with node scripts/parity-cuda.js (see docs/INIT_STRATEGY.md for the check's min/mean thresholds).