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

LFM2-24B-A2B-ONNX

Date: 2026-11-15Commit: 7bfb293Signed: 2DC28CC7B26A283B ✓

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

lfm61.2GBLFM2-24B-A2B-ONNXonnxcustom terms
FactsParamsnot statedSize61.2 GBFormatsonnxTasktext generationLicenseLFM-1.0 (custom)From sourcecustom termsread terms
# custom terms: read the license before you download
$ fw get onnx-community/LFM2-24B-A2B-ONNX
# manifest sha256 dd3cbaef706f… · 61.2 GB · 42 files
$ fw verify ./LFM2-24B-A2B-ONNX onnx-community/LFM2-24B-A2B-ONNX
From sourceHosted (signed)onnx-community/LFM2-24B-A2B-ONNXLast check: 2026-11-15 00:22 UTC

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

Works with

Runs with

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

Convert with

Overview

Size
61.2 GB
Weights
1.90 GB (smallest of 2 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
License
LFM-1.0 (custom) (custom)
Files
42, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.lfm
Lineage

Original release from the publisher.

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

Image: Liquid AI

Try LFM • Documentation • LEAP

LFM2-24B-A2B#

LFM2 is a family of hybrid models designed for on-device deployment. LFM2-24B-A2B is the largest model in the family, scaling the architecture to 24 billion parameters while keeping inference efficient.

  • Best-in-class efficiency: A 24B MoE model with only 2B active parameters per token, fitting in 32 GB of RAM for deployment on consumer laptops and desktops.
  • Fast edge inference: 112 tok/s decode on AMD CPU, 293 tok/s on H100. Fits in 32B GB of RAM with day-one support llama.cpp, vLLM, and SGLang.
  • Predictable scaling: Quality improves log-linearly from 350M to 24B total parameters, confirming the LFM2 hybrid architecture scales reliably across nearly two orders of magnitude.

Image: image

Find more information about LFM2-24B-A2B in our blog post.

🗒️ Model Details#

LFM2-24B-A2B is a general-purpose instruct model (without reasoning traces) with the following features:

PropertyLFM2-8B-A1BLFM2-24B-A2B
Total parameters8.3B24B
Active parameters1.5B2.3B
Layers24 (18 conv + 6 attn)40 (30 conv + 10 attn)
Context length32,768 tokens32,768 tokens
Vocabulary size65,53665,536
Training precisionMixed BF16/FP8Mixed BF16/FP8
Training budget12 trillion tokens17 trillion tokens
LicenseLFM Open License v1.0LFM Open License v1.0

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

Generation parameters:

  • temperature: 0.1
  • top_k: 50
  • repetition_penalty: 1.05

We recommend the following use cases:

  • Agentic tool use: Native function calling, web search, structured outputs. Ideal as the fast inner-loop model in multi-step agent pipelines.
  • Offline document summarization and Q&A: Run entirely on consumer hardware for privacy-sensitive workflows (legal, medical, corporate).
  • Privacy-preserving customer support agent: Deployed on-premise at a company, handles multi-turn support conversations with tool access (database lookups, ticket creation) without data leaving the network.
  • Local RAG pipelines: Serve as the generation backbone in retrieval-augmented setups on a single machine without GPU servers.
Chat Template#

LFM2-24B-A2B uses a ChatML-like format. See the Chat Template documentation for details. Example:

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

You can use tokenizer.apply_chat_template() to format your messages automatically.

Tool Use#

LFM2-24B-A2B supports function calling as follows:

  1. Function definition: We recommend providing the list of tools as a JSON object in the system prompt. You can also use the tokenizer.apply_chat_template() function with tools.
  2. Function call: By default, LFM2-24B-A2B writes Pythonic function calls (a Python list between <|tool_call_start|> and <|tool_call_end|> special tokens), as the assistant answer. You can override this behavior by asking the model to output JSON function calls in the system prompt.
  3. Function execution: The function call is executed, and the result is returned as a "tool" role.
  4. Final answer: LFM2-24B-A2B interprets the outcome of the function call to address the original user prompt in plain text.

See the Tool Use documentation for the full guide. Example:

<|startoftext|><|im_start|>system
List of tools: [{"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"]}}]<|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
[{"candidate_id": "12345", "status": "Interview Scheduled", "position": "Clinical Research Associate", "date": "2023-11-20"}]<|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|>

🏃 Inference#

LFM2-24B-A2B is supported by many inference frameworks. See the Inference documentation for the full list.

NameDescriptionDocsNotebook
TransformersSimple inference with direct access to model internals.LinkColab link
vLLMHigh-throughput production deployments with GPU.LinkColab link
llama.cppCross-platform inference with CPU offloading.LinkColab link
MLXApple's machine learning framework optimized for Apple Silicon.Link—
LM StudioDesktop application for running LLMs locally.Link—
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-24B-A2B-ONNX",
  { dtype: "q4f16", 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);

Or try out our online WebGPU demo:

ONNX Runtime#

Here's a quick start example with ONNX Runtime:

from transformers import AutoConfig, AutoTokenizer
import onnxruntime
import numpy as np
from huggingface_hub import snapshot_download

