Model reference · open weights

LFM2-Extract

LLMs LiquidAI Text gen 2 builds Its own licence terms 2k dl/mo

LFM2-Extract is an open-weight language model from LiquidAI. LFM2-1.2B-Extract (BF16) weighs 2.3 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • LFM2-Extract is a 1.2B parameter text-generation model developed by LiquidAI for extracting information from unstructured documents into structured formats like JSON, XML, or YAML.
  • The model supports a context length of 128,000 tokens and operates in English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish.
  • It is intended for single-turn conversations and is distributed under an other licence.

Summary of the LiquidAI/LFM2-1.2B-Extract model card, 2026-10-01

What it is

Released byLiquidAI
Released2025-08-22
Parameters1.2B
VRAM2.3 GB for the weights

What it runs on

Memory and cards for LFM2-1.2B-Extract (BF16)

2.3 GBweights, file size
631 MBruntime overhead, at least
128,000 tokenscontext max

How much memory each request adds isn't estimated yet for this architecture. The weights need at least the cards below, plus room for the context.

CardWeights alone
RTX 3060 12 GBfits
RTX 4060 Ti 16 GBfits
RTX 3090 24 GBfits
RTX 4090 24 GBfits
RTX 5090 32 GBfits
L40S 48 GBfits
A100 80 GBfits
H100 80 GBfits
RTX PRO 6000 Blackwell 96 GBfits
DGX Spark (GB10) 128 GB unifiedfits
H200 141 GBfits
B200 180 GBfits

Builds

Sizes, precisions & builds

BuildParamsPrecisionWeightsSmallest setup
LFM2-1.2B-Extract (above) ↗ 1.2BBF16 2.3 GBRTX 3060 12 GB
LFM2-350M-Extract ↗ 354MFP32 709 MBRTX 3060 12 GB

From the model card

What LiquidAI says about LFM2-Extract

Read the model card

src="https://cdn-uploads.huggingface.co/production/uploads/61b8e2ba285851687028d395/2b08LKpev0DNEk6DlnWkY.png" alt="Liquid AI" style="width: 100%; max-width: 100%; height: auto; display: inline-block; margin-bottom: 0.5em; margin-top: 0.5em;" />

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

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

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

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

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’s 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’s output and the ground-truth answer.

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

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

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms