/ Модель

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

Контекст
32 768 токенов
Параметры
281 млн
Лицензия
Apache 2.0
Архитектура
rockandegg_v3_systemone · dense
Базовая модель
Qwen3-0.6B-Base
Библиотека
transformers
Опубликована
16 ноя 2026

RockAndEgg-313M-v3

Классификация текстаТекст → label4 профессии
340скачиваний за 30 дней0лайковвеса обновлены25 ноя 2026

Описание модели

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

Компактная модель на базе Qwen3 для классификации и выбора среди заданных вариантов с повторным использованием общего контекста.

RockAndEgg-313M-v3 — компактная модель принятия структурированных решений, разработанная Moeshawky на основе дообученной Qwen3. Она кодирует общий контекстный текст один раз, а затем оценивает вопросы и варианты ответов относительно кэшированного представления. Модель выдаёт распределение оценок и значение уверенности; свободный текст не генерирует. Архитектура включает 10 декодерных блоков Qwen3 без языковой головы и отдельную голову принятия решений; всего 313,2 млн параметров.

Указанный нативный контекст — 32 768 токенов, однако квалифицированный режим адаптера ограничен 256 токенами состояния и 64 токенами варианта. Поддерживаются типы решений choice, score и noul; модель ориентирована на английский язык. Повторное использование кэша делает её подходящей для сценариев с несколькими вопросами об одном состоянии, хотя вычисления оценки вариантов растут с их количеством.

Выпущена в формате safetensors, лицензия Apache-2.0. Модель предназначена для поддержки решений и требует проверки в целевом приложении: точность зависит от рабочей нагрузки, уверенность не откалибрована, а другие языки не тестировались.

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

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

Ограничения

Уверенность представляет собой некалиброванные значения softmax и не должна трактоваться как вероятность правильного ответа или использоваться как порог риска. Квалифицированная конфигурация ограничена 256 токенами состояния и 64 токенами варианта; модель уступает указанному базовому сравнению по точности, обучена на английских данных, другие языки не тестировались и свободные ответы не генерируются.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

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

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

RockAndEgg-313M-v3

A compact, non-generative decision model for efficient structured decision-making over a shared contextual state.

RockAndEgg reads a state — a deployment log, a support ticket, an invoice, a workflow trace — and answers typed questions about it. It returns a probability distribution and a confidence value per question. It does not generate text.

Its engineering proposition is reuse. A request can carry several questions about one state, and the state is encoded once; every question and every candidate option is scored against that single cached representation. The backbone runs a fixed number of times regardless of how many questions share the state.

Highlights

  • 313,161,733 parameters — 312,892,928 backbone + 268,805 decision head.
  • Headless Qwen3-derived backbone — 10 decoder blocks, Qwen3Model, no LM head.
  • No autoregressive generation — no vocabulary projection at inference, no sampler, no generation loop.
  • Three native decision primitives — choice, score, noul.
  • Shared-state KV-cache reuse — one state encode per request, independent of question and option count.
  • Batched candidate scoring — options are isolated in batch rows and scored in one pass.
  • 10 MiB KV cache at S=256 in FP16 (20 MiB at S=512).
  • 313M-class footprint — 626,323,466 bytes of raw FP16 parameter storage (313,161,733 × 2 B); the serialized model.safetensors is 626,337,154 bytes including its header.

Quantized variant

A qualified mixed-precision INT8 variant is available at moeshawky/RockAndEgg-313M-v3-INT8: quantized backbone projections (W8A16, group size 128) with FP16 embeddings and decision head, ~24.5% smaller, decision quality statistically indistinguishable from this FP16 release on the canonical panel. See that repository's model card for methodology, benchmark results, and deployment limitations.

Model specifications

FieldValue
Parameters313,161,733 (backbone 312,892,928 + head 268,805)
BackboneQwen3-derived, 10 decoder blocks, Qwen3Model (no LM head)
Hidden size1024
Intermediate size3072
Attention16 query heads / 8 KV heads (GQA 2:1), head_dim 128, full attention
PositionalRoPE, rope_theta 1,000,000, max_position_embeddings 32,768
Vocabulary151,936, tied embeddings
NormalizationRMSNorm, rms_norm_eps 1e-6
Decision headquery-type embedding (3) + 1024→256→1 scorer + per-type temperature
Decision primitiveschoice, score, noul
State token limit256
Option token limit64
Outputper-question probability vector + confidence (max probability)
Weight precisionFP16 (all 122 tensors)
Raw parameter storage626,323,466 bytes (313,161,733 × 2 B, FP16)
Serialized checkpoint626,337,154 bytes (model.safetensors, includes header)
LicenseApache-2.0
Runtimetorch, transformers, safetensors; HTTP server additionally needs fastapi, uvicorn

