KoarAI LFM2.5-350M Thinking 0003 Banner

🐨 KoarAI / LFM2.5-350M-Thinking-0003

License: Apache 2.0 Model Revision Fine-Tuning: 100% Full Weights Parameters Base Model\nGGUF Available

📌 Release Note: Model Revision 0003

Model Revision: 0003
Key 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

Parameter Specification
Base Model LiquidAI/LFM2.5-350M
Fine-Tuning Method Full Fine-Tuning (100% parameters)
Precision bfloat16 / fp16
Epochs 2.1
Learning Rate 2.5e-5 (Cosine schedule with 5% warmup)
Effective Batch Size 8 (batch_size=2, gradient_accumulation_steps=4)
Max Sequence Length 512 tokens
Special Tokens <think>, </think>


📦 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.

Downloads last month
1,022
Safetensors
Model size
0.4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for KoarAI/LFM2.5-350M-Thinking-0003

Finetuned
(66)
this model
Quantizations
1 model

Space using KoarAI/LFM2.5-350M-Thinking-0003 1

Collection including KoarAI/LFM2.5-350M-Thinking-0003