Instructions to use Dadm-n/LFM2.5-VL-450M-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Dadm-n/LFM2.5-VL-450M-mlx 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("Dadm-n/LFM2.5-VL-450M-mlx") config = load_config("Dadm-n/LFM2.5-VL-450M-mlx") # 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 Dadm-n/LFM2.5-VL-450M-mlx with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Dadm-n/LFM2.5-VL-450M-mlx"
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": "Dadm-n/LFM2.5-VL-450M-mlx" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Dadm-n/LFM2.5-VL-450M-mlx 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 "Dadm-n/LFM2.5-VL-450M-mlx"
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 Dadm-n/LFM2.5-VL-450M-mlx
Run Hermes
hermes
Try LFM • Documentation • LEAP • Blog
LFM2.5-VL-450M-MLX-bf16
MLX export of LFM2.5-VL-450M for Apple Silicon inference.
LFM2.5-VL-450M is a vision-language model built on the LFM2.5-350M backbone with a SigLIP2 NaFlex vision encoder (86M). It supports OCR, document comprehension, multilingual vision understanding, bounding box prediction, and function calling.
Model Details
| Property | Value |
|---|---|
| Parameters | 450M |
| Precision | bfloat16 |
| Size | 0.84 GB |
| Context Length | 32K |
| Vision Encoder | SigLIP2 NaFlex (86M) |
| Native Resolution | up to 512x512 |
Quickstart
uv pip install 'mlx-vlm==0.3.9'
from mlx_vlm import load, generate
from mlx_vlm.utils import load_image
model, processor = load("LiquidAI/LFM2.5-VL-450M-MLX-bf16")
image = load_image("photo.jpg")
# Apply chat template (required for LFM2.5-VL)
messages = [{"role": "user", "content": [
{"type": "image"},
{"type": "text", "text": "What do you see in this image?"},
]}]
prompt = processor.apply_chat_template(messages, add_generation_prompt=True)
result = generate(
model,
processor,
prompt,
[image],
temp=0.1,
min_p=0.15,
repetition_penalty=1.05,
verbose=True,
)
print(result.text)
Recommended Sampling Parameters
| Parameter | Value |
|---|---|
| temperature | 0.1 |
| min_p | 0.15 |
| repetition_penalty | 1.05 |
License
This model is released under the LFM 1.0 License.
- Downloads last month
- 14
Model size
0.4B params
Tensor type
BF16
·
Hardware compatibility
Log In to add your hardware
Quantized
Model tree for Dadm-n/LFM2.5-VL-450M-mlx
Base model
LiquidAI/LFM2.5-350M-Base Finetuned
LiquidAI/LFM2.5-350M Finetuned
LiquidAI/LFM2.5-VL-450M