Skip to main content
Multimodal LFMs run on llama.cpp through its mtmd library. A vision or audio GGUF comes in two parts: the language model (LFM2.5-VL-1.6B-Q4_0.gguf) and a projector / encoder file (mmproj-*.gguf). llama-server, llama-cli, and llama-mtmd-cli all load both; the same mtmd code is available in the iOS XCFramework and Android builds.

Vision (LFM2.5-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. Vision models use temperature 0.1, min_p 0.15, repeat_penalty 1.05. See Vision Capabilities for prompting guidance and LFM2.5-VL-1.6B / LFM2.5-VL-3B for model details.

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. Downscale images before passing them to the model β€” LFM2.5-VL handles native resolution, but a 12-megapixel camera frame costs far more image tokens than a 1024-pixel resize with no accuracy benefit for most tasks.

Audio (LFM2.5-Audio)

LFM2.5-Audio adds a custom audio detokenizer for speech output, so it runs on llama.cpp through Liquid’s dedicated audio runners rather than the generic mtmd path. The GGUF repository ships four files per quantization: the language model, the mmproj-* audio encoder, the vocoder-* decoder, and the tokenizer-* speaker file.
The LFM2.5-Audio-1.5B model page has the TTS and interleaved-mode commands and the list of platforms the runners are built for (macOS arm64, Ubuntu x64/arm64, Android arm64). The real-time transcription example is a complete Python CLI that downloads the runner and drives it; the Hand & Voice Racer and Audio Browser Demo show the same model in the browser.
Audio input is 16 kHz mono WAV. Resample and downmix on the client (AVAudioConverter on iOS, AudioRecord at 16 kHz on Android, ffmpeg -ar 16000 -ac 1 on desktop) before sending it to the model.