/ Модель

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

Контекст
8 192 токена
Параметры
140 млн
Лицензия
Apache 2.0
Архитектура
modernbert · dense
Библиотека
transformers
Опубликована
8 окт 2026

Phocinae-Largha-150M-v1

Заполнение пропусковТекст → текст

Компактная двуязычная модель для локальной классификации типизированных решений, маршрутизации запросов и проверок с оценкой уверенности.

362скачиваний за 30 дней232лайкавеса обновлены12 окт 2026

Бенчмарки

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

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

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

  • LocalLLaMA/typed-decisions

    score · выше — лучше

    Результат

    0,906

    accuracy 0,906ece 0,2519kl_from_gold 0,0548
    Hugging Face Leaderboards

    Публичная таблицаревизия не подтверждена

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

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

Phocinae-Largha-150M-v1 — компактная модель для структурированных решений, разработанная Phocinae и дообученная на базе mmBERT-small от JHU CLSP. Она принимает описание состояния и набор типизированных вопросов: ответ «да/нет», выбор одного варианта или оценку по шкале 2–10. Модель выдаёт ответы и оценки уверенности за один проход; заявлена устойчивость к перестановке вариантов. Веса доступны в формате safetensors, лицензия — Apache-2.0.

Модель предназначена для локальных шлюзов согласования команд, выбора инструментов, маршрутизации и эскалации запросов, проверки шагов и фильтрации выходов. Это двуязычная модель с английским как основным языком; китайский оценивался на смешанном наборе, включающем машинный перевод и примеры, использованные при обучении. Размер — около 140,5 млн параметров, базовый контекст — 8192 токена; README описывает рабочую последовательность решения до 512 токенов.

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

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

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

Ограничения

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

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

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

Открыть на Hugging Face

斑海豹 Largha, the spotted seal: a 144.3M decision model (en-first; zh evaluated on machine-translated cases) (150M-class) for structured decisions — one forward pass per decision, on your own hardware. Not a chat model: it takes a state plus a list of typed questions (noul yes/no · choice pick-one · score 2–10) and returns calibrated answers with confidence, robust to option reordering. Downloads: Hugging Face · GitHub · ModelScope 魔搭 · 中文: FAQ 中文版 · 场景演示画廊.

Built on mmBERT-small (JHU CLSP, MIT) — see Weights & license for full lineage and license notes.

TL;DR