# 1. Load config, processor, and model
model_id = "onnx-community/LFM2-24B-A2B-ONNX"
config = AutoConfig.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
eos_token_id = config.eos_token_id

filename = "model_q4f16.onnx" # Options: "model_fp16.onnx", "model_q4f16.onnx"
model_path = snapshot_download(repo_id=model_id, allow_patterns=f"onnx/{filename}*") # Download the graph + weights
session = onnxruntime.InferenceSession(f"{model_path}/onnx/{filename}")

# 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]
num_logits_to_keep = np.array(1, dtype=np.int64)

past_cache_values = {}
for inp in session.get_inputs():
    name = inp.name
    shape = inp.shape
    dtype = np.float32 if inp.type == "tensor(float)" else np.float16
    if name.startswith("past_key_values"):
        # Attention KV cache: shape [batch_size, num_kv_heads, 0, head_dim]
        past_cache_values[name] = np.zeros([batch_size, shape[1], 0, shape[3]], dtype=dtype)
    elif name.startswith("past_conv"):
        # Conv cache: shape [batch_size, hidden_size, conv_L_cache]
        past_cache_values[name] = np.zeros([batch_size, shape[1], shape[2]], dtype=dtype)

# 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,
      num_logits_to_keep=num_logits_to_keep,
      **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 np.isin(input_ids, eos_token_id).any():
      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])

🔧 Fine-Tuning#

NameDescriptionDocsNotebook
CPT (Unsloth)Continued Pre-Training using Unsloth for text completion.LinkColab link
CPT (Unsloth)Continued Pre-Training using Unsloth for translation.LinkColab link
SFT (Unsloth)Supervised Fine-Tuning with LoRA using Unsloth.LinkColab link
SFT (TRL)Supervised Fine-Tuning with LoRA using TRL.LinkColab link
DPO (TRL)Direct Preference Optimization with LoRA using TRL.LinkColab link
GRPO (Unsloth)GRPO with LoRA using Unsloth.LinkColab link
GRPO (TRL)GRPO with LoRA using TRL.LinkColab link

📊 Performance#

CPU Inference#

We compared LFM2-24B-A2B against two popular MoE models of similar size: Qwen3-30B-A3B-Instruct-2507 (30.5B total, 3.3B active parameters) and gpt-oss-20b (21B total, 3.6B active parameters). We measured both prefill and decode throughputs with Q4_K_M versions of these models using llama.cpp on AMD Ryzen AI Max+ 395.

Image: image

Image: image

GPU Inference#

We also report throughput (total tokens / wall time) achieved with vLLM on a single H100 SXM5 GPU.

Image: image

Contact#

For enterprise solutions and edge deployment, contact sales@liquid.ai.

Citation#

@article{liquidAI202624B,
  author = {Liquid AI},
  title = {LFM2.5-24B-A2B: Scaling Up the LFM2 Architecture},
  journal = {Liquid AI Blog},
  year = {2026},
  note = {www.liquid.ai/blog/},
}
@article{liquidai2025lfm2,
  title={LFM2 Technical Report},
  author={Liquid AI},
  journal={arXiv preprint arXiv:2511.23404},
  year={2025}
}

Files