The 256/64 token budgets are the qualified configuration. They are set explicitly in the adapter (max_state_len=256, max_option_len=64); the Transformers defaults are larger and are not the qualified operating point.

Architecture

flowchart LR
    A["State text"] --> B["Backbone prefill<br/>(one pass)"]
    B --> C["DynamicCache<br/>shared KV"]
    C --> D["Option rows<br/>(cache forked, not re-encoded)"]
    D --> E["Decision head<br/>qtype + scorer"]
    E --> F["Typed distribution<br/>per question"]

The mechanism, in order:

  1. Encode the state once. A single forward pass produces the backbone's DynamicCache.
  2. Fork the cache, not the text. batch_repeat_interleave replicates the cached state across option rows — an integer repeat, not a re-encode.
  3. Isolate options in batch rows. Each option is scored in its own row against the repeated cache; option rows never attend to each other.
  4. Mix only in the head. The head reduces each row to one scaled logit; a softmax over a question's rows gives its probability vector.
  5. Pad, never reorder. Rows are padded to one width; padded positions receive a large negative logit and are excluded from the softmax.

Backbone invocation count stays fixed as questions and options grow, but candidate-scoring cost is not constant: it grows with the number of option rows scored. The saving is the eliminated re-encoding of the state, not a claim of constant-time inference.

The backbone derives from Qwen/Qwen3-0.6B-Base (Apache-2.0), distilled into a compact 10-layer form. The decision head and the shared-state scoring contract follow the typed-decision, head-over-backbone position.

Decision primitives

PrimitivePurposeExample
choiceSelect among discrete alternativesChoose the next workflow action
scoreSelect an ordinal level from an ordered scaleAssess operational risk
noulEvaluate a binary propositionDetermine whether human review is needed

Each question returns probabilities in the order the options were supplied, the chosen_key of the highest-probability option, and confidence (the maximum probability).

Two contracts matter for correct use:

  • score levels are positional. Levels are interpreted by position, so labels must be ordered and contiguous.
  • Option text is part of the input. Options render as key: value when a value is supplied; changing the rendering changes the probabilities.

An optional caller-side helper, systemone_semantics.py, renders state-grounded noul options and supports stable answer_keys. It is a convenience for reproducible option rendering, not part of the model's identity, and it never reads the state.

Benchmarks

Decision quality

Panel: LocalLLaMA/typed-decisions test split — 400 dossiers × 5 questions = 2,000 decisions. Canonical convention: every decision scored against the dataset gold label, decision taken as argmax of the model probabilities.

ModelAccuracyNLLBrierScore MAE
RockAndEgg-313M-v3 (published weights)74.40%0.72830.07220.4956
Laya, typed-decisions head (full 1024-token context)76.70%0.72720.06150.4707

Per decision type: choice 72.83%, noul 81.33%, score 70.37%.

Paired difference: −2.30 percentage points, 95% CI [−4.15, −0.25] (400 dossier clusters; 138 corrections, 184 regressions). The interval excludes zero, so on this panel and protocol Laya scored higher. This is a statement about one panel, not a universal ranking, and it is not an equivalence or non-inferiority claim — no margin was pre-specified.

Why 74.40% / 76.70% and not 74.50% / 76.65%. Both pairs are the same shipped weights (bd30d80e…) and the same Laya typed-decisions checkpoint (4fa56de7…) on the same 400-dossier / 2,000-decision panel at S=256 in FP16. The 74.50% / 76.65% pair is the 2026-11-23 independent benchmark package (paired −2.15 pp [−4.15, −0.20]); the 74.40% / 76.70% pair is the 2026-11-25 canonical re-measurement (paired −2.30 pp [−4.15, −0.25]) reported here. The differences — 0.10 pp for RockAndEgg (two decisions) and 0.05 pp for Laya (one decision) — sit inside the measured FP16 run-to-run noise floor and reflect the two harnesses' independent paired-bootstrap implementations. The canonical re-measurement is the value used throughout this card.

The advantage is workload-dependent. RockAndEgg's measured strength is inference efficiency as questions share a state, not raw exact-match accuracy. Laya is better calibrated on this panel (Brier 0.0615 vs 0.0722) and slightly better on ordinal error.

Not reproduced here. An earlier out-of-distribution investigation reported large accuracy differences from option-rendering variants. That investigation contained evaluation-contract defects, including reversed human_review option polarity and an inconsistent ordinal rubric. Its OOD conclusions are withdrawn and are not established results. No replacement OOD result has been qualified, so none is claimed.