TL;DRvalue
parameters144.3M (mmBERT-small base: hidden 384 × 22 layers × 6 heads, 256k-vocab tokenizer, RoPE + sliding-window + full attention; base context 8192; decision sequence ≤512 tokens with a 192-token head attention window)
typed-decisions en (400 cases / 2000 decisions)0.906 (specialist: fitted on this dataset's train split; above the 0.735 teacher self-agreement reference — the dataset card flags scores far above it as label-specific overfitting) — Laya 0.766 (self-measured, native interface) · JEV 0.727 (generalist, zero-shot) · meraGPT 0.768 (generalist, zero-shot)
typed-decisions zh (machine-translated cases; training mix includes machine-translated Chinese ≈2,400 rows and native Chinese ≈1,400 rows)0.848
option-order flip robustness (lower is better)CPU fp32: flip150 0.0200 · flip400 0.0217 · random-mean 0.0144 · any 0.0283 (GPU fp16 0.0200/0.0217, note only)
inference latencyGPU fp16 p50 21.0 ms (RTX 5090) · CPU single-thread p50 1.64 s per case (1 case = 1 state + 5 questions, single forward pass) · CPU 8-thread batch 8–20 decisions/s
JevBench public-2310.5455 (126/231) — below the 58.4% gate, disclosed honestly; tool_selection 12/12 (n=12)
escalate routing (E1 gate, τ=0.6)+0.0876 kept-subset acc (0.906→0.9936 (kept subset)) while −55.0% LLM calls (79.6% at τ=0.5) (45.0% official-set escalate; τ swept on the eval set — re-scan per domain)
calibrationshipped column ECE 0.2519 (en) / 0.1941 (zh); with the bundled calibration column: 0.0168 / 0.0152; calibration temperatures 0.8660205/0.8081192/0.6624661 (applied at inference)

Full numbers, methodology, and evidence: BENCHMARKS.md.

See it in action

📽️ 全部 27 个场景演示 → docs/gallery/(审批安全 · 路由省费 · 实时分级 · 办公文档 · 流程工程 · 对照与可靠性;中文版 gallery/README_cn.md)

Why Phocinae: slash agent costs

55.0% fewer LLM calls, 21.0 ms per decision on an RTX 5090. Phocinae-Largha-150M (144.3M params) routes the repetitive decisions inside agent sessions — command approvals, tool selection (12/12 on JevBench tool_selection, k≤10), step checks, output screening — to a local single-forward-pass engine (8192-token base context, 512-token default head) instead of a 500–4,000-token API call. The τ=0.6 confidence gate cuts LLM traffic 55.0% with kept-subset accuracy 0.906 → 0.9936 and full routed accuracy 0.8135; deterministic inference means auditable, replayable decisions with zero data leaving your machine — at 21.0 ms GPU p50 (RTX 5090) vs 1.5 s+ API round-trips. Full cost model: docs/cost-savings.md.

Quick start — phocinae-server

phocinae-server ships the runtime, not the weights — fetch the weights first (step 1).

The official runtime is phocinae-server: a local FastAPI service (127.0.0.1 only) that loads these weights with a pure PyTorch forward (no extra runtime needed). Full spec: docs/protocol.md. Hardware tiers: docs/deployment.md.

# 1) get the weights (either CLI works; `hf` is the newer one)
hf download Phocinae/Phocinae-Largha-150M-v1 --local-dir ./largha
#   older huggingface_hub releases:
#   huggingface-cli download Phocinae/Phocinae-Largha-150M-v1 --local-dir ./largha

# 2) install the runtime and point it at that directory
pip install phocinae-server
PHOC_MODEL_DIR=./largha python -m phocinae.main   # http://127.0.0.1:8155

The directory produced by that download is exactly the layout PHOC_MODEL_DIR expects (model.safetensors, encoder/, tokenizer/, rl_agent_config.json).

From Python (the same engine the server uses):

from phocinae.engine import Engine

eng = Engine("./largha", device="cpu")   # device="auto" selects CUDA when present
answers, confidence, action, usage = eng.run(
    "The agent restarted nginx after checking the logs and the health endpoint is green.",
    [{"id": "ok",   "type": "noul"},
     {"id": "act",  "type": "choice", "options": ["allow", "ask", "deny"]},
     {"id": "risk", "type": "score"}],
)
# answers    -> {'ok': False, 'act': 0, 'risk': 3}
# confidence -> {'ok': 0.668, 'act': 0.409, 'risk': 0.1633}
# usage      -> {'input_tokens': 146, 'output_tokens': 0}
# pass with_scores=True to get a 5th value (per-option scores)

One decision over HTTP:

curl -s http://127.0.0.1:8155/v1/systemone -H 'Content-Type: application/json' -d '{
  "model": "Phocinae-Largha-150M-v1",
  "state": "The agent restarted nginx after checking the logs and the health endpoint is green.",
  "questions": [
    {"id": "ok",   "type": "noul",   "threshold": 0.65},
    {"id": "act",  "type": "choice", "options": ["allow", "ask", "deny"]},
    {"id": "risk", "type": "score"}
  ]
}'
{
  "model": "Phocinae-Largha-150M-v1",
  "answers": {"ok": false, "act": 0, "risk": 3},
  "usage": {"input_tokens": 146, "output_tokens": 0},
  "answer_confidence": {"ok": 0.668, "act": 0.409, "risk": 0.1633},
  "action": {"act": {"act_probability": 0.1581}},
  "routing": {"model": "Phocinae-Largha-150M-v1", "device": "cpu", "perm": "none", "backend": "phocinae-pure-torch"}
}

Known limitation in tool routing. Router.route_tool() confuses semantically close tool names. Reproducible case: state "The user wants to find the latest news about the product launch." with the six tools web_search / read_file / run_command / list_files / fetch_url / ask_user returns fetch_url, not web_search, at confidence ≈0.33. Treat low-confidence tool picks as escalate-worthy rather than final.

answers values: noul = bool · choice = 0-based option index · score = integer 2–10. Errors: 422 (unknown model/type, >64 questions, choice without options, score with options, threshold outside [0,1]) · 413 (>2 MiB body) · 401 (bearer token). Extension keys answer_confidence / action / routing can be disabled with PHOC_EXTENSIONS=0.

Documentation

