---
title: "Liquid AI's LFM2.5-VL-Extract Outputs Clean JSON Directly From Images"
subtitle: "Liquid AI's new Extract models skip the parsing layer entirely, returning clean JSON from images natively on any device"
url: "https://alphasignal.ai/news/liquid-ai-s-lfm2-5-vl-extract-outputs-clean-json-directly-from-images"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "Liquid AI"
company_url: "https://alphasignal.ai/company/liquidai"
published: "2026-05-26T05:14:58.000Z"
updated: "2026-06-07T17:31:06.223Z"
type: "Model"
topics:
  - "Image"
  - "Llms"
subtopics:
  - "Vision Language"
  - "Structured Output"
  - "Vision Language"
  - "Small Models"
upvotes: 1049
source_url: "https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B-Extract"
comments: 0
truncated: true
---

# 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

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](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B-Extract) and [LFM2.5-VL-450M-Extract](https://huggingface.co/LiquidAI/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"}
```

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [X post by @liquidai](https://x.com/liquidai/status/2062686748291846307)
- [LFM2.5-VL-1.6B-Extract – Hugging Face Model Card](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B-Extract)
- [LFM2.5-VL-450M-Extract – Hugging Face Model Card](https://huggingface.co/LiquidAI/LFM2.5-VL-450M-Extract)
- [Introducing Liquid Nanos — frontier-grade performance on everyday devices](https://www.liquid.ai/blog/introducing-liquid-nanos-frontier-grade-performance-on-everyday-devices)
- [LFM2-VL: Efficient Vision-Language Models | Liquid AI](https://www.liquid.ai/blog/lfm2-vl-efficient-vision-language-models)
- [Introducing LFM2: The Fastest On-Device Foundation Models | Liquid AI](https://www.liquid.ai/blog/liquid-foundation-models-v2-our-second-series-of-generative-ai-models)
