> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liquid.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# LFM2.5-VL-450M

> Compact 450M vision-language model with enhanced performance for edge deployment

export const VlLlamacpp = ({ggufRepo, samplingFlags}) => <div>
<p>llama.cpp enables efficient CPU inference for vision models.</p>
<p><strong>Install:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="bash">
<code language="bash">
{`brew install llama.cpp`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
<p>Or download pre-built binaries from <a href="https://github.com/ggml-org/llama.cpp/releases">llama.cpp releases</a>.</p>
<p><strong>Run:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="bash">
<code language="bash">
{`llama-cli \\
    -hf ${ggufRepo}:Q4_0 \\
    --image test_image.jpg \\
    -p "What's in this image?" \\
    -n 128 \\
    ${samplingFlags}`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
<p>The <code>-hf</code> flag downloads the model directly from Hugging Face. Use <code>--image-max-tokens</code> to control image token budget.</p>
<p>For server deployment and advanced usage, see the <a href="/docs/inference/llama-cpp#vision-models">llama.cpp guide</a>.</p>
</div>;

export const VlSglang = ({modelId}) => <div>
<p><strong>Install:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="bash">
<code language="bash">
{`uv pip install "sglang>=0.5.10"`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
<p><strong>Launch server:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="bash">
<code language="bash">
{`sglang serve \\
    --model-path ${modelId} \\
    --host 0.0.0.0 \\
    --port 30000`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
<p><strong>Query (OpenAI-compatible):</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="python">
<code language="python">
{`from openai import OpenAI

client = OpenAI(base_url="http://localhost:30000/v1", api_key="None")

response = client.chat.completions.create(
    model="${modelId}",
    messages=[{
        "role": "user",
        "content": [
            {"type": "image_url", "image_url": {"url": "http://images.cocodataset.org/val2017/000000039769.jpg"}},
            {"type": "text", "text": "Describe what you see in this image."},
        ],
    }],
    temperature=0.0,
    max_tokens=256,
)

print(response.choices[0].message.content)`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
</div>;

export const VlVllm = ({modelId}) => <div>
<p><strong>Install:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="bash">
<code language="bash">
{`uv pip install vllm==0.19.0`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="bash">
<code language="bash">
{`uv pip install transformers==5.5.0 pillow`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
<p><strong>Run:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="python">
<code language="python">
{`from vllm import LLM, SamplingParams

IMAGE_URL = "http://images.cocodataset.org/val2017/000000039769.jpg"

llm = LLM(
    model="${modelId}",
    max_model_len=1024,
)

sampling_params = SamplingParams(
    temperature=0.1,
    min_p=0.15,
    repetition_penalty=1.05,
    max_tokens=256,
)

messages = [{
    "role": "user",
    "content": [
        {"type": "image_url", "image_url": {"url": IMAGE_URL}},
        {"type": "text", "text": "Describe what you see in this image."},
    ],
}]

outputs = llm.chat(messages, sampling_params)
print(outputs[0].outputs[0].text)`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
</div>;

export const VlTransformers = ({modelId}) => <div>
<p><strong>Install:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="bash">
<code language="bash">
{`pip install "transformers>=5.2.0" pillow torch`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
<p><strong>Download & Run:</strong></p>
<pre className="shiki shiki-themes github-light github-dark" style={{
  backgroundColor: '#fff',
  '--shiki-dark-bg': '#24292e',
  color: '#24292e',
  '--shiki-dark': '#e1e4e8'
}} language="python">
<code language="python">
{`from transformers import AutoProcessor, AutoModelForImageTextToText
from transformers.image_utils import load_image

model_id = "${modelId}"
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    device_map="auto",
    dtype="bfloat16",
)

processor = AutoProcessor.from_pretrained(model_id)

url = "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
image = load_image(url)

conversation = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": image},
            {"type": "text", "text": "What is in this image?"},
        ],
    },
]

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

outputs = model.generate(**inputs, do_sample=True, temperature=0.1, min_p=0.15, repetition_penalty=1.05, max_new_tokens=256)
response = processor.batch_decode(outputs, skip_special_tokens=True)[0]
print(response)`.split('\n').map((line, i) => <span key={i} className="line">{line}{'\n'}</span>)}
</code>
</pre>
</div>;

<a href="/lfm/models/vision-models" className="back-button">← Back to Vision Models</a>

LFM2.5-VL-450M is Liquid AI's smallest vision-language model, building on LFM2-VL-450M with extended reinforcement learning for improved performance while maintaining the same compact deployment footprint.

<div style={{display: 'flex', gap: '0.5rem', margin: '0.5rem 0 1.5rem 0'}}>
  <a href="https://huggingface.co/LiquidAI/LFM2.5-VL-450M" style={{padding: '0.35rem 0.7rem', borderRadius: '4px', fontSize: '0.85rem', fontWeight: 600, textDecoration: 'none', backgroundColor: '#fbbf24'}}><span style={{color: '#000'}}>HF</span></a>
  <a href="https://huggingface.co/LiquidAI/LFM2.5-VL-450M-GGUF" style={{padding: '0.35rem 0.7rem', borderRadius: '4px', fontSize: '0.85rem', fontWeight: 600, textDecoration: 'none', backgroundColor: '#60a5fa'}}><span style={{color: '#000'}}>GGUF</span></a>
  <a href="https://huggingface.co/LiquidAI/LFM2.5-VL-450M-ONNX" style={{padding: '0.35rem 0.7rem', borderRadius: '4px', fontSize: '0.85rem', fontWeight: 600, textDecoration: 'none', backgroundColor: '#86efac'}}><span style={{color: '#000'}}>ONNX</span></a>
</div>

## Specifications

| Property       | Value             |
| -------------- | ----------------- |
| Parameters     | 450M              |
| Context Length | 32K tokens        |
| Architecture   | LFM2.5-VL (Dense) |

<div className="use-cases">
  <CardGroup cols={3}>
    <Card title="Ultra-Light" icon="feather">
      Minimal memory footprint
    </Card>

    <Card title="Low Latency" icon="bolt">
      Fastest vision model inference
    </Card>

    <Card title="Edge-Ready" icon="microchip">
      Runs on mobile and embedded devices
    </Card>
  </CardGroup>
</div>

## Quick Start

<Tabs>
  <Tab title="Transformers">
    <VlTransformers modelId="LiquidAI/LFM2.5-VL-450M" />
  </Tab>

  <Tab title="vLLM">
    <VlVllm modelId="LiquidAI/LFM2.5-VL-450M" />
  </Tab>

  <Tab title="SGLang">
    <VlSglang modelId="LiquidAI/LFM2.5-VL-450M" />
  </Tab>

  <Tab title="llama.cpp">
    <VlLlamacpp ggufRepo="LiquidAI/LFM2.5-VL-450M-GGUF" samplingFlags="--temp 0.1 --min-p 0.15 --repeat-penalty 1.05" />
  </Tab>
</Tabs>
