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

LFM2-2.6B-Exp-ONNX

Date: 2026-11-15Commit: 6453277Signed: 2DC28CC7B26A283B ✓

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

lfm18.8GBLFM2-2.6B-Exp-ONNXonnxcustom terms
FactsParamsnot statedSize18.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-Exp-ONNX
# manifest sha256 5706eb6a60af… · 18.8 GB · 22 files
$ fw verify ./LFM2-2.6B-Exp-ONNX onnx-community/LFM2-2.6B-Exp-ONNX
From sourceHosted (signed)onnx-community/LFM2-2.6B-Exp-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-Exp.

Works with

Runs with

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

Convert with

Overview

Size
18.8 GB
Weights
1.57 GB (smallest of 4 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
License
LFM-1.0 (custom) (custom)
Files
22, 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-Exp

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

Image: Liquid AI

Try LFM • Documentation • LEAP

LFM2-2.6B-Exp#

LFM2-2.6B-Exp is an experimental checkpoint built on LFM2-2.6B using pure reinforcement learning.

Specifically trained on instruction following, knowledge, and math, it delivers particularly strong performance compared to other 3B models. In particular, its IFBench score surpasses DeepSeek R1-0528, a model 263 times larger.

Image: LFM2.6B-Exp-White_v1

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

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|>

You can directly pass tools as JSON schema or Python functions with .apply_chat_template() as shown in this page to automatically format the system prompt.

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
  • Reinforcement learning with verifiable rewards

🏃 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

You can then use the model as follows:

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

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

// Define the list of messages
const messages = [
  { role: "user", content: "What's 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);
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-Exp-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]
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,
      **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)
  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])

🔧 How to fine-tune LFM2#

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

NotebookDescriptionLink
SFT (Unsloth)Supervised Fine-Tuning (SFT) notebook with a LoRA adapter using Unsloth.Colab link
SFT (TRL)Supervised Fine-Tuning (SFT) notebook with a LoRA adapter using TRL.Colab link
DPO (TRL)Preference alignment with Direct Preference Optimization (DPO) using TRL.Colab link

📬 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

22 files · 18.8 GBWeights 1.57 GB (smallest of 4 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 22 files with their sha256
FileSizesha256
.gitattributes2.18 KB909da8dc3ee78f8db0597e3a26306a168b7c2a6c8c3b9500adbf948497975aa7
README.md11.9 KBd68495c0f57081b668219caad7fc781c84873496b7387549bfd3e34712b6ac3e
chat_template.jinja1.30 KB89e790f027916b5a2bca145a6a8454e06ffc7a5043bf3b6d97829aff86bb543f
config.json1.78 KB86165908307e2b3517c694ac5281eae8db1ed437659baaa424c18995342cc739
generation_config.json136 B40d17f9ec64c97e8fd5400540960b6a9761ed6d6acc0b1ab6a6656055e4755b3
onnx/model.onnx257 KB7678b42f520f1d76f8669e7fece094254b692eac445972af5baff601b9bb95d8
onnx/model.onnx_data2.03 GB14313d694fa97c8b5a3c42cee66bb32695c41793d8157c7ea83cd35a6b7215df
onnx/model.onnx_data_12.03 GB1f799956b26d2a2fc152a0d6f8f8e9efb4f731075f90745a61b87d37b70530e7
onnx/model.onnx_data_22.09 GB34182e549fe4f447a2ea85dd63be3292d153397791c2f50103656b19aae86fe5
onnx/model.onnx_data_32.05 GB1661f02d8a765a6dcbbd078619f947fe6222db82befa963011385ad81fee0e99
onnx/model.onnx_data_42.03 GB5d4fa0188089be51761daba57733f15ec1cbcc6d9a297f15ad1ad337fd9d6d10
onnx/model.onnx_data_588.1 MBc801ceb94925e03713647201728c98697a18350eae629bdf3bfefb90e0b0c396
onnx/model_fp16.onnx256 KB987f2ddb349333a17ed1542e54cc358df99da31d852f639793ed49b469753e83
onnx/model_fp16.onnx_data2.09 GBdb5d6f4f7dff4937865d8001adee794015a69fbdebff58c87e40f56624473b8a
onnx/model_fp16.onnx_data_12.09 GB95c45a1f4702f8a46ad6a182daf8b12fb9b0f5cc5d916a7816138deac632bbd9
onnx/model_fp16.onnx_data_2969 MB1a99d830e7f6bd1cc8e0dff6f0e9f2b6ca78fec55fb7bb1ac5d954fb1eeebf7e
onnx/model_q4.onnx333 KB861fa228f652e3df1b5c4f12fe606fb38c5a22df8db77f1505f280483460b5ef
onnx/model_q4.onnx_data1.75 GB759cd32371cef7710c75e33684248e4b874d6ca623625963d4555d0a780b8a88
onnx/model_q4f16.onnx333 KB75205f8dc16d967b79613fd267ef2b620d37188331dc3ef40fe47d33106a6279
onnx/model_q4f16.onnx_data1.57 GBbe51307300327c814d0a02c9f488e666724cb213fd04465ccb270e7c2ee98627
tokenizer.json3.30 MB478692636ff381f5b0ff999141bfdc31ef600c647437d3a0a63945843b574b77
tokenizer_config.json2.49 KBf9fcb44661594531533329d6a358bc8f2b74e776ad82730cbd5848a5662c2672
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
645327768e pinned now2026-11-15 00:22 UTC22 files · 18.8 GB

Use it

# custom terms: read the license before you download
$ fw get onnx-community/LFM2-2.6B-Exp-ONNX
# manifest sha256 5706eb6a60af… · 18.8 GB · 22 files
$ fw verify ./LFM2-2.6B-Exp-ONNX onnx-community/LFM2-2.6B-Exp-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-Exp-ONNX.json --dir ./LFM2-2.6B-Exp-ONNX $ python3 fw.py verify ./LFM2-2.6B-Exp-ONNX ./onnx-community__LFM2-2.6B-Exp-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-Exp-ONNX --revision 645327768e7bfa7f1875979c6fc154c1eb06d792 --local-dir ./LFM2-2.6B-Exp-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
d68495c0f57081b668219caad7fc781c84873496b7387549bfd3e34712b6ac3e
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-Exp-ONNXDate: 2026-11-15Commit: 6453277Signed: 2DC28CC7B26A283B ✓
Upstream
onnx-community/LFM2-2.6B-Exp-ONNX
Pinned commit
645327768e7bfa7f1875979c6fc154c1eb06d792
Manifest
LFM2-2.6B-Exp-ONNX.json · .minisig
Manifest sha256
5706eb6a60afe0427306e3087f4605037687a47fce4921d5c2bf72acb863efa8
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-Exp-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/LFM2-2.6B-Exp-ONNX.json.minisig $ minisign -Vm LFM2-2.6B-Exp-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-Exp · 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-Exp-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-Exp-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