alt.freeweights.lfm / LFM2-2.6B-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.lfmSubject:

LFM2-2.6B-ONNX

Date: 2026-11-15Commit: 26718ccSigned: 2DC28CC7B26A283B ✓

Text generation model. Onnx weights, 21.8 GB in all. Published by onnx-community under LFM-1.0 (custom).

lfm21.8GBLFM2-2.6B-ONNXonnxcustom terms
FactsParamsnot statedSize21.8 GBFormatsonnxTasktext generationLicenseLFM-1.0 (custom)From sourcecustom termsread terms
# custom terms: read the license before you download
$ fw get onnx-community/LFM2-2.6B-ONNX
# manifest sha256 b1ca9cb81677… · 21.8 GB · 26 files
$ fw verify ./LFM2-2.6B-ONNX onnx-community/LFM2-2.6B-ONNX
From sourceHosted (signed)onnx-community/LFM2-2.6B-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-2.6B.

Works with

Runs with

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

Convert with

Overview

Size
21.8 GB
Weights
1.66 GB (smallest of 5 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
License
LFM-1.0 (custom) (custom)
Files
26, 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-2.6B

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 26718cc. Shown as plain text with links; images open at the publisher.

Image: Liquid AI

https://playground.liquid.ai/chat https://leap.liquid.ai/?utm_source=huggingface&utm_medium=modelcards

LFM2-2.6B#

LFM2 is a new generation of hybrid models developed by Liquid AI, specifically designed for edge AI and on-device deployment. It sets a new standard in terms of quality, speed, and memory efficiency.

We're releasing the weights of four post-trained checkpoints with 350M, 700M, 1.2B, and 2.6 parameters. They provide the following key features to create AI-powered edge applications:

  • Fast training & inference – LFM2 achieves 3x faster training compared to its previous generation. It also benefits from 2x faster decode and prefill speed on CPU compared to Qwen3.
  • Best performance – LFM2 outperforms similarly-sized models across multiple benchmark categories, including knowledge, mathematics, instruction following, and multilingual capabilities.
  • New architecture – LFM2 is a new hybrid Liquid model with multiplicative gates and short convolutions.
  • Flexible deployment – LFM2 runs efficiently on CPU, GPU, and NPU hardware for flexible deployment on smartphones, laptops, or vehicles.

Find more information about LFM2 in our blog post.

📄 Model details#

Due to their small size, we recommend fine-tuning LFM2 models on narrow use cases to maximize performance. They are particularly suited for agentic tasks, data extraction, RAG, creative writing, and multi-turn conversations. However, we do not recommend using them for tasks that are knowledge-intensive or require programming skills.

PropertyLFM2-350MLFM2-700MLFM2-1.2BLFM2-2.6B
Parameters354,483,968742,489,3441,170,340,6082,569,272,320
Layers16 (10 conv + 6 attn)16 (10 conv + 6 attn)16 (10 conv + 6 attn)30 (22 conv + 8 attn)
Context length32,768 tokens32,768 tokens32,768 tokens32,768 tokens
Vocabulary size65,53665,53665,53665,536
Precisionbfloat16bfloat16bfloat16bfloat16
Training budget10 trillion tokens10 trillion tokens10 trillion tokens10 trillion tokens
LicenseLFM Open License v1.0LFM Open License v1.0LFM Open License v1.0LFM Open License v1.0

Supported languages: English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish.

Generation parameters: We recommend the following parameters:

  • temperature=0.3
  • min_p=0.15
  • repetition_penalty=1.05

Reasoning: LFM2-2.6B is the only model in this family to use dynamic hybrid reasoning (traces between <think> and </think> tokens) for complex or multilingual prompts.

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

<|startoftext|><|im_start|>system
You are a helpful assistant trained by Liquid AI.<|im_end|>
<|im_start|>user
What is C. elegans?<|im_end|>
<|im_start|>assistant
It's a tiny nematode that lives in temperate soil environments.<|im_end|>

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

Tool use: It consists of four main steps:

  1. Function definition: LFM2 takes JSON function definitions as input (JSON objects between <|tool_list_start|> and <|tool_list_end|> special tokens), usually in the system prompt
  2. Function call: LFM2 writes Pythonic function calls (a Python list between <|tool_call_start|> and <|tool_call_end|> special tokens), as the assistant answer.
  3. Function execution: The function call is executed and the result is returned (string between <|tool_response_start|> and <|tool_response_end|> special tokens), as a "tool" role.
  4. Final answer: LFM2 interprets the outcome of the function call to address the original user prompt in plain text.

Here is a simple example of a conversation using tool use:

<|startoftext|><|im_start|>system
List of tools: <|tool_list_start|>[{"name": "get_candidate_status", "description": "Retrieves the current status of a candidate in the recruitment process", "parameters": {"type": "object", "properties": {"candidate_id": {"type": "string", "description": "Unique identifier for the candidate"}}, "required": ["candidate_id"]}}]<|tool_list_end|><|im_end|>
<|im_start|>user
What is the current status of candidate ID 12345?<|im_end|>
<|im_start|>assistant
<|tool_call_start|>[get_candidate_status(candidate_id="12345")]<|tool_call_end|>Checking the current status of candidate ID 12345.<|im_end|>
<|im_start|>tool
<|tool_response_start|>{"candidate_id": "12345", "status": "Interview Scheduled", "position": "Clinical Research Associate", "date": "2023-11-20"}<|tool_response_end|><|im_end|>
<|im_start|>assistant
The candidate with ID 12345 is currently in the "Interview Scheduled" stage for the position of Clinical Research Associate, with an interview date set for 2023-11-20.<|im_end|>

Architecture: Hybrid model with multiplicative gates and short convolutions: 10 double-gated short-range LIV convolution blocks and 6 grouped query attention (GQA) blocks.

Pre-training mixture: Approximately 75% English, 20% multilingual, and 5% code data sourced from the web and licensed materials.

Training approach:

  • Very large-scale SFT on 50% downstream tasks, 50% general domains
  • Custom DPO with length normalization and semi-online datasets
  • Iterative model merging

🏃 How to run LFM2#

Transformers.js#

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Basic example

import { pipeline, TextStreamer } from "@huggingface/transformers";

// Create a text generation pipeline
const generator = await pipeline(
  "text-generation",
  "onnx-community/LFM2-2.6B-ONNX",
  { dtype: "q4" },
);

// Define the list of messages
const messages = [
  { role: "system", content: "You are a helpful assistant." },
  { role: "user", content: "What is the capital of France?" },
];

// Generate a response
const output = await generator(messages, {
    max_new_tokens: 512,
    do_sample: false,
    streamer: new TextStreamer(generator.tokenizer, { skip_prompt: true, skip_special_tokens: true }),
});
console.log(output[0].generated_text.at(-1).content);
// The capital of France is Paris.

Example: Tool calling

import { AutoModelForCausalLM, AutoTokenizer, TextStreamer } from "@huggingface/transformers";

// Load tokenizer and model
const model_id = "onnx-community/LFM2-2.6B-ONNX";
const tokenizer = await AutoTokenizer.from_pretrained(model_id);
const model = await AutoModelForCausalLM.from_pretrained(
  model_id, { dtype: "q4", device: "webgpu" },
);

// Define tools and messages
const tools = [
  {
    name: "get_weather",
    description: "Get current weather information for a location",
    parameters: {
      type: "object",
      properties: {
        location: {
          type: "string",
          description: "The city and state, e.g. San Francisco, CA",
        },
        unit: {
          type: "string",
          enum: ["celsius", "fahrenheit"],
          description: "The unit of temperature to use",
        },
      },
      required: ["location"],
    },
  },
];
const messages = [
  {
    role: "user",
    content: "What's the weather like in New York?"
  },
];

// Prepare inputs
const input = tokenizer.apply_chat_template(messages, {
  tools,
  add_generation_prompt: true,
  return_dict: true,
});

// Generate output
const sequences = await model.generate({
  ...input,
  max_new_tokens: 512,
  do_sample: false,
  streamer: new TextStreamer(tokenizer, { skip_prompt: true, skip_special_tokens: false }),
});

// Decode and print the generated text
const response = tokenizer.batch_decode(
  sequences.slice(null, [input.input_ids.dims[1], null]),
  { skip_special_tokens: true },
);
console.log(response[0]); // [get_weather(location="New York", unit="fahrenheit")]
ONNXRuntime#
from transformers import AutoConfig, AutoTokenizer
import onnxruntime
import numpy as np
from huggingface_hub import hf_hub_download

# 1. Load config, processor, and model
model_id = "onnx-community/LFM2-2.6B-ONNX"
config = AutoConfig.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
filename = "model_q4.onnx" # Options: "model.onnx", "model_fp16.onnx", "model_q4.onnx", "model_q4f16.onnx"
model_path = hf_hub_download(repo_id=model_id, filename=f"onnx/{filename}") # Download the graph
hf_hub_download(repo_id=model_id, filename=f"onnx/{filename}_data") # Download the weights
session = onnxruntime.InferenceSession(model_path)

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

# 2. Prepare inputs
prompt = "What is C. elegans?"
messages = [{"role": "user", "content": prompt}]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="np")
input_ids = inputs['input_ids']
attention_mask = inputs['attention_mask']
batch_size = input_ids.shape[0]
position_ids = np.tile(np.arange(0, input_ids.shape[-1]), (batch_size, 1))
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)
for i in range(max_new_tokens):
  logits, *present_cache_values = session.run(None, dict(
      input_ids=input_ids,
      attention_mask=attention_mask,
      position_ids=position_ids,
      **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_like(input_ids, dtype=np.int64)], axis=-1)
  position_ids = position_ids[:, -1:] + 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 (input_ids == eos_token_id).all():
    break

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

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

