Skip to main content
Back

Liquid AI's LFM2.5-VL-Extract Outputs Clean JSON Directly From Images

Liquid AI's new Extract models skip the parsing layer entirely, returning clean JSON from images natively on any device

Pro

Model, Full Access
  • Liquid AI released LFM2.5-VL-1.6B-Extract and LFM2.5-VL-450M-Extract, vision models that return structured JSON natively from images.
  • You pass an image and a YAML field list; the model returns a populated JSON object with no free-form text or post-processing needed.
  • The 1.6B model scores 99.6 JSON Validity and 90.6 VLM Judge Score, competitive with 4B-class models on structured extraction benchmarks.
  • The 450M model targets phones and embedded SoCs, outperforming sub-1B VLMs and competitive with models 4× its size.
  • Both are open-weight, run via Transformers v5.1+, vLLM, SGLang, and GGUF-quantized for Ollama and LM Studio.
  • Models are scoped to single-image flat JSON extraction; multi-image reasoning and free-form VQA are out of scope by design.

Most vision pipelines have a dirty secret: after the model gives you its answer, you still need another layer of code to parse that answer into something your system can actually use. Liquid AI just shipped two models designed to make that problem disappear. LFM2.5-VL-1.6B-Extract and LFM2.5-VL-450M-Extract are vision-language models that take an image and a schema, and return a populated JSON object. No free-form text. No regex. No post-processing.

The problem they are solving

Standard vision-language models (VLMs) are generalists. Ask one to describe an invoice, and it will write you a paragraph. That paragraph is useful for a human, but it is a liability for a pipeline. Your downstream system expects a field called invoice_total, not a sentence that contains the number somewhere in it. Most edge AI applications require models that excel in one particular task. Typically, this requires fine-tuning general-purpose models for a given task, but fine-tuning remains a challenge for many users due to a lack of time, data, or compute. The Extract models are Liquid's answer to that gap.

How it works

You specify what to extract as a YAML field list in the system prompt, and the model returns a JSON object with those fields. Structured outputs integrate cleanly with rule-based systems and downstream pipelines. The interface is intentionally minimal:

  • System prompt: a YAML list of field names and plain-English descriptions
  • User message: the image
  • Output: a strict JSON object, nothing else

The model also supports an enum constraint, where you provide a list of allowed values for a field and the model will only return one of those values. This is useful when you need categorical outputs like "smooth" | "rough" | "grainy" rather than free-form strings.

