kosmos-2.5
Microsoft · microsoft/kosmos-2.5
Weights license: MIT · code and components may use other terms
Quality
No comparable score
We track no public, comparable benchmark that covers this model yet. No score is inferred.
Reported by the publisher
Runs on
Fast memory holds it 119
The planning estimate fits the memory the model can use quickly: graphics card VRAM, or unified memory within the macOS GPU share.
Show all 119
Hardware profiles grouped by the Q4 planning estimate on each machine (dedicated GPUs reserve 2 GB; unified and system memory 25%, 2 to 8 GB): the fast memory holds it, it is within memory but outside the fast part (layers offloaded to PC RAM, or above the macOS GPU share), or the machine is one memory tier short. Not a measured fit or speed.
Microsoft released kosmos-2.5 on 2024-05: a vision-language model that answers about images, with 1.37B parameters on the Hugging Face count and the MIT license. Languages the publisher declares: en.
License: commercial use allowed. At Q4 the weights load about 1 GB before each machine's reserve; image resolution, video frames and context add memory, and the vision encoder needs support in the runtime you pick.
Measured speed
No published measurement for this checkpoint
Tokens per second are shown only when a source publishes them with hardware, build and setup. They are never estimated.
How to run
Runtime compatibility and tokens per second have not been measured for this entry. Published metadata and a memory estimate do not prove a successful local run.
Library in source: transformers
Documented ways to run it
Copied as printed in the linked source (read 2026-10-18); not run by this site.
import re
import torch
import requests
from PIL import Image, ImageDraw
from transformers import AutoProcessor, Kosmos2_5ForConditionalGeneration, infer_device
repo = "microsoft/kosmos-2.5"
device = "cuda:0"
dtype = torch.bfloat16
model = Kosmos2_5ForConditionalGeneration.from_pretrained(repo, device_map=device, dtype=dtype)
processor = AutoProcessor.from_pretrained(repo)
# sample image
url = "https://huggingface.co/microsoft/kosmos-2.5/resolve/main/receipt_00008.png"
image = Image.open(requests.get(url, stream=True).raw)
prompt = "<md>"
inputs = processor(text=prompt, images=image, return_tensors="pt")
height, width = inputs.pop("height"), inputs.pop("width")
raw_width, raw_height = image.size
scale_height = raw_height / height
scale_width = raw_width / width
inputs = {k: v.to(device) if v is not None else None for k, v in inputs.items()}
inputs["flattened_patches"] = inputs["flattened_patches"].to(dtype)
generated_ids = model.generate(
**inputs,
max_new_tokens=1024,
)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)
print(generated_text[0])Technical details
What the source and the catalog store for this checkpoint. Missing fields are left out, never zero.
- Checkpoint / source
- microsoft/kosmos-2.5
- Task
- image-text-to-text
- Architecture
- Kosmos2_5ForConditionalGeneration
- Library in source
- transformers
- Weight license
- MITmicrosoft/kosmos-2.5 model card (Hugging Face) · read 2026-10-18source
- Commercial use
- Allowed MIT license text (SPDX) · read 2026-10-18license text
- Languages
- enModel card metadata · read 2026-10-25source
- Released
- Kosmos-2.5 README news, 'May 2024: open-sourced the checkpoint and inference code' (microsoft/unilm GitHub) · read 2026-10-18source
Every stored field
- Revision checked
- ec3c8051b697166514a31d646cfa36d6ef4c93d7
- Architecture
- Kosmos2_5ForConditionalGeneration
- Library
- transformers
- Hub task tag
- image-text-to-text
- Formats
- transformers, safetensors
- Access
- Open download
- Publisher kind
- Official
- Hub parameter count
- 1,374,646,272safetensors.total
- Repository created
- 2024-05-13creation is not the model's release
- Repository updated
- 2025-08-28a commit is not a release date
- Hub downloads (30 days) · likes
- 8,141 · 276this repository only · read 2026-10-25
- Catalog state
- Hub config or weights found; no inventory benchmark link
Sources
Identity and published specifications come from the checkpoint page. Benchmark scores belong to the named release and do not measure speed on your computer.
- Publisher model card
- License: microsoft/kosmos-2.5 model card (Hugging Face)
- Release date: Kosmos-2.5 README news, 'May 2024: open-sourced the checkpoint and inference code' (microsoft/unilm GitHub)
Curated facts checked: 2026-10-18. The license and release date cite the publisher's sources; parameters, files and task come from the Hugging Face record, and memory is a labelled estimate from its parameter count. A value no source states stays empty; a repository commit is not a model release date.






























