Inference latency and memory

Current published weights (bd30d80e…) against the native Laya typed-decisions implementation (4fa56de7…), measured in-process on 2× Tesla T4 (SM 7.5) in FP16 over 3 rounds. The current weights were faster in 32 of 32 measured configurations.

Measurement (current published weights)RockAndEgg-313M-v3Native Laya
Configurations faster32 / 32—
Latency ratio, F1 (one question, shared state)reference0.90–0.96× (near parity)
Latency ratio, F8 (eight questions, shared state, S=256)reference4.3× slower
Latency ratio, independent (non-shared) statereference0.88–0.99× (advantage vanishes)
Peak allocated GPU memory, matched S256/F8 config860 MB2504 MB
Cold load1.6 s15.1 s

The ratio is RockAndEgg latency over Laya latency, so below 1 favours RockAndEgg. The win is the shared-state KV reuse — the state is encoded once rather than re-encoded per question — so it is fan-out dependent: near parity at one question, 4.3× at eight, and it disappears when questions do not share a state. It is not a universal advantage. The memory difference is real but is not attributable to KV reuse alone: the models differ in parameter count (313M vs 421M) and in parameter-storage characteristics.

Historical (previous checkpoint 17a54706…, one T4, FP16, in-process): the earlier stratified paired ratio was ~1.33× (range ~1.05–2.00×, 11/11 configs), with ~0.85 GB vs ~2.68 GB peak reserved VRAM. Those figures describe the pre-promotion checkpoint and are retained as historical; they are not the current result. A separate matched workload on an RTX PRO 6000 favoured Laya on p50 latency; results differ by hardware and workload and are not combined.

Shared-state fan-out

The mechanism is measured, not asserted. Backbone forwards per request, counted by a hook inside the model:

ArmBackbone forwards per request
RockAndEgg, shared state2 — at every fan-out
RockAndEgg, one question at a time2F
Laya native1 (but its single batched pass still processes the state F times)

At F=1 the shared and non-shared paths do identical work, which is the control that shows the harness measures the stated mechanism. From F=2 upward the shared path's advantage grows with fan-out; in the current re-benchmark this mechanism is the measured 4.3× latency advantage at F8/S256 (41 ms vs 177 ms).

Request-level concurrency

2× Tesla T4, FP16, S=256, in-process serving, 256 requests per level:

ReplicasRequests/sDecisions/sp50 (ms)p99 (ms)
120.70103.548.555.0
239.62198.149.661.7
437.42187.1102.9116.3
828.65143.3205.2298.5

Throughput scales 1.91× from one replica to two with p50 unchanged. Beyond two replicas the aggregate regresses: both devices measure 91–94% GPU utilisation, so extra replicas queue rather than add capacity. The useful operating point on this substrate is one replica per T4.

This is in-process serving, not HTTP. No queueing model, no batching across requests. HTTP latency is not compared.

Quick start

Requires torch, transformers, and safetensors. The model ships custom modeling code, so both loaders need trust_remote_code=True.

pip install torch transformers safetensors
import torch
from transformers import AutoModel, AutoTokenizer
from systemone_inference import Question, SystemOneInference, SystemOneRequest

model_id = "moeshawky/RockAndEgg-313M-v3"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModel.from_pretrained(
    model_id, trust_remote_code=True, dtype=torch.float16
).to("cuda").eval()

adapter = SystemOneInference(model, tokenizer, max_state_len=256, max_option_len=64)

request = SystemOneRequest(
    state=(
        "Deployment failed at 03:12 UTC. The on-call engineer rolled back "
        "the release and opened an incident."
    ),
    questions=[
        Question(
            type="choice",
            instruction="What happened?",
            options=["The deployment failed", "The deployment succeeded"],
        ),
        Question(
            type="score",
            instruction="How severe was it?",
            options=["none", "low", "medium", "high"],
        ),
        Question(
            type="noul",
            instruction="Does this need human review?",
            options=["false", "true"],
        ),
    ],
)

with torch.inference_mode():
    response = adapter(request)

for decision in response.decisions:
    print(
        decision.type,
        decision.chosen_key,
        round(decision.confidence, 4),
        [round(p, 4) for p in decision.probabilities],
    )

Verified output:

choice The deployment failed 0.566 [0.566, 0.434]
score high 0.3221 [0.2375, 0.2047, 0.2357, 0.3221]
noul false 0.5641 [0.5641, 0.4359]

systemone_inference.py ships in this repository. Download it into your working directory before running the example.

On CPU, load with dtype=torch.float32. BF16 is not supported on Turing (T4); use FP16 on CUDA.

