Shumai is an experimental differentiable tensor library for TypeScript and JavaScript, developed by Facebook Research. It provides a high-performance framework for numerical computing and machine learning within modern JavaScript runtimes. Built on Bun and Flashlight, with ArrayFire as its numerical backend, Shumai brings GPU-accelerated tensor operations, automatic differentiation, and scientific computing tools directly to JavaScript developers. It allows seamless integration of machine learning, deep learning, and custom differentiable programs into web-based or server-side environments without relying on Python frameworks. The library supports matrix operations, gradient computation, and tensor conversions with intuitive APIs and near-native speed, thanks to Bun’s low-overhead FFI bindings. It can automatically leverage GPU acceleration on Linux (via CUDA) and CPU computation on macOS.

Features

  • Fast GPU-accelerated tensor operations powered by ArrayFire and Flashlight
  • Automatic differentiation with flexible gradient control and detachment
  • Supports matrix multiplication, elementwise operations, and data conversion between JS arrays and tensors
  • Built with Bun for high-speed JIT and minimal FFI overhead
  • Cross-platform support for macOS (CPU) and Linux (CUDA GPU)
  • Integrated statistics logging, profiling, and memory tuning APIs

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

MIT License

Follow Shumai

Shumai Web Site

Other Useful Business Software
Go From AI Idea to AI App Fast Icon
Go From AI Idea to AI App Fast

One platform to build, fine-tune, and deploy ML models. No MLOps team required.

Access Gemini 3 and 200+ models. Build chatbots, agents, or custom models with built-in monitoring and scaling.
Try Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Shumai!

Additional Project Details

Operating Systems

Linux, Mac

Programming Language

C++, Python, TypeScript

Related Categories

Python Libraries, C++ Libraries, TypeScript Libraries

Registered

2025-10-08