alt.freeweights.lfm / LFM2-VL-450M-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.lfmSubject:

LFM2-VL-450M-ONNX

Date: 2026-11-15Commit: 308cf78Signed: 2DC28CC7B26A283B ✓

Image text to text model. Onnx weights, 4.48 GB in all. Published by onnx-community under LFM-1.0 (custom).

lfm4.48GBLFM2-VL-450M-ONNXonnxcustom terms
FactsParamsnot statedSize4.48 GBFormatsonnxTaskimage text to textLicenseLFM-1.0 (custom)From sourcecustom termsread terms
# custom terms: read the license before you download
$ fw get onnx-community/LFM2-VL-450M-ONNX
# manifest sha256 33623e496aa9… · 4.48 GB · 39 files
$ fw verify ./LFM2-VL-450M-ONNX onnx-community/LFM2-VL-450M-ONNX
From sourceHosted (signed)onnx-community/LFM2-VL-450M-ONNXLast check: 2026-11-15 00:22 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of LFM2-VL-450M.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Overview

Size
4.48 GB
Weights
38.8 MB (smallest of 15 ONNX variants)
Parameters
not stated
Formats
onnx
Task
image text to text
License
LFM-1.0 (custom) (custom)
Files
39, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.lfm
Lineage

Original release from the publisher.

Base model: LiquidAI/LFM2-VL-450M

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 00:22 UTCpassed

Model card

From the publisher at commit 308cf78. Shown as plain text with links; images open at the publisher.

Image: Liquid AI

Try LFM • Documentation • LEAP

LFM2‑VL-450M#

LFM2‑VL is Liquid AI's first series of multimodal models, designed to process text and images with variable resolutions. Built on the LFM2 backbone, it is optimized for low-latency and edge AI applications.

We're releasing the weights of two post-trained checkpoints with 450M (for highly constrained devices) and 1.6B (more capable yet still lightweight) parameters.

  • 2× faster inference speed on GPUs compared to existing VLMs while maintaining competitive accuracy
  • Flexible architecture with user-tunable speed-quality tradeoffs at inference time
  • Native resolution processing up to 512×512 with intelligent patch-based handling for larger images, avoiding upscaling and distortion

Find more about our vision-language model in the LFM2-VL post and its language backbone in the LFM2 blog post.

📄 Model details#

Due to their small size, we recommend fine-tuning LFM2-VL models on narrow use cases to maximize performance. They were trained for instruction following and lightweight agentic flows. Not intended for safety‑critical decisions.

PropertyLFM2-VL-450MLFM2-VL-1.6B
Parameters (LM only)350M1.2B
Vision encoderSigLIP2 NaFlex base (86M)SigLIP2 NaFlex shape‑optimized (400M)
Backbone layershybrid conv+attentionhybrid conv+attention
Context (text)32,768 tokens32,768 tokens
Image tokensdynamic, user‑tunabledynamic, user‑tunable
Vocab size65,53665,536
Precisionbfloat16bfloat16
LicenseLFM Open License v1.0LFM Open License v1.0

Supported languages: English

Generation parameters: We recommend the following parameters:

  • Text: temperature=0.1, min_p=0.15, repetition_penalty=1.05
  • Vision: min_image_tokens=64 max_image_tokens=256, do_image_splitting=True

Chat template: LFM2-VL uses a ChatML-like chat template as follows:

<|startoftext|><|im_start|>system
You are a helpful multimodal assistant by Liquid AI.<|im_end|>
<|im_start|>user
<image>Describe this image.<|im_end|>
<|im_start|>assistant
This image shows a Caenorhabditis elegans (C. elegans) nematode.<|im_end|>

Images are referenced with a sentinel (<image>), which is automatically replaced with the image tokens by the processor.

You can apply it using the dedicated .apply_chat_template() function from Hugging Face transformers.

