/ Модель

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

Контекст
262 144 токена
Параметры
1,9 млрд
Лицензия
Своя лицензия
Архитектура
lfm3 · dense
Базовая модель
LFM3-1.7B-Base
Библиотека
transformers
Опубликована
29 ноя 2026

LFM3-1.7B-Looped-Distilled

Генерация текстаТекст → текст
1 153скачиваний за 30 дней2лайкавеса обновлены29 ноя 2026

Описание модели

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

Базовая текстовая модель LFM3 на 1,9 млрд параметров с повторным вычислением части слоёв и дистилляцией для генерации и продолжения текста.

LFM3-1.7B-Looped-Distilled — текстовая базовая модель семейства LFM3, созданная автором репозитория на основе LiquidAI/LFM3-1.7B-Base. В неё перенесён цикл глубины из LFM3-1.7B-Looped: блоки 8–11 выполняются повторно, образуя обычную 28-слойную архитектуру. Эффект обученного повторного входа дистиллирован в скопированные блоки 12–15; сама модель насчитывает около 1,9 млрд параметров.

Модель предназначена для генерации текста и продолжения запросов в формате completions; её также можно запускать с чат-шаблоном, но она не настроена на инструкции. По README, обучение дистилляции проводилось на фрагментах WikiText, без инструкционных данных для итоговой модели. Контекст составляет 262 144 токена по метаданным; опубликованы веса Safetensors и вариант GGUF Q8_0. Указана поддержка 17 языков, включая русский.

В описанной оценке модель улучшила результат базовой модели на ARC-Challenge, а perplexity на WikiText снизилась; автор отмечает, что выигрыш по perplexity частично связан с обучением на WikiText. Лицензия указана как other, поэтому условия использования следует проверять в карточке репозитория. Модель не обучалась для использования инструментов или многошагового агентного поведения; цикл фиксирован двумя проходами и не адаптируется во время генерации.

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

  • продолжение текстовых запросов в режиме completions
  • генерация ответов на чатовые запросы без специальной настройки на инструкции
  • локальный запуск генеративной модели через llama.cpp
  • оценка языковой модели на ARC-Easy и ARC-Challenge
  • эксперименты с рекуррентной глубиной языковых моделей

Ограничения

Это базовая модель без настройки на инструкции и RLHF/DPO, поэтому качество ответов на чатовые запросы не гарантируется; обучение инструментальному использованию и многошаговым задачам не проводилось. Цикл имеет фиксированные два прохода, а наиболее убедительный заявленный выигрыш относится к ARC-Challenge; автор указывает, что сравнение GSM8K недостаточно мощное, а результат WikiText частично обусловлен обучающими данными.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

Открыть на Hugging Face

LFM3-1.7B-Looped-Distilled

LFM3-1.7B-Base with the depth loop of LFM3-1.7B-Looped and a re-entry bridge distilled into the looped block. The result is a plain 28-layer model: no bridge module, no custom sampler, and a stock llama.cpp graph.

What was done

  1. Loop. The base has 24 layers. Layers 8-11 are executed twice: their copies become layers 12-15, and the eight post_attention_norm / post_ffw_norm weights for layers 8-15 are multiplied by 0.5. This is the same damped depth loop as LFM3-1.7B-Looped: alpha=0.5, two passes, 28 layers total.
  2. Teacher. A zero-initialised rank-64 re-entry bridge was trained on top of that loop: it reads the layer-7 output and writes into layer 12, with a tanh gate. The bridge has 0.26M parameters and was trained for 500 steps on the wikitext-train / GSM8K-chat mix. It is not shipped.
  3. Distillation. The bridge teacher was distilled into the looped block with rank-64 LoRA on layers 12-15 only. Loss was cross-entropy plus a normalised MSE to the teacher's final hidden states, computed on 250 x 1024-token wikitext-train windows; 500 steps, 10.7M trainable parameters (0.525% of the model). No GSM8K or instruction data was used for the student.
  4. Merge. The LoRA weights were merged into layers 12-15. The LoRA B matrices for every other layer are exactly zero, so layers 0-11 and 16-27 carry no trained change.
  5. Export. Standard HF checkpoint -> GGUF F16 -> Q8_0 with llama.cpp.

The loop is architectural: the GGUF has lfm3.block_count = 28, 335 tensors, and the copied block repeated once. The bridge is not a runtime tensor; its effect lives in the merged weights of the copied layers.

Evaluation

All numbers are 5-shot, greedy, on the same harness and tokenizer; paired per-item comparisons. ARC is n=1000; GSM8K is n=80.

