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
Try Google Cloud Risk-Free With $300 in Credit Icon
Try Google Cloud Risk-Free With $300 in Credit

No hidden charges. No surprise bills. Cancel anytime.

Use your credit across every product. Compute, storage, AI, analytics. When it runs out, 20+ products stay free. You only pay when you choose to.
Start 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