from transformers import AutoProcessor, AutoModelForImageTextToText
from transformers.image_utils import load_image
model_id = "LiquidAI/LFM2.5-VL-1.6B-Extract"
model = AutoModelForImageTextToText.from_pretrained(
    model_id, device_map="auto", dtype="bfloat16", trust_remote_code=True
)
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
image = load_image("path/to/invoice.png")
fields_yaml = """invoice_total: The total amount due on the invoice
vendor_name: The name of the company issuing the invoice
due_date: The payment due date"""
system_prompt = f"""Extract the following from the image:
{fields_yaml}
Respond with only a JSON object."""
conversation = [
    {"role": "system", "content": system_prompt},
    {"role": "user",   "content": [{"type": "image", "image": image}]},
]
inputs = processor.apply_chat_template(
    conversation, add_generation_prompt=True,
    return_tensors="pt", return_dict=True, tokenize=True
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
response = processor.batch_decode(
    outputs[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True
)[0]
print(response)
# {"invoice_total": "$1,240.00", "vendor_name": "Acme Corp", "due_date": "2026-07-01"}

The architecture under the hood

The model consists of three main components: a language model backbone, a vision encoder, and a multimodal projector. The language model tower builds upon the LFM2 backbone, inheriting from LFM2-1.2B for the 1.6B variant. The vision tower uses SigLIP2 NaFlex encoders to convert input images into token sequences. SigLIP2 NaFlex is Google's shape-aware image encoder that processes images at their native aspect ratio rather than forcing them into a fixed square, which matters a lot for documents and dashboards where proportions carry meaning.

The language backbone itself is not a standard transformer. LFM2 is a hybrid Liquid model with multiplicative gates and short convolutions. It consists of 16 blocks: 10 double-gated short-range convolution blocks and 6 blocks of grouped query attention. The convolution blocks handle local patterns in linear time, while the attention blocks handle global context. The result is a model that is faster to run and cheaper on memory than a pure transformer of the same size, especially on CPU and NPU hardware.

LFM2.5-VL builds on LFM2-VL with extended reinforcement learning training for higher performance while maintaining the same architecture and deployment footprint. The Extract variants are then fine-tuned from the base VL checkpoints specifically for structured extraction, teaching the model to always produce valid, schema-consistent JSON.

For image handling, the model supports native resolution processing up to 512×512 pixels without upscaling, preserves non-standard aspect ratios without distortion, and uses a tiling strategy that splits large images into non-overlapping 512×512 patches while including thumbnail encoding for global context. The thumbnail encoding is important: without it, tiling would give the model only local patches with no sense of the overall scene.

Two sizes, two deployment targets

The release comes in two variants designed for different hardware budgets:

ModelTotal ParamsLM BackboneVision EncoderTarget
LFM2.5-VL-1.6B-Extract~1.6BLFM2.5-1.2BSigLIP2 400MLaptops, single GPU
LFM2.5-VL-450M-Extract~450MLFM2.5-350MSigLIP2 86MPhones, embedded SoCs

Liquid Nanos occupy RAM space of 100MB to 2GB, trained with advanced pre-training and a specialized form of post-training to deliver frontier-grade results on the building blocks of agentic AI. Despite their small footprint, Nanos match or approach the quality of vastly larger generalist models on the tasks they are designed for, and they run fully on-device on modern phones and PCs.

How they benchmark

Liquid AI evaluated the 1.6B Extract on a 2,000-sample benchmark of (image, schema, JSON) triples, with reference labels generated by an ensemble of frontier multimodal models. Three metrics were tracked:

  • JSON Validity: what fraction of outputs are strictly parseable JSON
  • Schema Consistency F1: how well the predicted field names match the requested ones
  • VLM Judge Score: whether the extracted values are actually correct, as judged by a separate vision model

LFM2.5-VL-1.6B-Extract outperforms similarly-sized (~2B) open-source VLMs on this benchmark and is competitive with models 2× its size. On JSON Validity and Schema F1, it scores 99.6 on both, matching InternVL3-2B and beating SmolVLM2-2.2B (84.4 validity) and FastVLM-1.5B (87.3 validity). The VLM Judge Score of 90.6 puts it within 1.4 points of Qwen3-VL-4B-Instruct, a model nearly three times larger.

The 450M Extract outperforms similarly-sized sub-1B open-source VLMs on this benchmark and is competitive with models 4× its size. That is a significant claim for a model that fits on a phone.

Where it shines, and where it does not

These models are purpose-built for a specific input-output contract: one image in, a flat JSON object out. That focus is also their ceiling. The model card is explicit about this: performance is not expected to transfer to vastly different tasks, such as multi-image reasoning or free-form VQA. If you need to compare two images, ask open-ended questions, or generate descriptive captions, you want the base LFM2.5-VL models instead.

The practical sweet spots are:

  • Document scanning: invoices, forms, receipts, ID cards
  • Industrial inspection: detecting defects, reading gauges, classifying surface conditions
  • In-car cabin understanding: occupancy, seatbelt status, driver state
  • Retail and e-commerce: auto-tagging product images with structured attributes
  • Safety monitoring: detecting fallen persons, fire, or leakage to trigger automated alerts

The bigger shift

The Extract models are part of a broader design philosophy Liquid AI calls Liquid Nanos: small, task-specific models that are trained to be excellent at one thing rather than mediocre at everything. Liquid Nanos are task-specific models fine-tuned for specialized use cases. The text-only Extract models for documents already existed; this release extends the same concept to vision for the first time.

The field has largely assumed that structured output from vision models requires either a large general model with careful prompting, or a custom fine-tune. Liquid Foundation Models leverage Liquid Neural Networks, a proprietary architecture rooted in dynamical systems and signal processing, to deliver frontier-grade intelligence at a fraction of the compute, on any hardware, on or off the cloud. The Extract models challenge the assumption that you need cloud-scale compute to get reliable structured outputs from images. A 450M model that returns valid JSON 99% of the time and runs on a phone SoC is a genuinely different tool from anything that existed before.

Getting started

Both models are open-weight and available now on Hugging Face. You can use them out of the box or fine-tune for domain-specific extraction. They run with transformers v5.1 or newer, and are compatible with vLLM, SGLang, Docker, and quantized via llama.cpp, Ollama, and LM Studio. GGUF quantized versions are available in multiple quantization levels including Q4_0, Q4_K_M, Q5_K_M, Q6_K, Q8_0, and F16. The full evaluation pipeline is also included in the repository if you want to reproduce or extend the benchmarks on your own data.

Liquid AI recommends greedy decoding (do_sample=False, temperature=0) for these models, which makes sense: you want deterministic, schema-consistent outputs, not creative variation.