ONNX Model Zoo

onnx-community/LFM2-350M-Math-ONNX

By onnx-community · ↓ 4 · ♥ 2 · Updated 2025-09-29

What's in this repo

This page lists the files in onnx-community/LFM2-350M-Math-ONNX, including model.onnx, model_fp16.onnx, model_q4.onnx and more.

  • 5 ONNX models (.onnx files)
  • 18 files, including 5 .json, 5 .onnx, 5 .onnx_data, 1 .md, 1 .jinja
  • Last updated 2025-09-29

ONNX files

File Size Download
onnx/model.onnx — Download
onnx/model_fp16.onnx — Download
onnx/model_q4.onnx — Download
onnx/model_q4f16.onnx — Download
onnx/model_quantized.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

Liquid AI

Playground Playground Playground Leap

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.

68d41660ccb9b4bb78d0ad93_Response Accuracy - dark mode

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.

68d4166ef8b3f7322f15c8cb_Response Length - dark mode

🏃 How to run

📬 Contact

If you are interested in custom solutions with edge deployment, please contact our sales team.

Model info

text-generation transformers.js
transformers.js onnx lfm2 text-generation liquid edge conversational en base_model:LiquidAI/LFM2-350M-Math base_model:quantized:LiquidAI/LFM2-350M-Math license:other region:us
↓ 4 ♥ 2

Created: 2025-09-26

Updated: 2025-09-29

View on Hugging Face

Files (18)

.gitattributes
README.md
chat_template.jinja
config.json
generation_config.json
onnx/model.onnx ONNX
onnx/model.onnx_data
onnx/model_fp16.onnx ONNX
onnx/model_fp16.onnx_data
onnx/model_q4.onnx ONNX
onnx/model_q4.onnx_data
onnx/model_q4f16.onnx ONNX
onnx/model_q4f16.onnx_data
onnx/model_quantized.onnx ONNX
onnx/model_quantized.onnx_data
special_tokens_map.json
tokenizer.json
tokenizer_config.json

Related models