LLM Inference
Vision-Language Inference
Run image and text prompts with ZeticMLange LFM-VL models.
Vision-language inference lets an on-device LLM answer questions about an RGB image plus a text prompt.
This page reflects ZeticMLange 1.9.0 on Android and iOS, and zetic_mlange 1.9.1 on Flutter. It covers image + text LFM-VL usage only; lower-level embedding injection APIs are not part of the public website surface for this release.
Image Input
Images are passed as RGB bytes with explicit width and height.
val image = ZeticMLangeLLMModel.Image(
rgb = rgbBytes,
width = width,
height = height,
)let image = ZeticMLangeLLMModel.Image(
rgb: rgbBytes,
width: width,
height: height
)final image = ZeticMLangeLLMImage(
rgb: rgbBytes,
width: width,
height: height,
);The RGB byte length must be width * height * 3.
Respond To An Image
model.respond(
systemPrompt = "Answer briefly.",
userText = "What is in this image?",
image = image,
).collect { token ->
append(token)
}for try await token in try model.respond(
systemPrompt: "Answer briefly.",
userText: "What is in this image?",
image: image
) {
append(token)
}final response = await model.respond(
systemPrompt: 'Answer briefly.',
userText: 'What is in this image?',
image: image,
);Use an LFM-VL-capable model. Calling image response APIs on a text-only model returns an unsupported-operation error.