Skip to content

BrowserLoadOptions

Defined in: browser.ts:19

config: string | ModelConfig

Defined in: browser.ts:23

config.json: a URL (fetched here) or the already-parsed object.


optional executionProviders?: string[]

Defined in: browser.ts:29

onnxruntime-web execution providers. Default [‘wasm’]; use [‘webgpu’] to accelerate.


model: string | ArrayBufferLike | Uint8Array<ArrayBufferLike>

Defined in: browser.ts:21

ONNX model: a URL (fetched by the runtime) or raw bytes.


optional tokenizer?: SubwordTokenizer

Defined in: browser.ts:27

…or pass an already-loaded transformers.js tokenizer instance.


optional tokenizerId?: string

Defined in: browser.ts:25

Sub-word tokenizer: a HuggingFace hub id / URL base transformers.js can load.