Skip to content
Other

LFM2.5-24B-A2B-opencode

адаптер для агента OpenCode с экономией вызовов

2 min read

LFM2.5-24B-A2B-opencode от команды harness-hub — это LoRA-адаптер (компактная надстройка над базовой нейросетью) для модели LiquidAI/LFM2.5-24B-A2B, обученный с помощью RL (обучения с подкреплением) для работы внутри кодинг-агента OpenCode. В ходе тренировки модель запускали в изолированной песочнице с реальными файлами: она читала условие, писала код на Python или shell-команды, а верификатор оценивал точность ответа и поощрял за экономию действий. В итоге адаптер справляется с задачами по анализу данных на том же уровне точности, что и базовая модель, но тратит на 30% меньше вызовов инструментов. Разработка пригодится тем, кто разворачивает локальных ИИ-агентов для автоматизации работы с таблицами и данными.

Ключевые особенности

  • На 30% меньше вызовов инструментов: на задачах анализа данных адаптер достигает цели за заметно меньшее число итераций, что ускоряет работу агента.
  • Обучение в реальной среде: тренировка проходила через асинхронный GRPO в TRL на полных сессиях OpenCode в песочницах Hugging Face с проверкой безопасности вызовов через safeagents.
  • Готовность к локальному запуску: адаптер легко подключается к базовой модели через vLLM, а также доступна его GGUF-версия для llama.cpp.
  • Честная оценка с ограничениями: автор открыто отмечает, что прирост подтверждён именно в связке с OpenCode и на задачах анализа данных, тогда как на сложных репозиториях из traj2envs результат остаётся на уровне базы.

Что можно сделать

  • Подключить адаптер к локальному OpenCode через vLLM или llama.cpp, чтобы автоматизировать анализ CSV-таблиц и локальных наборов данных.
  • Использовать конфигурацию обучения из примера async_grpo_harbor в библиотеке TRL как шаблон для дообучения собственных моделей под агентские задачи.

Пример

vllm serve LiquidAI/LFM2.5-24B-A2B \
    --enable-lora --max-lora-rank 32 \
    --lora-modules lfm2.5-harbor-opencode=harness-hub/LFM2.5-24B-A2B-opencode \
    --enable-auto-tool-choice --tool-call-parser lfm2 --reasoning-parser qwen3 \
    --max-model-len 131072
ПодробнееБенчмарк SmolDataEnvs (150 задач): 84.0% против 82.7% у базовой модели (+1.3 ± 4.5 п.п.) при снижении числа вызовов инструментов на 30%.
Бенчмарк traj2envs (40 сложных задач по репозиториям): 20.0% против 25.0% у базы (-5.0 ± 13.9 п.п., в пределах погрешности).
Детали обучения: шаг 160 из 200, AsyncGRPO, LoRA (r=32, alpha=64, все линейные слои), контекст до 131 072 токенов, обучение на 4× NVIDIA H200.
Ограничения: заточен строго под промпты и инструменты OpenCode; в других агентах качество может оказаться на уровне базы или ниже.
Discuss 1 5

Will it run?

Runs in 4-bit

Full precision does not fit, a quantised version does: quality barely changes down to 8 bits, more noticeably at 4 bits.

  • BF16weights 45 GB · ready files50 GB
  • FP8 / INT8recommendedweights 22 GB25 GB
  • 4-bitweights 13 GB14 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

This is a LoRA: counted together with its base model LFM2.5-24B-A2B.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # harness-hub/LFM2.5-24B-A2B-opencode
    # ===== Tokens: paste yours between the quotes =====
    export HF_TOKEN=""        # huggingface.co/settings/tokens, for gated models
    # ==========================================
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download LiquidAI/LFM2.5-24B-A2B --local-dir ~/models/LFM2.5-24B-A2B
    hf download harness-hub/LFM2.5-24B-A2B-opencode --local-dir ~/models/LFM2.5-24B-A2B-opencode
    # The model is in ~/models. How to run it is in the model card (link above).
    Add more LoRAs to LFM2.5-24B-A2B
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b40from November 18, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026new release

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

Requires the base model

LiquidAI/LFM2.5-24B-A2B

This model is a LoRA / adapter. Download the base model first, then load this one on top.

  1. LFM2.5-24B-A2B-Basefamily root
  2. LFM2.5-24B-A2B
  3. LFM2.5-24B-A2B-opencode

New posts about versions of LFM2.5-24B-A2B-Base (quants, finetunes, LoRAs) will show up under the bell.

Fine-tunes 5All on Hugging Face

About the model

harness-hub/LFM2.5-24B-A2B-opencode
Author
harness-hub
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

51

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments