Elestia Open Source Ratings
7.1

node-llama-cpp

A strong pick. 3rd of 7 machine learning in JavaScript.

node-llama-cpp is a set of Node.js bindings for llama.cpp. It runs GGUF language models, embeddings and rerankers inside the Node process, and it can force the output to match a JSON schema. It is the most complete way to run an LLM in-process from Node today, but it rests mostly on one maintainer, and native installs are heavy and can break on some hardware.

Best for: Node.js or Electron apps that need local LLM chat, embeddings or schema-constrained output inside the process, without a separate Ollama server.

WebsiteGitHubnpm

Scores

Overall7.1

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 6.5, likely 5.5 to 7.5

For running LLMs in-process in Node, it is the most capable and best-maintained option, and its schema-constrained output is a real advantage. Heavy native installs, platform-specific crashes and a single main maintainer keep it below the category leaders. Transformers.js covers more of the category, in both the browser and Node. Teams that can run a separate service often find Ollama simpler.

GPT-6.2 Sol: 7.6, likely 6.4 to 8.6

For embedded GGUF inference in Node.js, the typed API, structured generation, and steady release cadence make this a strong pick. Transformers.js is the better category default for projects that need browser support or a broader set of model tasks. Native packaging and reliance on a small release team are the main uncertainties for a new project.

Needed by many3.7

How many developers need a tool for this job?

Claude Opus 5.5: 3.5, likely 2.5 to 5.0

Running LLMs on the device from Node is a clear niche, though it is growing with local agents and private embeddings. The project serves only Node and Electron, not the browser, so it covers less of the category than Transformers.js or MediaPipe. It also covers only GGUF LLMs and embedding models, not vision or classic ML.

GPT-6.2 Sol: 3.8, likely 2.7 to 5.0

In-process GGUF inference serves a clear niche in desktop apps, offline tools, and Node.js services. Transformers.js also serves browser apps and covers a wider set of model tasks. The Stack Overflow survey measures use of model vendors, leaving demand for locally embedded JavaScript inference uncertain.

Helps a lot7.6

How well does it do the job for those who need it?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

The feature set is rich: JSON-schema-constrained generation, function calling, embeddings, reranking, GPU backends, prebuilt binaries, typed APIs and good docs. It is the most capable in-process LLM runtime for Node. Several things hold it back. Native installs are heavy and fragile on some platforms, and open bugs include segfaults, hangs and silent wrong output. For many apps, Ollama as a separate service is easier.

GPT-6.2 Sol: 8.1, likely 7.0 to 9.1

Version 3.22.3 offers streaming chat, embeddings, and schema-constrained generation through a typed API with examples that coding agents can follow. The native binding led the tested configurations in a small Raspberry Pi 5 study. A DGX Spark user reported a silent fallback to CPU, and performance and setup still vary across hardware and models.

Holds up over time6.3

Will it still be a good choice in two years?

Claude Opus 5.5: 5.5, likely 4.0 to 7.0

Releases are frequent and recent: 21 in the last year, with the latest on 5 November 2026, and each follows llama.cpp's breaking changes quickly. But giladgd appears to carry most of the work, there is one GitHub sponsor, and the repository had 50 commits in a year. That is a real bus-factor risk for a native binding that must chase upstream all the time. A v4.0.0 milestone suggests breaking changes are coming.

GPT-6.2 Sol: 7.0, likely 5.7 to 8.1

The project made 50 commits and shipped 21 releases in the past year, and a maintainer responded to a hardware report within a week. GitHub Sponsors shows funding, while npm lists one collaborator. QMD had to change its cleanup code after a minor update, and the open v4 milestone leaves the timing and scope of the next upgrade uncertain.

Used widely4.7

How many use it, and is that growing?

Claude Opus 5.5: 5.0, likely 3.5 to 6.5

