Skip to content

Liquid AI

LFM2-1.2B-Extract

A 1.2B model by Liquid AI that uses tools such as web search.

Tools
Downloads
2,552 downloads last month
Likes
47 likes
Uploaded
Uploaded 5 Sept 2025

Get it in Zero1LLM

Then open Explore in the app and search for:

Parameters
1,170,340,608 (1.2B)
Context length
128,000 tokens
Architecture
lfm2
Task
text-generation
Licence
lfm1.0
Released
22 Aug 2025
Last updated
30 Mar 2026

This is LiquidAI's upload of LiquidAI/LFM2-1.2B-Extract, which is based on LiquidAI/LFM2-1.2B.

Read the licence: lfm1.0

Languages listed in the model card

  • English
  • Arabic
  • Chinese
  • French
  • German
  • Japanese
  • Korean
  • Spanish

Tools

Uses tools, so web search and the browser work best with it.

Each version is the same model stored at a different precision: smaller files use less memory and lose a little quality.

VersionFile sizeFileSHA-256
Q4_0695.8 MBLFM2-1.2B-Extract-Q4_0.gguf
Q4_K_M730.9 MBLFM2-1.2B-Extract-Q4_K_M.gguf
Q5_K_M843.4 MBLFM2-1.2B-Extract-Q5_K_M.gguf
Q6_K962.8 MBLFM2-1.2B-Extract-Q6_K.gguf
Q8_01.25 GBLFM2-1.2B-Extract-Q8_0.gguf
F162.34 GBLFM2-1.2B-Extract-F16.gguf
Model class
Lfm2ForCausalLM
Model type
lfm2
Layers
16
Hidden size
2048
Attention heads
32
Key/value heads
8
Vocabulary
65,536
Context length
128,000 tokens
Weights
bfloat16

Papers the model's Hugging Face page links to (the model's own report and papers it cites).

LFM2-1.2B-Extract

Based on LFM2-1.2B, LFM2-1.2B-Extract is designed to extract important information from a wide variety of unstructured documents (such as articles, transcripts, or reports) into structured outputs like JSON, XML, or YAML.

Use cases:

  • Extracting invoice details from emails into structured JSON.
  • Converting regulatory filings into XML for compliance systems.
  • Transforming customer support tickets into YAML for analytics pipelines.
  • Populating knowledge graphs with entities and attributes from unstructured reports.

You can find more information about other task-specific models in this blog post.

馃搫 Model details

Generation parameters: We strongly recommend using greedy decoding with a temperature=0.

System prompt: If no system prompt is provided, the model will default to JSON outputs. We recommend providing a system prompt with a specific format (JSON, XML, or YAML) and a given schema to improve accuracy (see the following example).

image/png

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

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

<|startoftext|><|im_start|>system
Return data as a JSON object with the following schema:\n[...]<|im_end|>
<|im_start|>user
Caenorhabditis elegans is a free-living transparent nematode about 1 mm in length that lives in temperate soil environments.<|im_end|>
<|im_start|>assistant
{
"species": "C. elegans",
"genus": "Caenorhabditis",
"description": "A free-living transparent nematode about 1 mm in length that lives in temperate soil environments.",
[...]{<|im_end|>

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

Warning

鈿狅笍 The model is intended for single-turn conversations.

The data used for training these models was primarily synthetic, which allowed us to ensure a diverse data mix. We used a range of document types, domains, styles, lengths, and languages. We also varied the density and distribution of relevant text in the documents. In some cases, the extracted information was clustered in one part of the document; in others, it鈥檚 spread throughout. We applied the same approach of ensuring diversity when creating synthetic user requests and designing the structure of the model outputs. The data generation process underwent many iterations, incorporating ideas and feedback from across the Liquid AI team.

馃搱 Performance

We evaluated LFM2-Extract on a dataset of 5,000 documents, covering over 100 topics with a mix of writing styles, ambiguities, and formats. We used a combination of five metrics to capture a balanced view on syntax, accuracy, and faithfulness:

  • Syntax score: Checks whether outputs parse cleanly as valid JSON, XML, or YAML.
  • Format accuracy: Verifies that outputs match the requested format (e.g., JSON when JSON is requested).
  • Keyword faithfulness: Measures whether values in the structured output actually appear in the input text.
  • Absolute scoring: A judge LLM scores quality on a 1-5 scale, assessing completeness and correctness of extractions.
  • Relative scoring: We ask a judge LLM to choose the best answer between the extraction model鈥檚 output and the ground-truth answer.

image/png

LFM2-1.2B-Extract can output complex objects in different languages on a level higher than Gemma 3 27B, a model 22.5 times its size.

馃弮 How to run

You can use the following Colab notebooks for easy inference and fine-tuning:

NotebookDescriptionLink
InferenceRun the model with Hugging Face's transformers library.
SFT (TRL)Supervised Fine-Tuning (SFT) notebook with a LoRA adapter using TRL.
DPO (TRL)Preference alignment with Direct Preference Optimization (DPO) using TRL.
SFT (Axolotl)Supervised Fine-Tuning (SFT) notebook with a LoRA adapter using Axolotl.
SFT (Unsloth)Supervised Fine-Tuning (SFT) notebook with a LoRA adapter using Unsloth.

馃摤 Contact

Citation

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

More from Liquid AI

On Hugging Face

Everything on this page comes from these pages and is refreshed every few hours; Hugging Face always has the latest.