/ Модель

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

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

LFM3-1.7B-RD-v2

Генерация текстаТекст → текст13 профессий
1 947скачиваний за 30 дней2лайкавеса обновлены7 ноя 2026

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

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

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

LFM3-1.7B-RD-v2 — экспериментальная адаптивная языковая модель на 1,6 млрд параметров, созданная автором репозитория на основе LiquidAI/LFM3-1.7B. Это конверсия архитектуры с последующим дообучением и continual alignment; модель использует архитектуру Lfm3RDForCausalLM с общим рекуррентным ядром и фазовыми адаптерами. Для каждого токена она может выполнять от 1 до 32 рекуррентных шагов: фиксированное число выбирается пресетами reasoning_effort, а режим auto динамически распределяет вычисления в зависимости от токена.

Модель предназначена для генерации текста в диалоговых сценариях, включая рассуждения, математику, программирование и использование инструментов. В README указаны обучение на наборах данных по рассуждениям, математике, коду и вызову инструментов, а также контекст длиной до 262 144 токенов по метаданным. Поддерживаются английский, русский и другие языки из карточки модели. Лицензия указана как other; конкретные условия следует проверять в файлах репозитория. Автор характеризует чекпойнт как экспериментальную архитектурную конверсию, поэтому заявленные преимущества адаптивной глубины не следует считать независимой гарантией качества или ускорения.

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

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

Ограничения

Модель описана как экспериментальная архитектурная конверсия; в предоставленной карточке нет независимой оценки качества на общепринятых бенчмарках. Лицензия обозначена как other, поэтому условия использования нужно уточнить по файлам репозитория.

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

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

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

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

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

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

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

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

Также подходит для

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

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

Открыть на Hugging Face

LFM3-1.7B-RD

LFM3-1.7B-RD is an adaptive recurrent-depth language model built by refactoring the 24-layer tri-hybrid architecture of LiquidAI/LFM3-1.7B into a Prelude -> Shared Recurrent Core -> Coda system.

Instead of executing a fixed forward pass on every token, LFM3-1.7B-RD executes anywhere from 1 to 32 recurrent core steps per token—either via manual effort presets (low, fast, medium, high, max) or dynamically per token in auto mode via a learned continuous depth controller.

[!NOTE] This checkpoint is an experimental architectural conversion and continual alignment of LiquidAI/LFM3-1.7B. It focuses on dynamic per-token recurrent routing, early-exit FFN completion, and deep iterative refinement without catastrophic drift.


Model Details

PropertySpecification
Base ModelLiquidAI/LFM3-1.7B
ArchitectureLfm3RDForCausalLM (Prelude + Shared Recurrent Core with Phase LoRAs + Coda)
Sequence OperatorsGated Short Convolutions (Lfm3ShortConv), Sliding-Window GQA, Full Global GQA
Layout2 Prelude layers -> 5 Core Phases x 4 layers (shared bank + LoRA) -> 2 Coda layers
Recurrent Depth (T)Configurable from T = 1 to T = 32 steps (medium / T = 5 matches the 24-layer baseline depth)
Context Length256K tokens (inherited from LFM3-1.7B; aligned on 2,048-token reasoning/tool windows)
Vocabulary128,000 tokens
Precisionbfloat16
LicenseLFM Open License v1.0

