/ Модель

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

Контекст
128 000 токенов
Параметры
445 млн
Лицензия
Своя лицензия
Архитектура
lfm2 · dense
Базовая модель
LFM2.5-350M
Библиотека
transformers
Опубликована
26 авг 2026

LFM2.5-350M-ToMoE

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

Экспериментальная MoE-версия инструкционной LFM2.5-350M для генерации текста и диалоговых ответов с сокращённым числом активных параметров.

68скачиваний за 30 дней0лайковвеса обновлены26 авг 2026

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

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

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

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

Nichonauta/LFM2.5-350M-ToMoE — преобразованная методом ToMoE версия инструкционной языковой модели LiquidAI/LFM2.5-350M. Модель использует архитектуру LFM2 с разреженной маршрутизацией по экспертам: в 16 слоях MLP токены направляются к одному из восьми экспертов, а каналы внимания и свёрточных слоёв маскируются или прореживаются. Веса представлены в формате safetensors; общее число параметров по метаданным — 444,6 млн, контекст — до 128 000 токенов.

Модель предназначена для генерации текста и диалоговых ответов. Это исследовательский артефакт, показывающий применение ToMoE к компактной LFM2; по README, качество заметно ниже исходной модели, а генерация склонна к повторам. Для запуска через Transformers требуется trust_remote_code=True. Производная основана на LiquidAI/LFM2.5-350M; README указывает лицензию LFM Open License v1.0.

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

  • эксперименты с разреженной маршрутизацией экспертов в языковых моделях
  • генерация диалоговых ответов
  • оценка качества сжатия инструкционной языковой модели
  • изучение метода ToMoE на архитектуре LFM2

Ограничения

README сообщает о существенном снижении качества относительно плотной базовой модели и склонности генерации к повторам. Для запуска через Transformers требуется trust_remote_code=True.

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

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

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

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

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

Открыть на Hugging Face

LFM2.5-350M-ToMoE

A Mixture-of-Experts (MoE) conversion of LiquidAI/LFM2.5-350M, obtained with the ToMoE method (Dynamic Structural Pruning + Hypernetwork).

The dense 350M instruct model is converted into a channel-MoE where:

  • feed_forward / MLP (16 layers): per-token expert routing over 8 channel-experts (top-1 via Gumbel-softmax), the FFN is cut to the union of the expert channel masks.
  • Full attention (6 layers): Q/K kept at full width; the V channels are dynamically masked per token (deterministic masks).
  • ShortConv (10 layers): statically pruned (a single channel index shared by the B/C/x projections, the conv and the output projection).

Metrics

MetricDense baseToMoE MoE
Total params354.5M321.4M stored
Active params per token354.5M~205M
PPL wikitext-2 (raw, 1810 tok)919.9994.4
PPL chat-formatted (prompt + answer)21.7314.2
Embeddings (always active)67.1M67.1M

Note: LFM2.5-350M is an instruction-tuned model. Its raw-text perplexity is dominated by a strong special-token prior, so the chat-formatted PPL is the more meaningful fidelity metric (14x degradation vs 40x for the 230M conversion).

The pruned budget is p = 0.05 with the ToMoE regularization (lam 64→128, Gumbel base annealed 1.0→−0.25, 8 experts). The attention QK is excluded from the budget (kept full) because the small head-dim (64) collapses under aggressive QK pruning. The hypernetwork was trained with chat-formatted wikitext-103 turns (user/assistant split of the articles) so the KD signal follows the instruct distribution.

Usage (transformers, trust_remote_code)

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained(
    "Nichonauta/LFM2.5-350M-ToMoE",
    trust_remote_code=True,
    torch_dtype=torch.bfloat16,
    device_map="cuda:0",
    attn_implementation="eager",
)
tokenizer = AutoTokenizer.from_pretrained("Nichonauta/LFM2.5-350M-ToMoE")

messages = [{"role": "user", "content": "What is the capital of France?"}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_tensors="pt")
out = model.generate(**prompt, max_new_tokens=64)
print(tokenizer.decode(out[0], skip_special_tokens=True))

Note: this model requires trust_remote_code=True — the custom modeling_lfm2_moe_final.py defines the Lfm2MoEForCausalLM class.

Conversion details

  • Base: LiquidAI/LFM2.5-350M (LFM Open License v1.0, lfm1.0)
  • Method: ToMoE — a bidirectional-GRU hypernetwork generates differentiable channel masks per sublayer; the model weights are frozen and only the hypernetwork is trained (online KD against the dense teacher). The final pruned weights are extracted from the trained masks.
  • Training: 2,400 steps, seq 2048, online knowledge distillation (2× forward KL), gradient checkpointing, chat-formatted wikitext-103 turns (4M tokens).
  • Architecture deltas: 16 layers (10 ShortConv + 6 full attention), FFN 4608-wide per layer (auto-adjusted from 6656), head_dim 64, tied embeddings.

Limitations

  • The model is significantly degraded versus the dense base (chat PPL ~314 vs ~22) and generation tends to repeat — the conv layers are cut to ~5–36% width and each token activates ~50–70% of the MLP channels through a single expert.
  • This is a research artifact demonstrating the ToMoE pipeline on a small LFM2 architecture.

License

This model is a derivative of LiquidAI/LFM2.5-350M and is released under the LFM Open License v1.0 (see LICENSE).

Files

  • model.safetensors — the pruned MoE weights (fp32)
  • modeling_lfm2_moe_final.py — the custom model definition (trust_remote_code)
  • config.json — model configuration (with auto_map)
  • tokenizer.json, tokenizer_config.json, chat_template.jinja, generation_config.json

GGUF quantizations

Quantized GGUF files (BF16, Q8_0, Q4_K_M) are available in the companion repository: Nichonauta/LFM2.5-350M-ToMoE-GGUF.

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
Lfm2MoEForCausalLM
Ревизия весов
5dad894

0 моделей