Architecture

  • Hybrid backbone: Language model tower (LFM2-1.2B or LFM2-350M) paired with SigLIP2 NaFlex vision encoders (400M shape-optimized or 86M base variant)
  • Native resolution processing: Handles images up to 512×512 pixels without upscaling and preserves non-standard aspect ratios without distortion
  • Tiling strategy: Splits large images into non-overlapping 512×512 patches and includes thumbnail encoding for global context (in 1.6B model)
  • Efficient token mapping: 2-layer MLP connector with pixel unshuffle reduces image tokens (e.g., 256×384 image → 96 tokens, 1000×3000 → 1,020 tokens)
  • Inference-time flexibility: User-tunable maximum image tokens and patch count for speed/quality tradeoff without retraining

Training approach

  • Builds on the LFM2 base model with joint mid-training that fuses vision and language capabilities using a gradually adjusted text-to-image ratio
  • Applies joint SFT with emphasis on image understanding and vision tasks
  • Leverages large-scale open-source datasets combined with in-house synthetic vision data, selected for balanced task coverage
  • Follows a progressive training strategy: base model → joint mid-training → supervised fine-tuning

🏃 How to run LFM2-VL#

ONNXRuntime#
from transformers import AutoConfig, AutoProcessor
from transformers.image_utils import load_image
import onnxruntime
import numpy as np
from huggingface_hub import hf_hub_download

# 1. Load config, processor, and model
model_id = "onnx-community/LFM2-VL-450M-ONNX"
config = AutoConfig.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id)

local_dir = 'LFM2-VL-450M-ONNX'
vision_model_path = hf_hub_download(model_id, "vision_encoder.onnx", subfolder="onnx", local_dir=local_dir)         # Download vision graph
hf_hub_download(model_id, "vision_encoder.onnx_data", subfolder="onnx", local_dir=local_dir)                        # Download vision weights
embed_model_path = hf_hub_download(model_id, "embed_tokens.onnx", subfolder="onnx", local_dir=local_dir)            # Download embed_tokens graph
hf_hub_download(model_id, "embed_tokens.onnx_data", subfolder="onnx", local_dir=local_dir)                          # Download embed_tokens weights
decoder_model_path = hf_hub_download(model_id, "decoder_model_merged.onnx", subfolder="onnx", local_dir=local_dir)  # Download decoder graph
hf_hub_download(model_id, "decoder_model_merged.onnx_data", subfolder="onnx", local_dir=local_dir)                  # Download decoder weights

## Load sessions
providers = ['CPUExecutionProvider']
vision_session = onnxruntime.InferenceSession(vision_model_path, providers=providers)
embed_session = onnxruntime.InferenceSession(embed_model_path, providers=providers)
decoder_session = onnxruntime.InferenceSession(decoder_model_path, providers=providers)

## Set config values
text_config = config.text_config
num_key_value_heads = text_config.num_key_value_heads
head_dim = text_config.hidden_size // text_config.num_attention_heads
num_hidden_layers = text_config.num_hidden_layers
eos_token_id = text_config.eos_token_id
hidden_size = text_config.hidden_size
conv_L_cache = text_config.conv_L_cache
layer_types = text_config.layer_types
image_token_index = config.image_token_index

# 2. Prepare inputs
image_url = "https://www.ilankelman.org/stopsigns/australia.jpg"
image = load_image(image_url)
messages = [
  {
    "role": "user",
    "content": [
      {"type": "image", "image": image},
      {"type": "text", "text": "What is in this image?"},
    ],
  },
]
inputs = processor.apply_chat_template(
  messages,
  add_generation_prompt=True,
  return_tensors="pt",
  return_dict=True,
  tokenize=True,
)

input_ids = inputs['input_ids'].numpy()
attention_mask = inputs['attention_mask'].numpy()
has_vision_inputs = 'pixel_values' in inputs
pixel_values = inputs['pixel_values'].numpy() if has_vision_inputs else None
pixel_attention_mask = inputs['pixel_attention_mask'].numpy().astype(np.int64) if has_vision_inputs else None
spatial_shapes = inputs['spatial_shapes'].numpy() if has_vision_inputs else None

