Request it for the seed queue, or get it now with pf download sahilchachra/LFM2.5-8B-A1B-Claude-Opus4-6-Reasoning (CLI guide).
LiquidAI's LFM2.5-8B-A1B fine-tuned on Claude 4.6 Opus reasoning traces.
This model adds explicit step-by-step chain-of-thought reasoning to LFM2.5-8B, distilling the reasoning style of Claude 4.6 Opus into an efficient 8B model that runs fully locally on Apple Silicon. Inspired by Jackrong's reasoning distillation pipeline; adapted for MLX and Apple Silicon using KL-regularized LoRA.
Before answering, the model produces an explicit reasoning trace inside <think> tags.
The reasoning trace makes the logic visible and inspectable, and forces the model to actually work through problems rather than pattern-match to a quick guess.
The base LFM2.5-8B model answers immediately. This model first thinks through the problem step-by-step — like Claude does — then gives the answer.
| Property | Value |
|---|---|
| Base model | LiquidAI/LFM2.5-8B-A1B |
| Architecture | Hybrid: 18 LIV conv + 6 GQA attention layers (MoE-style) |
| Parameters | 8.3B total, 1.5B active |
| Precision | bfloat16 (dequantized from 4-bit base for quality) |
| Context window | 128K tokens |
| Chat template | ChatML (`< |
| Training hardware | Mac Mini M4 Pro, 24GB unified memory |
| Inference hardware | Mac Mini M4 Pro, 24GB unified memory |
| Benchmarking hardware | Mac Mini M4 Pro, 24GB unified memory |
| Training framework | MLX + mlx-lm |
Standard SFT on reasoning data causes reasoning collapse: the model learns the <think> format but produces shallow, 46-word think-blocks and gets worse at actual problem solving. In our experiments, a naive SFT run was beaten by the unmodified base model 71% of the time.
This model uses a combined loss that simultaneously teaches the Claude reasoning format while penalizing distributional drift from the base model:
total_loss = CE_loss + kl_weight * KL(p_finetuned || p_base)
The KL term prevents reasoning shortcuts. Base logits are computed with a scale=0 LoRA trick — no second model copy needed in memory.
| Parameter | Value |
|---|---|
| Rank | 16 |
| Scale (alpha) | 20.0 |
| Dropout | 0.0 |
| Target layers | Last 16 of 24 (all attention + deep conv layers) |
| Trainable params | 98M / 8.4B = 1.16% |
| Hyperparameter | Value |
|---|---|
| Iterations | 6,000 |
| Batch size | 1 |
| Learning rate | 5e-5 |
| Optimizer | Adam |
| Weight decay | 0.01 |
| Max seq length | 2,048 |
| KL weight | 0.1 |
| KL warmup | 500 steps |
| Gradient checkpointing | Yes |
~12,000 samples combining three datasets of Claude 4.6 Opus reasoning traces:
| Dataset | Samples |
|---|---|
nohurry/Opus-4.6-Reasoning-3000x-filtered |
~3,900 |
Jackrong/Qwen3.5-reasoning-700x |
~700 |
Roman1111111/claude-opus-4.6-10000x |
~9,600 |
All assistant turns normalized to <think>{reasoning}</think>{answer}. System messages stripped.
Evaluated via LLM-as-a-judge (meta-llama/llama-3.3-70b-instruct via OpenRouter) on 24 questions spanning GSM8K math, MATH500 hard problems, logic puzzles, coding, and open-ended questions. A/B answer order randomized per question to prevent position bias.
| Model | Base Wins | FT Wins | Ties | Base Win % |
|---|---|---|---|---|
| Naive SFT (no KL) | 17/24 | 4/24 | 2/24 | 71% |
| This model (KL-regularized) | 8/23 | 4/23 | 11/23 | 35% |
KL regularization cut the base model's advantage in half. 65% of questions are now a tie or a win for this model.
| Metric | Naive SFT | This model |
|---|---|---|
| Complete reasoning failures (0 think-words) | 25% | 12.5% |
| Avg think-words per successful response | 46 | 68 |
By category (vs base model):
pip install mlx-lm
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load("sahilchachra/LFM2.5-8B-A1B-Claude-Opus4-6-Reasoning")
messages = [{"role": "user", "content": "What is 15% of 240?"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
response = generate(
model, tokenizer,
prompt=prompt,
max_tokens=2048,
sampler=make_sampler(temp=0.6),
verbose=True
)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "sahilchachra/LFM2.5-8B-A1B-Claude-Opus4-6-Reasoning"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16)
messages = [{"role": "user", "content": "Explain why 0.999... equals 1."}]
inputs = tokenizer.apply_chat_template(messages, return_tensors='pt', add_generation_prompt=True)
outputs = model.generate(inputs, max_new_tokens=2048, temperature=0.6, do_sample=True)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))
The model uses ChatML format. Always use apply_chat_template.
The key memory challenge: KL regularization requires base model logits at every training step, but two 8B model copies exceed 24GB unified memory. Solved using the LoRA scale trick:
# Pass 1: scale=0 → model behaves as frozen base (no second copy needed)
for layer in lora_layers:
layer.scale = 0.0
base_logits = model(inputs) # no gradient
# Pass 2: restore scale → fine-tuned forward with gradients
for layer, s in zip(lora_layers, orig_scales):
layer.scale = s
ft_logits = model(inputs) # gradient flows through LoRA only
Full training code: train_kl.py
If you use this model, please also credit:
Everything — training, inference, and benchmarking — was done on a Mac Mini M4 Pro (24GB unified memory) using MLX. No cloud GPUs, no A100s. Serious reasoning distillation is achievable on consumer Apple Silicon hardware.
Have the files? Publish a torrent.
Publish a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo sahilchachra/LFM2.5-8B-A1B-Claude-Opus4-6-Reasoning ./model-foldermodel-00001-of-00004.safetensors 5.2 GBmodel-00003-of-00004.safetensors 5.1 GBmodel-00002-of-00004.safetensors 5.1 GBmodel-00004-of-00004.safetensors 1.4 GBLiquidAI/LFM2.5-8B-A1B