← all repositories
microsoft/onnxjs

Microsoft's browser ML runtime is now a museum piece

ONNX.js let you run neural networks in browsers and Node.js using WebAssembly and WebGL, but Microsoft has already moved on to its successor.

1.8k stars TypeScript Inference · Serving
onnxjs
Velocity · 7d
+0.6
★ / day
Trend
steady
star history

What it does ONNX.js is a JavaScript inference engine for ONNX models — the open standard for exchanging neural networks between frameworks like PyTorch and TensorFlow. It runs in browsers and Node.js, using WebAssembly for CPU execution and WebGL for GPU acceleration. The pitch was privacy-preserving, server-free ML: load a pre-trained model, score it locally, skip the round-trip to the cloud.

The interesting bit The README’s most prominent feature is a giant deprecation banner. Microsoft has already replaced ONNX.js with ONNX Runtime Web, and the docs spend more space on migration links than on the project itself. It’s a rare honest obituary in open source — no “maintenance mode” euphemisms, just a direct pointer to the faster successor.

Key highlights

  • Three backends: plain JS, WebAssembly, and WebGL, with automatic fallback
  • Web Workers for pseudo-multithreading on CPU
  • Claims “very promising performance gains” versus Keras.js and TensorFlow.js in ResNet-50 benchmarks (single Windows workstation, circa 2018 hardware)
  • Supports ONNX opset v7; ai.onnx.ml operators marked “coming soon” — likely forever now
  • Works in Electron and Node.js, though Node is explicitly labeled “usually for testing purpose”

Caveats

  • Safari on Windows and Ubuntu is unsupported; Android Firefox is “coming soon”
  • Benchmarks are on a single machine with an AMD FirePro W2100 — not exactly modern AI hardware
  • The project is deprecated; new work should use ONNX Runtime Web instead

Verdict Worth a look if you’re maintaining legacy code that already depends on it, or if you need to understand why WebAssembly+WebGL seemed like the future of browser ML in 2019. Everyone else should follow Microsoft’s own advice and migrate.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.