Instructions to use z0lo/LFM2.5-VL-1.6B-Extract-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use z0lo/LFM2.5-VL-1.6B-Extract-4bit with MLX:
# Make sure mlx-vlm is installed # pip install --upgrade mlx-vlm from mlx_vlm import load, generate from mlx_vlm.prompt_utils import apply_chat_template from mlx_vlm.utils import load_config # Load the model model, processor = load("z0lo/LFM2.5-VL-1.6B-Extract-4bit") config = load_config("z0lo/LFM2.5-VL-1.6B-Extract-4bit") # Prepare input image = ["http://images.cocodataset.org/val2017/000000039769.jpg"] prompt = "Describe this image." # Apply chat template formatted_prompt = apply_chat_template( processor, config, prompt, num_images=1 ) # Generate output output = generate(model, processor, formatted_prompt, image) print(output) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use z0lo/LFM2.5-VL-1.6B-Extract-4bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "z0lo/LFM2.5-VL-1.6B-Extract-4bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "z0lo/LFM2.5-VL-1.6B-Extract-4bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use z0lo/LFM2.5-VL-1.6B-Extract-4bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "z0lo/LFM2.5-VL-1.6B-Extract-4bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default z0lo/LFM2.5-VL-1.6B-Extract-4bit
Run Hermes
hermes
- OpenClaw new
How to use z0lo/LFM2.5-VL-1.6B-Extract-4bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "z0lo/LFM2.5-VL-1.6B-Extract-4bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "z0lo/LFM2.5-VL-1.6B-Extract-4bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
LFM2.5-VL-1.6B-Extract — MLX 4-bit
This repository contains an MLX affine 4-bit conversion of
LiquidAI/LFM2.5-VL-1.6B-Extract
at the immutable upstream revision
21073aa65b326c125ceb07d80fa08900bc2eb0d9.
This is the Extract checkpoint, not the general
LiquidAI/LFM2.5-VL-1.6B checkpoint and not
mlx-community/LFM2.5-VL-1.6B-4bit.
Artifact details
| Property | Value |
|---|---|
| Architecture | LFM2.5-VL: 1.2B LFM2 language model plus approximately 400M SigLIP2 vision encoder |
| Model type | lfm2_vl |
| Weight format | MLX-compatible safetensors |
| Quantization | MLX affine 4-bit |
| Quantization group size | 64 |
| Evaluated conversion runtime | mlx-vlm==0.6.7 |
| Model weights | 1,511,170,678 bytes |
| Complete runtime snapshot | 1,515,976,304 bytes |
This is an MLX checkpoint. It is not a Core ML model and is not the
original upstream BF16 Transformers checkpoint. A runtime must explicitly
support the lfm2_vl architecture; the presence of MLX weights does not imply
compatibility with every MLX or MLX Swift release.
Important configuration note
The converted config.json intentionally sets:
{
"text_config": {
"block_ff_dim": 12288
}
}
The upstream source configuration omits this field. During conversion,
mlx-vlm==0.6.7 otherwise selected the 450M-model default and produced
incorrect feed-forward tensor shapes. The value 12288 matches the Extract
checkpoint's source tensors. No source tensors were changed or dropped.
Loading with MLX-VLM
The conversion was evaluated with:
pip install mlx-vlm==0.6.7
from mlx_vlm import load
model, processor = load(
"z0lo/LFM2.5-VL-1.6B-Extract-4bit",
adapter_path=None,
lazy=False,
trust_remote_code=True,
)
Use deterministic greedy decoding (temperature=0) for extraction, as
recommended by the upstream model card.
Intended use and limitations
The upstream model is designed for a single image, a YAML field list in the system prompt, and a flat JSON object as output. This conversion was created for on-device structured-extraction evaluation.
Quantization and runtime differences can affect model quality. JSON or schema validity does not establish factual accuracy. Validate extracted values against the source image before applying them to production data.
This converted checkpoint has not been independently qualified for arbitrary multi-image reasoning, free-form visual question answering, or every MLX runtime.
License and attribution
The original model and this converted checkpoint are governed by the
LFM Open License v1.0. See LICENSE and review its terms
before using or redistributing the model.
Original model: Copyright Liquid AI, Inc.
- Downloads last month
- 51
4-bit
Model tree for z0lo/LFM2.5-VL-1.6B-Extract-4bit
Base model
LiquidAI/LFM2.5-1.2B-Base