Model reference · open weights
Ovis2.5 is an open-weight language model from ATH-MaaS. Ovis2.5-2B (BF16) weighs 5.1 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the ATH-MaaS/Ovis2.5-2B model card, 2026-10-01
What it is
| Released by | ATH-MaaS |
|---|---|
| Released | 2025-08-15 |
| Parameters | 2.6B |
| VRAM | 5.1 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB | 6 | 1 | all 40K | 11.6 GB |
| RTX 4060 Ti 16 GB | 10 | 2 | all 40K | 15.4 GB |
| RTX 3090 24 GB | 18 | 4 | all 40K | 23.4 GB |
| RTX 4090 24 GB | 18 | 4 | all 40K | 23.4 GB |
| RTX 5090 32 GB | 26 | 6 | all 40K | 31.0 GB |
| L40S 48 GB | 40 | 10 | all 40K | 44.0 GB |
| A100 80 GB | 77 | 19 | all 40K | 78.2 GB |
| H100 80 GB | 72 | 18 | all 40K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 89 | 22 | all 40K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 103 | 25 | all 40K | 107 GB |
| H200 141 GB | 136 | 34 | all 40K | 138 GB |
| B200 180 GB | 176 | 44 | all 40K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 17 | 4 | all 40K | 11.6 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 6.7 GB | 9.6 GB |
| 5 | 10.5 GB | 24.6 GB |
| 8 | 13.3 GB | 35.9 GB |
| 16 | 20.8 GB | 65.9 GB |
| 32 | 35.9 GB | 126 GB |
| 64 | 65.9 GB | 246 GB |
One card, with vLLM's small-card settings.
From the model card
We are pleased to announce the release of Ovis2.5, the successor to Ovis2, designed for native-resolution visual perception and enhanced multimodal reasoning. It integrates a native-resolution vision transformer (NaViT) that processes images at their original, variable resolutions, eliminating the need for fixed-resolution tiling and preserving both fine details and global layout—crucial for visually dense content such as charts and diagrams. To strengthen reasoning, Ovis2.5 is trained not only on linear chain-of-thought (CoT) but also on reflective reasoning, including self-checking and revision. This advanced capability is available at inference as an optional thinking mode, enabling users to trade latency for higher accuracy on complex inputs.
Building on these advances, Ovis2.5-9B achieves an average score of 78.3 on the OpenCompass multimodal evaluation suite (SOTA among open-source MLLMs under 40B parameters), while the lightweight Ovis2.5-2B scores 73.9, continuing the “small model, big performance” philosophy for resource-constrained scenarios.
Key Features
Below is a simple example demonstrating how to run Ovis2.5 with a single image input. For accelerated inference with vLLM, refer to GitHub.
First, install the required dependencies:
pip install torch==2.4.0 transformers==4.51.3 numpy==1.25.0 pillow==10.3.0 moviepy==1.0.3
pip install flash-attn==2.7.0.post2 --no-build-isolation
Then, run the following code.
import torch
import requests
from PIL import Image
from transformers import AutoModelForCausalLM
MODEL_PATH = "AIDC-AI/Ovis2.5-2B"
# Thinking mode & budget
enable_thinking = True
enable_thinking_budget = True # Only effective if enable_thinking is True.
# Total tokens for thinking + answer. Ensure: max_new_tokens > thinking_budget + 25
max_new_tokens = 3072
thinking_budget = 2048
model = AutoModelForCausalLM.from_pretrained(
MODEL_PATH,
torch_dtype=torch.bfloat16,
trust_remote_code=True
).cuda()
messages = [{
"role": "user",
"content": [
{"type": "image", "image": Image.open(requests.get("https://cdn-uploads.huggingface.co/production/uploads/658a8a837959448ef5500ce5/TIlymOb86R6_Mez3bpmcB.png", stream=True).raw)},
{"type": "text", "text": "Calculate the sum of the numbers in the middle box in figure (c)."},
],
}]
input_ids, pixel_values, grid_thws = model.preprocess_inputs(
messages=messages,
add_generation_prompt=True,
enable_thinking=enable_thinking
)
input_ids = input_ids.cuda()
pixel_values = pixel_values.cuda() if pixel_values is not None else None
grid_thws = grid_thws.cuda() if grid_thws is not None else None
outputs = model.generate(
inputs=input_ids,
pixel_values=pixel_values,
grid_thws=grid_thws,
enable_thinking=enable_thinking,
enable_thinking_budget=enable_thinking_budget,
max_new_tokens=max_new_tokens,
thinking_budget=thinking_budget,
)
response = model.text_tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The thinking and thinking budget logic can be applied in the same way for multi-image, video and pure text scenarios.
Note (answer extraction for CoT/Thinking): To make evaluation and usage easier, we recommend appending a fixed suffix to prompts when using chain-of-thought (CoT) or thinking mode. This ensures the model clearly outputs a final answer that can be extracted programmatically:
End your response with 'Final answer: '.
For example:
Calculate the sum of the numbers in the middle box in figure (c).
End your response with 'Final answer: '.
Tip: The sections below include an optional streaming helper (compatible with two-phase thinking/budget runs) and extra inference modes: multi-image, video, and text-only.
To support thinking budget, we modified the implementation of the Ovis generate method and the default TextIteratorStreamer is now incompatible. If you need to stream model output, be sure to use the helper class below.
# --- Budget-aware streamer helper ---
from transformers import TextIteratorStreamer
class BudgetAwareTextStreamer(TextIteratorStreamer):
"""A streamer compatible with Ovis two-phase generation.
Call .manual_end() after generation to flush any remaining text.
"""
def manual_end(self):
if len(self.token_cache) > 0:
text = self.tokenizer.decode(self.token_cache, **self.decode_kwargs)
printable_text = text[self.print_len:]
self.token_cache = []
self.print_len = 0
else:
printable_text = ""
self.next_tokens_are_prompt = True
self.on_finalized_text(printable_text, stream_end=True)
# Disable base class's end hook; we'll finalize via manual_end()
def end(self):
pass
Example usage:
streamer = BudgetAwareTextStreamer(
model.text_tokenizer,
skip_prompt=True,
skip_special_tokens=True
)
outputs = model.generate(
inputs=input_ids,
pixel_values=pixel_values,
grid_thws=grid_thws,
enable_thinking=enable_thinking,
enable_thinking_budget=enable_thinking_budget,
max_new_tokens=max_new_tokens,
thinking_budget=thinking_budget,
streamer=streamer
)
Demonstrates how to run inference with multiple images and a rel
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.