Multimodal AI with LFM3 and OpenVINO
⚠️ EXPERIMENTAL NOTEBOOK
Content
Multimodal AI with LFM3 and OpenVINO
⚠️ EXPERIMENTAL NOTEBOOK
This notebook demonstrates a model that has not been fully validated with OpenVINO and uses development builds of Optimum Intel and OpenVINO. It may be fully supported and validated in the future.
LFM3 is a family of open-weight models from Liquid AI built on one shared backbone and designed for on-device use and domain-specific fine-tuning. The language model has a hybrid architecture that combines gated short convolutions with sliding-window and global attention layers.
The family covers several modalities:
| Model | Input | Output | Highlights | |---|---|---|---| | LFM3-1.7B | Text | Text | Reasoning on/off per request, tool calling, structured outputs, 256K context | | LFM3-VL | Text, images, video | Text | New in-house vision encoder, video understanding, thinking mode | | LFM3-Omni | Text, images, video, audio | Text, speech | First LFM omni model: speech recognition, text-to-speech, spoken chat |
What The Notebook Covers
- Install prerequisites
- Download preconverted OpenVINO models or convert them with Optimum Intel (FP16 / INT8 / INT4)
- LFM3-1.7B with OpenVINO GenAI
LLMPipeline: direct answers vs. reasoning, multi-turn chat, tool calling and structured JSON output - LFM3-VL with OpenVINO GenAI
VLMPipeline: image understanding, multi-image comparison, thinking mode and video understanding - LFM3-Omni with OpenVINO GenAI
OmniPipeline: text-to-speech, speech recognition, spoken questions about images and spoken chat - Interactive Gradio demo with LFM3-Omni
- Measure LFM3-1.7B performance with OpenVINO GenAI
Installation Instructions
LFM3 export support is merged into main, but is not in the latest Optimum Intel release, 2.2.0. The notebook installs main and Transformers 5.20.0. This Transformers version overrides Optimum Intel's <5.16 constraint, so a pip dependency warning is expected.
GenAI support for VL and Omni is also merged, but is not in the latest released GenAI, 2026.4.1.0. The notebook selects openvino-genai==2027.0.0.0.dev20261119 from the nightly index with OpenVINO and tokenizers pinned to the same date.
Video frames are decoded with PyAV (av), which bundles FFmpeg, and passed to GenAI as RGB tensors with frame-rate metadata. TorchCodec and system FFmpeg shared libraries are not required.
Omni speech uses ATTENTION_BACKEND="SDPA". Speech output on paged attention is still pending. Text-only, speech-only and interleaved text/speech responses are selected through OmniTalkerSpeechConfig; audio input is 16 kHz mono and speech output is 24 kHz. Optimum Intel remains an alternative inference backend.
This is a self-contained example that relies solely on its own code.
We recommend running the notebook in a virtual environment. You only need a Jupyter server to start. For details, please refer to [Installation Guide](../../README.md).
Local models and generation settings
Set Local IR root to reuse converted models without downloading or converting them again. The folder should contain directories such as LFM3-1.7B-int4-ov, LFM3-1.7B-int8-ov and LFM3-1.7B-fp16-ov. A selected local model with missing files raises an error; leave the field empty to use the usual download/conversion path.
All three GenAI pipelines require exported OpenVINO tokenizers and detokenizers alongside the model IR. LFM3-Omni currently has no published OpenVINO IR in the OpenVINO collection, so its first preparation exports the model locally.
Local INT4 conversion explicitly uses asymmetric compression with group size 64 and ratio 1.0. Text examples inherit the checkpoint's generation defaults; structured JSON generation and the benchmark use greedy decoding.
Source and license
- Source
- Intel OpenVINO Notebooks
- Original
- openvinotoolkit/openvino_notebooks/notebooks/lfm3
- License
- Apache-2.0