[Doc] Host model recipes in recipes/ (#61302)
Signed-off-by: esmeetu <jasonailu87@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f98ae6a9fd
commit
b515648641
@@ -0,0 +1,137 @@
|
||||
meta:
|
||||
title: "LFM2.5 1.2B Base"
|
||||
slug: "lfm2.5-1.2b-base"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's 1.2B pretrained base model on the LFM2 hybrid conv+attention backbone — a text-completion and fine-tuning foundation (no chat template)."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "1.2B pretrained base (no chat template) — completions endpoint, ideal as a fine-tuning base"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
- LiquidAI/LFM2.5-350M
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-1.2B-Base"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "1.2B"
|
||||
active_parameters: "1.2B"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 3
|
||||
description: "Full BF16 — single 8 GB+ NVIDIA GPU with room for KV cache"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-1.2B-Base](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Base) is the pretrained base
|
||||
checkpoint behind [Liquid AI's](https://www.liquid.ai/) LFM2.5-1.2B instruct models, built on
|
||||
the **LFM2 hybrid backbone** (short-range gated convolution blocks interleaved with grouped-query
|
||||
attention). It is **not** instruction-tuned and has no chat template — use the
|
||||
`/v1/completions` endpoint (raw text continuation), or fine-tune it for your own task.
|
||||
|
||||
### Key Features
|
||||
- **Pretrained base**: No chat template, no instruction tuning — a clean foundation for fine-tuning or raw completion.
|
||||
- **Hybrid backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Native vLLM support**: Served via the `Lfm2ForCausalLM` architecture.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU with ≥8 GB VRAM.
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-Base
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-base \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-1.2B-Base \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Text Completion
|
||||
This is a base model — use the **completions** endpoint, not chat. Recommended sampling:
|
||||
temperature `0.3`, `min_p 0.15`, `repetition_penalty 1.05`.
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.completions.create(
|
||||
model="LiquidAI/LFM2.5-1.2B-Base",
|
||||
prompt="The three laws of thermodynamics are:",
|
||||
temperature=0.3,
|
||||
extra_body={"min_p": 0.15, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].text)
|
||||
```
|
||||
|
||||
## Configuration Tips
|
||||
- Use `/v1/completions` (raw continuation) — there is no chat template on a base model.
|
||||
- For fine-tuning, this checkpoint is the recommended starting point for custom LFM2.5-1.2B tasks.
|
||||
- Set `--max-model-len` to match your workload (up to 32K).
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Base)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,186 @@
|
||||
meta:
|
||||
title: "LFM2.5 1.2B Instruct"
|
||||
slug: "lfm2.5-1.2b-instruct"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's 1.2B instruction-tuned model on the LFM2 hybrid conv+attention backbone, with tool calling and a 32K context window on a single small GPU."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "1.2B hybrid (gated conv + GQA) instruct model with tool calling — runs on a single 8 GB+ GPU"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-350M
|
||||
- LiquidAI/LFM2.5-1.2B-Thinking
|
||||
- LiquidAI/LFM2.5-8B-A1B
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-1.2B-Instruct"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "1.2B"
|
||||
active_parameters: "1.2B"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
features:
|
||||
tool_calling:
|
||||
description: "Surface LFM2.5's Pythonic tool calls (wrapped in <|tool_call_start|>…<|tool_call_end|>) as OpenAI tool_calls via vLLM's native lfm2 parser"
|
||||
args:
|
||||
- "--enable-auto-tool-choice"
|
||||
- "--tool-call-parser"
|
||||
- "lfm2"
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 3
|
||||
description: "Full BF16 — single 8 GB+ NVIDIA GPU with room for KV cache"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-1.2B-Instruct](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct) is a 1.2B
|
||||
instruction-tuned model from [Liquid AI](https://www.liquid.ai/), built on the **LFM2 hybrid
|
||||
backbone**: short-range gated convolution blocks interleaved with grouped-query attention.
|
||||
The hybrid design keeps the KV cache small and decode fast, so the model serves comfortably on
|
||||
a single small GPU while supporting a 32K context window and Pythonic tool calling — all
|
||||
through vLLM's OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Hybrid backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Tool calling**: Pythonic tool calls (`<|tool_call_start|>…<|tool_call_end|>`) surfaced as OpenAI `tool_calls` by vLLM's native `lfm2` parser.
|
||||
- **Native vLLM support**: Served via the `Lfm2ForCausalLM` architecture.
|
||||
- **Edge-ready family**: Day-one support across llama.cpp, MLX, ONNX, vLLM, and SGLang.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU with ≥8 GB VRAM (e.g. L4, A10, RTX 4090, H100).
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-Instruct
|
||||
```
|
||||
Cap the context to fit a smaller GPU (the model supports up to 32K):
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-Instruct --max-model-len 32768
|
||||
```
|
||||
|
||||
### Full-Featured Server Launch
|
||||
Enables tool calling:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-Instruct \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser lfm2 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-1.2b \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-1.2B-Instruct \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Text Generation
|
||||
The model card recommends temperature `0.1`, `top_k 50`, `repetition_penalty 1.05`. `top_k` and
|
||||
`repetition_penalty` are vLLM extra sampling params — pass them via `extra_body`.
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-1.2B-Instruct",
|
||||
messages=[{"role": "user", "content": "What is C. elegans? Answer in one sentence."}],
|
||||
temperature=0.1,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.content)
|
||||
```
|
||||
|
||||
### Tool Calling
|
||||
Launch with `--enable-auto-tool-choice --tool-call-parser lfm2`, then pass `tools=[…]`. The
|
||||
`lfm2` parser converts the model's Pythonic call into a standard `tool_calls` array.
|
||||
```python
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-1.2B-Instruct",
|
||||
messages=[{"role": "user", "content": "What's the weather in Paris?"}],
|
||||
tools=[{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "get_weather",
|
||||
"description": "Get current weather for a location",
|
||||
"parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]},
|
||||
},
|
||||
}],
|
||||
temperature=0.1,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.tool_calls)
|
||||
```
|
||||
|
||||
### Structured Outputs
|
||||
vLLM's guided decoding constrains output to a JSON schema via `response_format`. The model does
|
||||
not see the schema itself — put semantic instructions (units, formatting) in the system prompt.
|
||||
|
||||
## Configuration Tips
|
||||
- Set `--max-model-len` to match your workload (up to 32K); lowering it frees VRAM for KV cache.
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- FP8 KV cache (`--kv-cache-dtype fp8`) roughly halves KV memory.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Instruct)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,158 @@
|
||||
meta:
|
||||
title: "LFM2.5 1.2B JP (202606)"
|
||||
slug: "lfm2.5-1.2b-jp-202606"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's updated (2026-06) 1.2B Japanese chat model on the LFM2 hybrid conv+attention backbone — adds tool calling, with a 32K context window."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "Updated Japanese-tuned 1.2B hybrid chat model with tool calling — single small GPU"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-1.2B-JP
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-1.2B-JP-202606"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "1.2B"
|
||||
active_parameters: "1.2B"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
features:
|
||||
tool_calling:
|
||||
description: "Surface LFM2.5's Pythonic tool calls (wrapped in <|tool_call_start|>…<|tool_call_end|>) as OpenAI tool_calls via vLLM's native lfm2 parser"
|
||||
args:
|
||||
- "--enable-auto-tool-choice"
|
||||
- "--tool-call-parser"
|
||||
- "lfm2"
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 3
|
||||
description: "Full BF16 — single 8 GB+ NVIDIA GPU with room for KV cache"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-1.2B-JP-202606](https://huggingface.co/LiquidAI/LFM2.5-1.2B-JP-202606) is the updated
|
||||
(June 2026) Japanese-specialized 1.2B chat model from [Liquid AI](https://www.liquid.ai/),
|
||||
adding tool calling on top of the **LFM2 hybrid backbone** (short-range gated convolution
|
||||
blocks interleaved with grouped-query attention). It serves on a single small GPU through
|
||||
vLLM's OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Japanese-specialized**: Updated June 2026 checkpoint tuned for Japanese chat.
|
||||
- **Hybrid backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **Tool calling**: Pythonic tool calls (`<|tool_call_start|>…<|tool_call_end|>`) surfaced as OpenAI `tool_calls` by vLLM's native `lfm2` parser.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Native vLLM support**: Served via the `Lfm2ForCausalLM` architecture.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU with ≥8 GB VRAM.
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-JP-202606
|
||||
```
|
||||
|
||||
### Full-Featured Server Launch
|
||||
Enables tool calling:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-JP-202606 \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser lfm2 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-jp-202606 \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-1.2B-JP-202606 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Text Generation
|
||||
The updated checkpoint uses temperature `0.1`, `top_k 50`, `repetition_penalty 1.05` (`top_k`
|
||||
and `repetition_penalty` ride in `extra_body`).
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-1.2B-JP-202606",
|
||||
messages=[{"role": "user", "content": "京都でおすすめの観光スポットを3つ教えてください。"}],
|
||||
temperature=0.1,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.content)
|
||||
```
|
||||
|
||||
### Tool Calling
|
||||
Launch with `--enable-auto-tool-choice --tool-call-parser lfm2`, then pass `tools=[…]`; the
|
||||
`lfm2` parser converts the model's Pythonic call into a standard `tool_calls` array.
|
||||
|
||||
## Configuration Tips
|
||||
- Set `--max-model-len` to match your workload (up to 32K); lowering it frees VRAM for KV cache.
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-1.2B-JP-202606)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,137 @@
|
||||
meta:
|
||||
title: "LFM2.5 1.2B JP"
|
||||
slug: "lfm2.5-1.2b-jp"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's 1.2B Japanese-specialized chat model on the LFM2 hybrid conv+attention backbone, with a 32K context window on a single small GPU."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "Japanese-tuned 1.2B hybrid chat model — single small GPU"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-1.2B-JP-202606
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-1.2B-JP"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "1.2B"
|
||||
active_parameters: "1.2B"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 3
|
||||
description: "Full BF16 — single 8 GB+ NVIDIA GPU with room for KV cache"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-1.2B-JP](https://huggingface.co/LiquidAI/LFM2.5-1.2B-JP) is the Japanese-specialized
|
||||
1.2B chat model from [Liquid AI](https://www.liquid.ai/), built on the **LFM2 hybrid backbone**
|
||||
(short-range gated convolution blocks interleaved with grouped-query attention). It serves on a
|
||||
single small GPU through vLLM's OpenAI-compatible API. For the latest Japanese checkpoint with
|
||||
tool calling, see
|
||||
[LFM2.5-1.2B-JP-202606](https://huggingface.co/LiquidAI/LFM2.5-1.2B-JP-202606).
|
||||
|
||||
### Key Features
|
||||
- **Japanese-specialized**: Tuned for Japanese chat and instruction following.
|
||||
- **Hybrid backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Native vLLM support**: Served via the `Lfm2ForCausalLM` architecture.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU with ≥8 GB VRAM.
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-JP
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-jp \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-1.2B-JP \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Text Generation
|
||||
The card recommends temperature `0.3`, `min_p 0.15`, `repetition_penalty 1.05` for the JP
|
||||
checkpoint (`min_p` and `repetition_penalty` ride in `extra_body`).
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-1.2B-JP",
|
||||
messages=[{"role": "user", "content": "日本の四季について簡単に説明してください。"}],
|
||||
temperature=0.3,
|
||||
extra_body={"min_p": 0.15, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.content)
|
||||
```
|
||||
|
||||
## Configuration Tips
|
||||
- Set `--max-model-len` to match your workload (up to 32K); lowering it frees VRAM for KV cache.
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-1.2B-JP)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,180 @@
|
||||
meta:
|
||||
title: "LFM2.5 1.2B Thinking"
|
||||
slug: "lfm2.5-1.2b-thinking"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's 1.2B reasoning model on the LFM2 hybrid conv+attention backbone — <think> chain-of-thought, tool calling, and 32K context on a single small GPU."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "1.2B hybrid reasoning model with <think> chain-of-thought and tool calling — single small GPU"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
- LiquidAI/LFM2.5-8B-A1B
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-1.2B-Thinking"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "1.2B"
|
||||
active_parameters: "1.2B"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
features:
|
||||
reasoning:
|
||||
description: "Split the model's <think>…</think> chain-of-thought into a separate reasoning field via vLLM's qwen3 parser"
|
||||
args:
|
||||
- "--reasoning-parser"
|
||||
- "qwen3"
|
||||
tool_calling:
|
||||
description: "Surface LFM2.5's Pythonic tool calls (wrapped in <|tool_call_start|>…<|tool_call_end|>) as OpenAI tool_calls via vLLM's native lfm2 parser"
|
||||
args:
|
||||
- "--enable-auto-tool-choice"
|
||||
- "--tool-call-parser"
|
||||
- "lfm2"
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 3
|
||||
description: "Full BF16 — single 8 GB+ NVIDIA GPU with room for KV cache"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-1.2B-Thinking](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Thinking) is the reasoning
|
||||
variant of [Liquid AI's](https://www.liquid.ai/) 1.2B LFM2.5 model, built on the **LFM2 hybrid
|
||||
backbone** (short-range gated convolution blocks interleaved with grouped-query attention). On
|
||||
reasoning-heavy tasks it produces an explicit `<think>…</think>` chain-of-thought before its
|
||||
final answer, so it reasons well above its weight class while still serving on a single small
|
||||
GPU through vLLM's OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Hybrid backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **`<think>` reasoning**: Emits an explicit `<think>…</think>` chain-of-thought on non-trivial problems; vLLM's `qwen3` parser splits it into a separate `reasoning` field.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Tool calling**: Pythonic tool calls surfaced as OpenAI `tool_calls` by vLLM's native `lfm2` parser.
|
||||
- **Native vLLM support**: Served via the `Lfm2ForCausalLM` architecture.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active, also a reasoning model)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU with ≥8 GB VRAM.
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
Enable the reasoning parser so the chain-of-thought is returned in `reasoning`:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-Thinking \
|
||||
--reasoning-parser qwen3
|
||||
```
|
||||
|
||||
### Full-Featured Server Launch
|
||||
Reasoning **and** tool calling:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-1.2B-Thinking \
|
||||
--reasoning-parser qwen3 \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser lfm2 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-thinking \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-1.2B-Thinking \
|
||||
--reasoning-parser qwen3 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Reasoning Mode
|
||||
The card recommends a low temperature for the reasoning model — temperature `0.05`, `top_k 50`,
|
||||
`repetition_penalty 1.05`. Do **not** set `max_tokens` — capping it can truncate the
|
||||
chain-of-thought mid-stream.
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-1.2B-Thinking",
|
||||
messages=[{"role": "user", "content": "A snail climbs 3 ft up a 20 ft well each day and slides 2 ft back each night. How many days to reach the top?"}],
|
||||
temperature=0.05,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
msg = response.choices[0].message
|
||||
print("reasoning:", msg.reasoning)
|
||||
print("answer:", msg.content)
|
||||
```
|
||||
|
||||
> **Note**: the model opens the `<think>` channel for non-trivial problems; a simple prompt may
|
||||
> be answered directly, in which case `reasoning` is empty. That is expected behavior —
|
||||
> the `qwen3` parser extracts the block whenever it is present.
|
||||
|
||||
### Tool Calling
|
||||
Add `--enable-auto-tool-choice --tool-call-parser lfm2` at launch, then pass `tools=[…]`; the
|
||||
model can reason about which tool to call before emitting it.
|
||||
|
||||
### Structured Outputs
|
||||
vLLM's guided decoding constrains output to a JSON schema via `response_format`. The model does
|
||||
not see the schema itself — put semantic instructions in the system prompt.
|
||||
|
||||
## Configuration Tips
|
||||
- Give reasoning room: leave `max_tokens` unset so the `<think>` block and answer aren't truncated.
|
||||
- Set `--max-model-len` to match your workload (up to 32K).
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-1.2B-Thinking)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,184 @@
|
||||
meta:
|
||||
title: "LFM2.5 230M"
|
||||
slug: "lfm2.5-230m"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's most compact LFM2.5 chat model (230M) on the LFM2 hybrid conv+attention backbone — distilled from LFM2.5-350M, tool calling and 32K context, built for edge / on-device serving."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-25
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "230M hybrid instruct model with tool calling — runs from low-cost CPUs to production GPUs, ideal for tightest on-device budgets"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-350M
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
- LiquidAI/LFM2.5-8B-A1B
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-230M"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "230M"
|
||||
active_parameters: "230M"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
features:
|
||||
tool_calling:
|
||||
description: "Surface LFM2.5's Pythonic tool calls (wrapped in <|tool_call_start|>…<|tool_call_end|>) as OpenAI tool_calls via vLLM's native lfm2 parser"
|
||||
args:
|
||||
- "--enable-auto-tool-choice"
|
||||
- "--tool-call-parser"
|
||||
- "lfm2"
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 1
|
||||
description: "Full BF16 — fits essentially any GPU (~0.5 GB of weights)"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides: {}
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-230M](https://huggingface.co/LiquidAI/LFM2.5-230M) is the most compact chat model in
|
||||
[Liquid AI's](https://www.liquid.ai/) LFM2.5 family, built on the **LFM2 hybrid backbone**:
|
||||
short-range gated convolution blocks interleaved with grouped-query attention. It was
|
||||
**distilled from LFM2.5-350M** and refined with multi-stage reinforcement learning, then
|
||||
trained on a 19T-token budget — keeping memory and latency low enough for the tightest edge and
|
||||
on-device budgets while still supporting tool calling and a 32K context window through vLLM's
|
||||
OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Hybrid backbone**: 14 layers — 8 double-gated short-convolution blocks interleaved with 6 grouped-query attention blocks — for a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **32K context**: Long-context support (`context_length = 32768`).
|
||||
- **Tool calling**: Pythonic tool calls (`<|tool_call_start|>…<|tool_call_end|>`) surfaced as OpenAI `tool_calls` by vLLM's native `lfm2` parser.
|
||||
- **Native vLLM support**: Served via the `Lfm2ForCausalLM` architecture — no `--trust-remote-code` required.
|
||||
- **Edge-ready**: ~0.5 GB of BF16 weights — runs from low-cost CPUs to production GPUs (213 tok/s decode on a Galaxy S25 Ultra, 42 tok/s on a Raspberry Pi 5).
|
||||
|
||||
Best suited for data extraction and lightweight on-device agentic pipelines; the model card
|
||||
notes it is **not** recommended for reasoning-heavy workloads (advanced math, code generation,
|
||||
creative writing) — reach for a larger sibling there.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU (~1 GB VRAM for weights; any modern GPU works). Verified on H100.
|
||||
- **vLLM**: ≥ 0.23.0 — the LFM2 architecture ships in the 0.23.0 stable release.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-230M
|
||||
```
|
||||
|
||||
### Full-Featured Server Launch
|
||||
Enables tool calling:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-230M \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser lfm2 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-230m \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-230M \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Text Generation
|
||||
The model card recommends temperature `0.1`, `top_k 50`, `repetition_penalty 1.05` (`top_k` and
|
||||
`repetition_penalty` ride in `extra_body`).
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-230M",
|
||||
messages=[{"role": "user", "content": "Give me three uses for baking soda."}],
|
||||
temperature=0.1,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.content)
|
||||
```
|
||||
|
||||
### Tool Calling
|
||||
Launch with `--enable-auto-tool-choice --tool-call-parser lfm2`, then pass `tools=[…]`; the
|
||||
`lfm2` parser converts the model's Pythonic call into a standard `tool_calls` array.
|
||||
```python
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-230M",
|
||||
messages=[{"role": "user", "content": "What's the weather in Paris?"}],
|
||||
tools=[{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "get_weather",
|
||||
"description": "Get current weather for a location",
|
||||
"parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]},
|
||||
},
|
||||
}],
|
||||
temperature=0.1,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.tool_calls)
|
||||
```
|
||||
|
||||
### Structured Outputs
|
||||
vLLM's guided decoding constrains output to a JSON schema via `response_format`. The model does
|
||||
not see the schema itself — put semantic instructions in the system prompt. Data extraction is a
|
||||
primary use case for this model, so structured outputs pair naturally with it.
|
||||
|
||||
## Configuration Tips
|
||||
- At 230M the model fits any GPU; raise `--max-num-seqs` to push batch throughput.
|
||||
- Set `--max-model-len` to match your workload (up to 32K).
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-230M)
|
||||
- [Blog post](https://www.liquid.ai/blog/lfm2-5-230m)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,181 @@
|
||||
meta:
|
||||
title: "LFM2.5 350M"
|
||||
slug: "lfm2.5-350m"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's smallest LFM2.5 chat model (350M) on the LFM2 hybrid conv+attention backbone — tool calling and 32K context, light enough for edge GPUs."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "350M hybrid instruct model with tool calling — fits any GPU, ideal for edge / on-device serving"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
- LiquidAI/LFM2.5-8B-A1B
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-350M"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "350M"
|
||||
active_parameters: "350M"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
features:
|
||||
tool_calling:
|
||||
description: "Surface LFM2.5's Pythonic tool calls (wrapped in <|tool_call_start|>…<|tool_call_end|>) as OpenAI tool_calls via vLLM's native lfm2 parser"
|
||||
args:
|
||||
- "--enable-auto-tool-choice"
|
||||
- "--tool-call-parser"
|
||||
- "lfm2"
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 1
|
||||
description: "Full BF16 — fits essentially any GPU (~0.7 GB of weights)"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-350M](https://huggingface.co/LiquidAI/LFM2.5-350M) is the smallest chat model in
|
||||
[Liquid AI's](https://www.liquid.ai/) LFM2.5 family, built on the **LFM2 hybrid backbone**:
|
||||
short-range gated convolution blocks interleaved with grouped-query attention. It shares that
|
||||
backbone with its larger siblings, which keeps memory and latency low enough for edge and
|
||||
on-device deployment while still supporting tool calling and a 32K context window — all
|
||||
through vLLM's OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Hybrid backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Tool calling**: Pythonic tool calls (`<|tool_call_start|>…<|tool_call_end|>`) surfaced as OpenAI `tool_calls` by vLLM's native `lfm2` parser.
|
||||
- **Native vLLM support**: Served via the `Lfm2ForCausalLM` architecture.
|
||||
- **Edge-ready**: ~0.7 GB of BF16 weights — runs on commodity and on-device GPUs.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU (~1 GB VRAM for weights; any modern GPU works).
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-350M
|
||||
```
|
||||
|
||||
### Full-Featured Server Launch
|
||||
Enables tool calling:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-350M \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser lfm2 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-350m \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-350M \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Text Generation
|
||||
The model card recommends temperature `0.1`, `top_k 50`, `repetition_penalty 1.05` (`top_k` and
|
||||
`repetition_penalty` ride in `extra_body`).
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-350M",
|
||||
messages=[{"role": "user", "content": "Give me three uses for baking soda."}],
|
||||
temperature=0.1,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.content)
|
||||
```
|
||||
|
||||
### Tool Calling
|
||||
Launch with `--enable-auto-tool-choice --tool-call-parser lfm2`, then pass `tools=[…]`; the
|
||||
`lfm2` parser converts the model's Pythonic call into a standard `tool_calls` array.
|
||||
```python
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-350M",
|
||||
messages=[{"role": "user", "content": "What's the weather in Paris?"}],
|
||||
tools=[{
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "get_weather",
|
||||
"description": "Get current weather for a location",
|
||||
"parameters": {"type": "object", "properties": {"location": {"type": "string"}}, "required": ["location"]},
|
||||
},
|
||||
}],
|
||||
temperature=0.1,
|
||||
extra_body={"top_k": 50, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.tool_calls)
|
||||
```
|
||||
|
||||
### Structured Outputs
|
||||
vLLM's guided decoding constrains output to a JSON schema via `response_format`. The model does
|
||||
not see the schema itself — put semantic instructions in the system prompt.
|
||||
|
||||
## Configuration Tips
|
||||
- At 350M the model fits any GPU; raise `--max-num-seqs` to push batch throughput.
|
||||
- Set `--max-model-len` to match your workload (up to 32K).
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-350M)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,189 @@
|
||||
meta:
|
||||
title: "LFM2.5 8B A1B"
|
||||
slug: "lfm2.5-8b-a1b"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's 8B mixture-of-experts model (~1B active) on the LFM2 hybrid conv+attention backbone, with <think> reasoning and tool calling at ~1B decode cost."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- text
|
||||
performance_headline: "8B-total / ~1B-active hybrid MoE with reasoning and tool calling — 8B quality at ~1B decode cost on a single GPU"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
- LiquidAI/LFM2.5-1.2B-Thinking
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-8B-A1B"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: moe
|
||||
parameter_count: "8B"
|
||||
active_parameters: "1B"
|
||||
context_length: 128000
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
features:
|
||||
reasoning:
|
||||
description: "Split the model's <think>…</think> chain-of-thought into a separate reasoning field via vLLM's qwen3 parser"
|
||||
args:
|
||||
- "--reasoning-parser"
|
||||
- "qwen3"
|
||||
tool_calling:
|
||||
description: "Surface LFM2.5's Pythonic tool calls (wrapped in <|tool_call_start|>…<|tool_call_end|>) as OpenAI tool_calls via vLLM's native lfm2 parser"
|
||||
args:
|
||||
- "--enable-auto-tool-choice"
|
||||
- "--tool-call-parser"
|
||||
- "lfm2"
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 21
|
||||
description: "Full BF16 — all 8B of experts live in VRAM; single 24 GB+ NVIDIA GPU"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-8B-A1B](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B) is [Liquid AI's](https://www.liquid.ai/)
|
||||
mixture-of-experts model: ~8B total parameters with only ~1B activated per token. It pairs the
|
||||
**LFM2 hybrid backbone** (short-range gated convolution blocks interleaved with grouped-query
|
||||
attention) with sparse MoE feed-forward layers, so it reaches 8B-class quality at roughly 1B
|
||||
decode cost. It supports explicit `<think>` reasoning and Pythonic tool calling through vLLM's
|
||||
OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Hybrid + MoE**: Gated short convolutions + grouped-query attention with sparse expert FFNs — ~1B active parameters per token out of ~8B total.
|
||||
- **`<think>` reasoning**: Emits an explicit `<think>…</think>` chain-of-thought on non-trivial problems; vLLM's `qwen3` parser splits it into `reasoning`.
|
||||
- **Tool calling**: Pythonic tool calls surfaced as OpenAI `tool_calls` by vLLM's native `lfm2` parser.
|
||||
- **128K context**: Long-context support (`max_position_embeddings = 128000`).
|
||||
- **Native vLLM support**: Served via the `Lfm2MoeForCausalLM` architecture.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Dense:
|
||||
- `LiquidAI/LFM2.5-230M` (230M)
|
||||
- `LiquidAI/LFM2.5-350M` (350M)
|
||||
- `LiquidAI/LFM2.5-1.2B-Instruct` (1.2B)
|
||||
- `LiquidAI/LFM2.5-1.2B-Thinking` (1.2B, reasoning)
|
||||
- `LiquidAI/LFM2.5-1.2B-JP` / `LiquidAI/LFM2.5-1.2B-JP-202606` (Japanese)
|
||||
- `LiquidAI/LFM2.5-1.2B-Base` (pretrained base)
|
||||
|
||||
MoE:
|
||||
- `LiquidAI/LFM2.5-8B-A1B` (8B total / ~1B active)
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M`, `LiquidAI/LFM2.5-VL-1.6B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
> **Sizing**: MoE keeps every expert resident in VRAM, so size the GPU for the full ~8B of
|
||||
> weights (≈17 GB BF16 + KV cache) even though only ~1B is active per token.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU with ≥24 GB VRAM.
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-8B-A1B
|
||||
```
|
||||
|
||||
### Full-Featured Server Launch
|
||||
Reasoning **and** tool calling:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-8B-A1B \
|
||||
--reasoning-parser qwen3 \
|
||||
--enable-auto-tool-choice \
|
||||
--tool-call-parser lfm2 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Multi-GPU
|
||||
This model fits on a single 24 GB+ GPU, so tensor parallelism gives no meaningful speedup on
|
||||
basically any GPU — there's nothing to split that helps. You can still try it on a multi-GPU
|
||||
node if you want, but expect no throughput gain:
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-8B-A1B --tensor-parallel-size 2
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-8b-a1b \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-8B-A1B \
|
||||
--reasoning-parser qwen3 \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Reasoning Mode
|
||||
The model card recommends temperature `0.2`, `top_k 80`, `repetition_penalty 1.05`. Leave
|
||||
`max_tokens` unset so the `<think>` block and answer aren't truncated mid-stream.
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-8B-A1B",
|
||||
messages=[{"role": "user", "content": "A snail climbs 3 ft up a 20 ft well each day and slides 2 ft back each night. How many days to reach the top?"}],
|
||||
temperature=0.2,
|
||||
extra_body={"top_k": 80, "repetition_penalty": 1.05},
|
||||
)
|
||||
msg = response.choices[0].message
|
||||
print("reasoning:", msg.reasoning)
|
||||
print("answer:", msg.content)
|
||||
```
|
||||
|
||||
> **Note**: the model opens the `<think>` channel for non-trivial problems; a simple prompt may
|
||||
> be answered directly, in which case `reasoning` is empty. That is expected behavior —
|
||||
> the `qwen3` parser extracts the block whenever it is present.
|
||||
|
||||
### Tool Calling
|
||||
Add `--enable-auto-tool-choice --tool-call-parser lfm2` at launch, then pass `tools=[…]`; the
|
||||
`lfm2` parser converts the model's Pythonic call into a standard `tool_calls` array.
|
||||
|
||||
### Structured Outputs
|
||||
vLLM's guided decoding constrains output to a JSON schema via `response_format`. The model does
|
||||
not see the schema itself — put semantic instructions in the system prompt.
|
||||
|
||||
## Configuration Tips
|
||||
- Size the GPU for the full ~8B of weights — all experts are resident even though ~1B is active.
|
||||
- It fits on one GPU; tensor parallelism gives no real speedup on basically any GPU (you can still try `--tensor-parallel-size N`).
|
||||
- Set `--max-model-len` to match your workload (up to 128K).
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-8B-A1B)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,155 @@
|
||||
meta:
|
||||
title: "LFM2.5 VL 1.6B"
|
||||
slug: "lfm2.5-vl-1.6b"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's 1.6B vision-language model — LFM2 hybrid LM backbone plus a SigLIP2 vision tower for image+text chat on a single small GPU."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- multimodal
|
||||
performance_headline: "1.6B vision-language model (hybrid LM + SigLIP2 vision) — image understanding on a single small GPU"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-VL-450M
|
||||
- LiquidAI/LFM2.5-1.2B-Instruct
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-VL-1.6B"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "1.6B"
|
||||
active_parameters: "1.6B"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
# TODO(vincentzed): the Lfm2VL encoder CUDA graph (vllm-project/vllm#44930, ~10-20% lower e2e
|
||||
# latency at low batch) is NOT in 0.23.0 — add the encoder-CG compilation flag here once it
|
||||
# ships in a stable release (>0.23.0).
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 4
|
||||
description: "Full BF16 (LM + vision encoder) — single 8 GB+ NVIDIA GPU"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-VL-1.6B](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B) is the larger vision-language
|
||||
model in [Liquid AI's](https://www.liquid.ai/) LFM2.5-VL family. It pairs the **LFM2 hybrid
|
||||
language backbone** (short-range gated convolution blocks interleaved with grouped-query
|
||||
attention) with a SigLIP2 vision encoder for image understanding, while remaining small enough
|
||||
to serve on a single commodity GPU through vLLM's OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Vision-language**: SigLIP2 vision encoder on top of the LFM2 hybrid language backbone — single- and multi-image prompts.
|
||||
- **Hybrid LM backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Native vLLM support**: Served via the `Lfm2VlForConditionalGeneration` architecture.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M` (450M)
|
||||
- `LiquidAI/LFM2.5-VL-1.6B` (1.6B)
|
||||
|
||||
Text (same LFM2 family):
|
||||
- Dense: `LiquidAI/LFM2.5-230M`, `LiquidAI/LFM2.5-350M`, `LiquidAI/LFM2.5-1.2B-Instruct`, `LiquidAI/LFM2.5-1.2B-Thinking`, `LiquidAI/LFM2.5-1.2B-JP`, `LiquidAI/LFM2.5-1.2B-JP-202606`, `LiquidAI/LFM2.5-1.2B-Base`
|
||||
- MoE: `LiquidAI/LFM2.5-8B-A1B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU with ≥8 GB VRAM.
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-VL-1.6B
|
||||
```
|
||||
|
||||
### Multiple Images per Request
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-VL-1.6B \
|
||||
--limit-mm-per-prompt '{"image": 4}' \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-vl-1.6b \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-VL-1.6B \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Image Understanding
|
||||
Send an image + text turn via the OpenAI chat API. The card recommends temperature `0.1`,
|
||||
`min_p 0.15`, `repetition_penalty 1.05` (`min_p` and `repetition_penalty` ride in `extra_body`).
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-VL-1.6B",
|
||||
messages=[{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{"type": "image_url", "image_url": {"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"}},
|
||||
{"type": "text", "text": "What is in this image?"},
|
||||
],
|
||||
}],
|
||||
temperature=0.1,
|
||||
extra_body={"min_p": 0.15, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.content)
|
||||
```
|
||||
|
||||
### Multiple Images
|
||||
Launch with `--limit-mm-per-prompt '{"image": N}'`, then include several `image_url` blocks in
|
||||
one message to compare or reason across images.
|
||||
|
||||
## Performance
|
||||
|
||||
Tensor parallelism gives no speedup — the model fits on a single GPU.
|
||||
|
||||
## Configuration Tips
|
||||
- `--limit-mm-per-prompt '{"image": N}'` caps images per request (default 1).
|
||||
- Set `--max-model-len` to match your workload (up to 32K).
|
||||
- `--gpu-memory-utilization 0.90–0.95` maximizes KV cache capacity.
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-VL-1.6B)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
@@ -0,0 +1,149 @@
|
||||
meta:
|
||||
title: "LFM2.5 VL 450M"
|
||||
slug: "lfm2.5-vl-450m"
|
||||
provider: "LiquidAI"
|
||||
description: "Liquid AI's smallest vision-language model (450M) — LFM2 hybrid LM backbone plus a SigLIP2 vision tower for image+text chat, light enough for edge GPUs."
|
||||
date_added: 2026-06-25
|
||||
date_updated: 2026-06-24
|
||||
tasks:
|
||||
- multimodal
|
||||
performance_headline: "450M vision-language model (hybrid LM + SigLIP2 vision) — image understanding light enough for edge / on-device serving"
|
||||
related_recipes:
|
||||
- LiquidAI/LFM2.5-VL-1.6B
|
||||
- LiquidAI/LFM2.5-350M
|
||||
hardware:
|
||||
h100: verified
|
||||
h200: verified
|
||||
b200: verified
|
||||
|
||||
model:
|
||||
model_id: "LiquidAI/LFM2.5-VL-450M"
|
||||
min_vllm_version: "0.23.0"
|
||||
architecture: dense
|
||||
parameter_count: "450M"
|
||||
active_parameters: "450M"
|
||||
context_length: 32768
|
||||
base_args: []
|
||||
base_env: {}
|
||||
|
||||
variants:
|
||||
default:
|
||||
precision: bf16
|
||||
vram_minimum_gb: 2
|
||||
description: "Full BF16 (LM + vision encoder) — fits essentially any GPU"
|
||||
|
||||
compatible_strategies:
|
||||
- single_node_tp
|
||||
|
||||
hardware_overrides:
|
||||
# Blackwell (B200) only: route RMSNorm to the bundled oink kernels (measured ~+2.6% on B200,
|
||||
# output identical). Inert (falls back to native) on non-Blackwell GPUs.
|
||||
blackwell:
|
||||
extra_env:
|
||||
VLLM_USE_OINK_OPS: "1"
|
||||
strategy_overrides:
|
||||
single_node_tp:
|
||||
tp: 1
|
||||
|
||||
guide: |
|
||||
## Overview
|
||||
|
||||
[LFM2.5-VL-450M](https://huggingface.co/LiquidAI/LFM2.5-VL-450M) is the smallest vision-language
|
||||
model in [Liquid AI's](https://www.liquid.ai/) LFM2.5-VL family — a SigLIP2 vision encoder on
|
||||
top of the **LFM2 hybrid language backbone** (short-range gated convolution blocks interleaved
|
||||
with grouped-query attention). It is light enough for edge and on-device image understanding,
|
||||
served through vLLM's OpenAI-compatible API.
|
||||
|
||||
### Key Features
|
||||
- **Vision-language**: SigLIP2 vision encoder on top of the LFM2 hybrid language backbone — single- and multi-image prompts.
|
||||
- **Edge-ready**: ~1 GB of BF16 weights — runs on commodity and on-device GPUs.
|
||||
- **Hybrid LM backbone**: Gated short convolutions interleaved with grouped-query attention — a smaller KV cache and lower decode latency than a same-size full-attention transformer.
|
||||
- **32K context**: 32,768-token context window.
|
||||
- **Native vLLM support**: Served via the `Lfm2VlForConditionalGeneration` architecture.
|
||||
|
||||
### Supported Variants
|
||||
|
||||
Vision-Language:
|
||||
- `LiquidAI/LFM2.5-VL-450M` (450M)
|
||||
- `LiquidAI/LFM2.5-VL-1.6B` (1.6B)
|
||||
|
||||
Text (same LFM2 family):
|
||||
- Dense: `LiquidAI/LFM2.5-230M`, `LiquidAI/LFM2.5-350M`, `LiquidAI/LFM2.5-1.2B-Instruct`, `LiquidAI/LFM2.5-1.2B-Thinking`, `LiquidAI/LFM2.5-1.2B-JP`, `LiquidAI/LFM2.5-1.2B-JP-202606`, `LiquidAI/LFM2.5-1.2B-Base`
|
||||
- MoE: `LiquidAI/LFM2.5-8B-A1B`
|
||||
|
||||
See the [LFM2.5 usage guide](../../LiquidAI/LFM2.5) for the full family.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Hardware**: 1× GPU (~1–2 GB VRAM for weights; any modern GPU works).
|
||||
- **vLLM**: ≥ 0.23.0.
|
||||
|
||||
### pip (NVIDIA CUDA)
|
||||
```bash
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -U vllm --torch-backend auto
|
||||
```
|
||||
|
||||
## Deployment Configurations
|
||||
|
||||
### Quick Start (Single GPU, BF16)
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-VL-450M
|
||||
```
|
||||
|
||||
### Multiple Images per Request
|
||||
```bash
|
||||
vllm serve LiquidAI/LFM2.5-VL-450M \
|
||||
--limit-mm-per-prompt '{"image": 4}' \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker (NVIDIA)
|
||||
```bash
|
||||
docker run -itd --name lfm2.5-vl-450m \
|
||||
--ipc=host --network host --shm-size 16G --gpus all \
|
||||
-v ~/.cache/huggingface:/root/.cache/huggingface \
|
||||
vllm/vllm-openai:latest \
|
||||
--model LiquidAI/LFM2.5-VL-450M \
|
||||
--host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
## Client Usage
|
||||
|
||||
### Image Understanding
|
||||
Send an image + text turn via the OpenAI chat API. The card recommends temperature `0.1`,
|
||||
`min_p 0.15`, `repetition_penalty 1.05` (`min_p` and `repetition_penalty` ride in `extra_body`).
|
||||
```python
|
||||
from openai import OpenAI
|
||||
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
|
||||
response = client.chat.completions.create(
|
||||
model="LiquidAI/LFM2.5-VL-450M",
|
||||
messages=[{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{"type": "image_url", "image_url": {"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"}},
|
||||
{"type": "text", "text": "What is in this image?"},
|
||||
],
|
||||
}],
|
||||
temperature=0.1,
|
||||
extra_body={"min_p": 0.15, "repetition_penalty": 1.05},
|
||||
)
|
||||
print(response.choices[0].message.content)
|
||||
```
|
||||
|
||||
### Multiple Images
|
||||
Launch with `--limit-mm-per-prompt '{"image": N}'`, then include several `image_url` blocks in
|
||||
one message to compare or reason across images.
|
||||
|
||||
## Configuration Tips
|
||||
- At 450M the model fits any GPU; ideal for edge / on-device image understanding.
|
||||
- `--limit-mm-per-prompt '{"image": N}'` caps images per request (default 1).
|
||||
- Set `--max-model-len` to match your workload (up to 32K).
|
||||
- Sampling presets are per-request client defaults — don't bake them into `vllm serve`.
|
||||
|
||||
## References
|
||||
- [Model card](https://huggingface.co/LiquidAI/LFM2.5-VL-450M)
|
||||
- [LFM2.5 usage guide](../../LiquidAI/LFM2.5)
|
||||
- [Liquid AI](https://www.liquid.ai/)
|
||||
- [vLLM supported models](https://docs.vllm.ai/en/latest/models/supported_models.html)
|
||||
Reference in New Issue
Block a user