🧠 LFM2.5-350M-Thinking-0004
LFM2.5-350M-Thinking-0004 is an ultra-fast, lightweight 350-million-parameter Reasoning Model based on LiquidAI's Liquid Neural Network (LNN) architecture.
It is fine-tuned through two-stage multi-teacher distillation (Qwen3.8-Max, DeepSeek-R1 CoT, and GrandMaster Pro) with full structured Chain-of-Thought (<think> ... </think>), fluent Russian language mastery, and clean code generation.
⚡ Highlights & Key Capabilities
- 🧬 Liquid Neural Network (LNN): High compute efficiency and sub-linear memory scaling.
- 📐 Structured Chain-of-Thought: Generates deep step-by-step reasoning inside
<think> ... </think>before providing the final answer. - 🇷🇺 Russian Language Proficiency: Native, grammatically sound Russian CoT reasoning without translation artifacts.
- 💻 Algorithmic Code Synthesis: Clean Python, HTML/CSS, and shell scripts without refusal loops.
- 🚀 Extreme Edge Speed: Reaches 25–40+ tokens/sec on CPU and mobile devices.
📊 Evaluation & Benchmarks
| Benchmark / Task | Metric / Result | Performance Notes |
|---|---|---|
| Inference Speed (Vulkan/Metal) | 28.4 – 38.0 tok/s | Real-time generation on low-end hardware |
| GSM8K Multi-Step Math | 30.8% Exact Match | Zero-shot chain-of-thought without tools |
| Russian Spelling / Analysis | 100% CoT Accuracy | Deep step-by-step character & grammatical logic |
| Python Code Generation | Verified Syntax | Clean functional implementations |
🛠️ Usage Example
Transformers (PyTorch)
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "KoarAI/LFM2.5-350M-Thinking-0004"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True
)
prompt = "Сколько букв 'р' в слове 'трапеция'? Объясни пошагово."
messages = [{"role": "user", "content": prompt}]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=512,
temperature=0.6,
top_p=0.95
)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
📦 GGUF & Quantized Models
For deployment with llama.cpp, Ollama, or LM Studio:
- 🔗 GGUF Repository: KoarAI/LFM2.5-350M-Thinking-0004-GGUF
📜 Citation & Credits
- Base model architecture by Liquid AI (
LiquidAI/LFM2.5-350M). - Distillation & Alignment by KoarAI.