Text-generation interfaces do not apply. There is no generate() path and no LM head. model.generate(...) does not exist. Use the adapter above or the HTTP API below.

Serving

The repository ships a FastAPI server. It needs fastapi and uvicorn in addition to the model dependencies.

pip install fastapi uvicorn

# Local directory (the script's own directory is used when it holds config.json)
python systemone_server.py

# From the Hub — the revision pin is mandatory for Hub sources
RAE_MODEL_ID=moeshawky/RockAndEgg-313M-v3 \
RAE_MODEL_REVISION=<commit-sha> \
RAE_PORT=8012 python systemone_server.py
EndpointMethodPurpose
/healthzGETliveness plus resolved configuration
/readyGETreadiness with per-check results
/v1/systemonePOSTtyped decisions for one state and question list
curl -X POST http://127.0.0.1:8012/v1/systemone \
  -H 'Content-Type: application/json' \
  -d '{
    "state": "Deployment failed at 03:12 UTC. Roll back or ignore.",
    "questions": [
      {
        "type": "choice",
        "instruction": "What should the operator do next?",
        "options": ["Roll back the release", "Ignore it"],
        "answer_keys": ["rollback", "ignore"]
      }
    ]
  }'

Representative response:

{
  "decisions": [
    {
      "type": "choice",
      "probabilities": [0.5273, 0.4727],
      "chosen_key": "rollback",
      "confidence": 0.5273
    }
  ],
  "truncated": false,
  "state_tokens": 12,
  "max_state_tokens": 256,
  "physical_state_len": 256,
  "context_policy": "fixed-256",
  "options_truncated": 0,
  "option_rows": 2
}

answer_keys is optional. Supply it to receive stable identifiers instead of option text as chosen_key; omit it and the key is the option text. Empty or whitespace-only states, and empty or duplicate answer_keys, are rejected with HTTP 422.

The server binds loopback by default. Binding a non-loopback address requires RAE_API_TOKEN; without it, startup fails rather than exposing an unauthenticated endpoint.

Intended use

Appropriate applications:

  • Agentic workflow decisions — routing, tool selection, next-action choice.
  • Structured classification over a fixed, known option set.
  • Candidate selection among enumerated alternatives.
  • Operational assessments — severity, risk level, triage.
  • Multi-question decision pipelines that share one state.
  • Resource-constrained inference on Turing-class GPUs or CPU.

RockAndEgg is a decision-support component. It produces a scored recommendation with a confidence value; it does not authorize consequential actions. Any deployment that gates a consequential action on its output requires application-specific validation and human oversight.

Limitations

  • Confidence is not calibrated. Probabilities are raw softmax at T = 1.0. The production ECE ≤ 0.05 gate is not met (0.1323 on the 2,000-decision FP16 panel). Do not use confidence as a calibrated probability of correctness or as a risk threshold.
  • Accuracy is workload-dependent. On the 2,000-decision panel the model trails Laya by 2.30 pp; its measured advantage is inference efficiency under shared state, not accuracy.
  • Bounded context. 256 state tokens, 64 option tokens. Longer inputs are truncated; the response reports truncated and state_tokens so an overlength state is never presented as fully evaluated.
  • English-centric. Training data is English; other languages are untested.
  • Fixed decision types. choice, score, noul only — no free-form label space and no instruction following.
  • Small evaluation panels. Per-type cells are 600–800 decisions and per-workflow cells 500, so small differences there are not resolved.
  • No safety tuning. The model scores options; it does not refuse and has no notion of harmful content.
  • Single-machine measurements. Latency, memory and concurrency figures are specific to the stated hardware and do not transfer unchanged.

Source code and technical documentation

Detailed evidence ships with this model repository: evidence/quality_metrics.json, evidence/latency_results.json, evidence/memory_results.json, evidence/predictions.jsonl, evidence/fp16_invariance.json, BENCHMARK.md, CALIBRATION_LIMITATIONS.md, and TRAINING_PROVENANCE.md.

License and attribution

Apache-2.0. The backbone derives from Qwen/Qwen3-0.6B-Base (Apache-2.0); training data is LocalLLaMA/typed-decisions (Apache-2.0); the benchmark arm uses convaiinnovations/laya (Apache-2.0). See ATTRIBUTION.md and LICENSE.

Citation

@misc{rockandegg313m_v3_2026,
  title  = {RockAndEgg-313M-v3: a non-generative typed-decision model},
  author = {moeshawky},
  year   = {2026},
  url    = {https://huggingface.co/moeshawky/RockAndEgg-313M-v3}
}

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

Класс архитектуры
RockAndEggV3SystemOneModel
Ревизия весов
a3dc14a

0 моделей