modelARC-EasyARC-ChallengeGSM8Kwiki PPL (Q8_0)
LFM3-1.7B-Base60.830.067.518.42
static loop [8-11]x2, alpha=0.569.234.161.317.92
this model (wiki-only distill)69.840.567.513.72

Paired vs the static loop:

  • ARC-Challenge: 136 wins / 72 losses, exact McNemar p = 1.0e-5.
  • ARC-Easy: 93 / 87, p = 0.71 (tied).
  • GSM8K: 9 / 4, p = 0.27 (n=80, not powered).
  • PPL is llama-perplexity on wikitext-test.txt, 1024-token chunks, Q8_0.

Reading the table honestly: the robust gain is ARC-Challenge (+6.4 pp, significant). ARC-Easy is flat versus the static loop. GSM8K returns to the base level rather than the static loop's drop, but the n=80 comparison is not significant. The PPL gain is partly in-domain because the distillation data is wikitext-train.

This is a base checkpoint, not an instruction-tuned model. The chat template works and the model answers chat-style prompts, but it has no RLHF/DPO. Raw /v1/completions behaviour is preserved; a 50/50 wikitext/GSM8K variant reached GSM8K 75.0 but degraded raw completions, which is why it is not the released file.

Files

filenotes
model.safetensorsbf16 HF checkpoint, 28 layers, 1.97B params
gguf/LFM3-1.7B-Looped-Distilled-Q8_0.gguf2.0 GB, Q8_0, 28 blocks
config.json, modeling_lfm3.py, ...standard LFM3 custom code
LICENSE, NOTICELFM Open License v1.0 and modification notice

Usage

llama.cpp

llama-cli -m gguf/LFM3-1.7B-Looped-Distilled-Q8_0.gguf \
  -p "The capital of France is" -n 64 -ngl 99

llama-server -m gguf/LFM3-1.7B-Looped-Distilled-Q8_0.gguf \
  --alias lfm3-1.7b-looped-distilled -c 131072 -ngl 99 --jinja

The file is a normal 28-layer LFM3 graph; no patched llama.cpp is required. On an RTX 4070 it runs at about 180 tok/s decode and 17.5k tok/s prefill at Q8_0.

Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

tok = AutoTokenizer.from_pretrained("vaultpls/LFM3-1.7B-Looped-Distilled", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    "vaultpls/LFM3-1.7B-Looped-Distilled", trust_remote_code=True, torch_dtype="bfloat16"
).cuda()

ids = tok("The capital of France is", return_tensors="pt").input_ids.cuda()
print(tok.decode(model.generate(ids, max_new_tokens=32, do_sample=False)[0]))

Training details

  • Teacher: static loop + zero-init rank-64 bridge (layer 7 -> layer 12), 500 steps on alternating wikitext-train / GSM8K-chat windows, AdamW, lr 1e-3 with warmup and cosine, batch 2 x 1024 tokens.
  • Student: rank-64 LoRA (alpha=128, dropout 0) on q_proj, k_proj, v_proj, o_proj, in_proj, out_proj, w1, w2, w3 of layers 12-15; CE + normalised MSE (weight 1.0) to teacher final hidden states; 500 steps on 250 wikitext windows, lr 3e-4, cosine schedule, batch 2 x 1024 tokens, bf16.
  • Hardware: one RTX 4070 12 GB, gradient checkpointing.
  • The scripts used are in scripts/; paths in them are the local training paths and need adjusting for a fresh checkout.

Limitations

  • Base model, not instruction-tuned; tool use and long multi-step agency are not trained.
  • The loop is fixed at two passes and alpha=0.5; there is no adaptive loop count.
  • ARC-Challenge is the only statistically solid gain. GSM8K n=80 is underpowered.
  • Wiki PPL is in-domain relative to the distillation corpus.
  • The model was distilled from a teacher trained on wikitext-train; it inherits the base model's language coverage and biases.

License and attribution

This is a derivative work of LiquidAI/LFM3-1.7B-Base, distributed under the LFM Open License v1.0. A copy is in LICENSE; the required modification notice is in NOTICE. No affiliation with or endorsement by Liquid AI is claimed.

The static-loop recipe follows arXiv:2605.23872; the re-entry-bridge teacher follows the idea in arXiv:2608.11233 (Retrofitting Recurrent Depth). The distillation and merge are this repository's work.

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
Lfm3ForCausalLM
Ревизия весов
9113ab0

0 моделей