/ Модель

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

Лицензия
Apache 2.0
Архитектура
tamev · dense
Базовая модель
TinyBERT_General_4L_312D
Библиотека
transformers
Опубликована
25 сен 2026

tamev-nano-tinybert

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

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

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

Бенчмарки

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

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

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

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

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

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

TAMEV-Nano-TinyBERT — компактная модель принятия решений и маршрутизации, разработанная автором репозитория Tamkimd. Она принимает состояние, вопрос и список вариантов, а затем оценивает варианты и возвращает распределение вероятностей; поддерживает выбор одного из K вариантов, ответы «да/нет» и порядковую оценку. Модель предназначена для маршрутизации запросов к инструментам и агентам, определения намерений, сортировки очередей и оценки по заданной шкале. Это компонент для встраивания в систему, а не автономный агент или генератор текста.

В основе лежит энкодер huawei-noah/TinyBERT_General_4L_312D с объединённой головой оценки вариантов. Модель обрабатывает варианты независимо друг от друга, поэтому перестановка списка меняет порядок оценок, но не сами оценки; каждому варианту выделяется окно до 48 токенов. В README приведены результаты на внутреннем наборе: точность top-1 80,93% и ECE 0,0041; эти показатели не гарантируют качество на других данных. Поддерживаются английский язык, инференс на CPU и форматы Safetensors и ONNX; в карточке указана лицензия Apache-2.0.

Ключевое ограничение — точность и калибровка зависят от распределения данных: на незнакомых задачах качество может быть близким к случайному, поэтому перед применением на собственной очереди или каталоге требуется дообучение и проверка. Результаты зависят от формулировок вариантов, а модель не предназначена для генерации текста, ответов на фактические вопросы или использования в качестве единственного непроверенного механизма безопасности. Версия ONNX INT8 совпадала с FP32 в 96,5% из 1024 проверенных примеров.

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

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

Ограничения

Качество и калибровка измерены на данных, близких к обучающим; на незнакомых наборах точность может быть близка к случайной, поэтому требуется адаптация и оценка на целевом распределении. Результат зависит от формулировки вариантов; INT8 не полностью совпадает с FP32, а модель не предназначена для генерации текста или самостоятельного контроля безопасности.

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

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

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

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

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

Открыть на Hugging Face

TAMEV-Nano-TinyBERT — Tiny Decision Model & LLM Router

Scores your candidate options instead of generating text. Send a state and a list of options — a tool menu, a queue list, an intent catalogue, a rubric — and get back calibrated probabilities over those options in one forward pass, on CPU. choice (one of K), noul (yes/no) and score (ordinal) go through the same call.

Top-1 ECE Latency Permutation drift Parameters License

top-1 80.93% · ECE 0.0041 · 14.41 ms p50 on a single CPU thread · 0.0 (bit-exact) drift under option permutation.


⚡ At a glance

Top-180.93% (95% CI 80.40%–81.45%), n=19,999 · top-3 98.07%
CalibrationECE 0.0041 (95% CI 0.0034–0.0101) · Brier 0.2576 · NLL 0.4755
Latency14.41 ms p50 · 61.93 ms p95 · 44 calls/s — a single CPU thread
Order0.0 (bit-exact) under option permutation (159,992 pairs, 0 flips)
Size14,390,185 released parameters · Apache-2.0
Runs onCPU, Apple Silicon, mobile/edge via ONNX
Answerschoice (one of K) · noul (yes/no) · score (ordinal rubric)

This tier is self-contained: the backbone and pointer head are already fused in model.safetensors.


🚀 Quick start

from transformers import AutoModel, AutoTokenizer

model_id = "Tamkimd/tamev-nano-tinybert"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(model_id, trust_remote_code=True)

