Cross-Package Workflows
torch.js is built as a modular ecosystem. High-performance workflows often span multiple packages, leveraging each for its unique strengths.

Common Patterns
1. Train in PyTorch, Infer in torch.js
Develop and train your models using the full Python ecosystem, then export weights to .pt or safetensors for browser-based inference.
2. Live Visualization with React UI
Use @torchjsorg/react-ui to monitor your training loops in real-time, visualizing loss curves and activation maps at 60fps.
3. Background Computing with Spark
Offload heavy tensor math to Web Workers using @torchjsorg/spark, ensuring your main UI thread remains fluid and responsive.