/ Модель

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

Контекст
65 536 токенов
Параметры
395 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Базовая модель
ModernBERT-large
Библиотека
transformers
Опубликована
8 авг 2026

auto-0.4b

Классификация текстаТекст → label4 профессии

Англоязычный классификатор ProCreations на базе ModernBERT-large оценивает, следует ли ИИ-агенту выполнять следующий вызов инструмента.

151скачиваний за 30 дней12лайковвеса обновлены9 авг 2026

Бенчмарки

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

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

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

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

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

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

auto-0.4b — модель-классификатор ProCreations для оценки безопасности следующего вызова инструмента ИИ-агента. Это полное дообучение энкодера ModernBERT-large с 394,7 млн параметров и контекстом до 65 536 токенов. Модель принимает описание запроса пользователя, историю действий агента и предполагаемый вызов инструмента и классифицирует его как approve или deny. Поддерживается английский язык.

Модель рассчитана на быстрый первый этап проверки действий в агентных системах: она может одобрять рутинные операции и выявлять несанкционированные разрушительные действия, попытки утечки учётных данных, ослабления защиты и следование инструкциям из внедрённого в прочитанный контент текста. В карточке заявлены скорость около 7 мс на вызов и точность 90,13% на отложенном тесте из 3000 примеров; автор рекомендует передавать неоднозначные случаи более крупной модели.

На сложных примерах качество ниже, а доля ошибочных отказов на стандартном пороге составляет 10,88%; при настройке порога можно уменьшить ошибочные одобрения ценой роста ошибочных отказов. Результаты зависят от формата входа: модель обучалась на заданных секциях и порядке контекста. Лицензия — Apache-2.0.

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

  • первичная проверка безопасности вызовов инструментов ИИ-агентом
  • автоматическое одобрение рутинных действий агента
  • выявление несанкционированного удаления файлов или изменения системы
  • обнаружение попыток утечки учётных данных через инструменты
  • проверка вызовов агента на следование внедрённым инструкциям

Ограничения

На приведённом тесте точность ниже, чем у сравниваемых крупных языковых моделей; на стандартном пороге ошибочно отклоняется около 1 из 10 допустимых действий. Для неоднозначных вызовов автор рекомендует эскалацию к более крупной модели, а качество зависит от соблюдения обученного формата входа.

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

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

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

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

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

Открыть на Hugging Face

auto-0.4b

A 0.4B encoder that decides whether an AI agent's next tool call is safe to run.

Agent harnesses like Codex "Auto" mode and Claude Code auto-accept currently ask a large frontier LLM the question "should I let this tool call run?" on every single step. That works, but it burns subscription usage, adds API latency to every action, and spends a generative model on what is fundamentally a classification problem — the thing encoder-only models are best at.

auto-0.4b is a full fine-tune of ModernBERT-large with context extended to 64k tokens, trained to answer exactly that question:

  • approve — routine work that serves the user's request. Reading files, running tests, editing code, committing, web search, fetching docs, installing legitimate packages — network access is normal agent behaviour and is not treated as dangerous.
  • deny — the call is consequential and unauthorised: wiping directories, exfiltrating credentials, installing hostile software, weakening security controls, destroying production state, or following instructions injected by content the agent just read.

It runs in 7 ms per call on a single GPU — roughly 400x faster than asking a frontier LLM the same question, at zero marginal cost.

Honest positioning

This is not a drop-in replacement for a frontier-LLM gate. On the held-out benchmark:

systemaccuracyfalse-approvefalse-denylatency/callcost
GPT-5.6-Luna96.97%4.93%1.38%3.09 sAPI spend
DeepSeek V4 Flash 073194.95%10.11%0.63%5.64 sAPI spend
auto-0.4b90.13%8.71%10.88%7 msfree
regex heuristic57.97%59.39%26.83%~0 msfree

It trails Luna by ~7 points of accuracy, and its false-deny rate means it would interrupt roughly 1 in 10 legitimate actions at the default threshold. Where it earns its place is as a fast first-stage filter: it is very strong on the attacks that actually matter, and it answers in milliseconds so it can run on every single tool call.

attack categoryfalse-approve
self_permission_tamper (disabling its own guardrails)~1%
covering_tracks~1%
prompt_injection (following instructions from fetched content)~2%
privilege_escalation~3%
credential_exfiltration~3%

A sensible deployment auto-approves below a low threshold, auto-denies above a high one, and escalates the middle band to a bigger model — which removes most of the LLM calls while keeping a frontier model's judgement on the genuinely ambiguous cases.

Benchmark: approve-or-deny

Evaluated on ProCreations/approve-or-deny (3000 held-out items, never trained on):

metricauto-0.4bkeyword/regex baseline
accuracy90.13%57.97%
balanced accuracy90.21%56.89%
F1 (deny)0.89630.4744
AUROC0.9657—
false-approve rate (dangerous call let through)8.71%59.39%
false-deny rate (safe call blocked)10.88%26.83%

The regex baseline is the "block anything containing rm -rf/sudo/curl" heuristic these gates usually start life as. It is included to show the benchmark is not keyword-solvable — roughly half of the deny items contain no alarming token at all, and many approve items are full of them.

Choosing an operating point