# options are an argument of the call -- the class list is not baked into the weights
result = model.predict_decision(                 # `model.decide(...)` is an alias
    state="My transaction on a Visa card was rejected while I was travelling in Tokyo.",
    question="Which service queue should handle this incident?",
    options=["verify_travel_unblock", "file_fraud_dispute", "replace_damaged_card", "branch_appointment"],
    tokenizer=tokenizer,
)

print(result["best_option"], f"{result['confidence']:.0%}")   # -> the queue to route to
print(result["probabilities"])                                  # calibrated, sums to 1

Requirements: torch>=2.4, transformers>=4.40, Python ≥ 3.10.

Typed questions in one call — choice / noul / score

The tamev package is not on PyPI yet; install it from the repository:

from tamev import Choice, Noul, Score, TypeSafeDirectClient

with TypeSafeDirectClient(model_name="TAMEV-Nano-TinyBERT") as client:
    res = client.system_one(
        state="Customer reports a debit card block during an overseas ATM withdrawal.",
        questions={
            "action": Choice(
                instructions="Select the incident resolution playbook",
                criteria={
                    "travel_unblock": "Verify identity and lift the travel restriction",
                    "dispute_charge": "Open an unauthorized-transaction fraud case",
                    "branch_visit": "Direct the customer to the nearest branch",
                },
            ),
            "is_emergency": Noul(instructions="Is the customer stranded and in urgent need of cash?"),
            "urgency_score": Score(instructions="Rate the incident urgency",
                                   criteria=["Routine", "Elevated", "Critical"]),
        },
    )
    print(res.answers["action"].choice, res.answers["action"].confidence)
    print(res.answers["is_emergency"].noul, res.answers["urgency_score"].score)
# From a TAMEV source checkout
uv pip install -e ".[serve]"

Over HTTP

uv run tamev serve --checkpoint Tamkimd/tamev-nano-tinybert --port 8008 --device cpu

curl -X POST http://127.0.0.1:8008/v1/systemone \
  -H "Content-Type: application/json" \
  -d '{"state": "Payment processor latency spiked to 4s", "questions": {"playbook": {"type": "choice", "instructions": "Pick a remediation", "criteria": {"throttle": "Throttle traffic", "scale": "Scale replicas", "restart": "Restart pods"}}}}'

🎯 Use cases

LLM routing · tool-call gating · agent routing · intent routing (77-option catalogues are scored in full) · safety and policy triage · multiple-choice scoring · ordinal scoring. The candidate list is an argument of the call, so the same checkpoint serves a tool menu, a queue list or a rubric without retraining.


🧭 Why not just a classifier — or an LLM router?

  • A fixed-label classifier freezes one output per class: add an option, retrain. TAMEV-Nano-TinyBERT scores whatever list you pass in.
  • A generative router writes text your code then parses — prompt tokens, parse failures, and a number that is not a probability.
  • TAMEV-Nano-TinyBERT returns a calibrated distribution over your options in one forward pass.

🔒 Permutation invariance

Guaranteed by construction, measured on these weights. In this checkpoint the state is encoded once, then each option is encoded jointly with the state — no option ever attends to another option, and one shared function scores every option slot. Reordering your candidate list therefore reorders the score vector — it cannot change it. That is an architectural property, not a trained behaviour, and it holds on weights nobody has trained at all.

  • Measured: 0.0 (bit-exact) drift over 8 random permutations x 19,999 evaluation items = 159,992 reordered pairs, with 0 decision flips, through the documented predict_decision helper.
  • Bounded, too: each option gets its own 48-token window and options are encoded in chunks, so a 77-option question is scored as 77 options instead of being truncated.
  • Not covered: order is free, wording is not — rephrasing an option changes its score, and nothing here makes the model right about your domain.

📊 Evaluation

The set. 19,999 balanced held-out typed-decision items, scored with the weights in this repository through the documented predict_decision helper — one call per item, one CPU thread, safetensors FP32. The split is held out against training, validation and calibration by exact-id, normalised state-text, passage-group and question-text checks, all zero. It shares the same question cells as training by construction, which is why the external rows below exist.