batch_size = input_ids.shape[0]
past_cache_values = {}
for i in range(num_hidden_layers):
  if layer_types[i] == 'full_attention':
    for kv in ('key', 'value'):
      past_cache_values[f'past_key_values.{i}.{kv}'] = np.zeros([batch_size, num_key_value_heads, 0, head_dim], dtype=np.float32)
  elif layer_types[i] == 'conv':
    past_cache_values[f'past_conv.{i}'] = np.zeros([batch_size, hidden_size, conv_L_cache], dtype=np.float32)
  else:
    raise ValueError(f"Unsupported layer type: {layer_types[i]}")

# 3. Generation loop
max_new_tokens = 1024
generated_tokens = np.array([[]], dtype=np.int64)
image_features = None
for i in range(max_new_tokens):
  inputs_embeds = embed_session.run(None, {'input_ids': input_ids})[0]

  if has_vision_inputs and image_features is None:
    ## Only compute vision features if not already computed
    image_features = vision_session.run(None, dict(
      pixel_values=pixel_values,
      pixel_attention_mask=pixel_attention_mask,
      spatial_shapes=spatial_shapes,
    ))[0]

    ## Merge text and vision embeddings
    inputs_embeds[input_ids == image_token_index] = image_features.reshape(-1, image_features.shape[-1])

  logits, *present_cache_values = decoder_session.run(None, dict(
    inputs_embeds=inputs_embeds,
    attention_mask=attention_mask,
    **past_cache_values,
  ))

  ## Update values for next generation loop
  input_ids = logits[:, -1].argmax(-1, keepdims=True)
  attention_mask = np.concatenate([attention_mask, np.ones((batch_size, 1), dtype=attention_mask.dtype)], axis=-1)
  for j, key in enumerate(past_cache_values):
    past_cache_values[key] = present_cache_values[j]

  generated_tokens = np.concatenate([generated_tokens, input_ids], axis=-1)
  if np.isin(input_ids, eos_token_id).any():
    break

  ## (Optional) Streaming
  print(processor.decode(input_ids[0], skip_special_tokens=False), end='', flush=True)
print()

# 4. Output result
print(processor.batch_decode(generated_tokens, skip_special_tokens=False)[0])

🔧 How to fine-tune#

We recommend fine-tuning LFM2-VL models on your use cases to maximize performance.

NotebookDescriptionLink
SFT (TRL)Supervised Fine-Tuning (SFT) notebook with a LoRA adapter using TRL.Colab link

📈 Performance#

ModelRealWorldQAMM-IFEvalInfoVQA (Val)OCRBenchBLINKMMStarMMMU (Val)MathVistaSEEDBench_IMGMMVetMMEMMLU
InternVL3-2B65.1038.4966.1083153.1061.1048.7057.6075.0067.002186.4064.80
InternVL3-1B57.0031.1454.9479843.0052.3043.2046.9071.2058.701912.4049.80
SmolVLM2-2.2B57.5019.4237.7572542.3046.0041.6051.5071.3034.901792.50-
LFM2-VL-1.6B65.2337.6658.6874244.4049.5338.4451.1071.9748.071753.0450.99
ModelRealWorldQAMM-IFEvalInfoVQA (Val)OCRBenchBLINKMMStarMMMU (Val)MathVistaSEEDBench_IMGMMVetMMEMMLU
SmolVLM2-500M49.9011.2724.6460940.7038.2034.1037.5062.2029.901448.30-
LFM2-VL-450M52.2926.1846.5165541.9840.8733.1144.7063.5033.761239.0640.16

We obtained MM-IFEval and InfoVQA (Val) scores for InternVL 3 and SmolVLM2 models using VLMEvalKit.

📬 Contact#

If you are interested in custom solutions with edge deployment, please contact our sales team.

Citation#

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

Files

