Skip to main content
LFM3 requires llama.cpp v0.8.0 (b11960) or later. Use the same supported build for the main guide and subsidiary examples. Multimodal LFMs run on llama.cpp through its mtmd library. A vision or audio GGUF comes in two parts: the language model (LFM3-VL-2B-QAD-Q4_0.gguf) and a projector / encoder file (mmproj-*.gguf). llama-server and llama-cli load both; the same mtmd code is available in the iOS XCFramework and Android builds.

Vision (LFM3-VL)

Start the server

Or with local files:
Useful flags: --image-max-tokens caps the number of image tokens per picture (lower = faster, coarser); --no-mmproj-offload keeps the vision encoder on CPU when GPU memory is tight.

Send an image

Images travel as standard OpenAI image_url content parts — a data: URI with base64 bytes or a public URL.
Multiple images in one message are supported; put each image_url part before the text that refers to it. Multi-turn works as for text — send the full history, and the image tokens stay in the prompt cache. LFM3-VL can reason before answering, so leave a sufficient output budget. Its GGUF stores the recommended temperature, top-k, and repetition penalty. Use --top-p 1.0 --min-p 0.0 --no-reasoning-preserve on the server to apply the remaining settings and keep earlier reasoning out of history. See Vision Capabilities and the model page.

Command line

In-process (mobile and embedded)

The mtmd C API sits next to llama.h: load the projector with mtmd_init_from_file(), tokenize a prompt that contains image markers plus the image bitmaps with mtmd_tokenize(), evaluate the chunks with mtmd_helper_eval_chunks(), then sample text with the usual llama_sampler_sample() loop. tools/mtmd/README-dev.md documents the API and tools/mtmd/mtmd-cli.cpp is a compact reference. On Android build with -DLLAMA_BUILD_MTMD=ON; the iOS XCFramework already includes it. Choose image resolution for the detail your task needs. Resizing can reduce latency and memory, but can also remove text or grounding detail; evaluate the tradeoff on your inputs.

Audio and omni (LFM3)

LFM3-Audio and LFM3-Omni use llama.cpp’s current multimodal path, with a language model and the matching projector. They do not use the older LFM2.5 dedicated audio runner and vocoder layout. Follow the main Audio and Omni quickstart for the complete ASR, server, and TTS commands. For LFM3-Omni, follow the model page, including --reasoning off, video dependencies, and output controls. Server audio input uses OpenAI input_audio content parts; input formats and speech output endpoints differ from an image-only chat call.

Older multimodal deployments

LFM2.5-VL still uses its own GGUF and projector with the same image request shape. Its sampling and image-token controls differ from LFM3; see the model page. The deprecated LFM2.5-Audio model retains its dedicated runner instructions for existing applications. Its four-file model/encoder/vocoder/speaker layout is not the LFM3 layout. Use LFM3-Audio for new speech applications.
Last modified on November 18, 2026