CoolFace
Modelpublic

LeoFortunato/LFM2.5-VL-450M-Extract-MLX-bf16

sourceHugging Faceotherupdated 1mo agoView on Hugging Face
0likes97downloads
Model Card

<center> <div style="text-align: center;"> <img src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png" alt="Liquid AI" style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;" /> </div> <div style="display: flex; justify-content: center; gap: 0.5em;"> <a href="https://playground.liquid.ai/chat?model=lfm2.5-vl-450m"><strong>Try LFM</strong></a> • <a href="https://docs.liquid.ai/lfm/getting-started/welcome"><strong>Docs</strong></a> • <a href="https://leap.liquid.ai/"><strong>LEAP</strong></a> • <a href="https://discord.com/invite/liquid-ai"><strong>Discord</strong></a> </div> </center>

<br>

LFM2.5-VL-450M-Extract-MLX-bf16

LFM2.5-VL-450M-Extract-MLX-bf16 is the unquantized bfloat16 baseline Apple Silicon MLX port of Liquid AI's LFM2.5-VL-450M-Extract. It extracts user-defined fields from images and returns them as strict JSON, running natively in full bfloat16 precision on Apple Silicon (M1/M2/M3/M4) devices via MLX and mlx-vlm.

⚙️ How it works

You specify what to extract as a YAML field list in the system prompt, and the model returns a JSON object with those fields.

  • —System prompt:
yaml
wood_color: The overall coloration of the wood surface
wood_texture: The tactile quality of the wood surface 
wood_pattern: The pattern types visible on the wood surface
  • —Output:
json
{
  "wood_color": "light to medium brown",
  "wood_texture": "smooth with visible grain",
  "wood_pattern": "parallel, irregular, wavy"
}

Our model also supports enum constrained definitions:

yaml
wood_color: The overall coloration of the wood surface, such as blue, red, or light tan
wood_texture: The tactile quality of the wood surface, select from smooth, rough, or grainy
wood_pattern: The pattern types visible on the wood surface, e.g., straight, wavy, or curly

📄 Model Details

PropertyDetail
Base ModelLiquidAI/LFM2.5-VL-450M-Extract
Parameters (LM only)350M
Vision EncoderSigLIP2 (~100M, SigLIP-2 paper)
Precisionbfloat16 (unquantized baseline)
Weights Size~897 MB (model.safetensors)
Context Window128,000 tokens
Runtime / LibraryApple Silicon MLX (mlx_vlm)
LicenseLFM Open License v1.0

📊 Conversion Specs & Resource Usage

  • —Conversion Parameters: python -m mlx_vlm.convert --hf-path LiquidAI/LFM2.5-VL-450M-Extract --dtype bfloat16
  • —Memory Footprint: ~900 MB active unified memory during inference.
Model VariantPrecisionGroup SizeWeight SizeEst. Unified RAM
LFM2.5-VL-450M-Extract-MLX-4bit4-bit (int4)64~388 MB~400 MB
LFM2.5-VL-450M-Extract-MLX-8bit8-bit (int8)64~565 MB~600 MB
LFM2.5-VL-450M-Extract-MLX-bf16bfloat16N/A~897 MB~900 MB

🏃 How to run with MLX

1. Install dependencies

bash
pip install mlx-vlm pillow

2. Run inference in Python

python
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template
from mlx_vlm.utils import load_image

model_id = "LeoFortunato/LFM2.5-VL-450M-Extract-MLX-bf16"
model, processor = load(model_id)

image = load_image("https://huggingface.co/LiquidAI/LFM2.5-VL-450M-Extract/resolve/main/sample_image.png")

fields_yaml = """wood_color: The overall coloration of the wood surface
wood_texture: The tactile quality of the wood surface
wood_pattern: The pattern types visible on the wood surface"""

system_prompt = f"""Extract the following from the image:

{fields_yaml}

Respond with only a JSON object. Do not include any text outside the JSON."""

formatted_prompt = apply_chat_template(
    processor,
    processor.config,
    system_prompt,
    num_images=1
)

output = generate(
    model,
    processor,
    formatted_prompt,
    image=[image],
    max_tokens=512,
    temperature=0.0,
    verbose=False
)
print(output)

📬 Citation & Contact

bibtex
@article{liquidai2025lfm2,
 title={LFM2 Technical Report},
 author={Liquid AI},
 journal={arXiv preprint arXiv:2511.23404},
 year={2025}
}