/ Модель

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

Контекст
524 288 токенов
Параметры
1,6 млрд
Лицензия
Apache 2.0
Архитектура
lfm3 · dense
Базовая модель
LFM3-1.7B
Библиотека
transformers
Опубликована
28 окт 2026

LFM3-1.7B-Frontier-SmartAgent

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

Дообученная компактная модель Liquid AI для диалоговых агентов, генерации кода, планирования и вызова инструментов.

4 611скачиваний за 30 дней19лайковвеса обновлены30 окт 2026

Бенчмарки

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

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

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

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

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

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

LFM3-1.7B-Frontier-SmartAgent — дообученная языковая модель на базе LiquidAI/LFM3-1.7B, представленная автором mohommed. Она предназначена для локальных и периферийных диалоговых агентов, которым нужны планирование, рассуждение, генерация кода и вызов инструментов. Архитектура Lfm3ForCausalLM насчитывает около 1,6 млрд параметров и использует гибридные свёрточные и attention-слои; заявленная длина контекста — 524 288 токенов.

В README описаны обучение на многоходовых примерах и GRPO, структурированный четырёхэтапный протокол рассуждения, работа с внешним контекстом и ассоциативной памятью, а также генерация Python-вызовов инструментов. Модель рассчитана на сценарии «второго мозга», глубокого поиска, работы с кодом и автоматизации действий агента. Для репозитория указаны форматы Safetensors и GGUF с вариантами Q4_K_M, Q4_K_S и Q8_0.

Лицензия — Apache-2.0. Заявления README о точности, качестве рассуждений и безопасности выполнения вызовов инструментов не подтверждены приведёнными метаданными; качество может зависеть от формата, квантизации и настроек запуска.

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

  • планирование последовательности действий агента
  • генерация Python-вызовов инструментов
  • поиск ответов по внешнему контексту и памяти
  • суммирование результатов многошагового исследования
  • генерация и проверка кода по описанию задачи

Ограничения

В карточке не приведены независимые результаты оценки заявленных возможностей; качество генерации кода и вызовов инструментов следует проверять в целевой системе. Для запуска с контекстом до 524 288 токенов могут потребоваться значительные вычислительные ресурсы.

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

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

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

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

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

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

Открыть на Hugging Face

🚀 LFM3-1.7B-Frontier-SmartAgent (512K Context • 4-Stage Reasoning • Second Brain Agent)

LFM3-1.7B-Frontier-SmartAgent is an autonomous reasoning, coding, and tool-calling language model built on top of LiquidAI/LFM3-1.7B. It combines Liquid AI's 24-layer Tri-Hybrid architecture (Gated Short Convolutions + Sliding-Window Attention + Global Grouped-Query Attention) with 512K NTK-YaRN context scaling, Gram-Schmidt Damped Mid-Layer Orthogonalization, and a Two-Stage Post-Training Pipeline (Multi-Turn SFT + Multi-Objective GRPO).

Designed specifically for on-device and edge agentic systems, this model natively reasons through a structured 4-Stage Frontier Thinking Protocol (<think>...</think>), audits external context (<context>) and persistent associative memory (<second_brain>), and emits verified executable Python tool calls (<tool_call>...</tool_call>).


✨ Key Architectural Highlights

1. 🔭 512K (524,288 Token) NTK-Aware YaRN Context Scaling

Extended 2.0× from LFM3's native 262,144 context window to 524,288 tokens across both full and sliding-window attention layers using calibrated YaRN RoPE scaling (factor = 2.0, beta_fast = 32.0, beta_slow = 1.0, mscale = 1.14). This preserves high-frequency local positional resolution while enabling repository-scale AST dependency indexing.

2. 🧭 Gram-Schmidt Damped SVD Orthogonalization (Layers 9–19)

Rather than applying destructive full-model weight abliteration—which degrades small-model perplexity and state-space convolution stability—refusal directions are isolated via Singular Value Decomposition (SVD), orthogonalized against harmless technical reasoning activations via Gram-Schmidt projection, and subtracted exclusively from middle MLP down-projections (w2 / down_proj in layers 9–19) with a damping coefficient of $\alpha = 0.60$. Early shortconv feature extractors (layers 0–8) and final output calibration layers (layers 20–23) remain 100% untouched.

3. 🧠 Mandatory 4-Stage Frontier <think> Protocol