Architecture Overview

  1. Shared Core Bank & Phase LoRA Specialization (Lfm3SharedCoreBank) The 20 middle layers of LFM3-1.7B consist of 5 repetitions of a 4-layer motif ([FullAttention, ShortConv, SlidingWindowAttention, ShortConv]). LFM3-1.7B-RD extracts a shared recurrent operator bank across all 5 motifs paired with phase-specific low-rank adapters (Lfm3SharedLoRALinear and Lfm3SharedGroupedLoRALinear with 3 groups for B, C, x convolution projections). SwiGLU FFN blocks remain phase-specific memory modules.

  2. Early-Exit FFN-Tail Completion (T < 5) Exiting the recurrent core before completing all 5 motifs (T from 1 to 4) would normally skip the unvisited SwiGLU FFNs and corrupt the representation basis entering the Coda layers. When exiting early, _complete_ffn_tail skips the sequence operators (Attention and ShortConv) of remaining motifs while sweeping the hidden state through their FFN blocks and updating KV/conv caches via update_cache_only.

  3. Canonical KV-Cache Snapshots & Gauss-Seidel Refinement (T = 6..32)

    • Cache Consistency: During multi-pass recurrence (s >= 5), _snapshot_phase_cache and _restore_phase_cache roll back phase states before re-entering a motif and restore the canonical Pass-1 (T = 5) KV/convolution states upon loop termination, preventing duplicate token entries in DynamicCache.
    • Feedback Injection & Deep Adapters: At the beginning of each cycle (m = 0, s >= 5), inject_feedback projects the residual difference h_latent - prelude_out back into the input stream. Each phase refines its stored trajectory delta (phase_deltas[m]) using phase-specific deep adapters (ref_A, ref_B) and a token-selective gate alpha_tok that dampens updates on tokens that have already converged (unready_factor).
  4. Direct Depth Regression Controller (Lfm3RDController) At every recurrent step s, the controller inspects the normalized hidden state, step velocity, drift from prelude_out, and cosine instability to predict the required depth s_pred in [0, 31] and halting readiness probability p_ready.


Adaptive Token-Level Compute Traces

The primary objective of LFM3-1.7B-RD is dynamic per-token compute allocation during autoregressive decoding (reasoning_mode="auto"). Rather than using a uniform number of layers for every token, the router exits early on predictable syntax and allocates deep recurrent passes to high-entropy branching points and mathematical deductions.

Below are actual step traces recorded from the checkpoint during autoregressive evaluation (min_recurrent_loops=1, max_recurrent_loops=32):

Trace 1: Factual Recall & Continuation (Easy Prompt)

Average recurrent depth: 3.75 steps/token (vs. 5.0 steps for a standard full pass)

Prompt : "What is the capital of France?"
Target : "The capital of France is Paris, and it is known for"
Steps  : [3, 3, 3, 2, 3, 5, 3, 3, 2, 13, 2, 3]

  • Predictable factual tokens ("The", "capital", "of", "France", "is"): exit in 2 to 3 recurrent steps, bypassing 40%–60% of the core sequence operators.
  • Entity resolution ("Paris"): uses 5 steps (one full pass through all 5 core motifs).
  • Open-ended semantic pivot ("known"): spikes to 13 recurrent steps when selecting the continuation attribute, then immediately drops back to 2–3 steps on function words ("for").

Trace 2: Non-Linear Algebraic Derivation (Hard Reasoning Prompt)

Average recurrent depth: 4.15 steps/token | Peak depth: 22 steps

Prompt : "Solve the system of non-linear equations: x^3 + y^3 = 35 and x + y = 5."
Target : "<think>\nUsing the cubic identity x^3 + y^3 = (x+y)((x+y)^2 - 3xy), substitute 35 = 5(25 - 3xy), so 3xy = 18 and xy = 6."
Steps  : [12, 17, 7, 2, 3, 7, 3, 1, 3, 2, 2, 1, 2, 3, 3, 3, 3, 5, 3, 3, ...] (max = 22)

  • Reasoning initialization & proof strategy selection ("<think>\n", "Using", "the"): the router allocates 12, 17, and 7 steps on the opening tokens to set up the algebraic identity, reaching up to 22 steps on downstream substitution pivots.
  • Mechanical syntax & bracket expansion ("^3", "+", "=", "("): throttles down to 1 to 3 steps, keeping average compute below the 5-step baseline even on multi-step math derivations.

Validation Progression Across Depths (T = 1..32)

Following architectural fixes for canonical KV-cache restoration (save_kv_tensors) and early-exit FFN tail completion, the checkpoint was aligned for 1,250 optimizer steps (AdamW8bit, bfloat16 mixed precision on H100) across a 90/10 train/validation split of 7 reasoning, math, coding, and tool-use datasets.

Validation perplexity (Val PPL) is measured on the held-out validation subset across all recurrent presets simultaneously:

Optimizer StepT = 1 (low)T = 2 (fast)T = 4T = 5 (medium)T = 8T = 12 (high)T = 32 (max)Auto Steps (Easy / Hard / Max)
Step 0 (post-fix init)5.6773.4831.8911.7871.7851.7851.7843.92 / 4.57 (max 18)
Step 2005.4793.5051.9901.8891.8831.8821.8832.92 / 3.83 (max 21)
Step 4005.3083.4261.9791.8871.8781.8781.8782.58 / 4.28 (max 21)
Step 6005.1933.3641.9451.8561.8491.8481.8493.75 / 4.02 (max 21)
Step 8005.0973.3241.9111.8241.8171.8171.8173.67 / 4.35 (max 22)
Step 10005.0393.2861.8921.8041.7981.7981.7993.75 / 4.15 (max 22)
Step 1250 (final)5.0333.2911.9061.8251.8181.8181.8202.75 / 3.52 (max 21)

Inference

Requirements

pip install -U torch transformers accelerate safetensors

Quick Start with transformers

You can run LFM3-1.7B-RD in either adaptive auto mode (per-token dynamic depth during decoding) or with a fixed reasoning_effort preset:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "cybertruck32489/LFM3-1.7B-RD"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)

messages = [
    {"role": "user", "content": "Solve the system of non-linear equations: x^3 + y^3 = 35 and x + y = 5."}
]
prompt = tokenizer.apply_chat_template(
    messages,
    enable_thinking=True,
    add_generation_prompt=True,
    tokenize=False,
)
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False).to(model.device)

# 1. Adaptive per-token depth (auto mode)
model.model.act_step_history.clear()
outputs = model.generate(
    **inputs,
    max_new_tokens=256,
    do_sample=False,
    reasoning_effort="auto",  # Options: "low" (1), "fast" (2), "medium" (5), "high" (12), "max" (32), "auto"
)

generated_ids = outputs[0][inputs["input_ids"].shape[1]:]
print(tokenizer.decode(generated_ids, skip_special_tokens=False))
print("Recurrent steps per token:", model.model.act_step_history)

Manual Recurrent Depth Control

To force a specific number of recurrent iterations T in [1, 32] across all tokens:

# Switch model default configuration
model.set_reasoning_mode(mode="manual", loops=12)

# Or pass directly to .generate() / .forward()
outputs_t12 = model.generate(
    **inputs,
    max_new_tokens=256,
    do_sample=False,
    reasoning_mode="manual",
    recurrent_loops=12,
)

Effort PresetModeRecurrent Loops (T)Sequence Operators ExecutedIntended Use Case
lowmanual18 layers (+ FFN tail)Ultra-fast draft generation
fastmanual212 layers (+ FFN tail)Low-latency chat & simple continuations
mediummanual524 layersStandard 1-pass baseline (equivalent to LFM3-1.7B depth)
highmanual1252 layersMulti-step math, code, and structured tool calls
maxmanual32132 layersMaximum iterative refinement depth
autoauto1 .. 32Dynamic per tokenAutomatic per-token compute routing during decoding

Training & Alignment Data

The recurrent controller (Lfm3RDController), phase LoRA adapters, and backbone weights were aligned on a multi-domain mixture filtered to 2,048-token assistant-masked windows:


License & Acknowledgments

This model is derived from LiquidAI/LFM3-1.7B and is distributed under the LFM Open License v1.0.

@misc{lfm3-rd-2026,
  author = {cybertruck32489},
  title  = {LFM3-1.7B-RD: Adaptive Recurrent-Depth Architecture for Liquid Foundation Models},
  year   = {2026},
  url    = {[https://huggingface.co/cybertruck32489/LFM3-1.7B-RD](https://huggingface.co/cybertruck32489/LFM3-1.7B-RD)}
}

@article{liquidAI2026LFM3,
  author  = {Liquid AI},
  title   = {Introducing LFM3: Every Modality for Specialized Intelligence},
  journal = {Liquid AI Blog},
  year    = {2026},
  note    = {www.liquid.ai/blog/lfm3}
}

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

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

GPU в ailist

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

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

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

Класс архитектуры
Lfm3RDForCausalLM
Ревизия весов
af1a1dc

0 моделей