Downloads rose about 35 times in a year, to 1.58M per 4 weeks, far above the 4.1 median. Much of that likely comes from tools that install it, such as QMD and the OpenClaw llama-cpp plugin, rather than from developers choosing it directly. ecosyste.ms finds only 1 repository and 3 packages that depend on it, and it has 2.2k stars, both far below its peers. Direct choices are probably in the thousands to low tens of thousands, and that number is growing.

  • npm downloadsLast4Weeks: 1,576,105, against 44,590 a year before
  • dependents: 1 repo and 3 packages, very low next to peers
  • github stars: 2,207 stars, against 16k-39k for peers
  • docs.openclaw.ai/plugins/llama-cpp: OpenClaw's local embedding plugin installs node-llama-cpp

GPT-6.2 Sol: 4.3, likely 2.8 to 6.0

Four-week npm downloads rose from 44,590 to 1.58 million, about 35 times year over year against a catalog median of 4.1 times. OpenClaw formerly installed it by default and has since moved to a managed llama-server, while QMD still brings it in for local search. The collector found one dependent repository and three npm packages, with less social activity than WebLLM or Transformers.js. The share of downloads from projects choosing it directly is uncertain.

Vouched for5.8

Who stands behind it being good?

Claude Opus 5.5: 5.0, likely 3.5 to 6.5

Well-known projects build on it: QMD uses it for all embeddings, OpenClaw ships a plugin around it, and LangChain.js has an integration. There are no survey results, independent benchmarks or wide production write-ups. Hacker News and Bluesky show almost no attention.

GPT-6.2 Sol: 6.5, likely 5.3 to 7.7

QMD ships it for local search, and Clippy uses it to run models on desktop hardware. Electron’s maintainers chose it for an experimental reference implementation. The independent Raspberry Pi study supports its use on small edge devices, while evidence from larger deployments and library-specific satisfaction surveys is sparse.

Safe6.2

How safe is it to depend on?

Claude Opus 5.5: 6.0, likely 4.5 to 7.5

No advisories are known, and the licence is MIT. Other things widen the attack surface. The package pulls in 28 dependencies and large native binaries. It can download and build llama.cpp from source at install time. An open issue asks to bump simple-git past an unpatched CVE range, and another asks for hash checks on git clones. There is no Scorecard, Windows binaries are unsigned, and releases go through CI with one main maintainer.

GPT-6.2 Sol: 6.4, likely 5.0 to 7.6

The package uses the permissive MIT license, and OSV lists zero advisories for the npm package. GitHub Actions automates releases with OIDC permissions, and npm lists one collaborator. The package brings 28 direct dependencies and loads native code in the app process, where upstream GGUF parser bugs matter. The missing OpenSSF Scorecard and public security policy make its security practices harder to assess.

Good

  • It enforces a JSON schema or grammar while the model generates, and supports function calling, so local models return structured output reliably.
  • Prebuilt binaries for macOS, Linux and Windows with Metal, CUDA and Vulkan mean most users need no compiler.
  • It tracks llama.cpp closely, with 21 releases in the last year, so new models such as Gemma 4 work soon after llama.cpp supports them.
  • It is TypeScript-first, has good documentation and a CLI, and has a LangChain.js integration.

Bad

  • It runs in Node only, not in the browser, which makes it narrower than Transformers.js or WebLLM.
  • The native install is large (an open issue reports about 664 MB on Linux x64) and fails on some platforms, such as Jetson boards, Windows with Smart App Control and some pnpm lockfile setups.
  • Open issues report crashes and silent wrong output on some hardware and models, such as segfaults, embed hangs, repeating Gemma output and diverging embeddings.
  • One maintainer does most of the work, with little sponsorship.

The numbers

npm downloads, 4 weeks
1.6M ×35 in a year
GitHub stars
2.2k
Commits, 12 months
50
npm version
3.22.3 Nov 2026
Versions, 12 months
21
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
None
Licence
MIT

Read on 21 November 2026 from GitHub (withcatai/node-llama-cpp), npm (node-llama-cpp), OSV and the OpenSSF Scorecard.

Machine learning in JavaScript

  1. 8.4Transformers.js
  2. 7.8MediaPipe Tasks
  3. 7.1node-llama-cpp
  4. 6.8WebLLM
  5. 6.6Tesseract.js
  6. 4.5TensorFlow.js
  7. 2.7brain.js
Compare all 7 on six scores