What is Shumai?
Shumai is a fast, network-connected, differentiable tensor library designed for JavaScript and TypeScript developers. Built with Bun and Flashlight, it’s perfect for both software engineers and researchers who need efficient tensor operations. Whether you're working on machine learning models or data processing, Shumai has got you covered.
What are the features of Shumai?
- Fast Tensor Operations: Optimized for speed, Shumai outperforms other libraries in benchmarks.
- GPU Acceleration: Automatically leverages GPUs for faster computations.
- Differentiable Tensors: Supports gradient calculations for machine learning tasks.
- Easy Integration: Works seamlessly with JavaScript and TypeScript projects.
- Cross-Platform: Supports macOS and Linux, with experimental Windows support via Docker.
What are the use cases of Shumai?
- Machine Learning: Train small models faster with Shumai’s efficient tensor operations.
- Data Processing: Manipulate and transform data using native JavaScript arrays.
- Research: Experiment with advanced training and inference logic without needing C++.
How to use Shumai?
- Install Bun: Run
curl https://bun.sh/install | bashto install Bun. - Install ArrayFire: Use Homebrew for macOS (
brew install arrayfire) or follow Linux instructions. - Install Shumai: Run
bun install @shumai/shumaito get started. - Basic Usage: Import Shumai and start creating tensors, performing operations, and calculating gradients.