39 files · 4.48 GBWeights 38.8 MB (smallest of 15 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 39 files with their sha256
FileSizesha256
.gitattributes2.60 KB507353881b17a0e6d95a228cbe2e268b7b1204de3cca1bf41823e40a00ab0e12
README.md12.6 KB2f89925f19a51e2c0e960fb3c30d547cc4ed0dfb24e46e935577f30c7d2d49ad
chat_template.jinja434 Bcf0af741b36248dfe460af825b0b3acb3c651cf7dd40a74c29447f60b75d2b9b
config.json2.54 KB83bdcf699bed512982eab11a3148b2b88d12a4a5eea5e5349b27b7054dd81a52
generation_config.json136 B40d17f9ec64c97e8fd5400540960b6a9761ed6d6acc0b1ab6a6656055e4755b3
onnx/decoder_model_merged.onnx142 KBed1679df05c66c0fd9db95301cf5c68d40b2e67fc8746c4bc32040dbf657d612
onnx/decoder_model_merged.onnx_data1.45 GBa553d8de9d2419fda56d3c52580fa4881d00e95a64de14f76fb3f4e1a7872268
onnx/decoder_model_merged_fp16.onnx142 KB730e7cdeb56f569c73be29e5201d3824c5542ee64c4da95143e9bfd7962345f5
onnx/decoder_model_merged_fp16.onnx_data725 MB574e2977de9bb6e3ced134912688a32bc59523d7fd31bacddc5f927f13348045
onnx/decoder_model_merged_q4.onnx187 KB373d962a99a27a5e8b724fffdf8ecd9cbf2551c0cf98fe105355587298bca587
onnx/decoder_model_merged_q4.onnx_data260 MB24fe2caafbec5348f359402c9535d397a92589b10294d591dff57e663ea7d43d
onnx/decoder_model_merged_q4f16.onnx187 KB757583550381215fcf433f67b2b5989601d2994e7c098b5e6ce4e115daec6f7a
onnx/decoder_model_merged_q4f16.onnx_data221 MB6f98df4ee1cd06536523be2620338926b3a207b78d009d33bff46bba49aa2182
onnx/decoder_model_merged_quantized.onnx190 KB88a751afc69e65f32646406553783ab2dad71b63eb2eaa90c083281eea9b733e
onnx/decoder_model_merged_quantized.onnx_data443 MB882f9b3483c00e37b53b7e71e69d7926d25f6e0e1d1bcc4e536a1dcee70b93f0
onnx/embed_tokens.onnx434 Ba3fdfb2e2e3a0b69a328ab6c674e37e2aeb45b9637c44fa150a51d6ccbc90258
onnx/embed_tokens.onnx_data268 MB9f2f80777dd5b1ff21748f16dda6e3a2c5fde507636cff0b12ecafe158e6a7c0
onnx/embed_tokens_fp16.onnx637 B4e12bdaca4b895f95576c5dcc68324691cdcc7fd0912f3900809045381f82f79
onnx/embed_tokens_fp16.onnx_data134 MB22f5280b399bfd778e3ba20a0b27535b3b651eb54949b194c3bc88124dc0a53e
onnx/embed_tokens_q4.onnx853 Bf0d663cbf75fc6a0c7b9669177335139b0c5a63575c6413037d48501eea0c4a5
onnx/embed_tokens_q4.onnx_data43.0 MB5e87e7f4dd5bd16b2dc93bd15c0a04977a4ecb408edb64904e239a73dbaf0ca5
onnx/embed_tokens_q4f16.onnx1.06 KB8b0b2f8ce26a383d2064bac1949f0fee763dfc5625efa6b15166f6b115f23836
onnx/embed_tokens_q4f16.onnx_data38.8 MBae05c0956c48ab41235688fa984a1e1527c2ae591bd7c1d12763dc75da8861d2
onnx/embed_tokens_quantized.onnx875 B42a036e66fb394db463db62d2cba29e45099be5d8f44b6435293d7bfe1cab30e
onnx/embed_tokens_quantized.onnx_data77.6 MB4af6858c07bd3d00e54b7afc3552bb48a317d367bd895dcd12fae5db68d6ea39
onnx/vision_encoder.onnx150 KB5dffb6068ce6e1de4e6095d1c291885a48ad00448f8bd43b4f8b4d70c12054f6
onnx/vision_encoder.onnx_data385 MB292c386944d32ca169deaf841c40ac43905e80e3c5bb350eef6a51945673cbb1
onnx/vision_encoder_fp16.onnx152 KBeaec1d8903e18e5c9ca692c2a56b1d6716408dbfe894232cae584807df45ffd7
onnx/vision_encoder_fp16.onnx_data193 MB5e6930887b24c57b9b4ded9cfb629d312ddf1990afeae1c905101d5a82a0fad2
onnx/vision_encoder_q4.onnx185 KBb96aec6e314f5359f2a07cf1581947ee7c3030f61f4b74b524491a1151fa40ab
onnx/vision_encoder_q4.onnx_data62.8 MB8b8e29c4628ca7d384ca117a1ba0a9d86923114f1b4a69f01cb4991b8887b8aa
onnx/vision_encoder_q4f16.onnx187 KB56e338d85cdd53eed28478402f7a5e8a27b24cfc3a771e569df61cda0b941e25
onnx/vision_encoder_q4f16.onnx_data56.2 MB32a45109884fc243aa6daa5443b18e487183d33e347db85c6943a8bfe8149f6b
onnx/vision_encoder_quantized.onnx187 KB549a1a8ee042fcdedf1e8706bde0d766eb159f43a4eb42c994d943e2847b4710
onnx/vision_encoder_quantized.onnx_data112 MBba25e9016d236abfdc0ef04d9b1d31b3b291e86e92e76e5a7650ac4892639d14
preprocessor_config.json1.00 KBe0b0a180d1e8f8be68af1d96b642bd93d3a88fd49b7391498eb1c4ab24e87de0
processor_config.json1.16 KB28568d416f22025674da8d384980e0e00012242d833098d800d524b659825f47
tokenizer.json3.30 MB110f0ce6590eb6dfc502d56926e76935d2f2aee68fa78db2202295913fb73168
tokenizer_config.json1.42 KB872cce3cebd7216cd17eeddc25d50087e6c62127dc53eb608edad5f95fe60b38
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
308cf784b3 pinned now2026-11-15 00:22 UTC39 files · 4.48 GB

Use it

# custom terms: read the license before you download
$ fw get onnx-community/LFM2-VL-450M-ONNX
# manifest sha256 33623e496aa9… · 4.48 GB · 39 files
$ fw verify ./LFM2-VL-450M-ONNX onnx-community/LFM2-VL-450M-ONNX
Terms that come with these files. LFM 1.0: commercial use only for organisations under US$10M annual revenue. Keep a copy of the license with the files.
Custom license (custom). Read the license text first. Open this panel to show the commands once you accept its terms.
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/LFM2-VL-450M-ONNX.json --dir ./LFM2-VL-450M-ONNX $ python3 fw.py verify ./LFM2-VL-450M-ONNX ./onnx-community__LFM2-VL-450M-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/LFM2-VL-450M-ONNX --revision 308cf784b35ce25274540e1bf5592c33a0433469 --local-dir ./LFM2-VL-450M-ONNX

License

Name
LFM Open License v1.0
Id
LicenseRef-LFM-1.0
Class
Custom terms
Redistribution
click-through
Listing
Hosted (signed)
Terms
LFM 1.0: commercial use only for organisations under US$10M annual revenue. Keep a copy of the license with the files.
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
2f89925f19a51e2c0e960fb3c30d547cc4ed0dfb24e46e935577f30c7d2d49ad
Terms gate
Yes. The commands stay folded until you open them after reading the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.lfmSubject: LFM2-VL-450M-ONNXDate: 2026-11-15Commit: 308cf78Signed: 2DC28CC7B26A283B ✓
Upstream
onnx-community/LFM2-VL-450M-ONNX
Pinned commit
308cf784b35ce25274540e1bf5592c33a0433469
Manifest
LFM2-VL-450M-ONNX.json · .minisig
Manifest sha256
33623e496aa9bd5ad13132e5006122cb79a76acbb1095b0ff3011fccec36d624
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 00:22 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/LFM2-VL-450M-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/LFM2-VL-450M-ONNX.json.minisig $ minisign -Vm LFM2-VL-450M-ONNX.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

LiquidAI/LFM2-VL-450M · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Read license, then download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/LFM2-VL-450M-ONNX
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. LFM2-VL-450M-ONNX.json. Provenance. Takedown history: none.
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B-Extract
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B-RAG
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-1.2B-Tool
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-2.6B
From: LiquidAI <huggingface.co/LiquidAI>Subject: LFM2-2.6B-Exp