Skip to main content
torch.jstorch.jstorch.js
Getting StartedPlaygroundContact
Login
torch.jstorch.jstorch.js
Documentation
IntroductionType SafetyTensor IndexingEinsumEinopsAutogradTraining a ModelProfiling & MemoryPyTorch MigrationBest PracticesRuntimesPerformance
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.