Skip to main content
torch.js has not been released yet.
torch.js logotorch.js logotorch.js
PlaygroundContact
Login
Documentation
IntroductionType SafetyTensor ExpressionsTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformancePyTorch CompatibilityBenchmarksDType Coverage
torch.js· 2026
LegalTerms of UsePrivacy Policy

Documentation

torch.js is a WebGPU-accelerated tensor library with a PyTorch-compatible API. These docs cover everything from basic tensor operations to building and training neural networks in the browser.

New to torch.js? Start with the Getting Started guide, or jump into a package below.

Core Packages

torch.jsPyTorch-compatible tensor library with WebGPU acceleration
PyTorch-compatible tensor library with WebGPU acceleration
React UIReact components for ML visualization and interaction
React components for ML visualization and interaction
VizLow-level WebGPU visualization primitives
Low-level WebGPU visualization primitives

Platform & Tools

SparkWeb Workers RPC for background tensor computation
Web Workers RPC for background tensor computation
torch-nodeNode.js bindings for torch.js with native GPU support
Node.js bindings for torch.js with native GPU support
DawnDawn WebGPU backend for Node.js
Dawn WebGPU backend for Node.js
wgpu-nativewgpu-native WebGPU backend for Node.js
wgpu-native WebGPU backend for Node.js