Model reference · open weights
LFM2 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 · MoE |
| Parameters (lead) | 1.2B |
| Context | 125k tokens |
| Runs with | transformers |
| Released | 2025-07-10 |
| Popularity | 67k 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;" />
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 four post-trained checkpoints with 350M, 700M, 1.2B, and 2.6B parameters. They provide the following key features to create AI-powered edge applications:
Find more information about LFM2 in our blog post.
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.
| Property | LFM2-350M | LFM2-700M | LFM2-1.2B | LFM2-2.6B |
|---|---|---|---|---|
| Parameters | 354,483,968 | 742,489,344 | 1,170,340,608 | 2,569,272,320 |
| Layers | 16 (10 conv + 6 attn) | 16 (10 conv + 6 attn) | 16 (10 conv + 6 attn) | 30 (22 conv + 8 attn) |
| Context length | 32,768 tokens | 32,768 tokens | 32,768 tokens | 32,768 tokens |
| Vocabulary size | 65,536 | 65,536 | 65,536 | 65,536 |
| Precision | bfloat16 | bfloat16 | bfloat16 | bfloat16 |
| Training budget | 10 trillion tokens | 10 trillion tokens | 10 trillion tokens | 10 trillion tokens |
| License | LFM Open License v1.0 | LFM Open License v1.0 | LFM Open License v1.0 | LFM Open License v1.0 |
Supported languages: English, Arabic, Chinese, French, German, Japanese, Korean, and Spanish.
Generation parameters: We recommend the following parameters:
temperature=0.3min_p=0.15repetition_penalty=1.05Chat template: LFM2 uses a ChatML-like chat template as follows:
You are a helpful assistant trained by Liquid AI.
What is C. elegans?
It's a tiny nematode that lives in temperate soil environments.
You can automatically apply it using the dedicated .apply_chat_template() function from Hugging Face transformers.
Tool use: It consists of four main steps:
and special tokens), usually in the system promptand special tokens), as the assistant answer.and special tokens), as a "tool" role.Here is a simple example of a conversation using tool use:
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"]}}]
What is the current status of candidate ID 12345?
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.
You can directly pass tools as JSON schema or Python functions with .apply_chat_template() as shown in this page to automatically format the system prompt.
Architecture: Hybrid model with multiplicative gates and short convolutions: 10 double-gated short-range 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:
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys lfm2 for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (lfm2 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","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.