---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/llm/transformers_js/types/type-aliases/TransformersJsDevice.md
description: >-
  `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.
---

# Type Alias: TransformersJsDevice

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

Defined in: [src/batteries/llm/transformers\_js/types.ts:85](https://github.com/NHTIO/ADK/blob/v1.20261103.0/src/src/batteries/llm/transformers_js/types.ts#L85)

`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.