42 files · 61.2 GBWeights 1.90 GB (smallest of 2 ONNX variants). Sizes and sha256 from the signed manifest.
Show all 42 files with their sha256
FileSizesha256
.gitattributes3.65 KB89812c73d374b141690e4f28b314b05aaf0b13461a8e158a676428d882970b2e
README.md16.1 KBf6ba868dd0b5ed2e73c1c234f9598b9e330d4be7c8c370c2e2593a5c959c9bd5
chat_template.jinja2.55 KB013eed60546434b6967e3483153d8c5c37abcb1d667f8b1f914683f2a9411531
config.json1.66 KB15a48f786039df805a0a3fbfd70fad14eb76dc7ae61566de5b4c59ad263d4a4b
generation_config.json136 Bc38f3a30d05b13eb700e8d7fd9010fd29cea0583ca6dfdd654ee180b9d542c62
onnx/model_fp16.onnx410 KB4a19b0269631e0346f469b37f950cd36e1df212670dee9197c4e2352a5d00919
onnx/model_fp16.onnx_data1.90 GBb7823f9c0d4b954b6bbc2a1e206f749b86959353435746d22b3d97b4825152dc
onnx/model_fp16.onnx_data_12.05 GB7280929ba43cb3b2cd669536943e6c1dccf42bb08cd3ed2b3de2097a6b23d766
onnx/model_fp16.onnx_data_101.67 GB0e8fd0c9228a4e89743fd38b6acce39898231eaf4cb93d1a794bcf3a23c384f7
onnx/model_fp16.onnx_data_112.05 GB968a7f810de766366d3a5abe9fc77b6222009f56041879ba9083a435c3911a25
onnx/model_fp16.onnx_data_121.68 GBb6f1e84da82536b268fe4ea760a0d523a5889644d45d50fc77a8efc5062cd9f1
onnx/model_fp16.onnx_data_132.03 GB255ab07716bb329c71d5e5279433b14e5048c00297fd22532971c34054a88007
onnx/model_fp16.onnx_data_141.68 GB636c76fafd250c6f2c9da0d7733963557c5d83de74dcadef4097a8c6a4cb1048
onnx/model_fp16.onnx_data_152.05 GB2974f3a8d01457ca0b41df6a1344a2ab486b608cb618957142e320ee41f2b92e
onnx/model_fp16.onnx_data_161.67 GB4ac67c0c0c7d05f6904a54fc76d03ce8a2701aa383c14434f48f09cee2f3f07d
onnx/model_fp16.onnx_data_172.05 GB7d021e8290ba24a9b135f1a548dfaf1514e68d2ae71d07ccd286d2f0e142d40d
onnx/model_fp16.onnx_data_181.67 GB7ee09066038cf78d38a3dfd69e47285aed311caeb3839dfbb0fc2199d34cf1aa
onnx/model_fp16.onnx_data_192.05 GB0774856790d9c2febb3bd290adaad40deda7c7b57e1e202492bda22993ae2d2a
onnx/model_fp16.onnx_data_21.67 GB3ffa3d14efe74412ec58c08cc3c641b737217379034e00ce1d725107447cf58f
onnx/model_fp16.onnx_data_201.68 GBa68a567a0210b80708e5a521f09ac429bb48bd7484e1ca65b48cabf933d8bc1c
onnx/model_fp16.onnx_data_212.03 GB2ea08a513212414617b51e3387cc3c9b144f54e77e23d068cf42001935e04def
onnx/model_fp16.onnx_data_221.68 GB3c8f3b5065d614e7949d7cb3453c671576aaaf00265af187f4eec4fb5cb90506
onnx/model_fp16.onnx_data_232.05 GBc42b36bad9ae06f28f3cc94a0bb4d292e65f207b4b9b0d3dbb51ebbc4429951d
onnx/model_fp16.onnx_data_241.67 GBe03d1f7720f92df4a4ee38a71a563c2b42e95e8a182b97dc4ddfb0f786cbe481
onnx/model_fp16.onnx_data_251.21 GBf8ed5577e1de065c39292d87d85375453497c94c9e048d869bfd31e7b132a8a6
onnx/model_fp16.onnx_data_32.05 GB2b9a86e841051ef0ac77253b4d291b5ade47a065e20bce123a2ff42d77f3e2ce
onnx/model_fp16.onnx_data_41.68 GB02a78e12355a7b1f1f73214fa24f356bfc3abb15673721041af93c8f87c67b64
onnx/model_fp16.onnx_data_52.03 GB44f0aa459057a4429377395de6fe227fd17ade255c60be4c7880629abd98d046
onnx/model_fp16.onnx_data_61.68 GBfdcdcccaff477e10e5eabf4a22478e7abcc4a0a3b2aa689cec2d2393fa12eb2d
onnx/model_fp16.onnx_data_72.05 GB5eab42fc7f2b742d61edb3daf57fb706954b96564cfacb6048d4e20692483964
onnx/model_fp16.onnx_data_81.67 GB1e628940b5abd4a341c729d863c4f6aa9d65bf33d57d2d2495aba00477dc15ba
onnx/model_fp16.onnx_data_92.05 GB52c9a2c89269f25fa9a5fcc73526c0223d28b6cb6b2d394b506573f9228a7a27
onnx/model_q4f16.onnx495 KB18725e7bab28d23cf67a01718909c1d99e79701d967a3990f20241316c5e60fb
onnx/model_q4f16.onnx_data2.02 GB12f9ad0a641420cf6afb9c4ddae3c0efff3ad53e25a95859bd615416a74a34e6
onnx/model_q4f16.onnx_data_12.04 GBae5a54829eadaa5802d946fcda7a7961884079c3441b8c2f5ddce4367349064c
onnx/model_q4f16.onnx_data_22.04 GB868144536237c0556720922cf223c6f91a610be33e7b97b900000422781a43ae
onnx/model_q4f16.onnx_data_32.04 GB849719320cc78d6c6bf23c75eade5cc16079a88d86563656e1fa79d6941614b7
onnx/model_q4f16.onnx_data_42.04 GBaa7b9076059dbd97321ccfb74712e55264d8e4aad251392106c678b5553773d0
onnx/model_q4f16.onnx_data_52.04 GBb82d51164169742513933204011beb2bdbf7d7ad7e5da2a1d1984aae2d0ae4d0
onnx/model_q4f16.onnx_data_61.30 GBb301737d179d7142ac10bfa9113496f51d8ca9ce1effd6d5de2834c542ca3894
tokenizer.json3.30 MB29d43b4be8e8a896fefd7cd836ca6d6b4eedd249f823866ce0453b368e646f49
tokenizer_config.json3.83 KBe70cd070c2696bf1b0f1ad303c34502753670cca6f844637821cb1c37e6bea8d
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
7bfb2932c9 pinned now2026-11-15 00:22 UTC42 files · 61.2 GB

Use it

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

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Read license, then download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/LFM2-24B-A2B-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-24B-A2B-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