/ Модель

Характеристики

Контекст
128 000 токенов
Параметры
1,6 млрд
Размер весов
16,9 ГБ
Лицензия
Apache 2.0
Архитектура
lfm2_moe · MoE
Базовая модель
LFM2.5-8B-A1B
Опубликована
15 июн 2026

LFM2.5-8B-A1B-Claude-Opus4-6-Reasoning

Генерация текстаТекст → текст3 профессии

Экспериментальная англоязычная модель на базе LFM2.5, дообученная для пошаговых рассуждений и ответов на диалоговые, логические, математические и программистские вопросы.

55скачиваний за 30 дней1лайквеса обновлены15 июн 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

LFM2.5-8B-A1B-Claude-Opus4-6-Reasoning — экспериментальная англоязычная модель sahilchachra, дообученная на базе LiquidAI/LFM2.5-8B-A1B с помощью KL-регуляризованного LoRA. Она генерирует явный пошаговый ход рассуждений перед ответом и предназначена для диалоговых задач, решения задач на логику и математику, а также вопросов по программированию. Модель использует гибридную MoE-архитектуру LFM2 с 18 сверточными LIV- и 6 GQA-слоями; метаданные указывают 1,6 млрд параметров и контекст до 128 000 токенов. Предусмотрен формат диалога ChatML, а запуск оптимизирован для MLX на Apple Silicon.

В небольшой оценке на 23 вопросах модель сравнялась с базовой или превзошла её в 65% случаев; преимущество особенно не подтверждено для сложной математики. Модель обучалась преимущественно на английских примерах, а рассуждения могли обрезаться из-за максимальной длины обучения в 2 048 токенов. Использование явных рассуждений не гарантирует правильность ответа. Лицензия — Apache-2.0.

Сценарии применения

  • пошаговое решение логических задач
  • решение математических задач и задач GSM8K
  • объяснение хода решения перед ответом
  • ответы на вопросы по программированию
  • локальный диалоговый помощник на Apple Silicon

Ограничения

В оценке на 23 вопросах модель уступала базовой на сложных задачах MATH500; результаты этой небольшой оценки не гарантируют качество на других задачах. Обучение было преимущественно англоязычным, рассуждения могли обрезаться после 2 048 токенов, а явный ход рассуждений не гарантирует правильного ответа.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

LFM2.5-8B-A1B-Claude-Opus4-6-Reasoning

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.


What This Model Does

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.


Model Details

PropertyValue
Base modelLiquidAI/LFM2.5-8B-A1B
ArchitectureHybrid: 18 LIV conv + 6 GQA attention layers (MoE-style)
Parameters8.3B total, 1.5B active
Precisionbfloat16 (dequantized from 4-bit base for quality)
Context window128K tokens
Chat templateChatML (`<
Training hardwareMac Mini M4 Pro, 24GB unified memory
Inference hardwareMac Mini M4 Pro, 24GB unified memory
Benchmarking hardwareMac Mini M4 Pro, 24GB unified memory
Training frameworkMLX + mlx-lm

Training Details

The Problem: Reasoning Collapse

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.

The Fix: KL-Regularized LoRA

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.

LoRA Configuration

ParameterValue
Rank16
Scale (alpha)20.0
Dropout0.0
Target layersLast 16 of 24 (all attention + deep conv layers)
Trainable params98M / 8.4B = 1.16%

Training Hyperparameters

HyperparameterValue
Iterations6,000
Batch size1
Learning rate5e-5
OptimizerAdam
Weight decay0.01
Max seq length2,048
KL weight0.1
KL warmup500 steps
Gradient checkpointingYes

Training Data

~12,000 samples combining three datasets of Claude 4.6 Opus reasoning traces:

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


Evaluation

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.

Win Rate vs Base Model

ModelBase WinsFT WinsTiesBase Win %
Naive SFT (no KL)17/244/242/2471%
This model (KL-regularized)8/234/2311/2335%

KL regularization cut the base model's advantage in half. 65% of questions are now a tie or a win for this model.

Reasoning Depth

MetricNaive SFTThis model
Complete reasoning failures (0 think-words)25%12.5%
Avg think-words per successful response4668

By category (vs base model):

  • GSM8K: essentially equal (3 base wins, 3 model wins, 6 ties)
  • Open-ended: mostly tied (2 base, 0 model, 5 ties) — good general capability
  • MATH500 hard: base still ahead (3 base, 1 model) — hard math remains a stretch

Usage

mlx-lm (Apple Silicon, recommended)

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
)

Transformers (CPU/GPU)

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.


Limitations

  • Hard math: Still loses to the base model on MATH500 Level 4-5 problems. Reasoning traces are deeper but not always correct on competition-level mathematics.
  • Seq length: Training used 2,048 token max; some long reasoning traces were truncated. Very long multi-step problems may get cut off.
  • English-primary: Training data is overwhelmingly English. The base model supports 9 languages but reasoning fine-tuning was English-only.
  • Not RLHF'd: SFT + KL regularization only — no reinforcement learning from human or AI feedback.

Technical Note

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


Citation

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.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

MLX-модели работают только на Apple Silicon.

Класс архитектуры
Lfm2MoeForCausalLM
Ревизия весов
32e9c97

0 моделей