Instructions to use mkurman/LiquidAI-LFM2.5-350M-SYNTH with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mkurman/LiquidAI-LFM2.5-350M-SYNTH with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mkurman/LiquidAI-LFM2.5-350M-SYNTH") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("mkurman/LiquidAI-LFM2.5-350M-SYNTH") model = AutoModelForMultimodalLM.from_pretrained("mkurman/LiquidAI-LFM2.5-350M-SYNTH") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mkurman/LiquidAI-LFM2.5-350M-SYNTH with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mkurman/LiquidAI-LFM2.5-350M-SYNTH" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mkurman/LiquidAI-LFM2.5-350M-SYNTH", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mkurman/LiquidAI-LFM2.5-350M-SYNTH
- SGLang
How to use mkurman/LiquidAI-LFM2.5-350M-SYNTH with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mkurman/LiquidAI-LFM2.5-350M-SYNTH" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mkurman/LiquidAI-LFM2.5-350M-SYNTH", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mkurman/LiquidAI-LFM2.5-350M-SYNTH" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mkurman/LiquidAI-LFM2.5-350M-SYNTH", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mkurman/LiquidAI-LFM2.5-350M-SYNTH with Docker Model Runner:
docker model run hf.co/mkurman/LiquidAI-LFM2.5-350M-SYNTH
LFM2.5-350M-SYNTH
A 350M-parameter reasoning model fine-tuned from LiquidAI/LFM2.5-350M on
synthetic reasoning data. It produces explicit chain-of-thought (<think> … </think>) before answering, and is small enough
to run on CPU or modest GPUs while retaining the base model's 128k context window.
Highlights
- Reasoning-first: trained on SynthLabs-style traces for math, medical, and general reasoning.
- Compact & fast: 350M params on the hybrid LFM2 architecture (convolution + sparse full-attention blocks), bf16.
- Long context: inherits the base model's 128k
max_position_embeddings. - Chat + tools: ChatML format with native tool-calling special tokens.
Model details
│ │ │ │ │
────────────────┼──────────────────────────────────────────────────┼──────────┼─────────┼────────┼────
Base model │ LiquidAI/LFM2.5-350M │ │ │ │
Architecture │ `Lfm2ForCausalLM` (hybrid conv / full-attention) │ │ │ │
Parameters │ ~350M │ │ │ │
Hidden size │ 1024 │ │ │ │
Layers │ 16 (12 conv + 4 full-attention) │ │ │ │
Attention heads │ 16 (8 KV heads, GQA) │ │ │ │
Vocab size │ 65,536 │ │ │ │
Context length │ 128,000 │ │ │ │
Precision │ bfloat16 │ │ │ │
Chat format │ ChatML (`< │ im_start │ >` / `< │ im_end │ >`)
Training
Fully fine-tuned for 4,000 steps on a single A100:
- Sequence length: 2,048
- Effective batch size: 64
- Optimizer: AdamW, LR 5e-5, warmup ratio 0.03
- Precision: bf16
Datasets
- PleIAs/SYNTH (https://huggingface.co/datasets/PleIAs/SYNTH)
- mkurman/medical-reasoning-synthlabs-I (https://huggingface.co/datasets/mkurman/medical-reasoning-synthlabs-I)
- mkurman/gsm8k-SynthLabs-reasoning (https://huggingface.co/datasets/mkurman/gsm8k-SynthLabs-reasoning)
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "mkurman/LiquidAI-LFM2.5-350M-SYNTH"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
messages = [{"role": "user", "content": "Natalia sold 48 clips in April and half as many in May. How many in total?"}]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=512, do_sample=True, temperature=0.6, top_p=0.95)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
The model emits its reasoning inside … followed by the final answer.
Evaluation
TODO
Intended use & limitations
Research and experimentation with small reasoning models. As a 350M model trained largely on synthetic data, it can hallucinate and make reasoning errors. Not intended for medical, legal, or other high-stakes decisions - outputs must be independently verified.
License
Released under the LFM Open License (lfm1.0); see LICENSE (LICENSE).
Citation
@misc{kurman2025lfm25synth,
title = {LFM2.5-350M-SYNTH},
author = {Kurman, Mariusz},
year = {2026},
url = {https://huggingface.co/mkurman/LiquidAI-LFM2.5-350M-SYNTH}
}
- Downloads last month
- 81