Top-1 / top-3 are exact match; ECE (95% CI 0.0034–0.0101), Brier and NLL are temperature-scaled proper scores (lower is better); permutation drift (159,992 permutation pairs, 0 flips on the shipped weights) is the largest change in the score vector when the candidate list is reordered.

Independently replicated. A second, independent full-set run of the same weights returned identical top-1, top-3, ECE, Brier and NLL rows.

The same rows with content-free option text. The rows above carry each score cell's real option text, which is what a caller sends. On the identical rows with identical labels and only that text replaced by the content-free Rating i template DecisionItem.from_dict synthesises, this checkpoint scores top-1 0.7538 (-5.55pp vs the row above), top-3 0.9374, ECE 0.0113 — read the row above as the deployment number. This row is instrument history and is deliberately kept out of the headline.

Calibration

  • ECE 0.0041 (95% CI 0.0034–0.0101) · Brier 0.2576 · NLL 0.4755 over 19,999 items, temperature-scaled with temperature = 1.5 plus the per-K map in config.json.
  • Project criterion is ECE ≤ 0.05; this tier meets it.
  • The per-K calibration_by_k map served with these weights is inherited unchanged from the previous generation of this tier and was not refit on this head; only the scalar temperature is this checkpoint's own value.

⚡ Performance

MeasurementValueConfiguration
Latency p50 / p9514.41 ms / 61.93 mspredict_decision, a single CPU thread, no option cache (option_fusion: cross)
Raw forward p50 / p958.87 ms / 10.52 msone uncached forward pass
Throughput44.0 req/sone call per item

📦 Export formats

RuntimeFileSize
PyTorch FP32model.safetensors54.9 MiB
Apple Metal MPS FP16model_mps_fp16.pt27.5 MiB
Apple MLXweights.npz54.9 MiB
ONNX Runtime FP16model_fp16.onnx27.5 MiB
ONNX Runtime INT8model_int8.onnx14.2 MiB
ONNX Runtime FP32model.onnx54.7 MiB
C++ LibTorch (TorchScript)model.torchscript55.1 MiB

Sizes are the files in this repository, in MiB. ONNX INT8 is dynamic-quantized and not bit-exact: it agrees with FP32 on 96.5% of 1024 sampled items; every other format here agrees on 100%. ONNX FP16 is a cast of the FP32 graph (not a re-export) at half the download, and picks the same answer on 512 sampled gate items. The Hub marks this file Suspicious (Protect AI PAIT-TCHST-301): a TorchScript archive is a ZIP of pickles, so the container alone puts every one of them in scope for a code-execution finding, whatever is inside — the same scan passes this repository's model_mps_fp16.pt, which is a real pickle. This one was audited statically rather than loaded: all 101 callables across 3 pickle members are torch types, and the 80 TorchScript source files (77,973 characters) contain no file, process or network primitive and no custom operators. The audit disassembles the pickles rather than loading them, so running it cannot execute what it inspects, and it ships with the source distribution. The file it covers is sha256 0e132aed8910.

hf download Tamkimd/tamev-nano-tinybert --local-dir ./tamev-nano-tinybert

Compatibility note. TypeSafeDirectClient speaks this project's own /v1/systemone request/response shape. It is not a wrapper around TypeSafe's models and carries no TypeSafe quality guarantee.


🏗 Architecture & training

  • Encoder only, no decoder: 312-d backbone (huawei-noah/TinyBERT_General_4L_312D), cls pooling, a 64-d projection, and one pointer head shared across option slots (option_fusion: cross). 128 tokens of state, 48 per option.
  • Trained supervised on (state, typed questions, candidate options, label) rows — not on generated text. choice, noul and score questions share the weights.
  • Not knowledge-distilled. The corpus carries no teacher-probability field, so the distillation term never fires and the stage name in the config is historical. (Stated because the project name makes the opposite easy to assume.)
  • Calibrated after training (temperature scaling, plus the per-K map served in config.json); the training config and the evaluation harness ship with the TAMEV source distribution.

