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
IntroductionQuickstartClient APIWorker APIFile I/OBackends
getGPUBackendloadGPUProvidergetGPUBackendInfoGPUBackendsaveloadload_safetensorsSerializationFormatSaveOptionsLoadOptions
torch.js· 2026
LegalTerms of UsePrivacy Policy
/
/
  1. docs
  2. torch-node
  3. index

torch-node API Reference

Complete API documentation for torch-node.

torch-node

Functions

  • getGPUBackend - Get the configured GPU backend from environment.
  • loadGPUProvider - Load the GPU provider based on environment configuration.
  • getGPUBackendInfo - Get information about the current GPU backend configuration.

Types

  • GPUBackend - Supported GPU backends.

torch-node.serialization

Functions

  • save - Save tensors or a model to a file.
  • load - Load tensors from a file.
  • load_safetensors - Load tensors from safetensors format with metadata.

Types

  • SerializationFormat - Supported serialization formats.
  • SaveOptions - Options for save.
  • LoadOptions - Options for load.