/ Модель

Характеристики

Лицензия
Своя лицензия
Базовая модель
LFM2.5-VL-450M
Библиотека
litert-lm
Опубликована
13 авг 2026

LFM2.5-VL-450M

Изображение и текст → текст4 профессии
1 382скачиваний за 30 дней4лайкавеса обновлены29 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

LFM2.5-VL-450M — компактная мультимодальная модель Liquid AI, преобразованная сообществом litert-community в формат LiteRT-LM для локального запуска на устройствах.

Она предназначена для задач обработки текста и изображений, включая описание изображений, ответы на вопросы о цветах и формах, OCR и простой подсчёт объектов. Модель поддерживает одну фотографию на запрос и работает через LiteRT-LM на CPU, а также на GPU в macOS и Android при использовании подходящей версии runtime.

Архитектура включает гибридную текстовую основу LFM2 с 16 слоями, объединяющую gated short-convolutions и grouped-query attention, словарь на 64 тысячи токенов, а также компактную vision-башню SigLIP2 из 12 слоёв со скрытым размером 768. Изображения приводятся к размеру 512×512 и преобразуются в 256 визуальных токенов. Максимальный контекст KV cache составляет 4096 токенов. Доступны варианты квантования int8 и int4; пакет int4 занимает около 0,41 ГБ и показывает лучшие результаты среди представленных конфигураций.

Ключевое ограничение стандартной сборки связано с дефектом LiteRT-LM: в версиях 0.16.0 и текущей ветке runtime модели может передаваться только верхняя четверть изображения, из-за чего позиционные вопросы, перечисление и локализация объектов дают неверные ответы без явной ошибки. В репозитории также приведена исправленная сборка int4_fixB, восстанавливающая обработку всей видимой области, но не обеспечивающая полноценное координатное позиционирование. На iOS GPU не поддерживается для этого семейства, поэтому рекомендуется CPU. Распространение осуществляется по лицензии LFM Open License v1.0.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

LiteRT is Google's on-device runtime, the new name for TensorFlow Lite (Android: com.google.ai.edge.litert:litert), and litert-torch, the renamed ai-edge-torch, is its PyTorch converter: a PyTorch model converted unmodified with litert_torch.convert matched the original to 4e-7 on a Galaxy S26 (measured, LiteRT 2.2.0, Android 16, 2026-09-05).

LFM2.5-VL-450M — LiteRT-LM

LiquidAI/LFM2.5-VL-450M converted to the LiteRT-LM (.litertlm) format for on-device inference with Google's LiteRT-LM runtime — a smaller model of the same family as litert-community/LFM2.5-VL-3B, at a size that fits almost anywhere (int4 file: 0.41 GB). For the GPU on LiteRT-LM 0.20.0, use LFM2.5-VL-450M_int4_fixB_v0200.litertlm, one of the three _v0200 files added for it. On a Mac M4 Max with litert-lm 0.20.0 from PyPI, this command, run from a directory holding only photo.png, printed an answer that begins The text in this image says "HELLO".

uvx --from litert-lm==0.20.0 litert-lm run --from-huggingface-repo=litert-community/LFM2.5-VL-450M LFM2.5-VL-450M_int4_fixB_v0200.litertlm --backend gpu --cache no --prompt "What does the text in this image say?" --attachment photo.png

On a Mac, --backend gpu of litert-lm 0.20.0 from PyPI runs on WebGPU. litert-lm 0.20.0 from PyPI needs Python 3.10 or newer. Asked one question on the GPU of litert-lm 0.19.2 (PyPI, Mac M4 Max), LFM2.5-VL-450M_int4_fixB_v0200.litertlm and LFM2.5-VL-450M_int8_v0200.litertlm printed garbled text that is not an answer, with no error and exit status 0. On the GPU, use the _v0200 files with LiteRT-LM 0.20.0. The _v0200 files were not run on a phone.

