# TensorFlow.js: 4.5 out of 10

Keep, but not for new work. 6th of 7 in [Machine learning in JavaScript](https://elestia.ai/opensource/ml/index.md).

TensorFlow.js is Google's general-purpose JavaScript library for training and running ML models in the browser and Node.js. It still works, but development has nearly stopped: there has been no release since October 2024 and only one commit in the last year. Google now presents LiteRT.js as the evolution of TensorFlow.js, so for new work pick LiteRT.js, ONNX Runtime Web/Transformers.js or MediaPipe, and keep TF.js only where it already runs.

**Best for:** Teams that already ship TF.js or Keras models, or that need to train small models in the browser, and accept a library that is barely maintained.

## Scores

- **Overall: 4.5** (likely 3.4 to 5.7)
  - Claude Opus 5.5 (3.5): TF.js still works and remains the only mature option for training in JS, but it has had no release in over two years of the last year's window and Google is steering users to LiteRT.js. For new projects, Transformers.js/ONNX Runtime Web, MediaPipe or LiteRT.js are better and actively developed. Keep it where it already runs.
  - GPT-6.2 Sol (5.5): TensorFlow.js earns a place in new projects that need custom browser training, automatic differentiation, or an existing compatible TensorFlow model. Transformers.js is the stronger starting point for pretrained transformer inference, with a newer release and ready-made pipelines. The range reflects how much the recommendation depends on the task and whether future compatibility fixes reach a stable release.
- **Needed by many: 4.0** (likely 2.6 to 5.3)
  - Claude Opus 5.5 (4.5): On-device ML is a clear and growing niche, not a need most JS developers have in most projects. TF.js covers both browser and Node and does both training and inference, which makes it broader than single-task peers. The range is wide because demand for on-device AI is changing fast.
  - GPT-6.2 Sol (3.4): On-device ML is a niche within JavaScript and TypeScript. TensorFlow.js covers both inference and training across browsers and Node.js, giving it several uses within that niche. State of JavaScript respondents rarely select machine learning as a use case, and the survey does not measure how many need on-device execution.
- **Helps a lot: 6.0** (likely 4.7 to 7.4)
  - Claude Opus 5.5 (5.0): The feature set is still unmatched for training and autograd in JS: it has layers and ops APIs, several backends, types and good documentation. But its JavaScript kernels are slower than WASM/WebGPU runtimes, the WebGPU backend has stalled, and it does not fit LLMs or Hugging Face models. Peers do inference clearly better for most of today's model types.
  - GPT-6.2 Sol (7.0): Version 4.22.0 combines trainable layers with low-level tensor operations and automatic differentiation. Types and versioned examples help developers and coding agents find the right APIs, including tensor cleanup. Conversion errors name the unsupported operation, and users report native Node.js compatibility failures and an iOS WebGPU video bug. Benchmark results vary with the model, device, and backend.
- **Holds up over time: 2.4** (likely 1.4 to 3.8)
  - Claude Opus 5.5 (2.0): There has been one commit in the last year and no release since October 2024; the Scorecard Maintained check is 0. In July 2026 Google launched LiteRT.js and calls it an evolution from TF.js, so the ecosystem is moving away. The repo is not archived or deprecated, which keeps the score above the floor.
  - GPT-6.2 Sol (2.8): The project recorded one commit and zero releases in the past year, with 345 open pull requests. A native Node.js compatibility fix merged in April 2025 is still waiting for a release. Maintainers still respond to some reports and have invited community fixes, so future compatibility depends on whether those fixes reach npm.
- **Used widely: 5.2** (likely 4.1 to 6.6)
  - Claude Opus 5.5 (5.5): It has 2.47M downloads per 4 weeks and the most dependent repos in the category (8,947), so many projects still use it. But its year-on-year ratio of 2.8 is below the 4.1 median, and every peer except brain.js grows far faster. Much of the download count likely comes from wrapper packages and old codebases, not new choices.
  - GPT-6.2 Sol (4.9): Ecosyste.ms found 8,947 dependent repositories, the highest reported count among the listed peers, and 699 dependent npm packages. Downloads rose to 2.47 million in four weeks, but the 2.83× year-over-year increase trails the catalog median of 4.1× and the gains of most peers. Downstream packages can inflate install counts, CDN use can escape them, and the latest Bluesky snapshot shows little attention.
- **Vouched for: 5.1** (likely 3.8 to 6.5)
  - Claude Opus 5.5 (4.5): Google built it, and web.dev still lists it as a stable option for well-established tasks. Most production write-ups and endorsements are old, and current independent sources discuss it as stalled or being replaced. Google's own newer guidance points to LiteRT.js.
  - GPT-6.2 Sol (5.7): ml5.js still builds on TensorFlow.js, and ModiFace documented using it for production browser-based makeup try-on. Independent benchmarks show useful browser performance on some workloads, with results sensitive to model and backend. The ModiFace case is old, and recent evidence of production use and developer satisfaction is limited.
- **Safe: 5.8** (likely 4.5 to 7.2)
  - Claude Opus 5.5 (6.0): It has no known advisories, uses the Apache-2.0 licence and has a moderate 11 dependencies, with good code review and token-permission checks. The Scorecard is 5.2, with 0 for Maintained, Pinned-Dependencies, Security-Policy, SAST and Fuzzing. With no active maintenance, any future issue may go unfixed. In 2025 a typosquatting campaign targeted users who search for TF.js packages.
  - GPT-6.2 Sol (5.6): The official package uses the permissive Apache-2.0 license, has 11 direct dependencies, and has zero recorded OSV advisories. The 2025 typosquatting incident involved an imitation package. OpenSSF gives the repo 5.2/10, with zeros for maintenance, pinned dependencies, and security policy. The tagged source documents an npm publish script, while npm provenance, publisher access, and the project's ability to ship a prompt security fix remain uncertain.

## Good

- It is the only mature JS library with tensors, autograd and in-browser training across WebGL, WASM, WebGPU and Node backends.
- It has a large set of ready-made models (pose, face, object detection, toxicity) and many tutorials and examples.
- It ships TypeScript types, uses the Apache-2.0 licence and has no known advisories.
- Its large base of existing code and Q&A answers helps AI coding agents write working TF.js code.

## Bad

- There has been no release since 4.22.0 in October 2024, and only one commit in the last year; 345 pull requests are open.
- Google now promotes LiteRT.js as its evolution, so new investment is going elsewhere.
- Its JavaScript kernels are slower than WASM/WebGPU runtimes, and it is not suited to LLMs or modern generative models.
- Its download growth is well below the category median and far behind every growing peer.

## The numbers

- Downloads, 4 weeks: 2.5M
- In a year: ×2.8
- GitHub stars: 19k
- Commits, 12 months: 1
- Last npm release: Oct 2024
- Advisories, 24 months: 0
- Licence: Apache-2.0
- GitHub: https://github.com/tensorflow/tfjs
- npm: https://www.npmjs.com/package/@tensorflow/tfjs

Scores run from 0 to 10 and are the mean of the scores of AI reviewers (Claude Opus 5.5, GPT-6.2 Sol), made on 22 November 2026 from GitHub, npm, OSV, OpenSSF Scorecard, ecosyste.ms, Hacker News and Bluesky data and a web search. The ecosyste.ms count of repositories that use a project is far too low for projects that grew in the last few years, and some reviews quote it. Overall is the reviewers' own judgement for a new project today, not an average of the parts. An AI wrote them and can be wrong.
