Tip Of AI
Discover what you can do with AI
Shumai is a fast, network-connected, differentiable tensor library for TypeScript (and JavaScript). It is built with bun + flashlight, making it suitable for both software engineers and researchers. However, it is important to note that this software is still experimental. The library offers various features and supports standard array utilities. Users can create tensors with random values, perform matrix operations, and convert tensors to and from JavaScript native arrays. The library also supports gradient calculations, allowing users to compute gradients and update parameters during training. Shumai uses the ArrayFire library for GPU computation on Linux systems and CPU computation on macOS systems. It currently does not support non-ArrayFire tensor backends, but there are plans to add support for the ArrayFire OpenCL backend in the future. Installation of Shumai requires the installation of bun and ArrayFire. The library can be installed with bun using the command "bun install @shumai/shumai". However, the installation process is still a work in progress, and users are encouraged to file issues if they encounter any problems. Shumai provides strong performance, as demonstrated by benchmark data collected from various operations. It outperforms TF.js (TensorFlow.js) in several tests, including addition, matrix multiplication, and hidden layer computations. The library also offers memory management options to optimize performance and includes statistics gathering capabilities for profiling purposes. Contributions to Shumai are welcome, and developers can contribute to the core bindings or ffi. The library is MIT licensed, allowing for open-source collaboration and usage. In summary, Shumai is a powerful tensor library for TypeScript and JavaScript that offers fast computation, gradient calculations, and extensive utility functions. It is still an experimental library but is actively developed and supported by the Facebook Research team.