If run stops right after the download with no error message from the CLI (a bus error; exit status 138 on a Mac) or with an error log that contains too large for file size, the downloaded file may be incomplete. The litert-lm CLI (tested on 0.19.2 and litert-lm-nightly 0.20.0.dev20261112; 0.14.0 to 0.19.1 and 0.20.0 have the same download code) can keep an incomplete download in ~/.litert-lm/cache/huggingface/litert-community/LFM2.5-VL-450M/ and uses it again on later runs without checking its size. Delete that file and run the command again.

Text + image work end-to-end on litert-lm 0.20.0 from PyPI (checked on a Mac M4 Max): each file carries the vision encoder, the vision adapter and the LFM2 image-placeholder metadata, so litert-lm run … --attachment photo.png just works.

Known issue: positional answers can be wrong in files with the stock vision graphs (measured with litert-lm 0.16.0, 0.17.0 and 0.19.1)

In files with the stock vision graphs, on those versions, only the top quarter of the image reaches the model. Captioning, colour questions and OCR of a large dominant subject still work. Positional answers — locate, count, enumerate, "which one is at the bottom" — can come back wrong, with no error and well-formed output.

The cause is a shrink-factor assumption in the runtime's vision path, reported upstream as LiteRT-LM#3246. It affects every LFM2.5-VL file with the stock vision graphs, not just this one: the family performs its 2×2 pixel-unshuffle in the vision adapter rather than the encoder, and the runtime assumes the opposite.

Quick check — a 512×512 image with 16 numbered horizontal bands, asked to list every number from top to bottom:

expected: 1 … 16    actual: 1 2 3 4 4 4 1 2 3 3 1 2 2 1 1 2 2 1 1

A repaired int4 build is in this repo: LFM2.5-VL-450M_int4_fixB.litertlm — the stock file with its two vision graphs re-exported so the 2×2 pixel-unshuffle happens inside the encoder (text weights, tokenizer and metadata unchanged; scripts: reexport_vision_unshuffle.py + repack_vision.py). On the ruler above, an earlier file of this name returned 1 … 16 on litert-lm 0.16.1 and 0.17.0 (2026-09-16) and on 0.19.1 (2026-11-07). It restores the visible area, not coordinate grounding — that stays a 3B capability in this family. The stock files stay published in case the runtime fix lands and makes them the right choice again.

LFM2.5-VL-450M pairs the hybrid LFM2 text backbone (16 layers: gated short-convolutions + grouped-query attention, 64k vocab) with a compact SigLIP2 vision tower (12 layers, hidden 768). An image is processed at 512×512 into 256 soft tokens (single image per prompt; the runtime resizes for you).

FileRecipeSize
LFM2.5-VL-450M_int8.litertlmint8 dynamic (text linears + convs + embedding, vision tower)0.56 GB
LFM2.5-VL-450M_int4.litertlmtext int4 blockwise-32 OCTAV linears, int8 embedding + lm_head; vision tower int80.41 GB
LFM2.5-VL-450M_int4_fixB.litertlmint4 as above, vision graphs re-exported with the pooling inside the encoder (full image visible on litert-lm 0.16.1, 0.17.0 and 0.19.1, measured on an earlier file of this name)0.41 GB
LFM2.5-VL-450M_int4_fixB_v0200.litertlmFor LiteRT-LM 0.20.0: int4 text as above, on an export with GPU composites (ShortConv state channels-last), with the vision graphs of _int4_fixB0.42 GB
LFM2.5-VL-450M_int4_v0200.litertlmFor LiteRT-LM 0.20.0: int4 text as above, on the same export, with the vision graphs of _int40.42 GB
LFM2.5-VL-450M_int8_v0200.litertlmFor LiteRT-LM 0.20.0: text linears and embedding int8, convs float, on a separate export at the same litert-torch commit; the vision tower of _int80.57 GB
Context (KV cache)4096 max
Image input1 per prompt, resized to 512×512 → 256 tokens; PNG/JPEG via --attachment . On 0.16.0, in files with the stock vision graphs, those tokens cover only the top quarter — see the known issue
BackendCPU and GPU (macOS/Android OpenCL per the LFM2.5 family). LFM2.5-VL-450M_int4.litertlm and LFM2.5-VL-450M_int8.litertlm ran on litert-lm 0.20.0 from PyPI on a Mac M4 Max (GPU and CPU, 2026-11-25). For the Android GPU path of these two files and of LFM2.5-VL-450M_int4_fixB.litertlm, see Known runtime issues. The _v0200 files run on the GPU with LiteRT-LM 0.20.0 (macOS verified by generation; see the top of this page).
Templatein the file — ChatML-style, with no <think> block
Base modelLiquidAI/LFM2.5-VL-450M (LFM Open License v1.0)

