Liquid AI
LFM2-350M-Math
A 0.4B model by Liquid AI that uses tools such as web search.
Tools- Downloads
- 1,312 downloads last month
- Likes
- 22 likes
- Uploaded
- Uploaded 5 Sept 2025
Overview
From LiquidAI/LFM2-350M-Math- Parameters
- 354,483,968 (0.4B)
- Context length
- 128,000 tokens
- Architecture
- lfm2
- Task
- text-generation
- Licence
- lfm1.0
- Released
- 25 Aug 2025
- Last updated
- 31 Mar 2026
This is LiquidAI's upload of LiquidAI/LFM2-350M-Math, which is based on LiquidAI/LFM2-350M.
Read the licence: lfm1.0
Languages listed in the model card
- English
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.
| Version | File size | File | SHA-256 |
|---|---|---|---|
| Q4_0 | 219.3 MB | LFM2-350M-Math-Q4_0.gguf | |
| Q4_K_M | 229.3 MB | LFM2-350M-Math-Q4_K_M.gguf | |
| Q5_K_M | 260.4 MB | LFM2-350M-Math-Q5_K_M.gguf | |
| Q6_K | 293.4 MB | LFM2-350M-Math-Q6_K.gguf | |
| Q8_0 | 379.2 MB | LFM2-350M-Math-Q8_0.gguf | |
| F16 | 711.5 MB | LFM2-350M-Math-F16.gguf |
Architecture
From config.json in LiquidAI/LFM2-350M-Math- Model class
- Lfm2ForCausalLM
- Model type
- lfm2
- Layers
- 16
- Hidden size
- 1024
- Attention heads
- 16
- Key/value heads
- 8
- Vocabulary
- 65,536
- Context length
- 128,000 tokens
- Weights
- bfloat16
Papers and data
From LiquidAI/LFM2-350M-MathPapers the model's Hugging Face page links to (the model's own report and papers it cites).
LFM2-350M-Math
Based on LFM2-350M, LFM2-350M-Math is a tiny reasoning model designed for tackling tricky math problems.
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.6, top_p=0.95, min_p=0.1, repetition_penalty=1.05.
System prompt: We recommend not using any system prompt.
Supported languages: English only.
Chat template: LFM2 uses a ChatML-like chat template as follows:
<|startoftext|><|im_start|>user
Find the sum of all integer bases $b>9$ for which $17_{b}$ is a divisor of $97_{b}$.<|im_end|>
<|im_start|>assistant
<|cot_start|>First, we need to convert $17_{b}$ and $97_{b}$ into base 10. [...]<|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.
馃搱 Performance
Reasoning enables models to better structure their thought process, explore multiple solution strategies, and self-verify their final responses. Augmenting tiny models with extensive test-time compute in this way allows them to even solve challenging competition-level math problems. Our benchmark evaluations demonstrate that LFM2-350M-Math is highly capable for its size.

As we are excited about edge deployment, our goal is to limit memory consumption and latency. Our post-training recipe leverages reinforcement learning to explicitly bring down response verbosity where it is not desirable. To this end, we combine explicit reasoning budgets with difficulty-aware advantage re-weighting. Please refer to our separate blog post for a detailed post-training recipe.

馃弮 How to run
- Hugging Face: LFM2-350M
- llama.cpp: LFM2-350M-Math-GGUF
- LEAP: LEAP model library
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. |
馃摤 Contact
- Got questions or want to connect? Join our Discord community
- 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}
}
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.