LFM2‑VL is Liquid AI's first series of multimodal models, designed to process text and images with variable resolutions.
Built on the LFM2 backbone, it is optimized for low-latency and edge AI applications.
We're releasing the weights of two post-trained checkpoints with 450M (for highly constrained devices) and 1.6B (more capable yet still lightweight) parameters.
2× faster inference speed on GPUs compared to existing VLMs while maintaining competitive accuracy
Flexible architecture with user-tunable speed-quality tradeoffs at inference time
Native resolution processing up to 512×512 with intelligent patch-based handling for larger images, avoiding upscaling and distortion
Find more about our vision-language model in the LFM2-VL post and its language backbone in the LFM2 blog post.
📄 Model details
Due to their small size, we recommend fine-tuning LFM2-VL models on narrow use cases to maximize performance.
They were trained for instruction following and lightweight agentic flows.
Not intended for safety‑critical decisions.
Chat template: LFM2-VL uses a ChatML-like chat template as follows:
<|startoftext|><|im_start|>system
You are a helpful multimodal assistant by Liquid AI.<|im_end|>
<|im_start|>user
<image>Describe this image.<|im_end|>
<|im_start|>assistant
This image shows a Caenorhabditis elegans (C. elegans) nematode.<|im_end|>
Images are referenced with a sentinel (<image>), which is automatically replaced with the image tokens by the processor.
You can apply it using the dedicated .apply_chat_template() function from Hugging Face transformers.
Architecture
Hybrid backbone: Language model tower (LFM2-1.2B or LFM2-350M) paired with SigLIP2 NaFlex vision encoders (400M shape-optimized or 86M base variant)
Native resolution processing: Handles images up to 512×512 pixels without upscaling and preserves non-standard aspect ratios without distortion
Tiling strategy: Splits large images into non-overlapping 512×512 patches and includes thumbnail encoding for global context (in 1.6B model)
Inference-time flexibility: User-tunable maximum image tokens and patch count for speed/quality tradeoff without retraining
Training approach
Builds on the LFM2 base model with joint mid-training that fuses vision and language capabilities using a gradually adjusted text-to-image ratio
Applies joint SFT with emphasis on image understanding and vision tasks
Leverages large-scale open-source datasets combined with in-house synthetic vision data, selected for balanced task coverage
Follows a progressive training strategy: base model → joint mid-training → supervised fine-tuning
🏃 How to run LFM2-VL
You can run LFM2-VL with Hugging Face transformers v4.55 or more recent as follows:
pip install -U transformers pillow
Here is an example of how to generate an answer with transformers in Python:
python
1from transformers import AutoProcessor, AutoModelForImageTextToText
2from transformers.image_utils import load_image
3# Load model and processor4model_id ="LiquidAI/LFM2-VL-450M"5model = AutoModelForImageTextToText.from_pretrained(6 model_id,7 device_map="auto",8 torch_dtype="bfloat16",9 trust_remote_code=True10)11processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)12# Load image and create conversation13url ="https://www.ilankelman.org/stopsigns/australia.jpg"14image = load_image(url)15conversation =[16{17"role":"user",18"content":[19{"type":"image","image": image},20{"type":"text","text":"What is in this image?"},21],22},23]24# Generate Answer25inputs = processor.apply_chat_template(26 conversation,27 add_generation_prompt=True,28 return_tensors="pt",29 return_dict=True,30 tokenize=True,31).to(model.device)32outputs = model.generate(**inputs, max_new_tokens=64)33processor.batch_decode(outputs, skip_special_tokens=True)[0]34# This image depicts a vibrant street scene in what appears to be a Chinatown or similar cultural area. The focal point is a large red stop sign with white lettering, mounted on a pole.
You can directly run and test the model with this Colab notebook.
🔧 How to fine-tune
We recommend fine-tuning LFM2-VL models on your use cases to maximize performance.
Notebook
Description
Link
SFT (TRL)
Supervised Fine-Tuning (SFT) notebook with a LoRA adapter using TRL.