LiquidAI/LFM2.5-VL-3B · Hugging Face

Reddit r/LocalLLaMA 模型

摘要

LiquidAI releases LFM2.5-VL-3B, a 3B multimodal model for on-device deployment with improved OCR, grounding, and efficient inference, available in multiple formats including GGUF, ONNX, and MLX.

暂无内容
查看原文
查看缓存全文

缓存时间: 2026/08/12 16:26

LiquidAI/LFM2.5-VL-3B · Hugging Face

Source: https://huggingface.co/LiquidAI/LFM2.5-VL-3B Liquid AI

LFM2.5-VL-3B is a multimodal variant of LFM2.5, a family of hybrid models designed foron-device deployment. It builds on LFM2-VL-3B with further mid- and post-training. LFM2.5-VL-3B can process both text and images, and uses the LFM2.5-2.6B language model as its backbone, combined with a SigLIP2 NaFlex vision encoder.

  • Better grounding: Improved grounding and object detection with natural language queries.
  • Better OCR: Full page OCR with layout annotation. Seelayout annotation formatfor more information.
  • Efficient inference: 228 tok/s on an Apple M5 Max and 116 tok/s on an AMD Ryzen AI Max+ 395, in under 3.3 GB of memory.

Find more information about LFM2.5-VL-3B in ourrelease post.

lfm2_5_vl_3b_task_group_averages

💻Demos: Try LFM2.5-VL-3B’s vision understanding capabilities in a Hugging Face space without any setup:Vision-capable chat in your browser: allows you to upload images or use the webcam to capture images and let the model interact with them, as well as use tool calls and display generated bounding boxes. If you just want to chat about images, theLiquidAI playgroundis a fast way to do that.

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#model-detailsModel Details

ModelDescription**LFM2.5‑VL‑3BOriginal checkpoint in native format. Best for fine-tuning and inference with HF Transformers, vLLM and SGLangLFM2.5‑VL‑3B‑GGUFQuantized GGUF exports of the original checkpoint. Best for CPU inference with reduced memory usage with llama.cppLFM2.5‑VL‑3B‑ONNXQuantized ONNX exports for cross-platform deployment. Enables hardware-accelerated inference across diverse environments (cloud, edge, mobile). See thedemo.LFM2.5-VL-3B-MLX**Quantized MLX exports for Apple Silicon. Optimized for fast inference on Mac devices using themlx-vlmframework.

  • LM Backbone: LFM2.5-2.6B
  • Vision encoder: SigLIP2 NaFlex shape‑optimized 400M
  • **Vocabulary size:**128,000
  • Context length: 32,768 tokens
  • Languages: English, Arabic, Chinese, French, German, Italian, Japanese, Korean, Portuguese, Spanish, Vietnamese, Thai, Indonesian, Hindi, Russian, Polish
  • Native resolution processing: Uses SigLIP2’s NaFlex; large images are split into non-overlapping 512×512 patches and a resized whole-image thumbnail.
  • Generation parameters:- text:temperature=0\.2,top\_k=50,repetition\_penalty=1\.0 - vision: Use theprocessor\_config\.jsonfile.

We recommend using it for single-turn, high-throughput, low-latency tasks; for example, for near-realtime object detection in automotive applications, batch processing scanned documents with OCR with layout information for turning PDFs into searchable text, or for on-device translation of menus and road signs into your native language.

It is not recommended for long-context, reasoning-intensive tasks, such as visual web design, or answering highly technical questions about blueprints.

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#chat-templateChat Template

LFM2.5 uses a ChatML-like format. See theChat Template documentationfor details. Example:

<|startoftext|><|im_start|>system
You are a helpful assistant trained by Liquid AI.<|im_end|>
<|im_start|>user
What species is in this picture?<image><|im_end|>
<|im_start|>assistant

You can usetokenizer\.apply\_chat\_template\(\)to format your messages automatically.

Note: Theapply\_chat\_template\(\)method automatically inserts the<image\>tag for each image in your message. Do not include<image\>in your message content.

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#inferenceInference

LFM2.5-VL is supported by many inference frameworks. See theInference documentationfor the full list.

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#quick-startQuick start

Quick start with Transformers (compatible withtransformers\>=5\.0\.0):

You will needtorch,transformers, andtorchvision.

import torch
from transformers import AutoModelForImageTextToText, AutoProcessor

model_id = "LiquidAI/LFM2.5-VL-3B"

model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16)
processor = AutoProcessor.from_pretrained(model_id)

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://placecats.com/300/200"},
            {"type": "text", "text": "Describe this image."},
        ],
    }
]

inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
).to(model.device)