🎯 Intended use

Built for: the use cases above, through predict_decision / decide or the local HTTP service. It is a decision component inside your system, not an autonomous agent, and it does not know your policy — it scores the options you hand it.

Not for: open-ended generation, factual question answering, or use as an unaudited safety control.


⚠️ Limitations

  • Accuracy is in-distribution. The held-out set is drawn from the same source/question cells and templates as training, and the exact-match leakage checks are blind to a paraphrase of a training passage. Pointed at any suite this tier was not trained on — a public QA set, your own ticket queue — top-1 is near chance: fine-tune on your distribution before shipping.
  • Calibration. Set-specific. ECE 0.0041 and Brier 0.2576 on the held-out set (n=19,999), 95% CI 0.0034–0.0101 — read the interval, not the point estimate. Target is ≤ 0.05; this tier is inside it.
  • Latency is one host, one catalogue shape. 14.41 ms p50 was measured on a single CPU thread on Apple M4, no option cache (option_fusion: cross); your numbers will differ.
  • ONNX INT8 is not bit-exact. Dynamic quantization has no calibration step, so model_int8.onnx agrees with FP32 on 96.5% of 1024 sampled items. The pointer head stays FP32, which keeps the disagreement this low; ONNX FP32, TorchScript, MPS-FP16 and safetensors agree on 100% of the same sample. Use INT8 for the 74% size cut, not for throughput.
  • This is a decision model, not a general one. It scores the options you pass it; it does not answer questions or write text.

🥊 TAMEV model zoo

TierModelTop-1ECEp50 (1 thread)
Nanotamev-nano-tinybert80.9%0.00414.4 ms
Nano-Flashtamev-nano-flash-tinybert77.5%0.0194.0 ms
Microtamev-micro-minilm82.2%0.0227.3 ms
Smalltamev-small-modernbert84.1%0.03860.8 ms

Medium and Large: in progress — larger than the encoder tiers and graded on a different instrument, so no number is published for them yet.

Encoder tiers ship as one fused model. Tiers were evaluated with different option budgets — compare within a column.


🧱 Model details

DimensionSpecification
TierNano
Model typeencoder
Base modelhuawei-noah/TinyBERT_General_4L_312D
Released artifactFused model (backbone + cross-fusion pointer head) — 14,390,185 parameters
Hidden / projection dim312 / 64
Poolingcls
Max state / option length128 / 48 tokens
Calibrated temperature1.5
Suggested deploymentRaspberry Pi-class ARM CPU, edge x86 CPU, mobile via Core ML/ONNX export
  • Repository: Tamkimd/tamev-nano-tinybert · License: Apache-2.0 (LICENSE)
  • Call: model.predict_decision(state, question, options, tokenizer=...) — model.decide(...) is an alias. The local tamev service exposes the same shape over HTTP.

Instrument history — earlier checkpoints served here. Pin revision= when you cite a number.

RevisionWeightsTop-1 / Top-3
5fde4fbb66from 2026-09-270.5831 / 0.8801
36da2bee0ffrom 2026-09-270.6961 / 0.9576

📄 License & citation

Apache License 2.0 — LICENSE.

@misc{tamev2026,
  title={TAMEV: System One Decision Models for Edge AI, LLM Routing and Tool-Call Gating},
  author={TAMEV Contributors},
  year={2026},
  publisher={Hugging Face},
  url={https://huggingface.co/Tamkimd/tamev-nano-tinybert}
}

🔗 References

  • Base model: huawei-noah/TinyBERT_General_4L_312D
  • Training suite: ten public classification sources (listed under datasets: above), re-formed into typed-decision records with train/validation/calibration/test splits held out by question cell.

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

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

GPU в ailist

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

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

MLX-модели работают только на Apple Silicon.

Ревизия весов
ad15b45

0 моделей