Quality

Checks on the 0.16.0 pip CLI, run on earlier files of this repo (greedy, a new Engine for each question, --cache no). Vision: five deterministic synthetic fixtures (dominant color, large-text OCR, shape, counting three squares, largest word). Text: the 8-question check used across our LiteRT conversions.

Configurationtext (8 questions)image (5 questions)
PyTorch bf16 (reference)—5/5
LiteRT int4-b32, CPU (recommended)8/84/5
LiteRT int8, CPU6/83/5

On the checks above, the earlier LFM2.5-VL-450M_int4.litertlm did better than the earlier LFM2.5-VL-450M_int8.litertlm — it answered the color, OCR, counting and largest-word fixtures correctly and missed only the shape question. Correction (2026-08-14): these misses are not a 450M-scale limitation. They are the runtime defect described in the known issue above — the shape and counting fixtures, like the OCR and largest-word ones, place their subject below the visible quarter. Repairing the file flips the shape answer from "Square." to "Circle." with nothing else changed, and the band ruler goes from 1 2 3 4 … to a clean 1 … 16. In a check of the conversion on 2026-08-13, the exported vision encoder and adapter matched PyTorch at cosine 1.0000 on three of these fixtures. Note that the 3B is affected identically; it scores 5/5 on these fixtures because a larger model answers them from global context, not because it sees more of the image.

With litert-lm 0.20.0 from PyPI on a Mac M4 Max (2026-11-25; these 8 questions with "Answer briefly." appended, greedy with --max-num-tokens 2048 and --thinking false, one process per question, one run), the three _v0200 files scored 7/8 on the GPU and on the CPU, except LFM2.5-VL-450M_int4_v0200.litertlm with 6/8 on the CPU; all of them missed the question that asks how to say "thank you" in French, and LFM2.5-VL-450M_int4_v0200.litertlm on the CPU also missed the one that asks it to complete "Roses are red, violets are ___". On five image questions (dominant color, large-text OCR, shape, counting three squares, largest word; vision encoder on the CPU, text decoder on the GPU or the CPU; the check passes at 4 of 5 with no degenerate reply), LFM2.5-VL-450M_int4_fixB_v0200.litertlm scored 5/5 on the GPU and on the CPU, and LFM2.5-VL-450M_int4_v0200.litertlm 4/5 on both, missing the shape question. LFM2.5-VL-450M_int8_v0200.litertlm scored 4/5 on the GPU, missing the shape question, and 3/5 on the CPU, missing the shape and counting questions: below the pass line of the image check, so do not use it for image questions on the CPU. No run degenerated. With the same checks, the three files without _v0200 scored 7/8 on the GPU and on the CPU, and on the images 5/5 (_int4_fixB), 4/5 (_int4) and 3/5 (_int8, below the pass line) on both.

Usage

pip install litert-lm
litert-lm run ./LFM2.5-VL-450M_int4.litertlm --prompt "What does the text in this image say?" --attachment photo.png

Text-only prompts work the same way without --attachment. --vision-backend cpu|gpu selects the vision encoder backend independently of the text backend. With LiteRT-LM 0.19.0, --vision-backend gpu fails when the conversation is created: the GPU delegate does not take the vision encoder's RESIZE_BILINEAR op, whose input is a constant, and the runtime requires the vision encoder to be delegated in full. This was seen on macOS with LFM2.5-VL-450M_int4.litertlm and LFM2.5-VL-450M_int4_fixB.litertlm (2026-11-09) and on a Galaxy S26 with LFM2.5-VL-450M_int8.litertlm and the vision encoder set to the GPU (2026-10-30). With the vision encoder on the CPU the same files answered an image question. Later LiteRT-LM versions were not tried.

