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.
Properties
Section titled “Properties”audioPath?
Section titled “audioPath?”
readonlyoptionalaudioPath?: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.
dtype?
Section titled “dtype?”
readonlyoptionaldtype?:"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.
imageTokens?
Section titled “imageTokens?”
readonlyoptionalimageTokens?: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.
maxTokens?
Section titled “maxTokens?”
readonlyoptionalmaxTokens?: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.
modelPath?
Section titled “modelPath?”
readonlyoptionalmodelPath?: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.
tokenizerPath?
Section titled “tokenizerPath?”
readonlyoptionaltokenizerPath?:string
Defined in: packages/runntime/src/zoo/tasks/multimodal/embedding.ts:60
The Hugging Face tokenizer.json.
visionPath?
Section titled “visionPath?”
readonlyoptionalvisionPath?: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.