📈 Performance#

LFM2 outperforms similar-sized models across different evaluation categories. We only report scores using instruct variants and non-thinking modes for consistency.

Image: image/png

ModelMMLUGPQAIFEvalIFBenchGSM8KMGSMMMMLU
LFM2-2.6B64.4226.5779.5622.1982.4174.3255.39
Llama-3.2-3B-Instruct60.3530.671.4320.7875.2161.6847.92
SmolLM3-3B59.8426.3172.4417.9381.1268.7250.02
gemma-3-4b-it58.3529.5176.8523.5389.9287.2850.14
Qwen3-4B-Instruct-250772.2534.8585.6230.2868.4681.7660.67

📬 Contact#

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

Files

26 files · 21.8 GBWeights 1.66 GB (smallest of 5 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 26 files with their sha256
FileSizesha256
.gitattributes2.32 KBac4ec21774593d68a3be7ca12d4379548784ebe0d0ad0fc0ecf3e71866969cce
README.md19.1 KBb90ab4873048790488c543b3ec4ce6c739c27e59311defd592e43f2623f7cea4
chat_template.jinja1.30 KB89e790f027916b5a2bca145a6a8454e06ffc7a5043bf3b6d97829aff86bb543f
config.json1.76 KBc94629bc18eea03ff3118fd7fa24cfb16a2e553cd72d28d68ef5fea00f4f8cdc
generation_config.json137 Bf7de2fded96ae1d174989025d46b2351e4ded99c799ac559d8186f0e2fb6295d
onnx/model.onnx262 KBd0b1f3c02da19feb6f3cf42fdd1d27c152fa5d61b49eb5a66e7f08ddf4e1d993
onnx/model.onnx_data2.03 GB52b0f345bef3a6c1630fc705f347a7b82f8a600f0f91655e8da297be9df95b7a
onnx/model.onnx_data_12.03 GBec4f088afca342dc904a0d6a0332e862b4048243240345f5d004b1e25a9f6f01
onnx/model.onnx_data_22.09 GB9539a630beb2ef958e00ce770ab27aa07dc5bf259dc4f96e633508cd28793a35
onnx/model.onnx_data_32.05 GBbb2e2d6cb091ea9f9c63730ad31cfabbf0ba2099633dc7279bfdadc76b241779
onnx/model.onnx_data_42.03 GBefffbb3c80cc1dced6cba8e05012aa909a967c8b89330f0ed443464fdeba46fc
onnx/model.onnx_data_588.1 MB5a4a66303f5004f7d0a333190c283945f825c538bf89f2f506c9fc34f009c7e5
onnx/model_fp16.onnx262 KBd3d2c77d79d5911264eba550dc97499040fc4da72b3b0784769087b8fe8607e9
onnx/model_fp16.onnx_data2.09 GB11f84230abca83fc24836d011112efb72b511736c55c6c7b26a8b65a8aea4cbd
onnx/model_fp16.onnx_data_12.09 GB1e8ffeb56393c02f89d27bb88052eba0ed0692ecf3bbc8170c2dca2b29c6901c
onnx/model_fp16.onnx_data_2969 MBa43028e4cc06a5fa5e03a320f392cf403d3d265c213356cd7358619236ca8a3c
onnx/model_q4.onnx324 KB26cecca7cc85cad6d58766a1081d899e7cd1388af7c59afdd5c0d74da3d20429
onnx/model_q4.onnx_data2.09 GB5f80e6c5eb5787c0c5825b8772f614113b09e6ac23be4dba58c8447c963bf157
onnx/model_q4f16.onnx323 KBd98c4f6cf16c142f928127c01be89b0199d7a0c8223c60a756bfde21afe33878
onnx/model_q4f16.onnx_data1.65 GB3dd89d13c6c716bba3fe196f9b6cd22abc51a1a476efb70a8c0151b14a5f8cfe
onnx/model_quantized.onnx5.16 MB73872c4966d55fba0278bf48cc785d37396821ae1c4472b5b2e56ddd59393a1c
onnx/model_quantized.onnx_data2.10 GB5f475ccef979dfcd681421bc50bd13dfde2fc57a6053befee68d092928488488
onnx/model_quantized.onnx_data_1506 MB5f68e0040ce4ff8314a27c830c862c8b55789d0cf008ec507c5dc34e4f846691
special_tokens_map.json434 B742aefe2b7dec496e8caffdba03a75d0c1a9925d53bd3f3e0d388c96b591b6f4
tokenizer.json3.30 MB0d97ddf099eae6c0b4392bdffa1256762eb8621de54e04429e0719965036c3d7
tokenizer_config.json93.6 KB232f1d56d9af02ce5306c0fa55267e9d2bd997fa7e201a6f5a775cfb041b223a
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
26718cc164 pinned now2026-11-15 00:22 UTC26 files · 21.8 GB

Use it

# custom terms: read the license before you download
$ fw get onnx-community/LFM2-2.6B-ONNX
# manifest sha256 b1ca9cb81677… · 21.8 GB · 26 files
$ fw verify ./LFM2-2.6B-ONNX onnx-community/LFM2-2.6B-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-2.6B-ONNX.json --dir ./LFM2-2.6B-ONNX $ python3 fw.py verify ./LFM2-2.6B-ONNX ./onnx-community__LFM2-2.6B-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/LFM2-2.6B-ONNX --revision 26718cc1647f63987db99e187367d6f899b67095 --local-dir ./LFM2-2.6B-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
b90ab4873048790488c543b3ec4ce6c739c27e59311defd592e43f2623f7cea4
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-2.6B-ONNXDate: 2026-11-15Commit: 26718ccSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/LFM2-2.6B-ONNX
Pinned commit
26718cc1647f63987db99e187367d6f899b67095
Manifest
LFM2-2.6B-ONNX.json · .minisig
Manifest sha256
b1ca9cb8167763ce232905e98c811157aacdde0dde6b24f3f2dd71724ac64d23
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-2.6B-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/LFM2-2.6B-ONNX.json.minisig $ minisign -Vm LFM2-2.6B-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-2.6B · 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-2.6B-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-2.6B-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