One Engine per conversation. On litert-lm 0.18.0 the runtime starts a new Conversation on an Engine that already ran another conversation from the earlier conversation's short-convolution state: it reuses the prompt tokens the two conversations share and does not reset the state (my report). In a test that asks three questions (What is the capital of France? / What is 17 times 23? / What color is the sky on a clear day?) first in a pirate-persona conversation and then in a conversation told to answer in one word, on the same Engine against a fresh Engine in a new process (answers capped at 200 tokens; CPU backend; litert-lm 0.18.0 on a Mac; 2026-10-12, on earlier files of this repo), the _int4 and _int4_fixB files each answered the sky question with "White." on the same Engine against "The sky is blue." on a fresh one, in both of its runs (a test is run a second time only when its first run does not pass). The _int8 file gave the same three one-word answers on both Engines, in its one run. Those three short questions say nothing about longer conversations. Create a new Engine for each conversation. The first conversation on an Engine is unaffected. A fix landed on LiteRT-LM main on 2026-11-03 (e1f86b05). The LiteRT-LM v0.20.0 release contains it; this model was not tested with a shared Engine on v0.20.0.

Speed

litert-lm benchmark … --cache no, litert-lm 0.16.0 pip, on earlier files of this repo, Apple M4 Max (128 GB), text path (prefill/decode; image encoding is a separate one-shot vision-encoder call at prompt time):

CPU backend:

VariantPrefill (256)Prefill (1024)DecodeTTFT
int81088 tok/s2240 tok/s129.2 tok/s0.24 s
int41026 tok/s1196 tok/s127.0 tok/s0.26 s

GPU backend (--backend gpu; both variants verified to generate on GPU before quoting — int4 also passes the image check on GPU, 4/5):

VariantPrefill (256)DecodeTTFT
int88443 tok/s360.0 tok/s0.03 s
int48296 tok/s354.2 tok/s0.03 s

On Android, earlier files of this repo ran GPU-accelerated on 2026-08-13. Pixel 8a (Tensor G3), litert_lm_main built from the v0.16.0 release tag, 296-token prompt, decode run to EOS (0.9k–3.8k tokens sustained), --disable_cache:

VariantBackendPrefill (296 tok)DecodeTTFT
int4GPU (OpenCL)528 tok/s33.1 tok/s0.59 s
int4CPU92 tok/s22.6 tok/s3.3 s
int8GPU (OpenCL)578 tok/s31.1 tok/s0.54 s
int8CPU177 tok/s15.8 tok/s1.7 s

In the GPU runs the text graph delegated fully on Android OpenCL (543/543 nodes, zero rejected ops). On the CPU, int4 prefilled slower than int8 (blockwise-int4 repacking) but decoded ~40% faster — pick by whether your prompts or your outputs dominate.

Galaxy S26 — GPU backend

This section describes earlier files of this repo, the ones it held on 2026-08-25: both ran on the Android GPU backend and generated. For the Android GPU path of the current files without _v0200, see Known runtime issues.

fileGPU backenddelegationpeak
LFM2.5-VL-450M_int4.litertlmran6443 / 6443 ops across 12 subgraphs on LiteRT GPU526 MiB
LFM2.5-VL-450M_int8.litertlmran6443 / 6443 ops across 12 subgraphs on LiteRT GPU529 MiB

Measured on a Samsung Galaxy S26 (SM-S942Q / SM8850, Android 16) with litert_lm_advanced_main from litert-lm 0.16.0, --backend=gpu --sampler_backend=cpu, prompt What is the capital of France?. Peak is the process high-water mark (VmHWM) sampled during that same run. Checked 2026-08-25.