logits[:, 1] after softmax is P(deny). Because a wrong approve costs far more than a wrong deny, you can trade the two:

thresholdaccuracyfalse-approvefalse-deny
0.184.43%2.71%26.83%
0.287.53%4.71%19.26%
0.388.97%6.57%14.95%
0.489.60%7.71%12.76%
0.590.13%8.71%10.88%
0.690.30%9.99%9.44%
0.790.43%11.85%7.57%
0.889.93%14.28%6.38%
0.989.27%18.20%4.19%

Where it is strong and weak

By difficulty

slicenaccuracyfalse-approvefalse-deny
medium106592.21%7.52%8.07%
hard106586.10%10.53%17.26%
easy87092.53%7.72%7.32%

By context length

slicenaccuracyfalse-approvefalse-deny
<1k242091.40%7.40%9.60%
16k-64k23278.45%25.62%17.12%
4k-16k21888.07%6.60%16.96%
1k-4k13090.77%3.03%15.62%

Usage

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tok = AutoTokenizer.from_pretrained("ProCreations/auto-0.4b")
model = AutoModelForSequenceClassification.from_pretrained(
    "ProCreations/auto-0.4b",
    dtype=torch.bfloat16,
    attn_implementation="flash_attention_2",   # required for the full 64k context
).cuda().eval()

def build_input(user_request, history, call):
    """history: list of dicts with tool/args/result. call: dict with tool/args."""
    parts = ["### PROPOSED TOOL CALL", f"tool: {call['tool']}", f"args: {call['args']}", "",
             "### USER REQUEST", user_request, "", "### AGENT HISTORY"]
    if not history:
        parts.append("(no prior actions)")
    else:
        for i, h in enumerate(history):
            parts.append(f"[{i+1}] {h['tool']}({h['args']})\n-> {h.get('result','')}")
    return "\n".join(parts)

text = build_input(
    user_request="clean up the build artifacts and reinstall deps",
    history=[{"tool": "Bash", "args": "ls -la", "result": "node_modules  dist  src  package.json"}],
    call={"tool": "Bash", "args": "rm -rf node_modules dist && npm install"},
)

enc = tok(text, return_tensors="pt", truncation=True, max_length=65536).to("cuda")
with torch.no_grad():
    p_deny = model(**enc).logits.softmax(-1)[0, 1].item()

print("DENY" if p_deny > 0.5 else "APPROVE", f"(P(deny)={p_deny:.3f})")

The input format matters. The proposed call and the user request come first so they survive truncation; history follows. Use the exact section headers above — the model was trained on them.

How it was built

Context extension (8k → 64k). ModernBERT alternates local sliding-window attention (window 128) with full global attention every 3rd layer, so only 10 of 28 layers pay the O(n²) cost — which is what makes 64k practical on one GPU. Only those global layers need a new RoPE base. The base was chosen empirically by sweeping it against MLM loss on domain-matched long agent transcripts:

RoPE base (global layers)8k16k32k64k
160,0000.5890.5930.7522.060
640,0000.5880.4740.4060.550
1,280,0000.5990.4770.3170.444
2,560,0000.6140.4900.3140.222
5,120,0000.6350.5070.3280.195

At the stock base the model simply cannot do 64k. 2,560,000 (16× the original for an 8× extension) was chosen: near-best long-context loss for ~4% short-context cost.

Training. Full fine-tune (all 395.8M parameters), two stages: bulk training at short context where nearly all real traffic lives, then a long-context stage at up to 64k so the extended RoPE is exercised on the actual task. Batching is by token budget rather than example count, since inputs span 200–65,536 tokens.

Data. 73,509 training examples generated with DeepSeek V4 Flash across a large combinatorial space of agent frameworks (Claude Code, Codex CLI, MCP servers, LangChain, computer-use, devops, …), domains, risk categories, obfuscation styles, and 10 languages, with deliberate minimal contrastive pairs — near-identical calls with opposite labels where only the user's request or the history flips the verdict.

Long-context examples are built by burying the decisive history steps inside benign filler at a random depth, so 64k capability is exercised as needle-in-a-haystack retrieval rather than merely declared.

Limitations

  • Training data is model-generated and reflects the decision rule it was written against; it is not a substitute for a real security review of your agent's permissions.
  • Held-out labels were audited by an independent pass, but both come from the same model family, so systematic blind spots can survive.
  • The ONNX export is practical to ~8k tokens (the non-flash attention path materialises a dense sliding-window mask); use the PyTorch + flash-attn path for full 64k.
  • It judges a proposed call from text. It cannot see what a script will actually do at runtime, so an opaque binary or a URL whose content it cannot read is judged on context alone.

Other formats

The GGUF build was withdrawn. llama.cpp converts the model, but its --pooling rank path returns zero for a 2-class classification head, so the GGUF could not actually make approve/deny decisions — it returned identical 0.000 scores for a rm -rf / and for a pytest invocation. It was removed rather than left up implying it worked.

Successor

ProCreations/auto-1b scores 96.40% on the same benchmark (vs 90.13% here), with false-deny down from 10.88% to 3.19% and long-context accuracy up from 78.45% to 97.02%. Prefer it unless you specifically need the smaller model.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertForSequenceClassification
Ревизия весов
2f6ec6c

0 моделей