Skip to content
1 min read · 41 words

Type Alias: TransformersJsDevice ​

ts
type TransformersJsDevice =
  | TransformersJsDeviceType
  | Record<string, TransformersJsDeviceType>;

Defined in: src/batteries/llm/transformers_js/types.ts:85

device/dtype for a multimodal model: a single value (all submodules) OR a Record keyed by ONNX submodule filename (vision_encoder / audio_encoder / embed_tokens / decoder_model_merged) — the way to configure each modality's precision/backend separately.