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
Full-stack observability with actually useful AI | Grafana Cloud Icon
Full-stack observability with actually useful AI | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
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