Skip to content

EmbedderModel

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:49

What to load. Every field is optional; a missing one comes from the model’s DEFAULT, EmbeddingGemma 2 without modelPath.

readonly optional audioPath?: ModelPath | null

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:58

The audio tower’s weights, for audio. EmbeddingGemma 2 only. null skips it: a smaller download.


readonly optional dtype?: "f32" | "f16"

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:65

Precision on the GPU. f16 runs the whole model in half precision, weights and activations, for half the memory traffic at a small cost in precision. Needs a device with shader-f16. Default: f16 where the device has it, f32 elsewhere. Either loads any weight file.


readonly optional imageTokens?: 70 | 140 | 280 | 560 | 1120

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:72

Most tokens one image takes: 70, 140, 280, 560 or 1120. More tokens keep more detail and take longer. Default 280.


readonly optional maxTokens?: number

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:69

Longest input in tokens. EmbeddingGemma 2: up to 2048, default 2048. all-MiniLM-L6-v2: up to 512, default 256. Longer text is cut; a longer input with images, video or audio is an error.


readonly optional modelPath?: ModelPath

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:52

The safetensors weights of EmbeddingGemma 2 or all-MiniLM-L6-v2. The model is read from the file.


readonly optional tokenizerPath?: string

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:60

The Hugging Face tokenizer.json.


readonly optional visionPath?: ModelPath | null

Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:55

The vision tower’s weights, for images and video. EmbeddingGemma 2 only. null skips it: a smaller download.