KoarAI/LFM2.5-350M-Thinking-0003
<div align="center">
<img src="https://huggingface.co/KoarAI/LFM2.5-350M-Thinking-0003/resolve/main/banner.png" alt="KoarAI LFM2.5-350M Thinking 0003 Banner" width="100%" style="border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.3);"/>
🐨 KoarAI / LFM2.5-350M-Thinking-0003
    \n
</div>
📌 Release Note: Model Revision 0003
[!IMPORTANT] Model Revision:0003Key Architecture & Dataset Improvements: - Anti-Overfitting Training Policy: Trained with a calibrated 2.3 epochs limit with a cosine learning rate scheduler (lr=2.5e-5), preventing catastrophic forgetting and repetition loops while preserving pristine generation fluency. - Multi-Teacher Distillation Mix (2,831 hand-crafted samples): 1. `r0b0tlab/qwen3.8-max-distillation-50k` (quality_score >= 6): Deep mathematical, algorithmic, and code reasoning distilled directly from Qwen 3.8 Max (700 samples). 2. `Vikhrmodels/GrandMaster-PRO-MAX`: High-quality natural Russian conversational mastery and instruction following (800 samples). 3. `iamtarun/python_code_instructions_18k_alpaca`: Clean Python algorithms, web development, and code syntax generation (600 samples). 4. `open-thoughts/OpenThoughts-114k`: Step-by-step verification and multi-hop Chain-of-Thought traces encapsulated in<think>blocks (431 samples). 5. `TIGER-Lab/MMLU-Pro`: Complex STEM, business, logic, and law benchmark multiple-choice reasoning (300 samples).
🌟 Overview
`KoarAI/LFM2.5-350M-Thinking-0003` is an ultra-compact, high-efficiency hybrid reasoning language model featuring native Chain-of-Thought (CoT) thinking capabilities.
Built upon the state-of-the-art Liquid Foundation Model architecture (LiquidAI/LFM2.5-350M), this model underwent 100% Full Parameter Fine-Tuning in bfloat16 precision. Despite having only 350 Million parameters, it produces structured internal step-by-step logic inside native <think> ... </think> blocks before delivering clean, concise final answers.
💡 Native Thinking Mode Example
<|im_start|>user
Сколько букв 'р' в слове 'программирование'?<|im_end|>
<|im_start|>assistant
<think>
1. Слово: 'программирование'.
2. Разберем по буквам: п-р-о-г-р-а-м-м-и-р-о-в-а-н-и-е.
3. Позиции буквы 'р':
- 2-я буква: 'р' (п-Р-о...)
- 5-я буква: 'р' (...г-Р-а...)
- 10-я буква: 'р' (...и-Р-о...)
4. Итого: 3 буквы 'р'.
</think>
В слове «программирование» содержится **3** буквы «р».<|im_end|>⚡ Quickstart (Transformers)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "KoarAI/LFM2.5-350M-Thinking-0003"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
device_map="auto",
trust_remote_code=True
)
messages = [
{"role": "user", "content": "Solve step-by-step: 32 + 32 - 42"}
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.6,
top_p=0.9,
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
print(tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=False))⚙️ Training Specifications
📦 GGUF Quantized Versions
Quantized GGUF versions for llama.cpp, Ollama, LM Studio, and Jan are available at: 👉 **KoarAI/LFM2.5-350M-Thinking-0003-GGUF**
🐨 Maintained by KoarAI Lab
Released for the open-source AI community by KoarAI.
