Skip to content

v4.2.0: multimodal embedding, a dispose that waits for work in flight

Latest

Choose a tag to compare

@lloyal-research lloyal-research released this 26 Oct 17:40

Part of release 2026.10.6 (lloyal.node 4.2.0).

Ships with lloyal-ai 1.21.0, whose templates pin it.

Multimodal embedding

encodeMultimodal(prompt, inputs, audioLimits?) embeds images, the text around them, audio and video windows on an embedding context with a projector. It runs on liblloyal v3.2.1's segments rail: one input, one pooled vector, read whole in one dispatch. A call the context can't serve is refused before any work runs. On EmbeddingGemma 2, the vector that reaches JavaScript is the model's 768-wide output, not its backbone's 512.

Every reference input agrees with llama.cpp's own embedding server to a cosine of 0.999 or better. The reference covers images, audio, mixed parts, task framings, languages, image budgets and a video window.

A dispose that waits for work in flight

dispose() refuses every later call at once. It frees the context's native state only when the last call in flight completes, and returns one promise that resolves then. Every worker a context queues holds the context, and a context collected mid-flight drains the same way. A call holds its context while it runs, so a getter that disposes the context can't free it underneath that call.

Packages

Thirteen platform packages, each built and tested on its own runner: macOS arm64 and x64; Linux arm64 and x64, with CUDA and Vulkan variants; Windows arm64 and x64, with CUDA and Vulkan variants. The Linux x64 CUDA flavor also ships as a signed download manifest for CUDA 12.9. Every package passed the L4 GPU gate before publishing.

CI checks the EmbeddingGemma 2 reference: the whole of it on Linux and Windows, and a lean subset on macOS.

Engine: llama.cpp b11559, through liblloyal v3.2.1.

What's Changed

  • feat(embedding): encodeMultimodal for EmbeddingGemma 2, and a dispose that waits for work in flight by @lloyal-research in #63

Full Changelog: v4.1.1...v4.2.0