What it is / what it is not

  • For: structured decisions — approval gates, tool routing, escalation, document triage, step checks, output screening; anywhere you want a fast, cheap, local decision layer instead of a large model.
  • Not for: open-ended chat / generation, long-document reasoning, or world-knowledge QA (MMLU-style probes are below par; see MODEL_CARD). Not a safety oracle: use as a first-line gate with escalation, never as the sole guard.

Honest disclosures

  • JevBench public-231: 0.5455 (126/231) vs a 58.4% acceptance gate — not passed. We publish the number as measured; JevBench (public-231) rows were held out of training.
  • Training-overlap disclosure (corrected 2026-10-10): the fine-tune lineage includes an error-correction pair pool (500 items) mined from model predictions on the typed-decisions test rows (82/100 of the S1MB benchmark's typed-decisions cases; 151/500 decisions) and sampled rows from a Jev-8 training pool (18/4,055 banking77-test; 13/~5,500 clinc_oos plus-test). A re-audit on 2026-10-12 quantifies the pool's overlap with the full typed-decisions test split: 500 / 2,000 decisions across 282 / 400 cases; a clean re-score without the pool — same recipe, pairs swapped back out — measures 0.791 (published in the dataset discussion, 2026-10-12). Full details: MODEL_CARD.md.
  • zh results are on machine-translated cases; the training mix includes machine-translated Chinese (≈2,400 rows) and native Chinese (≈1,400 rows) — treat zh as an in-mix (fitted) evaluation, not zero-shot cross-lingual transfer.
  • Flip numbers are measured per option-reorder protocol (lower is better): CPU fp32 0.0200/0.0217 (flip150/400 reversed) · random-mean 0.0144 · any 0.0283. GPU fp16 0.0200/0.0217 and 1k-row 0.0181/0.0150/0.0331 are note-only values from different protocols.
  • Calibration: the shipped column has ECE 0.2519 (en). Calibration temperatures (0.8660205/0.8081192/0.6624661) are stored in the model repo config and applied at inference by phocinae-server. A recommended recalibration column is bundled under calib/.

Weights & license

  • model.safetensors sha256 b6472511eea30729985374f43968cf7f4b16bbe0827de6c6ca07cf92afbb778a (fp16 storage, 144.3M params); trained from jhu-clsp/mmBERT-small on LocalLLaMA/typed-decisions (train split + flip-augmented reorderings), recipe in rl_agent_config.json.
  • Apache-2.0 (see LICENSE); base encoder jhu-clsp/mmBERT-small is MIT (see NOTICE). · Repo layout: model.safetensors · encoder/ · tokenizer/ · rl_agent_config.json · checkpoint_meta.json · figures/ · docs/.

Credits

Version & machine-readable sources

  • This release: v1.1 — pinned tag on the model repository (v1.0.0 marks the previous release), for reproducible citation. Resolve its commit with git ls-remote --tags https://huggingface.co/Phocinae/Phocinae-Largha-150M-v1. (No commit hash is written into this file on purpose: it would go stale on the next commit.)
  • Machine-readable facts (same numbers as this card, for AI systems and retrieval pipelines): llms.txt
  • Citation metadata: CITATION.cff
  • Landing page (mirrors this card, with structured data): https://phocinae.github.io/Phocinae-Largha-150M-v1/

Citation

Machine-readable: CITATION.cff. BibTeX:

@misc{phocinae2026largha,
  title  = {Phocinae-Largha-150M-v1: A 144.3M-parameter bilingual typed decision model},
  author = {Phocinae Project},
  year   = {2026},
  url    = {https://huggingface.co/Phocinae/Phocinae-Largha-150M-v1},
  license = {Apache-2.0}
}

Revision history

  • 2026-10-09 — v1.1 refresh. Weights upgraded (each metric in this card re-measured on the new weights; previous release sha256 db79d5ee2f16597f34e564f5a4363bddb5b5bbd9827c01819725dabcc7802697). Figures/gallery re-rendered; optional calibration column added under calib/.
  • 2026-10-09 — docs. Expanded quick start (weight download, Python & HTTP examples, tool-routing caveat); added landing page & machine-readable sources section.
  • 2026-10-10 — card metadata. Removed the machine-readable base_model field; lineage (mmBERT-small, MIT) stays disclosed in prose throughout this card (see Weights & license).

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
ModernBertForMaskedLM
Ревизия весов
6fd3133

0 моделей