Model reference · open weights
LFM2-Extract is an open-weight language model from LiquidAI. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | LiquidAI |
|---|---|
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 1.2B |
| Context | 125k tokens |
| Runs with | transformers |
| Based on | LiquidAI/LFM2-1.2B |
| Released | 2025-08-22 |
| Popularity | 2k downloads / month |
| Licence | Commercial licence needed |
About
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;" />
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:
You can find more information about other task-specific models in this blog post.
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.
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:
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.
You can use the following Colab notebooks for easy inference and fine-tuning:
| Notebook | Description | Link |
|---|---|---|
| Inference | Run 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. |
@article{liquidai2025lfm2,
title={LFM2 Technical Report},
author={Liquid AI},
journal={arXiv preprint arXiv:2511.23404},
year={2025}
}
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys lfm2-extract for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (lfm2-extract below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"lfm2-extract","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.