Unlike standard chat models whose chain-of-thought is unstructured or stripped during multi-turn conversations, LFM3-1.7B-Frontier-SmartAgent is trained with preserve_thinking = true to execute a strict 4-step cognitive audit before every action:

  1. [1. CONTEXT & 2ND BRAIN AUDIT]: Inspects <context>, <second_brain>, and <tool_response> to separate verified facts from unknowns.
  2. [2. DAG DECOMPOSITION]: Breaks complex goals into an ordered Directed Acyclic Graph (DAG) of atomic tool invocations.
  3. [3. HALLUCINATION & CONSTRAINT CHECK]: Verifies every URL, file path, Set-of-Marks ID [#som_id], and function parameter signature against the active context.
  4. [4. PRECISION EXECUTION]: Emits syntactically valid Python tool calls or a grounded final Markdown synthesis.

4. 🕸️ HippoRAG-2 Associative "Second Brain" & Multi-Hop Deep Research Ready

Trained to operate seamlessly with a persistent bi-temporal Second Brain combining:

  • Dense Vector Memory (FAISS IndexFlatIP) with Maximal Marginal Relevance (MMR) deduplication.
  • Neuro-Symbolic Knowledge Graph (NetworkX Personalized PageRank / PPR) for multi-hop entity association.
  • Playwright Set-of-Marks ([#som_id]) Browser Grounding and Voyager-style Dynamic Skill Synthesis.

🏗️ Architecture & Training Specifications

PropertySpecification
Base ArchitectureLfm3ForCausalLM (Tri-Hybrid: Gated shortconv + Sliding-Window GQA + Full GQA)
Parameters~1.7 Billion (24 Layers, 2048 Hidden Dim, 7680 SwiGLU FFN Dim)
Attention Heads16 Query Heads / 4 Key-Value Heads (GQA) on Attention Layers
ShortConv CacheKernel Size L_cache = 7
Vocabulary Size125,050 (Native Byte-Level BPE via PreTrainedTokenizerFast)
Max Context Length524,288 tokens (512K) via NTK-YaRN (factor=2.0, mscale=1.14)
Stage 1 Post-TrainingMulti-Turn Supervised Fine-Tuning (SFT) on 4-Stage <think> + <tool_call> trajectories (LoRA r=32, alpha=64, lr=1.5e-4, final loss 0.089)
Stage 2 Post-TrainingGroup Relative Policy Optimization (GRPO) with Dense AST, Signature-Binding & Context-Grounding Rewards (num_generations=4, lr=5e-6)

🔍 Example Model Output (Multi-Turn Agentic Trace)

Turn 1: Autonomous Planning & Tool Execution

<think>
[1. CONTEXT & 2ND BRAIN AUDIT]: <context> indicates the workspace is clean and report.txt is not yet written. <second_brain> lists the target URL https://example.com/.
[2. DAG DECOMPOSITION]:
  - Step 1: Call `browser_goto(url='https://example.com')` to extract the live Set-of-Marks DOM.
  - Step 2: Call `computer_write_file(filename='report.txt', content=dom_snap)` to persist the DOM.
  - Step 3: Call `computer_bash(command='head -n 8 report.txt')` to verify the file on disk.
[3. HALLUCINATION & CONSTRAINT CHECK]: All URLs and filenames are explicit and match tool parameter schemas.
[4. PRECISION EXECUTION]: Emit executable Python inside <tool_call>.
</think>
<tool_call>
dom_snap = browser_goto(url="https://example.com")
write_res = computer_write_file(filename="report.txt", content=dom_snap)
verify_res = computer_bash(command="head -n 8 report.txt")
print(write_res)
print(verify_res)
</tool_call>

Turn 2: Grounded Synthesis After <tool_response>

<think>
[1. CONTEXT & 2ND BRAIN AUDIT]: <tool_response> confirms report.txt (1068 bytes) was written and verified with EXIT 0.
[2. DAG DECOMPOSITION]: All 3 DAG nodes succeeded; no further tool calls required.
[3. HALLUCINATION & CONSTRAINT CHECK]: Cite exact byte count (1068 bytes), page title (Example Domain), and Set-of-Marks [#1].
[4. PRECISION EXECUTION]: Output final verified Markdown summary.
</think>
### Execution Verified
1. **Browser Navigation:** Loaded `https://example.com/` (`Example Domain`).
2. **Second Brain Upgrade:** Saved interactive Set-of-Marks `[#1]` (`<a> "Learn more"`).
3. **File Write:** Persisted `report.txt` — `1068 bytes`.
4. **Disk Verification:** Confirmed `report.txt` exists (`EXIT 0`).

📦 Available GGUF Quantizations

All GGUF files are hosted in the companion repository: mohommed/LFM3-1.7B-Frontier-SmartAgent-GGUF.

💡 Quantization Recommendation: Because LFM3-1.7B is a compact 1.7B Tri-Hybrid model utilizing stateful gated short-convolution (shortconv) layers, Q8_0 (1.84 GiB) or Q6_K (1.42 GiB) is strongly recommended to retain 99.8% of full-precision coding, reasoning, and tool-calling accuracy.

FilenameQuantizationSizeBest Use Case
lfm3-1.7b-frontier-f16.ggufF16~3.45 GiBUncompressed 16-bit reference weights
lfm3-1.7b-frontier-q8_0.ggufQ8_0~1.84 GiB⭐ Recommended for SOTA Agentic & Coding Quality
lfm3-1.7b-frontier-q6_k.ggufQ6_K~1.42 GiBNear-lossless quality with low memory footprint
lfm3-1.7b-frontier-q5_k_m.ggufQ5_K_M~1.22 GiBBalanced quality and inference speed
lfm3-1.7b-frontier-q4_k_m.ggufQ4_K_M~1.02 GiBFast CPU / laptop deployment
lfm3-1.7b-frontier-q3_k_m.ggufQ3_K_M~0.82 GiBUltra-compact mobile & embedded devices

🚀 Quickstart Guide

1. Python (transformers)

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "mohommed/LFM3-1.7B-Frontier-SmartAgent"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    trust_remote_code=True,
    torch_dtype=torch.bfloat16 if torch.cuda.is_bf16_supported() else torch.float16,
    device_map="auto",
).eval()

system_prompt = """You are LFM3-1.7B-Frontier, an elite autonomous AI agent equipped with a 512K context window and a Real-Time Second Brain Memory system.

### MANDATORY 4-STAGE THINKING PROTOCOL
Inside `<think>...</think>`, structure your reasoning using:
[1. CONTEXT & 2ND BRAIN AUDIT]
[2. DAG DECOMPOSITION]
[3. HALLUCINATION & CONSTRAINT CHECK]
[4. PRECISION EXECUTION]"""

messages = [
    {"role": "system", "content": system_prompt},
    {
        "role": "user",
        "content": (
            "<context>Workspace active.</context>\n"
            "<second_brain>No cached memories.</second_brain>\n"
            "Goal: Write a thread-safe LRU cache in Python with O(1) get and put operations."
        ),
    },
]

prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=512,
        temperature=0.15,
        top_p=0.90,
        repetition_penalty=1.08,
        do_sample=True,
        pad_token_id=tokenizer.eos_token_id,
    )

reply = "<think>\n" + tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=False).split("<|im_end|>")[0].strip()
print(reply)

2. Ollama (GGUF)

# Run the recommended 8-bit quantization directly from Hugging Face:
ollama run hf.co/mohommed/LFM3-1.7B-Frontier-SmartAgent-GGUF:Q8_0

# Or run the 4-bit quantization:
ollama run hf.co/mohommed/LFM3-1.7B-Frontier-SmartAgent-GGUF:Q4_K_M

3. llama.cpp CLI

./llama-cli \
  -hf mohommed/LFM3-1.7B-Frontier-SmartAgent-GGUF:Q8_0 \
  -c 32768 \
  --temp 0.15 \
  --repeat-penalty 1.08 \
  -cnv

🛡️ Best Practices & Recommended Sampling Parameters

  • Temperature: 0.10 – 0.20 (Low temperature keeps AST code generation and tool parameter binding deterministic).
  • Top-P: 0.90 – 0.92
  • Repetition Penalty: 1.08
  • Context Packing: While the architecture supports up to 512K tokens, for single-GPU consumer hardware (8 GB–16 GB VRAM), pairing the model with FAISS + PageRank MMR retrieval (injecting the top 8K–32K highest-signal tokens per turn) maximizes prefill speed and attention sharpness.

📜 License & Citation

This model is released under the Apache-2.0 License, inheriting from LiquidAI/LFM3-1.7B.

@misc{lfm3_frontier_smartagent_2026,
  title        = {LFM3-1.7B-Frontier-SmartAgent: 512K-Context Hybrid Reasoning and Second-Brain Autonomous Agent},
  author       = {mohommed},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/mohommed/LFM3-1.7B-Frontier-SmartAgent}}
}

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

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

0 моделей