/ Модель

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

Лицензия
Apache 2.0
Базовая модель
FastVLM-0.5B
Опубликована
2 июл 2026

apple-fastvlm-cpu-inference-models

Изображение и текст → текст3 профессии

CPU-конвейер FastVLM отвечает на вопросы об изображениях, используя ONNX-проектор и квантизованную языковую модель Qwen2-0.5B.

31скачиваний за 30 дней0лайковвеса обновлены2 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

Это готовый конвейер для запуска FastVLM на процессоре: модуль ONNX преобразует изображение в эмбеддинги, а языковая часть на основе Qwen2-0.5B в формате GGUF генерирует текстовый ответ. Репозиторий musk12 включает веса и серверный код на основе llama.cpp; для запуска GPU не требуется. Модель принимает изображение и необязательную текстовую подсказку, поддерживает визуальные вопросы и ответы, а также задачи распознавания текста и деталей изображения.

Доступны варианты обработки изображения 512×512 с 64 визуальными токенами и 1024×1024 с 256 токенами: первый быстрее, второй лучше подходит для мелкого текста и деталей, но имеет более высокую задержку. В README приведены результаты тестов на CPU, однако фактическая скорость зависит от оборудования. Сервер обрабатывает запросы последовательно. Модель распространяется по лицензии Apache-2.0.

Сценарии применения

  • ответы на вопросы по содержимому изображений
  • распознавание текста на изображениях и документах
  • описание объектов и сцен на изображениях
  • поиск мелких визуальных деталей при разрешении 1024×1024

Ограничения

Запросы обрабатываются последовательно, а скорость зависит от процессора; обработка 1024×1024 заметно увеличивает задержку. Языковая часть компактная и квантизована до Q4_K_M, поэтому качество может уступать более крупным моделям.

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

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

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

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

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

Открыть на Hugging Face

FastVLM CPU Inference (Vision Projector + Qwen2 GGUF)

A complete, CPU-only FastVLM inference pipeline: an ONNX vision projector for image encoding, paired with a quantized Qwen2 GGUF language model for text generation. This repo includes the model weights plus the full loading/serving code, so you can run the pipeline end to end without a GPU.

Pipeline overview

Image → [ONNX Vision Projector] → image embeddings ↓ [fastvlm_server (llama.cpp-based C binary)] ↓ Streamed text response (Qwen2 GGUF, Q4_K_M)

  1. An image is preprocessed and passed through vision_projector_v1_standalone.onnx (ONNX Runtime, CPU) to produce image embeddings.
  2. The embeddings are written to a temporary binary file and handed to a persistent fastvlm_server process (a custom llama.cpp-based binary) that keeps the GGUF language model loaded in memory.
  3. The language model generates a response token-by-token, streamed back over HTTP.

Files in this repo

FileRole
vision_projector_v1_standalone.onnxVision encoder — converts image → embeddings
fastvlm_qwen2_q4km.ggufQuantized Qwen2-0.5B language model (Q4_K_M)
fastvlm_serverCompiled C binary (llama.cpp-based) that loads the GGUF model and serves generation over stdin/stdout
libggml.so, libggml-base.so, libggml-cpu.so, libllama.so (+ .0 versions)Shared libraries required by fastvlm_server at runtime
stream_api.pyFastAPI server tying the vision encoder and LLM server together, exposing /predict

Requirements

  • Python 3.9+
  • onnxruntime, fastapi, uvicorn, pillow, numpy, python-multipart
pip install onnxruntime fastapi uvicorn pillow numpy python-multipart

Loading and running

Download all files in this repo into one local directory, keeping them all together (stream_api.py looks for the .onnx, .gguf, fastvlm_server, and .so files relative to its own location), then:

python stream_api.py

This starts a FastAPI server on http://0.0.0.0:8000. On startup it:

  • loads the ONNX vision encoder via ONNX Runtime (CPU),
  • launches fastvlm_server as a persistent subprocess with the GGUF model loaded and kept in memory, so the model isn't reloaded per request.

Endpoints

  • GET / — basic status info
  • GET /health — reports whether the ONNX session, GGUF file, and server binary are all present and loaded
  • POST /predict — send an image + optional prompt, get a streamed text response

Example request:

curl -X POST http://localhost:8000/predict \
  -F "image=@your_image.jpg" \
  -F "prompt=Describe this image in detail." \
  --no-buffer

The response streams as plain text until generation completes.

How it stays fast

fastvlm_server is started once at API startup and kept alive as a long-running subprocess — the GGUF model is loaded into memory a single time. Each /predict request sends the embedding file path and prompt over the process's stdin and reads generated tokens back from stdout until a ---END--- sentinel, avoiding reload cost per request. Requests are serialized (one at a time), since the underlying server is single-threaded.

Eval results

Benchmarks were run on a 6-core Intel CPU, comparing the two input resolution variants of the vision pipeline (512×512 vs 1024×1024).

ResolutionVisual tokensTTFTBenchmarkScore
512×51264~1.4 sPOPE80.39%
512×51264~1.4 sGQA60.12%
1024×1024256~5.5–9.6 sTextVQA72.21%
1024×1024256~5.5–9.6 sOCRBench v245.57%

LLaVA-Wild average TTFT @ 512: 1,382 ms (6-core Intel CPU)

Notes

  • 512×512 uses fewer visual tokens (64) and is significantly faster to first token, making it a good fit for latency-sensitive use cases and general VQA-style tasks (POPE, GQA).
  • 1024×1024 uses more visual tokens (256) for finer-grained visual detail, at the cost of higher TTFT — better suited for tasks requiring precise text/detail recognition (TextVQA, OCRBench v2).
  • TTFT (time to first token) figures are CPU-only, measured on a 6-core Intel CPU, and will vary with hardware.

Base models

Derived from:

Related

A hosted Gradio demo of this pipeline is available at: musk12/FastVLM-CPU-Inference-demo

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

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

GPU в ailist

Универсальный рантайм

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

GGUF-веса поддерживаются только для текстовых LLM (llama.cpp).

Ревизия весов
190b996

0 моделей