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
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime Icon
Custom VMs From 1 to 96 vCPUs With 99.95% Uptime

General-purpose, compute-optimized, or GPU/TPU-accelerated. Built to your exact specs.

Live migration and automatic failover keep workloads online through maintenance. One free e2-micro VM every month.
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