with torch.inference_mode():
    output_ids = model.generate(
        **inputs,
        do_sample=True,
        temperature=0.2,
        top_k=50,
        repetition_penalty=1.0,
        max_new_tokens=256,
    )

generated_ids = output_ids[:, inputs["input_ids"].shape[1] :]
print(processor.batch_decode(generated_ids, skip_special_tokens=True)[0])

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#tool-useTool Use

LFM2.5-VL-3B supports function calling in four steps:

  1. Function definition: Provide the list of tools as a JSON object in the system prompt, or usetokenizer\.apply\_chat\_template\(\)withtools=\.\.\..
  2. Function call: By default, LFM2.5 writes Pythonic function calls (a Python list between<\|tool\_call\_start\|\>and<\|tool\_call\_end\|\>special tokens), as the assistant answer.
  3. Function execution: Execute the call and return the result with thetoolrole.
  4. Final answer: LFM2.5 interprets the tool output and returns a plain-text answer addressing the original prompt.

See theTool Use documentationfor the full guide. Example:

<|startoftext|><|im_start|>system
List of tools: [{"name": "get_candidate_status", "description": "Retrieves the current status of a candidate in the recruitment process", "parameters": {"type": "object", "properties": {"candidate_id": {"type": "string", "description": "Unique identifier for the candidate"}}, "required": ["candidate_id"]}}]<|im_end|>
<|im_start|>user
What is the current status of candidate ID 12345?<|im_end|>
<|im_start|>assistant
<|tool_call_start|>[get_candidate_status(candidate_id="12345")]<|tool_call_end|>Checking the current status of candidate ID 12345.<|im_end|>
<|im_start|>tool
[{"candidate_id": "12345", "status": "Interview Scheduled", "position": "Clinical Research Associate", "date": "2023-11-20"}]<|im_end|>
<|im_start|>assistant
The candidate with ID 12345 is currently in the "Interview Scheduled" stage for the position of Clinical Research Associate, with an interview date set for 2023-11-20.<|im_end|>

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#layout-annotation-formatLayout Annotation Format

LFM2.5-VL-3B can do OCR with layout annotation. The layout annotation is a list of regions, each with a label, bounding box, and content. The format is:

image_index=<n> <label> [xmin, ymin, xmax, ymax]
<content>

image_index=<n> <label> [xmin, ymin, xmax, ymax]
<content>

image_index=<n> <label> [xmin, ymin, xmax, ymax]
<content>

...

where:

  • image\_indexis the zero-based index of image
  • <label\>is one of these layout labels:- text - title - list - table - table_caption - table_footnote - image - image_block - image_caption - image_footnote - chart - equation - formula_number - code - code_caption - algorithm - aside_text - ref_text - phonetic - page_header - page_footer - page_number - page_footnote
  • \[xmin, ymin, xmax, ymax\]are normalized integer coordinates in [0, 1000], same as our grounding format.
  • <content\>is the region’s content:- plain text for text regions - LaTeX for equations - OTSL (Optimized Table Structure Language, introducedhereby IBM) for tables - a short description for images and charts

There will be a blank line between each region.

To prompt the model to generate this structured output, use a system or user prompt that includes this:

Parse this document into its layout regions. The pages are provided as images in reading order. For every region, in reading order across all pages, output a header line immediately followed by the region's content:

image_index=<n> <label> [xmin, ymin, xmax, ymax]
<content>

where:
- image_index is the zero-based index of the page image the region appears on (0 for the first image, 1 for the second, and so on)
- <label> is one of these layout labels: text, title, list, table, table_caption, table_footnote, image, image_block, image_caption, image_footnote, chart, equation, formula_number, code, code_caption, algorithm, aside_text, ref_text, phonetic, page_header, page_footer, page_number, page_footnote
- [xmin, ymin, xmax, ymax] are normalized integer coordinates in [0, 1000]
- <content> is the region's content: plain text for text regions, LaTeX for equations, OTSL for tables, and a short description for images and charts

Separate each region block with one blank line. Return only the parsed regions.

Note that the layout annotation format is still experimental: it may change, may be unreliable, and may not be trivial to parse. We encourage users to try it out and provide feedback!

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#fine-tuningFine-Tuning

We recommend fine-tuning LFM2.5-VL models for your specific use case to achieve the best results.

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#performancePerformance

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#benchmarksBenchmarks

LFM2.5-VL-3B significantly improves over LFM2-VL-3B in screen understanding, grounding, multi-image input, and tool use:

BenchmarkLFM2.5‑VL‑3B (3.1B)LFM2‑VL‑3B (3.1B)Gemma4 E2B (5.1B)Gemma4 E4B (8B)InternVL 3.5 4B (4.7B)Qwen3.5-2B (2.3B)Qwen3.5-4B (4.7B)ScreenSpot-v2 (avg)80.7-31.150.984.266.578.5RefCOCO (Macro Prec@1)87.957.1 (-30.8)67.372.188.978.586.6BLINK61.550.2 (-11.3)51.856.457.459.365.0MuirBench58.334.9 (-23.4)40.748.953.449.067.0ToolSandBox59.526.4 (-33.1)56.561.6n/a147.765.0BFCLv432.520.5 (-12.0)33.240.0n/a133.953.6 A selection of benchmarks for LFM2.5-VL-3B, including multimodal reasoning, math, and OCR (see ourblog postfor more benchmarks and details):

Benchmark**LFM2.5‑VL‑3B (3.1B)**LFM2‑VL‑3B (3.1B)Gemma4 E2B (5.1B)Gemma4 E4B (8B)InternVL 3.5 2B (2.4B)InternVL 3.5 4B (4.7B)Qwen3.5-2B (2.3B)Qwen3.5-4B (4.7B)MME73.173.054.968.173.380.876.479.5MMStar63.357.757.961.957.565.367.973.3RealWorldQA73.171.156.261.861.468.671.476.2CountBenchQA87.392.270.880.170.682.583.286.9MMMB83.081.975.780.576.481.573.683.4MM-IF Eval60.651.464.566.748.454.652.163.8MathVista68.568.562.152.956.659.168.869.7MMMU Pro30.528.734.539.127.431.643.560.9ChartQA81.380.443.541.981.886.578.384.2OCRBenchv2247.543.944.748.745.549.248.058.8POPE88.789.284.086.987.388.988.786.0 [1]: InternVL 3.5 doesn’t support tool use.

[2]: English-only subset of OCRBenchv2.

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#on-device-inferenceOn-device Inference

LFM2.5-VL-3B decodes 228 tokens/s on an Apple M5 Max and 116 tokens/s on an AMD Ryzen AI Max+ 395, and fits in about 3 GB of memory. It even reaches 20 tokens/s on a Galaxy S26 Ultra, so you can run it fully on-device.

lfm2_5_vl_3b_on-device_inference_TTFT

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#gpu-inferenceGPU Inference

On a single NVIDIA H100 with vLLM, LFM2.5-VL-3B reaches the highest output throughput of any model we tested, about 11K tokens per second at high concurrency, or nearly 1B tokens per day.

lfm2_5_vl_3b_throughput

Because it answers directly instead of reasoning, LFM2.5-VL-3B is quick to first token on a single H100, reaching about 34 ms on a 5-frame clip.

lfm2_5_vl_3b_ttft

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#contactContact

https://huggingface.co/LiquidAI/LFM2.5-VL-3B#citationCitation

@article{liquidAI2026VL3B,
  author  = {Liquid AI},
  title   = {LFM2.5-VL-3B: A Better and Faster Vision-Language Model for the Edge},
  journal = {Liquid AI Blog},
  year    = {2026},
  note    = {www.liquid.ai/blog/lfm2-5-vl-3b},
}

相似文章

LiquidAI/LFM2.5-230M

Hugging Face Models Trending

Liquid AI发布了LFM2.5-230M,一款紧凑的230M参数混合模型,针对设备端部署进行了优化,边缘推理速度快(在Galaxy S25 Ultra上达到213 tok/s),并通过强化学习构建,适用于智能体任务。

LiquidAI/LFM2.5-2.6B

Hugging Face Models Trending

Liquid AI released LFM2.5-2.6B, a 2.6B-parameter hybrid model optimized for on-device deployment with 128K context, agentic post-training, and fast inference (220 tok/s on Apple M5 Max) under 2.5GB memory.

LiquidAI/LFM2.5-8B-A1B-GGUF

Hugging Face Models Trending

LiquidAI 发布了其 LFM2.5-8B-A1B 模型的 GGUF 量化版本,并提供了在多个推理引擎上的使用说明。

LiquidAI/LFM2.5-2.6B-GGUF

Hugging Face Models Trending

此 Hugging Face 模型卡片介绍了 LiquidAI 的 LFM2.5-2.6B 模型(GGUF 量化格式),并提供了通过 llama.cpp、vLLM、Ollama 等工具在本地运行的说明。

Liquid AI 发布 LFM2.5-8B-A1B

Reddit r/LocalLLaMA

Liquid AI 发布了 LFM2.5-8B-A1B,这是一款边缘模型,拥有 128K 上下文窗口、38T 预训练 token 和大规模强化学习,支持工具调用和复杂任务,同时可运行于入门级笔记本电脑。