The op counts above are the LiteRT GPU partitions. XNNPACK additionally takes 1 of the 4 nodes in main; the runtime accepts that split.

The test prompt carries no image, so this covers engine creation and the text path. The vision path on the GPU is not measured here.

No speed rows in this section, on purpose. A GPU throughput figure only means something beside a CPU row from the same handset. The Galaxy S26 rows of LFM2.5-VL-450M_int4.litertlm and LFM2.5-VL-450M_int8.litertlm are in litertlm_manifest.json: GPU rows of 2026-08-25 and CPU rows measured on 2026-09-05 (LiteRT-LM 0.16.0), on the same earlier files. In those rows the GPU was faster at both prefill and decode.

GPU wiring, including the Gallery import toggle: GPU guide.

Conversion

Converted with the open pipeline in hf-to-litertlm (lfm_work/convert_lfm25_vl.py, litert-torch 0.9.3 --task image_text_to_text): the exact recipe, the int4 post-processing (OCTAV int4-b32 + int8 embedder + zero-scale repair + executor metadata, all vision sections preserved) and the text and image check scripts are in the repo's REPRODUCE.md.

The _v0200 files have a text decoder exported with litert-torch main at commit 5d18d996e, whose default GPU composites keep the ShortConv state channels-last. int8: the exporter's dynamic_wi8_afp32 on the text decoder (convs float because they are operands of the ShortConv composite). int4: the text int4 recipe of LFM2.5-VL-450M_int4.litertlm, with the block scales floored at 2^-14. Their embedder, vision encoder and vision adapter come from the file of the same name without _v0200, so _int4_v0200 and _int4_fixB_v0200 differ as _int4 and _int4_fixB do. Their LLM metadata (chat template included) and tokenizer sections are byte-identical to those of the files without _v0200.

Known runtime issues

Measurements of LFM2.5-VL-450M_int4.litertlm and LFM2.5-VL-450M_int4_fixB.litertlm on this page made before 2026-11-09 used earlier files, not the current ones. Measurements of LFM2.5-VL-450M_int8.litertlm on this page made before 2026-10-30 used earlier files, not the current one.

Android GPU with LiteRT-LM v0.18.0 and v0.18.1. LFM2.5-VL-450M_int4.litertlm, LFM2.5-VL-450M_int4_fixB.litertlm and LFM2.5-VL-450M_int8.litertlm keep some of their weights outside the model graph (LiteRT's external weights), and on a Pixel 8a the GPU backend of the v0.18.0 and v0.18.1 Android builds crashes (SIGSEGV) on a Qwen3-0.6B file with external weights (LiteRT-LM#3986).

From the second turn of a conversation on, LiteRT-LM puts the previous answer's stop token into the KV cache with a zero embedding, because these files hold the embedding table in its own section and the decoder takes embeddings, so later answers in a conversation can differ from the answer the model gives to the same messages in one prompt (read in the source of LiteRT-LM 0.16.0 to 0.18.1; measured with 0.18.1 on WeVisOne-VL-2B and Qwen2.5-Coder-1.5B-Instruct, not on these files). One question per conversation avoids it, as does a new conversation that starts with the earlier messages and the new question.

License and changes

Distributed under the LFM Open License v1.0 (see LICENSE, inherited from the base model). Note the license's commercial-use limitation for organizations with annual revenue of US$10M or more. Changes from the original work: weights converted from safetensors to LiteRT flatbuffers and quantized as described above; in the _fixB files, the vision graphs re-exported so the 2×2 pixel-unshuffle happens inside the encoder; chat template replaced by a ChatML-style template written for LiteRT-LM; LiteRT-LM metadata added (the start and stop tokens, a 4096-token context limit and the lfm2 model type); the text decoder of the _v0200 files exported with litert-torch's GPU composites. This repository is a community conversion published by litert-community, not by Liquid AI.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · litert-lm

Нельзя запустить

Библиотека «litert-lm» рантаймом не поддерживается.

Ревизия весов
f78849d

0 моделей