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

LFM2-700M-ONNX

Date: 2026-11-15Commit: bdfeecdSigned: 2DC28CC7B26A283B ✓

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

lfm6.56GBLFM2-700M-ONNXonnxcustom terms
FactsParamsnot statedSize6.56 GBFormatsonnxTasktext generationLicenseLFM-1.0 (custom)From sourcecustom termsread terms
# custom terms: read the license before you download
$ fw get onnx-community/LFM2-700M-ONNX
# manifest sha256 b039cd2fd95d… · 6.56 GB · 20 files
$ fw verify ./LFM2-700M-ONNX onnx-community/LFM2-700M-ONNX
From sourceHosted (signed)onnx-community/LFM2-700M-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-700M.

Works with

Runs with

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

Convert with

Overview

Size
6.56 GB
Weights
496 MB (smallest of 5 ONNX variants)
Parameters
not stated
Formats
onnx
Task
text generation
License
LFM-1.0 (custom) (custom)
Files
20, 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-700M

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

Image: Liquid AI

https://playground.liquid.ai/chat

LFM2-700M#

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 three post-trained checkpoints with 350M, 700M, and 1.2B 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.

PropertyValue
Parameters742,489,344
Layers16 (10 conv + 6 attn)
Context length32,768 tokens
Vocabulary size65,536
Precisionbfloat16
Training budget10 trillion tokens
LicenseLFM 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

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:

  • Knowledge distillation using LFM1-7B as teacher model
  • 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-700M-ONNX",
  { dtype: "q4", device: "webgpu" },
);

// 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 { pipeline, TextStreamer } from "@huggingface/transformers";

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

// Define the tools available to the model
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"],
    },
  },
];

// Define the list of messages
const messages = [
  { role: "user", content: "What's the weather like in New York?" },
];

// 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 }),
    tokenizer_encode_kwargs: { tools },
});
console.log(output[0].generated_text.at(-1).content);
// [get_weather(location="New York", unit="fahrenheit")]
ONNXRuntime#
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-700M-ONNX"
config = AutoConfig.from_pretrained(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
eos_token_id = config.eos_token_id

filename = "model.onnx" # Options: "model.onnx", "model_fp16.onnx", "model_q4.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])

Files

20 files · 6.56 GBWeights 496 MB (smallest of 5 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 20 files with their sha256
FileSizesha256
.gitattributes1.89 KB7c8a5433ffefdd0b5c59f6c0f9569e7f085a9531a64d56eac9a662c9d61ffe4c
LICENSE10.6 KB55a61add48383d18363d9c80355acc747a1b0fb2bdb527964ce0583bb54b689d
README.md10.2 KBcc8991f95236ab61b256fa86e4657cea2da08de470233218c80fbe26aeaf50f5
chat_template.jinja1.35 KB2294f49b51a0b9a1b0194add3f124237b5bd986599f43180eec49bba4de01365
config.json1.43 KBd172bb298e49715d6f05953ff43a07a5d07a255a1a3d0965c1558da1b9d4a56c
generation_config.json136 B1be9f5bf1f044d6ce4ec91376c2bc14337078e1260a0ba56ff507c0c25ef1902
onnx/model.onnx141 KB0e5df94c0c8b0012bb801eb674f28e2a8e4259ad44e54b600f3b5b7b9d936829
onnx/model.onnx_data2.07 GB5963363b8574f53f64a31d44ea6efc6dfd124c019e3105f595c1ac91335e5431
onnx/model.onnx_data_1928 MB8eb2737a86ee7dd0fe00fac9c654bf11e91012e1bcba5cc36f4e3a2350b2142b
onnx/model_fp16.onnx140 KBb9d9ab856e20a9103986e455ee3cf167606ca8be559f2f7f1fe636e389757474
onnx/model_fp16.onnx_data1.50 GB24e179a8afdcff4f857132624d6f4351414e5990a4e617e402de68e219dca841
onnx/model_q4.onnx184 KB496549029747546240c69a5d11221ef3edce8c6d6f41051c42244ba47aedcefb
onnx/model_q4.onnx_data559 MBc063f8b36e0aa87cf659cd8c15ac23178fc90a2390f708d556d1d12d59cd2715
onnx/model_q4f16.onnx183 KB95ce2f28ec97b145913e7b474209c36bf5a174916fe6a13fd205531db7e24bcf
onnx/model_q4f16.onnx_data496 MBb0cd094b1731ce79e5bcc140f874147b1dc4554248ebcf6ed27c0126ad99776a
onnx/model_quantized.onnx186 KB11856b5e27b61acd6b11b6cd85adbe04878c00aa66fe9abaf294e8e17891b88a
onnx/model_quantized.onnx_data992 MB9923ef518913d4b329cfa7ee84f05d636e0d7fc15ddbd364747a49c117051569
special_tokens_map.json434 B742aefe2b7dec496e8caffdba03a75d0c1a9925d53bd3f3e0d388c96b591b6f4
tokenizer.json3.30 MBbec04fe03d27dbcb6276b46e7d2325433323a8132a2f0404ea6bbf98250a9211
tokenizer_config.json93.6 KB1635881015705807ba0fb6510d77a42e53fc041f4de12bb801f1685a62b7220d
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
bdfeecd930 pinned now2026-11-15 00:22 UTC20 files · 6.56 GB

Use it

# custom terms: read the license before you download
$ fw get onnx-community/LFM2-700M-ONNX
# manifest sha256 b039cd2fd95d… · 6.56 GB · 20 files
$ fw verify ./LFM2-700M-ONNX onnx-community/LFM2-700M-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-700M-ONNX.json --dir ./LFM2-700M-ONNX $ python3 fw.py verify ./LFM2-700M-ONNX ./onnx-community__LFM2-700M-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/LFM2-700M-ONNX --revision bdfeecd9300145cc1696702b74234d73f683622f --local-dir ./LFM2-700M-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
LICENSE
Text sha256
55a61add48383d18363d9c80355acc747a1b0fb2bdb527964ce0583bb54b689d
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-700M-ONNXDate: 2026-11-15Commit: bdfeecdSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/LFM2-700M-ONNX
Pinned commit
bdfeecd9300145cc1696702b74234d73f683622f
Manifest
LFM2-700M-ONNX.json · .minisig
Manifest sha256
b039cd2fd95db27af4b7bfd7f40a06ab2c7ad7eff825ca72db5e3bae24b90935
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-700M-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/LFM2-700M-ONNX.json.minisig $ minisign -Vm LFM2-700M-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-700M · 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-700M-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-700M-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