Deep Learning in JavaScript

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • js-pytorch

    A JavaScript library like PyTorch, built from scratch.

  • lab-grad

    An Automated Differentiation library (like Pytorch🔥) in Typescript, for educational purposes.

  • Very very cool to see!!!

    So yours is SO MUCH MORE fleshed out than mine, but I have a similar (again very fledgling) one going here that uses Typescript:

    https://github.com/Marviel/lab-grad

    I think there are some really neat opportunities to increase the approachability of ML algorithms when you take advantage of the Typescript templating system to explicitly ensure you're not accidentally composing tensors of incorrect shapes.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • SimSIMD

    Up to 200x Faster Inner Products and Vector Similarity — for Python, JavaScript, Rust, and C, supporting f64, f32, f16 real & complex, i8, and binary vectors using SIMD for both x86 AVX2 & AVX-512 and Arm NEON & SVE 📐

  • tfjs

    A WebGL accelerated JavaScript library for training and deploying ML models.

  • Many people seem to be unaware of tensorflow.js, an official JS implementation of TF

    https://github.com/tensorflow/tfjs

    I'd love to see PyTorch in JS, but I think unless you get it running on the GPU it won't be able to do much.

  • gpu.js

    GPU Accelerated JavaScript

  • You might already be familiar, but a GPU.js backend can provide some speedups via good old WebGL -- no need for WebGPU just yet!

    [0]: https://github.com/gpujs/gpu.js/

  • transformers.js

    State-of-the-art Machine Learning for the web. Run 🤗 Transformers directly in your browser, with no need for a server!

  • BTW: you might want to add support for typed arrays.

    See: https://github.com/xenova/transformers.js/blob/8804c36591d11...

    This is really old, but added as part of the shape of the vector as well: https://github.com/nicolaspanel/numjs/blob/master/src/dtypes...

  • numjs

    Like NumPy, in JavaScript

  • BTW: you might want to add support for typed arrays.

    See: https://github.com/xenova/transformers.js/blob/8804c36591d11...

    This is really old, but added as part of the shape of the vector as well: https://github.com/nicolaspanel/numjs/blob/master/src/dtypes...

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • onnxruntime

    ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

  • tfjs is dead, looking at the commit history. The standard now is to convert PyTorch to onnx, then use onnxruntime (https://github.com/microsoft/onnxruntime/tree/main/js/web) to run the model on the browsdr.

  • onegrad.js

    Lightweight deep learning framework in JavaScript

  • Cool project! I worked on something similar a while ago to learn about automatic differentiation: https://github.com/hexhowells/onegrad.js

    Needs more layers to be really useful though.

    I always thought examples using browser extensions would be neat since their built in JS and you only need to download the model once.

  • taichi.js

    Modern GPU Compute and Rendering in Javascript

  • FWIW also taichi is quite popular in python and seems has some javascript related implementation (I haven't used it though), taichi.js [0]

    [0] https://github.com/AmesingFlank/taichi.js

  • node-gyp

    Node.js native addon build tool

  • The benefit of having it in JS is not speed but portability and access to the JS ecosystem of tools. Having the code run in the browser without needing a complex setup is a huge benefit for sharing demos. Node.js provides a way to use native code as well and it's quite commonly used https://github.com/nodejs/node-gyp so there's no reason you couldn't use those same or similar libraries in a JS implementation.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts