- K-IM-Deiction — judgment (triage) model for group-chat messages (standalone + LoRA adapter)
- Why this model exists
- What it does
- Where it fits — and where it does not
- Performance & evaluation at a glance
- Judgment model vs. prompting a large model (measured, 2026-11-05)
- Contents
- Input format
- Outputs
- Usage
- Serving it locally
- MLX edition (Apple Silicon)
- Resource footprint (measured 2026-11-07)
- Evaluation — V4 (frozen blind set, 498 windows, measured 2026-11-10)
- Evaluation — V2, previous release (held-out set, 1,000 windows, measured 2026-11-06)
- Training data and privacy
- Known limitations
- License
- 中文说明
- Why this model exists
K-IM-Deiction — judgment (triage) model for group-chat messages (standalone + LoRA adapter)
The kai-decision V4 model — a Sage2-style structured judgment model for group-chat messages — in one repo, two interchangeable forms. V4 is the current production release (promoted 2026-11-10). Its one change over the V3.1 recipe is that relevance signals are a model input: every window carries a structured signal header as its first text line, and a 16-dimensional signal feature vector is projected and fed into all seven heads alongside the pooled hidden state — so the needs-attention head can learn what is relevant to the user, not only what looks important in general. The previous production release, V2, is preserved unchanged under the v2/ folder (independently downloadable, including its MLX edition under v2/mlx/; the mlx/ folder holds the current V4 MLX edition).
- Standalone (repo root): the LoRA adapter already merged into the Qwen/Qwen3.5-0.8B backbone. Download and it runs — no separate base-model download, no PEFT setup for the backbone.
- LoRA adapter (
adapter/folder): the same model as an adapter (102.4 MB), for loading on top of your own Qwen/Qwen3.5-0.8B.
Both forms share the seven judgment heads and calibration files in this repo and produce the same judgments. The model reads one message window (signal header + recent context + the target message) and produces seven judgments in a single forward pass — median latency 40.6 ms per window on an RTX 4090 D (batch 1, ≤512 tokens).
Judgment layer, not decision layer. This model answers typed questions about a window (what kind of message is it, how likely is it to need attention, does it contain a to-do) and returns calibrated scores. It never decides or acts by itself: the decision — surface this message, create that task, escalate or ignore — belongs to the surrounding system: deterministic rules, attention budgets and thresholds you set, and ultimately people. Keeping the probabilistic model in the judgment layer and the decision in deterministic code (or human hands) is deliberate: it is what makes the scores safe to automate around.
Why this model exists
Group chats produce far more messages than anyone can read. The scarce resource is not information but attention: which of these hundreds of windows deserve a person's eyes, a reply, a follow-up?
Goal. Turn every message window into structured, calibrated judgment signals — fast enough and cheap enough to run on all of them, locally, before any human (or any large model) spends attention. Instead of asking a large language model to read every window at ~1.5k tokens apiece, a 0.8B specialist distilled from such a teacher makes the routine judgments in 40 ms on your own hardware, and only the windows it flags ever need a closer look.
What it does
For each window the model emits seven calibrated judgments in one pass (definitions in the Outputs section): a 7-class category, sentiment, importance / urgency / intensity scores, a needs-attention probability, and a has-todo probability. Downstream, these plug into software directly:
- Attention triage — rank each person's incoming windows by the calibrated needs-attention probability and surface only the top few per day (an attention budget), instead of an unread-badge firehose.
- To-do mining — windows with high has-todo probability become task-list candidates with an owner and a deadline to confirm, instead of actions dissolving into chat history.
- Routing and filing — the category head files windows into help / task / decision / info / discussion streams for dashboards, digests and retrieval.
- Priority queues — importance × urgency orders follow-up lists and escalation checks.
- Team-sentiment monitoring — sentiment and intensity aggregate into a daily pulse (spikes of negative intensity are visible without reading the raw chats).
- A pre-filter in front of large models — in an LLM pipeline, this model screens every window for ~0 marginal cost; only flagged windows are sent to a large model for deep reading or drafting. The comparison below quantifies what that trade buys.
Where it fits — and where it does not
Good fits
- Enterprise IM triage at volume: thousands of windows a day that no one can read end-to-end.
- Notification prioritization and daily digests in team-chat products.
- To-do / action-item extraction pipelines and follow-up reminders.
- Sentiment and escalation monitoring for support or operations groups.
- On-premise or edge deployment where chat content must not leave the network (this model runs fully locally; nothing is sent to an API).
- High-volume first-pass screening in front of an LLM, where per-window API cost would dominate.
Poor fits
- Open-ended reading comprehension, summarization or reply drafting — it emits judgments, not text; pair it with a large model for those.
- Languages, platforms or chat cultures beyond Chinese enterprise group chat (its training domain).
- Judging content it cannot see: attachments, images, links and quoted documents enter only as placeholder tokens in the window text.
- Being the sole arbiter of consequential decisions. Needs-attention is a distilled, partly subjective judgment operating close to its label-noise ceiling — use it to rank and filter, keep humans (or a large model) on the flagged minority.
Performance & evaluation at a glance
Measured on the frozen blind set described below (498 windows, narrow-caliber gold), adapter form:
| Item | Value |
|---|---|
| Root package size | 1.83 GB — standalone weights 1.71 GB + LoRA adapter 0.10 GB; tokenizer, heads and calibration files make up the rest (the repo additionally preserves the V2 package under v2/; the mlx/ folder holds the V4 MLX edition) |
| Latency | median 40.6 ms per window (RTX 4090 D, batch 1, ≤512 tokens, all 7 heads + signal projection in one forward pass) |
| Category macro-F1 | 0.670 (primary 5 classes) · 0.632 (support ≥10) · 0.620 (7 classes) |
| needs-attention | AUC 0.880 · ECE 0.017 (calibrated) |
| has-todo | AUC 0.945 · ECE 0.064 (calibrated) |
| Sentiment accuracy | 91.2% |
Before the switch, the merged root package was verified against the adapter-form evaluation path through the production serving path on 100 blind windows: needs-attention median absolute difference 0.000197, category top-1 agreement 100% — i.e. the bundle reproduces the evaluated model.
On live-traffic shadow replay (four days, assistant-prelabeled under the narrow caliber), V4 with no external relevance layer matched the V2 production line exactly: Precision@20 0.0889, Recall@20 1.00, zero key misses — the pre-registered result that qualified it for promotion. The honest costs, kept in full: V4's category and calibration quality is slightly below the unreleased V3.1 build (decision-class F1 0.444 vs 0.507; binary-head ECE 0.017 / 0.064 vs 0.006 / 0.048); its raw needs-attention scores on true positives still sit near zero (0.000–0.039), so the shadow pass came from within-session ranking, not from positives being scored high in absolute terms; and on a six-day merged replay its Recall@20 is 0.50 — signal-free positives remain its blind spot. Details in the Evaluation section.
Judgment model vs. prompting a large model (measured, 2026-11-05)
Why not just prompt a large model for these judgments? We measured it for the previous (v1.3) release, on that release's frozen held-out set (258 windows) and the same gold labels. It has not been re-run for V2 — the table below is the v1.3 measurement, kept as a reference for the specialist-vs-large-model trade-off; V2's own held-out results are in the Performance and Evaluation sections. The large-model baseline is DeepSeek (deepseek-chat API) prompted zero-shot with the full labeling specification as its system prompt — the same spec the teacher labels were produced under — at temperature 0.
| Metric | K-IM-Deiction (v1.3, 0.8B) | DeepSeek zero-shot (large model) | Difference |
|---|---|---|---|
| Output format compliance | 100% (structured heads, by construction) | 100.0% (258/258 valid JSON) | 0% (tie) |
| Category macro-F1 (7 classes) | 0.637 | 0.620 | +2.7% |
| Category macro-F1 (support ≥10) | 0.744 | 0.724 | +2.8% |
| needs-attention AUC | 0.801 | 0.781 | +2.6% |
| has-todo AUC | 0.965 | 0.959 | +0.6% |
| Sentiment accuracy | 89.1% | 94.2% | −5.4% |
| Importance / urgency within ±1 | 100% / 99.6% | 98.8% / 98.5% | +1.2% / +1.1% |
| Latency per window | 40.3 ms median (local, RTX 4090 D) | 1.91 s median (API round trip, incl. network) | −97.9% |
| Tokens per window | 186 processed on avg (median 139; windows left-truncated at 512), 0 generated — it emits numbers, not text | 1,496 consumed on avg (1,312 in + 184 out); 385,961 for the 258 windows | −87.6% |
| Data exposure | fully on-premise — messages never leave | every window is sent to a cloud API | — |
Difference = (this model − large model) / large model. Positive means this model scores higher; for latency and tokens, negative means this model uses less (better).
How to read this. On the triage judgments this model was distilled for, the 0.8B specialist matches or slightly beats zero-shot large-model prompting — at roughly 1/47 of the latency, zero marginal cost, and with private chats never leaving the premises. The large model is clearly better at sentiment (94.2% vs 89.1%) and remains the right tool for open-ended reading and drafting; the specialist is a filter in front of it, not a replacement for it.
About tokens. Tokens are the unit any transformer processes — this model has them too; the difference is how many and for what. It reads one window (186 tokens on average after truncation, measured on this held-out set) and generates zero tokens, because its outputs are numbers from the decision heads, not text. The prompting baseline re-sends the same ~1,000 tokens of labeling specification with every window (its 1,312 average input tokens = window + spec), then generates ~184 tokens of JSON per window. So even if this model were deployed on a cloud inference service billed per token, a window would consume only its ~186 input tokens and nothing else — the specification lives in its weights, not in a prompt it must re-read forever.
Two more reference points, also measured:
- Prompting the untrained Qwen3.5-0.8B base with the same specification produced parseable output on only 1.6% of the 258 windows — a small model cannot simply be prompted into this job; the ability comes from the distillation.
- The teacher (GLM-5.3) that produced the gold labels consumed ≈1,526 tokens per window while labeling the v1.3 training round (3,440,553 tokens / 2,255 windows) — the same cost class as the DeepSeek baseline, except it is paid once during dataset construction instead of on every window, forever.
Contents
| File | What it is |
|---|---|
model.safetensors |
Full merged model weights (Qwen3.5-0.8B backbone with the V4 LoRA merged in) |
adapter/adapter_model.safetensors |
The same V4 model as a LoRA adapter (r=64, alpha=128, dropout 0.05; language-model projections only) — alternative to the merged weights |
adapter/adapter_config.json |
PEFT config for the adapter (base: Qwen/Qwen3.5-0.8B) |
config.json / generation_config.json |
Model configuration (stock Qwen3.5) |
tokenizer.json, tokenizer_config.json, chat_template.jinja |
The base model's tokenizer files, copied verbatim from Qwen/Qwen3.5-0.8B (V4 ships the self-contained tokenizer.json; separate vocab.json / merges.txt remain in the v2/ package) |
preprocessor_config.json, video_preprocessor_config.json |
Stock Qwen3.5 processor configs |
v2/ |
The previous production release (V2) package, preserved unchanged and independently downloadable |
mlx/ |
MLX edition for Apple Silicon (slimmed text-only weights, heads as heads.npz, signal machinery, inference + service scripts) — the V4 model (the V2 MLX edition is preserved under v2/mlx/); see the MLX section below |
heads.pt |
The signal projection (Linear 16→32) and the 7 judgment heads (plain nn.Linear layers on the 1024-d pooled hidden state concatenated with the 32-d signal projection) plus hidden/base metadata |
temps.json |
Per-head temperature for probability calibration |
calib.json |
Category calibration (bias + temperature mode) and isotonic regression tables for the two binary heads, fitted on the frozen 499-window calibration set |
soup_members.json |
The four checkpoints averaged (uniform FP32 weight soup) into this release |
LICENSE |
Apache-2.0 license text from the base model |
Input format
One window per inference. The target message is preceded by up to 10
context messages from the previous 30 minutes; senders are anonymized as
S####. The window is left-truncated to 512 tokens.
V4 adds a precondition — relevance signals. The window text starts
with one structured signal-header line, computed mechanically from the
messages' structured fields (the @-mention list, reply target and sender
IDs of the raw messages), and the same signals enter the heads as a
16-dimensional feature vector: five booleans (target @-mentions the user ·
target replies to the user · target is from the user · the user spoke in
the context · any context message @-mentions the user), the sender's
frequency bucket in the group and the user's share bucket in the group
(statistics frozen from the deployment's own training pool). A window
without its signal header and vector is out of contract for V4 — the
heads were trained with the signal channel always present — and must not
be scored by quietly substituting zeros; use the v2/ package for
plain-text windows. Example (synthetic; the header line is the first line):
【信号】 @本人:否 回复本人:否 本人发言:否 上文@本人:否 本人参与:否 发送者频次:中 本群本人占比:低
群:项目周会群
[S0002] 明天下午三点过一下发布清单
[S0005] 好的,我把清单整理成文档发出来
[S0003] 收到,我今晚把测试报告补齐
Outputs
| Head | Type | Label space |
|---|---|---|
cat |
7-class | 求助/提问 (help/request) · 任务/待办 (task) · 决策/结论 (decision) · 信息分享 (info) · 讨论观点 (discussion) · 闲聊寒暄 (chitchat) · 无关/其他 (other) |
sen |
3-class | 积极 (positive) · 中性 (neutral) · 消极 (negative) |
imp |
ordinal 1–5 | importance |
urg |
ordinal 1–5 | urgency |
inten |
ordinal 1–5 | sentiment intensity |
att |
binary | needs the user's attention (probability, calibrated) |
todo |
binary | contains a to-do / action item (probability, calibrated) |
Ordinal heads are trained as 5-way soft distributions; read them as an
expected score or argmax. Binary-head probabilities should pass through the
temperature + isotonic calibration in calib.json before thresholding.
Usage
import json
import numpy as np
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
REPO = "Songkai/K-IM-Deiction"
tok = AutoTokenizer.from_pretrained(REPO)
tok.truncation_side = "left"
if tok.pad_token is None:
tok.pad_token = tok.eos_token
model = AutoModelForImageTextToText.from_pretrained(REPO, dtype=torch.bfloat16).cuda().eval()
blob = torch.load("heads.pt", map_location="cpu", weights_only=True) # from this repo
W = blob["heads"] # state_dict of the 7 nn.Linear heads (hidden size in blob["hidden"])
def lin(name, h): # one nn.Linear per head
return h @ W[name + ".weight"].float().cuda().T + W[name + ".bias"].float().cuda()
BOOL_KEYS = ["t_at_user", "t_reply_user", "t_from_user", "ctx_user_spoke", "ctx_at_user_any"]
def sig_features(sig): # the 16-d relevance-signal vector (see Input format)
v = [1.0 if sig[k] else 0.0 for k in BOOL_KEYS]
v += [1.0 if sig["sender_freq_bucket"] == i else 0.0 for i in range(5)]
v += [1.0 if sig["group_user_share_bucket"] == i else 0.0 for i in range(6)]
return torch.tensor([v]).float().cuda()
calib = json.load(open("calib.json")) # from this repo
temps = calib["temps"]
def pooled(m, input_ids, attention_mask):
mm = m.get_base_model() if hasattr(m, "get_base_model") else m
core = getattr(mm, "model", mm)
h = core(input_ids=input_ids, attention_mask=attention_mask).last_hidden_state
idx = attention_mask.sum(1) - 1
return h[torch.arange(h.size(0), device=h.device), idx]
@torch.no_grad()
def decide(text, sig):
# text must already carry the signal-header line as its first line;
# sig is the matching dict of signal fields (see Input format)
enc = tok(text, truncation=True, max_length=512, return_tensors="pt").to("cuda")
h = pooled(model, enc["input_ids"], enc["attention_mask"]).float()
s = lin("sig_proj", sig_features(sig)) # 16-d signals -> 32-d
x = torch.cat([h, s], -1) # heads read [pooled hidden ; signal projection]
out = {n: lin(n, x) for n in ["cat", "sen", "imp", "urg", "inten", "att", "todo"]}
res = {
"category": torch.softmax((out["cat"] + torch.tensor(calib["cat_bias"]).cuda())
/ calib["cat_T"], -1)[0].cpu().numpy(),
"sentiment": torch.softmax(out["sen"] / temps["sen"], -1)[0].cpu().numpy(),
"importance": torch.softmax(out["imp"] / temps["imp"], -1)[0].cpu().numpy(),
"urgency": torch.softmax(out["urg"] / temps["urg"], -1)[0].cpu().numpy(),
"intensity": torch.softmax(out["inten"] / temps["inten"], -1)[0].cpu().numpy(),
}
for name, key in [("needs_attention", "att"), ("has_todo", "todo")]:
p = torch.sigmoid(out[key] / temps[key])[0].item()
iso = calib[key + "_iso"]
res[name] = float(np.interp(p, iso["x"], iso["y"])) # calibrated probability
return res
Adapter form
If you already run Qwen/Qwen3.5-0.8B, load the adapter from the adapter/ subfolder instead of the merged weights. The heads, calibration and the pooled / decide logic are exactly as above (download heads.pt and calib.json from this repo's root):
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
from peft import PeftModel
BASE = "Qwen/Qwen3.5-0.8B"
tok = AutoTokenizer.from_pretrained(BASE)
tok.truncation_side = "left"
tok.pad_token = tok.pad_token if tok.pad_token is not None else tok.eos_token
backbone = AutoModelForImageTextToText.from_pretrained(BASE, dtype=torch.bfloat16)
model = PeftModel.from_pretrained(backbone, "Songkai/K-IM-Deiction", subfolder="adapter").cuda().eval()
Serving it locally
This is not a generative model, so generative serving stacks do not fit it: Ollama and vLLM serve text generation and cannot run the custom judgment heads or the calibration in this repo. The intended deployment is a thin HTTP wrapper around the loading code above — load the model and heads once, expose a JSON endpoint. The author's own setup is a small zero-dependency Python HTTP server on the training machine (RTX 4090 D) with this contract:
GET /health→ service statusPOST /decidewith one window → its judgments (named fields: category and sentiment distributions with top-1, the three ordinal distributions with expected scores, calibrated needs-attention and has-todo probabilities)POST /decide_batchwith a list of windows →{"results": [...]}
Under V4 each window item must carry its relevance signals: either a precomputed sig field set together with the signal-header line inside text, or the raw structured messages (target / context / group_id), in which case the author's service computes the signals itself with a frozen statistics table. A text-only window without signals is rejected with a clear error rather than silently mis-scored — the one deliberate contract break from V2.
Measured through the HTTP layer: about 0.1 s per window end-to-end in small batches (40.6 ms of that is the forward pass). A reference Skill for agent-driven triage (window construction, attention thresholds, a daily-digest workflow) is maintained in the author's assistant setup; the contract above is all an integration needs.
MLX edition (Apple Silicon)
The mlx/ folder in this repo is a native MLX port of the current V4 model for Apple Silicon Macs, built on mlx-lm 0.32.2 (which supports the Qwen3.5 text architecture; the vision tower is unused, exactly as in the torch version). It holds a slimmed weight file (the vision-tower keys removed, 1,504,827,581 bytes; the text keys are identical to the merged model), the judgment heads — now including the signal projection — as both heads.pt and heads.npz, calib.json / temps.json / soup_members.json, the tokenizer files, the signal machinery (signals.py and the frozen signal_stats.json, carried over unchanged from the training side so the Mac service assembles V4's relevance signals exactly as the torch service does), and two scripts: mlx_decision_v4.py (the full inference chain: signal assembly, tokenization with left truncation to 512 tokens, last-token hidden state, the signal projection and the 7 heads, temperature + isotonic calibration) and serve_decision_mlx.py (a zero-dependency HTTP service with the same /health, /decide, /decide_batch contract as the torch service, the signal requirement included). See mlx/README_MLX.md for details. The previous V2 MLX edition is preserved unchanged under v2/mlx/.
Measured on the author's Mac on the same frozen blind set of 498 windows: macro-F1 0.664, needs-attention AUC 0.879, ECE 0.016 / 0.062 for the two binary heads — the torch V4 numbers (0.670 / 0.880 / 0.017 / 0.064) reproduced within porting noise, with 99.20% per-window category top-1 agreement against the RTX 4090 D torch run and a needs-attention median absolute difference of 0.00017. Latency is a median of 18.5 ms / p90 of 32.2 ms per window including tokenization — slower than the V2 MLX edition (13.5 / 23.5 ms), because the V4 signal header adds roughly 15 tokens to every window. To use it, download the mlx/ folder, install mlx and mlx-lm, and start the service manually in the foreground (it is intentionally not installed as a daemon):
pip install mlx mlx-lm numpy
python serve_decision_mlx.py --package ./mlx --port 8765
One deployment note: the author's own Mac switched its live service to this V4 MLX edition on 2026-11-10 20:50 (the V2 MLX service was stopped cleanly at 143 served windows; its package and scripts are kept untouched for rollback).
Resource footprint (measured 2026-11-07)
Both editions are small enough to run as an always-on background service. Measured with batch = 1, bf16 weights, steady state after warm-up inferences:
| Edition | Machine | Process RAM (RSS) | GPU / unified memory | On-disk size |
|---|---|---|---|---|
| PyTorch package (this repo root) | Windows machine, WSL2, RTX 4090 D | ~1.1 GB right after load, ~1.8 GB steady state | ~2.2 GB VRAM | 1.83 GB |
MLX edition (mlx/, slim package) |
Author's Mac (Apple Silicon) | ~1.7 GB total process footprint (unified memory; measured on the V2 edition, same architecture) | MLX active ~1.5 GB, peak ~1.6 GB | 1.53 GB |
The 7 judgment heads and calibration files are a few MB and are included in the figures above. The PyTorch service additionally needs the PyTorch runtime itself on disk; the MLX service needs mlx / mlx-lm.
Evaluation — V4 (frozen blind set, 498 windows, measured 2026-11-10)
The blind set is 498 windows from nine groups held out whole before the narrow-caliber labeling round; gold labels are teacher labels under the frozen narrow-caliber spec (needs-attention counts only items explicitly pointing at the user that need the user's own decision or handling), produced by two independent routes plus adjudication. V4 was trained on 7,498 windows (the V3.1 training pool) with relevance signals recomputed mechanically for every window; a separate frozen 499-window calibration set — never trained on — was used for calibration fitting only. The promotion rule was pre-registered: blind-set no-regression against V3.1 (primary macro-F1 and needs-attention AUC within −0.01) and a four-day shadow replay at Precision@20 ≥ 0.089 with Recall@20 1.00 and zero key misses.
| Metric | Result |
|---|---|
| Category macro-F1 (primary 5 classes) | 0.670 (gate ≥0.668 — margin +0.002) |
| Category macro-F1 (7 classes / support ≥10) | 0.620 / 0.632 |
| Per-class F1 | help 0.787 · task 0.603 · decision 0.444 · info 0.800 · discussion 0.554 · chitchat 0.606 · other 0.545 |
| needs-attention AUC | 0.880 (gate ≥0.875 — margin +0.005) |
| needs-attention ECE (calibrated) | 0.017 |
| has-todo AUC / ECE | 0.945 / 0.064 |
| Sentiment accuracy | 91.2% |
| Category F1 at 80% coverage (confidence abstention) | 0.724 |
| Latency | median 40.6 ms (RTX 4090 D, batch 1) |
| Shadow replay, 4 days (L0 ranking, no external layer) | P@20 0.0889 (4/45) · Recall@20 1.00 · key misses 0 — identical values to V2 |
| Shadow replay, 6 days merged | P@20 0.0824 · Recall@20 0.50 (V2: 1.00) |
Both pre-registered gates passed, both by hair-thin margins — that is the accurate description of this release, not a sweeping win. Mechanism evidence that the signal channel is genuinely used: on blind windows whose target @-mentions the user, the mean needs-attention score rose +0.088 versus V3.1 (0.100 → 0.187, n=7), while signal-free windows moved −0.001 on average. But on the four shadow positives the raw scores stayed at 0.000–0.039 — the pre-registered "positives lifted out of the near-zero zone" observation was not met; the 2026-11-09 positive was saved by becoming its session's highest score (rank #8), not by a substantively higher score. Costs against V3.1 (the stronger frozen-set build, archived locally and never released): decision-class F1 0.444 vs 0.507, selective F1 0.724 vs 0.759, binary-head ECE 0.017 / 0.064 vs 0.006 / 0.048. In exchange, V4 removes the structural blind spot that made V3/V3.1 miss a key @-mention in the shadow trial, and it does so inside the model rather than via the external relevance layer the production Skill still applies on top (the layer and V4 were verified compatible: V4 + layer, six-day Recall 0.57 vs 0.50 without).
Evaluation — V2, previous release (held-out set, 1,000 windows, measured 2026-11-06)
The held-out set is 1,000 windows drawn from seven groups the previous release never saw; it was frozen before V2 training under a pre-registered re-check design and never used for training or for calibration/model selection. Labels are teacher labels (GLM-5.3 primary, frozen labeling spec, soft distributions; DeepSeek re-labeled the same windows for agreement reporting). Trained on 6,580 windows.
| Metric | Result |
|---|---|
| Category macro-F1 (7 classes) | 0.611 |
| Category macro-F1 (classes with support ≥10) | 0.673 |
| Per-class F1 | help 0.836 (support 268) · task 0.754 (239) · decision 0.462 (101) · info 0.672 (182) · discussion 0.694 (158) · chitchat 0.620 (43) · other 0.235 (support 9) |
| needs-attention AUC | 0.822 |
| needs-attention ECE (calibrated) | 0.053 |
| has-todo AUC | 0.927 |
| has-todo ECE (calibrated) | 0.069 |
| Category confidence ECE | 0.095 (diagnostic only, see below) |
| Sentiment accuracy | 92.8% |
| Importance / urgency within ±1 | 99.9% / 97.7% |
| Latency | median 41.0 ms, p90 44.1 ms (RTX 4090 D, batch 1) |
| Needs-attention ranking quality | Precision@10 0.70 · Precision@20 0.80 · Precision@50 0.76 |
Metrics in plain words.
- AUC — did it rank right? Pick one message that truly needs attention and one that does not: AUC is the chance the model scores the important one higher. 0.5 is a coin flip, 1.0 is perfect ranking. The 0.822 above means the right message wins about 82% of the time. For a judgment this subjective, even two teachers labeling the same windows agree with each other on needs-attention only ~79% of the time (measured on this set), which puts the practical ceiling near 0.85.
- ECE — are the probabilities honest? Among windows the model calls "70% likely to need attention", do roughly 70% actually need it? ECE is the average gap between what the model says and what is true, across probability bands. The 0.053 / 0.069 above means the stated probabilities are off by only about 5–7 percentage points on average — close enough to use the probability as a threshold dial.
For reference, prompting the untrained base model to emit this label schema directly produced parseable output on only 1.6% of the earlier 258-window held-out set.
About the release gates. The original gates (macro-F1 ≥ 0.65, needs-attention AUC ≥ 0.85, ECE ≤ 0.08) were set before label quality was measured. A second teacher re-labeled a pilot sample and agreed with the primary teacher on needs-attention only 75% of the time; under a symmetric independent-error assumption that puts the achievable AUC against single-teacher gold labels at ≈ 0.854 — the 0.85 gate sat essentially on the label-noise ceiling. On 2026-11-05 the gates were revised with the rationale documented (support-aware macro-F1 ≥ 0.65; needs-attention AUC ≥ 0.80; ECE gate kept on the two binary heads, category ECE demoted to a diagnostic because the head is trained on soft teacher distributions). v1.3 passed the revised gates borderline (needs-attention AUC 0.801 on only 35 positive examples) and was recorded for re-check on a larger set. That re-check ran on this 1,000-window set from seven unseen groups: v1.3 scored needs-attention AUC 0.807 there, confirming the borderline pass under the pre-registered rule. V2 passes all three revised gates on the same set — F1 (support ≥10) 0.673 ≥ 0.65, needs-attention AUC 0.822 ≥ 0.80, binary-head ECE 0.053 / 0.069 ≤ 0.08.
Training data and privacy
- V4 was trained on 7,498 message windows from private enterprise group chats
(Chinese) — the V3.1 training pool (the v1.3/V2 sets, re-labeled under
the narrow-caliber spec, plus windows from the expanded 59-group corpus),
with relevance signals recomputed mechanically from the structured
message fields for every window. Senders were replaced by
anonymized IDs (
S####) before labeling and training; labels were produced by a teacher model (GLM-5.3) under a frozen labeling specification, as soft distributions. The 498-window blind set, the 499-window calibration set and the 1,000-window V2 held-out set were never used for training. - The training data is not released and cannot be reconstructed from this repo: it contains no messages, no group names, and no personal identifiers. The example window above is synthetic. The tokenizer files are Qwen's stock files, copied verbatim from the base model.
- Exactly how the local datasets were de-identified. The same treatment applies to the training set and to every held-out / evaluation set: the sender field of each message was replaced by a pseudonymous ID (
S####) before labeling and training, and the ID mapping exists only on the author's machines and is never released. During training the message body text was kept verbatim - the judgment signal lives in the text. On 2026-11-07 the retained local copies were additionally body-scrubbed: person names (harvested from message metadata, @-mentions and structured name labels), phone numbers, company names, ID-card numbers and emails in message bodies were replaced by placeholders across the training set, every held-out set and the raw pulls (about 127,000 replacements in total; post-scrub verification scans for all of these patterns return zero matches). Window headers still carry the real group names, and free-text nicknames cannot be guaranteed exhaustively caught, so the local datasets are best described as pseudonymized and body-scrubbed, not provably fully anonymized - a further reason they exist only on the author's machines and are never released. - Approaches measured and rejected during development: class weighting /
oversampling (v1.1, metrics went down), more history from the same groups
(marginal AUC gain +0.010 in v1.3), alternative category calibrators
(statistically tied); hard-example mining in V2 surfaced only 20 usable
candidate windows (limited effect). Later lines, also measured and
closed: session-level joint forward passes (three rounds — latency fell
~68% but the classification gate never cleared, and session-mixed
training dropped window↔joint agreement from 0.962 to 0.857); abstention
through a learned
unknownclass (the class almost never wins argmax — abstention works as a serving-layer confidence threshold instead). What V4 keeps from that research: checkpoint weight soup, a separate frozen calibration set, and truncation counting (6.36% of training windows exceed 512 tokens and lose the text-channel header; the feature channel is unaffected).
Known limitations
- Domain-specific: Chinese enterprise group-chat windows in the format above. Not evaluated on other languages, platforms, or chat styles.
needs_attentionis a distilled, partly subjective judgment close to its label-noise ceiling — use it as a triage ranking signal, not as ground truth about what matters.- V4 needs its signals: windows must be built by a pipeline that has the structured message fields (@-lists, reply targets, sender IDs). Relevant messages that carry no @ / reply / participation signal still score near zero — on the six-day merged shadow replay, half of the positives were of exactly that kind (Recall@20 0.50). The signal channel fixed being pointed at; it did not teach the attention head to spot unpointed relevance.
- The
decisionclass remains the weakest substantive class on the V4 blind set (F1 0.444) — its misses go mostly to info, discussion and task, i.e. conclusions stated implicitly inside a discussion. - Scores inherit the teacher model's biases and the labeling spec's definitions; a different spec (e.g. a stricter notion of "needs attention") would produce a different model.
License
Apache-2.0, following the Qwen3.5 base model.
中文说明
kai-decision V4——Sage2 式群聊消息结构化判断(分诊)模型,一个仓库、两种形态:整包(仓库根目录)是 LoRA 已合并进 Qwen/Qwen3.5-0.8B 基座的完整权重,下载即用、不用再单独下基座;adapter/ 子目录是同一模型的 LoRA 适配器(102.4 MB),可加载到自备的 Qwen3.5-0.8B 上。两种形态共用本仓的 7 个判断头与校准文件,输出一致。V4 是当前现役正式版(2026-11-10 转正);它相对 V3.1 配方的唯一改动是相关性信号入模:每个窗口的文本首行带结构化信号头,同一组信号另以 16 维特征向量投影后与池化隐状态拼接、喂给全部 7 个判断头——让需关注头能学「与本人相关」,而不只是「看起来重要」。上一版现役 V2 已原样保全在 v2/ 子目录(可独立下载使用,其 MLX 版在 v2/mlx/;mlx/ 子目录是 V4 的 MLX 版)。输入一个消息窗口(信号头 + 前文 + 目标消息),一次前向给出七项判断;在 RTX 4090 D 上单窗口延迟中位 40.6 ms(batch 1,≤512 token)。
判断层,不是决策层。 本模型回答的是带类型的问题(这条消息属于哪类、需关注的可能性多大、含不含待办),输出的是经校准的判断分数;它自己不做决策、不执行动作。决策——哪条冒泡、建不建任务、升级还是忽略——由外围系统做:你设定的确定性规则、注意力预算与阈值,以及最终的人。把概率模型放在判断层、把决策放在确定性代码(或人)手里,是有意为之:这样这些分数才可以放心地被自动化流程使用。
这个模型是为了解决什么
群聊每天产生的消息远超任何人能读完的量。真正稀缺的不是信息,而是注意力:几百个窗口里,哪些值得本人看、值得回复、值得跟进?
目标:把每一个消息窗口变成结构化、经校准的判断信号,快到、便宜到可以对全部窗口都跑一遍,且全程在本地完成——在人(或大模型)花注意力之前先做完分诊。与其让大模型以每窗口约 1.5k token 的成本逐条读,不如用一个由大模型蒸馏出的 0.8B 专用小模型在自家硬件上 40 ms 做完常规判断,只把被它标出来的少数窗口留给细看。
它具体干什么
每个窗口一次前向输出七项经校准的判断(定义见上方输出节):七分类、情绪、重要/紧急/情绪强度打分、需关注概率、含待办概率。下游软件可以直接拿去用:
- 注意力分诊——按校准后的需关注概率给每个人当天的窗口排序,只冒泡前几条(注意力预算),而不是未读红点大水漫灌。
- 待办挖掘——含待办概率高的窗口自动变成任务候选(附负责人和时间点待确认),而不是让行动项沉进聊天记录。
- 分流归档——分类头把窗口分进求助/任务/决策/信息/讨论等流,供看板、日报摘要和检索使用。
- 优先级队列——重要 × 紧急决定跟进顺序和升级检查。
- 团队情绪监测——情绪与强度按天聚合出脉搏(消极强度突增看得见,不必去翻原始聊天)。
- 大模型的前置过滤器——在 LLM 流水线里先用它近乎零边际成本筛全部窗口,只把标出的送大模型深读或起草。下节的对比数据就是在量化这笔账。
适合与不适合的场景
适合
- 企业 IM 大流量分诊:每天几千个窗口,没人能逐条读完。
- 团队聊天产品里的通知优先级排序与每日摘要。
- 待办/行动项抽取流水线与跟进提醒。
- 客服、运营类群的情绪与升级监测。
- 聊天内容不能出内网的本地/边缘部署(本模型全程本地运行,不调任何 API)。
- 大模型流水线的高流量第一道筛——逐窗口 API 成本会吃掉预算的那种。
不适合
- 开放式阅读理解、总结、代写回复——它只输出判断、不生成文本,这类活请搭配大模型。
- 中文企业群聊之外的语言、平台或聊天文化(它的训练域)。
- 判断它看不见的内容:附件、图片、链接、引用文档在窗口里只是占位符。
- 独自裁决重要事项。「需关注」是蒸馏来的、带主观性的判断,且已接近其标签噪声天花板——请用它排序和过滤,把被标出的少数留给人或大模型定夺。
性能与评测速览
| 项目 | 数值 |
|---|---|
| 根目录整包大小 | 1.83 GB——整包权重 1.71 GB + LoRA 适配器 0.10 GB,其余为 tokenizer、决策头与校准文件(仓库内另保全 v2/ 的 V2 整包;mlx/ 为 V4 的 MLX 版) |
| 延迟 | 单窗口中位 40.6 ms(RTX 4090 D,batch 1,≤512 token,7 个头 + 信号投影一次前向) |
| 分类 macro-F1 | 0.670(主五类)· 0.632(support ≥10)· 0.620(7 类) |
| 需关注 | AUC 0.880 · ECE 0.017(校准后) |
| 含待办 | AUC 0.945 · ECE 0.064(校准后) |
| 情绪准确率 | 91.2% |
分数是同一模型在适配器形态下(基座 + LoRA)于下述冻结盲测集(498 窗口、窄口径金标)上实测的。切换前已用现役服务路径对根目录合并整包做等价校验(100 条盲测窗):需关注中位绝对差 0.000197、分类 top1 一致率 100%,即整包与被评测的模型输出一致。
真实流量影子回放(四日、助手按窄口径预标):V4 不加任何模型外相关性层即与 V2 现役线完全持平——Precision@20 0.0889、Recall@20 1.00、关键漏报 0,这正是预登记的转正条件。代价如实保留、不弱化:分类与校准全面略弱于未发布的 V3.1(决策类 F1 0.444 对 0.507;两二值头 ECE 0.017 / 0.064 对 0.006 / 0.048);四个影子正例的需关注原始分仍在 0.000–0.039 的近零区——过关靠的是会话内排名,而非分数被实质抬高;六日合并回放 Recall@20 只有 0.50,无信号正例仍是它的盲区。详见下方评测节。
与大模型直判的对比(实测,2026-11-05)
为什么不直接让大模型来做这些判断?这张表是上一版(v1.3)在其冻结保密集(258 窗口)、同一份金标上的实测,V2 未重跑此对比,保留在此只为说明「专用小模型对大模型直判」这笔账的量级;V2 自己的保密集数字见上方速览与下方评测节。大模型基线为 DeepSeek(deepseek-chat API)零样本直判:系统提示给的就是教师打标用的同一份完整打标规范,温度 0。
| 指标 | K-IM-Deiction(v1.3,0.8B) | DeepSeek 零样本(大模型) | 差异 |
|---|---|---|---|
| 输出格式合规率 | 100%(结构化决策头,构造上保证) | 100.0%(258/258 合法 JSON) | 0%(持平) |
| 分类 macro-F1(7 类) | 0.637 | 0.620 | +2.7% |
| 分类 macro-F1(support ≥10) | 0.744 | 0.724 | +2.8% |
| 需关注 AUC | 0.801 | 0.781 | +2.6% |
| 含待办 AUC | 0.965 | 0.959 | +0.6% |
| 情绪准确率 | 89.1% | 94.2% | −5.4% |
| 重要 / 紧急 ±1 内 | 100% / 99.6% | 98.8% / 98.5% | +1.2% / +1.1% |
| 单窗口延迟 | 40.3 ms 中位(本地,RTX 4090 D) | 1.91 s 中位(API 往返,含网络) | −97.9% |
| 单窗口 token | 平均处理 186(中位 139;窗口左截断至 512),生成 0——它输出的是数字,不是文本 | 平均消耗 1,496(入 1,312 + 出 184);258 个窗口共 385,961 | −87.6% |
| 数据暴露 | 全程本地,消息不出内网 | 每个窗口都要发到云端 API | — |
差异 =(本模型 − 大模型)/ 大模型。正值表示本模型更高;延迟与 token 的负值表示本模型更低(更好)。
怎么读这张表。 在它被蒸馏来做的分诊判断上,这个 0.8B 专用模型与大模型零样本直判打平或略胜——而延迟只有约 1/47、边际成本为零、私有聊天不出本地。大模型在情绪上明显更好(94.2% 对 89.1%),开放式阅读与起草也仍是大模型的活;专用小模型是大模型前面的过滤器,不是替代品。
关于 token。 token 是任何 Transformer 处理文本的单位,本模型也有——区别在多少、用来干什么。它读一个窗口(截断后平均 186 token,本保密集实测)且生成 0 token,因为它的输出是决策头给出的数字,不是文本。而提示词路线每个窗口都要重发一遍约 1,000 token 的打标规范(其平均入 1,312 = 窗口 + 规范),再生成约 184 token 的 JSON。所以即便把本模型部署到按 token 计费的云端推理服务,一个窗口也只消耗约 186 个输入 token、别无其他——规范已经长在它的权重里,不用每次重读。
另外两个同样实测的参照点:
- 用同一份规范提示未训练的 Qwen3.5-0.8B 基座,258 个窗口里可解析率仅 **1.6%**——小模型靠提示词干不了这活,能力来自蒸馏。
- 产出这批金标的教师(GLM-5.3)在 v1.3 打标轮的用量为每窗口约 1,526 token(3,440,553 token / 2,255 窗口)——与 DeepSeek 基线同一成本量级,区别是它只在建数据集时付一次,而不是每个窗口永远付。
内容
| 文件 | 说明 |
|---|---|
model.safetensors |
合并后的完整权重(Qwen3.5-0.8B 基座 + V4 LoRA 已合并) |
adapter/adapter_model.safetensors |
同一模型的 LoRA 适配器(r=64、alpha=128、dropout 0.05;只训语言模型投影层),与合并权重二选一 |
adapter/adapter_config.json |
适配器的 PEFT 配置(基座 Qwen/Qwen3.5-0.8B) |
config.json / generation_config.json |
模型配置(Qwen3.5 原厂) |
tokenizer.json、tokenizer_config.json、chat_template.jinja |
基座 tokenizer 文件,自 Qwen/Qwen3.5-0.8B 原样复制(V4 为自包含 tokenizer.json;独立的 vocab.json / merges.txt 保留在 v2/ 包内) |
preprocessor_config.json、video_preprocessor_config.json |
Qwen3.5 原厂处理器配置 |
v2/ |
上一版现役(V2)整包,原样保全、可独立下载使用 |
mlx/ |
MLX 版(Apple Silicon 用;瘦身纯文本权重、heads.npz、信号组件、推理与服务脚本)——为 V4 模型(V2 的 MLX 版保全在 v2/mlx/),见下文 MLX 版一节 |
heads.pt |
信号投影层(Linear 16→32)与 7 个判断头(输入 = 1024 维池化隐状态与 32 维信号投影拼接;普通 nn.Linear)及 hidden/base 元数据 |
temps.json |
各头的校准温度 |
calib.json |
分类头的 bias+温度校准参数、两个二值头的 isotonic 校准表(在冻结的 499 条校准集上拟合) |
soup_members.json |
本版由哪四个 checkpoint 做 FP32 均匀平均(权重汤)而来 |
LICENSE |
基座的 Apache-2.0 许可证文本 |
输入格式
消息窗口:目标消息之前是 30 分钟内最多 10 条前文,发送者一律脱敏为
S#### 编号,整体左截断至 512 token。
V4 新增前置条件——相关性信号。 窗口文本的首行是结构化信号头,由原始消息的结构化字段(@ 列表、回复对象、发送者 ID)机械算出;同一组信号另以 16 维特征向量进入判断头:五个布尔量(目标 @ 本人 · 目标回复本人 · 目标为本人所发 · 本人在前文中发言 · 前文任意一条 @ 本人)、发送者在本群的发言频次档、本人在本群的发言占比档(统计表由部署方自己的训练池冻结算出)。没有信号头与信号向量的窗口对 V4 是越界输入——判断头是在信号通道恒在的条件下训出来的——不许用全零向量蒙混打分;纯文本窗口请改用 v2/ 的包。示例(虚构;第一行即信号头):
【信号】 @本人:否 回复本人:否 本人发言:否 上文@本人:否 本人参与:否 发送者频次:中 本群本人占比:低
群:项目周会群
[S0002] 明天下午三点过一下发布清单
[S0005] 好的,我把清单整理成文档发出来
[S0003] 收到,我今晚把测试报告补齐
输出
cat七分类:求助/提问、任务/待办、决策/结论、信息分享、讨论观点、 闲聊寒暄、无关/其他sen三分类:积极 / 中性 / 消极imp/urg/inten:重要性、紧急性、情绪强度,各为 1–5 序数软分布att:是否需要用户关注(二值,概率经校准)todo:是否含待办(二值,概率经校准)
使用代码见上方 Usage:整包直接 from_pretrained 加载,再取最后一个
非填充 token 的隐状态过 7 个头,按 temps.json / calib.json 做温度
与 isotonic 校准。适配器形态见上方 Adapter form 一节:基座加载自备的
Qwen/Qwen3.5-0.8B,用 PeftModel 从本仓 adapter/ 子目录挂适配器,
其余步骤相同。
本地服务方式
本模型不是生成式模型,Ollama、vLLM 这类生成推理服务套不上——它们管不了自定义决策头和校准逻辑。正确形态是把上面的加载代码包一层薄 HTTP 服务:模型与决策头加载一次,对外提供 JSON 接口。作者自己的部署是训练机(RTX 4090 D)上一个零依赖的 Python 小服务,契约如下:
GET /health:服务状态POST /decide:提交一个窗口,返回其判断(带字段名:分类与情绪分布及 top1、三个序数分布及期望分、校准后的需关注与含待办概率)POST /decide_batch:提交一批窗口,返回{"results": [...]}
V4 起每个窗口必须自带相关性信号:要么给出预先算好的 sig 字段组、且 text 首行已是信号头;要么直接给原始结构化消息(target / context / group_id),由作者的服务用冻结统计表自行组装信号。无信号的纯文本窗口会被明确报错拒绝,而不是蒙混打分——这是与 V2 唯一有意的契约变更。
HTTP 层实测:小批量端到端约 0.1 秒/窗口(其中纯前向 40.6 ms)。作者的助手环境中另有一份调用该服务的分诊 Skill(窗口构造、注意力阈值、每日摘要流程);第三方集成只需要上面的接口契约。
MLX 版(Apple Silicon)
本仓的 mlx/ 子目录是当前 V4 模型的 MLX 原生移植版,面向 Apple Silicon Mac,基于 mlx-lm 0.32.2(支持 Qwen3.5 文本架构;vision 部分与 torch 版一样不使用)。子目录内含瘦身权重文件(剔除 vision 权重键、1,504,827,581 字节;文本键与合并整包一致)、判断头(含信号投影层)的 heads.pt 与 heads.npz 两种形态、calib.json / temps.json / soup_members.json、tokenizer 全套、信号组件(signals.py 与冻结统计表 signal_stats.json,自训练侧原样带入,使 Mac 服务组装 V4 相关性信号的口径与 torch 服务完全一致),以及两个脚本:mlx_decision_v4.py(完整推理链:信号组装、左截断 512 token 分词、末 token 隐状态、信号投影 + 7 个判断头、温度 + isotonic 校准)与 serve_decision_mlx.py(零依赖 HTTP 服务,/health、/decide、/decide_batch 契约与 torch 版服务一致,含信号前置要求)。细节见 mlx/README_MLX.md。上一版 V2 的 MLX 版已原样保全在 v2/mlx/。
在作者 Mac 上、同一批冻结盲测集 498 窗口实测:macro-F1 0.664、需关注 AUC 0.879、两二值头 ECE 0.016 / 0.062——与 torch 版 V4 数字(0.670 / 0.880 / 0.017 / 0.064)在移植噪声内一致;逐窗分类 top1 与 4090 上 torch 版的一致率 99.20%,需关注中位绝对差 0.00017。延迟中位 18.5 ms、p90 32.2 ms 每窗口(含分词)——比 V2 的 MLX 版(13.5 / 23.5 ms)慢,因 V4 信号头给每个窗口多加约 15 个 token。用时下载 mlx/ 子目录、装好 mlx 与 mlx-lm 后,手动在前台启动服务(有意不做常驻守护):
pip install mlx mlx-lm numpy
python serve_decision_mlx.py --package ./mlx --port 8765
一个部署注记:作者本人的 Mac 已于 2026-11-10 20:50 把现役服务切到本 V4 MLX 版(V2 的 MLX 服务在 served=143 时正常停机,其包与脚本原样保留可回退)。
资源占用(2026-11-07 实测)
两个版本都小到可以常驻后台运行。口径:batch = 1、bf16 权重、预热推理后的稳态:
| 版本 | 机器 | 进程内存(RSS) | 显存 / 统一内存 | 磁盘占用 |
|---|---|---|---|---|
| PyTorch 整包(本仓根目录) | Windows 机器,WSL2,RTX 4090 D | 加载后约 1.1 GB,稳态约 1.8 GB | 显存约 2.2 GB | 1.83 GB |
MLX 版(mlx/ 瘦身包) |
作者的 Mac(Apple Silicon) | 进程总占用约 1.7 GB(统一内存;内存数字为 V2 版实测、同架构) | MLX 活跃约 1.5 GB、峰值约 1.6 GB | 1.53 GB |
7 个判断头与校准文件只有几 MB,已包含在上表数字内。PyTorch 版另需 PyTorch 运行时本身的磁盘空间;MLX 版另需 mlx / mlx-lm。
评测——V4(冻结盲测集 498 窗口,2026-11-10 实测)
盲测集为窄口径打标轮之前整群隔离的 9 个群、共 498 个窗口;金标为冻结窄口径规范下的教师标签(「需关注」只算明确指向本人、需本人拍板或亲手处理者),双路打标 + 分歧仲裁。V4 训练池 7,498 窗口(即 V3.1 的 train_v31),每窗相关性信号机械重算;另有整群隔离的冻结校准集 499 窗口,只用于校准拟合、从未训练。转正规则预登记:盲测不退化(主口径 macro-F1 与需关注 AUC 均不低于 V3.1−0.01),且影子四日 L0 回放 P@20 ≥0.089、Recall@20 = 1.00、关键漏报 0。
| 指标 | 结果 |
|---|---|
| 分类 macro-F1(主五类) | 0.670(门线 ≥0.668,余量 +0.002) |
| 分类 macro-F1(7 类 / support ≥10) | 0.620 / 0.632 |
| 逐类 F1 | 求助 0.787 · 任务 0.603 · 决策 0.444 · 信息 0.800 · 讨论 0.554 · 闲聊 0.606 · 无关 0.545 |
| 需关注 AUC | 0.880(门线 ≥0.875,余量 +0.005) |
| 需关注 ECE(校准后) | 0.017 |
| 含待办 AUC / ECE | 0.945 / 0.064 |
| 情绪准确率 | 91.2% |
| 分类 F1(80% 覆盖弃权口径) | 0.724 |
| 延迟 | 中位 40.6 ms(RTX 4090 D,batch 1) |
| 影子回放四日(L0 排序、无模型外层) | P@20 0.0889(4/45)· Recall@20 1.00 · 关键漏报 0——与 V2 完全同值 |
| 影子回放六日合并 | P@20 0.0824 · Recall@20 0.50(V2 为 1.00) |
两道预登记门都是贴线通过——这是对本版准确的描述,不是什么大胜。信号通道确实被模型用上的机制证据:盲测集中目标 @ 本人的窗口,需关注均分比 V3.1 抬升 +0.088(0.100 → 0.187,n=7),无信号窗口均分变化 −0.001。但四个影子正例的原始分仍在 0.000–0.039,预登记的「正例被抬离近零区」观察点未达成;11-09 那条正例是靠成为其会话最高分(第 8 名)被救回的,不是分数被实质抬高。与 V3.1(冻结集上更强、但只存档未发布)相比的代价:决策类 F1 0.444 对 0.507、弃权口径 F1 0.724 对 0.759、两二值头 ECE 0.017 / 0.064 对 0.006 / 0.048。换来的是补上让 V3 / V3.1 在影子试验漏掉关键 @ 消息的结构性盲区,且补在模型内而不是靠模型外层(现役 Skill 的相关性层仍叠加在上面,两者已验兼容:V4 + 该层六日召回 0.57,对无层 0.50)。
评测——V2,上一版(保密集 1,000 窗口,2026-11-06 实测)
保密集为 1,000 个窗口,来自上一版从未见过的 7 个新群;按预注册的复核 设计在 V2 训练前冻结,从未用于训练、校准或选型。金标为教师标签 (GLM-5.3 主标,按冻结的打标规范产出软分布;DeepSeek 同集复标用于 一致率报告)。训练集 6,580 个窗口。
| 指标 | 结果 |
|---|---|
| 分类 macro-F1(7 类) | 0.611 |
| 分类 macro-F1(support ≥10 的类) | 0.673 |
| 逐类 F1 | 求助 0.836(268)· 任务 0.754(239)· 决策 0.462(101)· 信息 0.672(182)· 讨论 0.694(158)· 闲聊 0.620(43)· 无关 0.235(support 9) |
| 需关注 AUC | 0.822 |
| 需关注 ECE(校准后) | 0.053 |
| 含待办 AUC | 0.927 |
| 含待办 ECE(校准后) | 0.069 |
| 分类置信 ECE | 0.095(仅作诊断,见下) |
| 情绪准确率 | 92.8% |
| 重要 / 紧急 ±1 内 | 99.9% / 97.7% |
| 延迟 | 中位 41.0 ms、p90 44.1 ms(RTX 4090 D,batch 1) |
| 需关注排序质量 | Precision@10 0.70 · Precision@20 0.80 · Precision@50 0.76 |
指标怎么读(大白话)。
- AUC —— 排序准不准。 随机抽一条真正需要关注的消息、再抽一条不需要的,模型给前者打分更高的概率就是 AUC。0.5 等于抛硬币,1.0 是完美排序。上表的 0.822 即约 82% 的时候能把该看的排在前面。这类主观判断连两位教师在同一批窗口上对「需关注」的一致率也只有约 79%(本集实测),实际上限约 0.85。
- ECE —— 概率虚不虚。 把模型说「70% 需要关注」的所有消息挑出来,看实际上是不是真有约 70% 需要关注;ECE 就是各概率档上「说的」与「实际的」平均偏差。上表的 0.053 / 0.069 即报出的概率平均只偏 5–7 个百分点,拿它当阈值旋钮用是可信的。
对照:未训练的基座模型被直接要求按此标签体系输出时,上一版 258 窗口 保密集上可解析率仅 **1.6%**。
关于发布门线。 原门线(macro-F1 ≥0.65、需关注 AUC ≥0.85、ECE ≤0.08) 定于标签质量被测量之前。试点中第二位教师对「需关注」的复标与主教师 一致率只有 75%;在错误对称独立的假设下,以单教师标签为金标可达的 AUC 上限约为 0.854——原 0.85 门线基本压在标签噪声天花板上。 2026-11-05 门线经修订并留档(macro-F1 改为 support 感知口径 ≥0.65; 需关注 AUC 改 ≥0.80;ECE 门线只保留两个二值头,分类 ECE 因其拟合的是 教师软分布而降为诊断指标)。v1.3 在修订门线下贴线通过(需关注 AUC 0.801,正样本仅 35 条),明确记为须用更大的保密集复核;该复核已在本 集(1,000 窗口、7 个未见新群)完成:v1.3 需关注 AUC 0.807,按预 注册规则判定贴线结论确认、不回退。V2 在同一集上三项修订门线全过: F1(support ≥10)0.673 ≥0.65、需关注 AUC 0.822 ≥0.80、两二值头 ECE 0.053 / 0.069 ≤0.08。
训练数据与隐私
- V4 训练数据为 企业内部群聊(中文)的 7,498 个消息窗口(即 V3.1 训练池:v1.3 / V2 数据集按窄口径规范重打标 + 扩至 59 群后的新增窗口),每窗相关性信号由结构化字段机械重算;发送者在打标与训练前已全部替换为脱敏编号(
S####);标签由教师模型(GLM-5.3)按冻结规范产出,为软分布。盲测集 498 窗口、校准集 499 窗口与 V2 保密集 1,000 窗口均从未进入训练。 - 训练数据不公开,且无法从本仓库还原:仓库内不含任何消息原文、 群名或个人标识。上方示例窗口为虚构。tokenizer 文件为 Qwen 原厂 文件、原样复制。
- 本地数据集的脱敏口径(精确版)。 训练集与所有保密/评测集一视同仁:每条消息的发送者字段在打标与训练前已替换为假名编号(
S####),编号映射表只存在于作者的机器上、从不公开。训练期间消息正文保留原文——判断信号就在正文里。2026-11-07 又对留存的本地副本做了正文级脱敏:正文中的人名(取自消息元数据、@ 提及与结构化姓名标注)、电话、公司名、身份证号与邮箱已在训练集、全部保密/评测集与原始拉取数据中统一替换为占位符(合计约 12.7 万处;脱敏后对上述模式的复扫为零命中)。窗口头仍为真实群名,正文中的昵称类称呼也无法保证穷尽,因此本地数据集准确的说法是已假名化并经正文脱敏、但不宣称可证明的完全匿名化;这也是它们只存放在作者机器上、从不对外发布的又一原因。 - 开发中实测无效、已放弃的路线:类加权/过采样(v1.1,指标反降)、
继续深拉同一批群的历史(v1.3 AUC 仅 +0.010)、更换分类校准方法
(三种候选统计并列);V2 的难例挖掘最终只捞到 20 条可用候选(收效有限)。后续路线同样实测后收口:会话级联合前向(三轮——延迟约降 68% 但分类门线始终未过,会话混训使窗口↔联合一致率从 0.962 掉到 0.857);用模型自带的
unknown类做弃权(该类几乎从不 argmax 胜出——弃权改走服务层置信阈值)。V4 从这些研究里保留下来的只有:checkpoint 权重汤、独立冻结校准集、截断计数(训练窗 6.36% 超 512 token、丢文本通道信号头;特征通道不受影响)。
已知限制
- 领域专用:上述格式的中文企业群聊窗口;未在其他语言、平台或聊天 风格上评测。
- 「需关注」是蒸馏来的、带主观性的判断,且已接近其标签噪声天花板—— 请把它当作分诊排序信号,而不是「什么重要」的真值。
- V4 依赖信号:窗口必须由掌握结构化消息字段(@ 列表、回复对象、发送者 ID)的流水线构造。不带任何 @ / 回复 / 参与信号的相关消息分数仍在近零区——六日合并影子回放里漏掉的正例正属此类(Recall@20 0.50)。信号通道修好了「被指向」的情况,没有教会需关注头识别未被指向的相关性。
- 「决策/结论」在 V4 盲测集上仍是最弱的实质类别(F1 0.444),主要漏到信息分享、讨论观点与任务/待办——多为讨论中夹带的隐性结论。
- 各项分数继承教师模型的偏见与打标规范的定义;换一套规范(例如更 严格的「需关注」定义)会得到不同的模型。
许可证
Apache-2.0,随 Qwen3.5 基座模型。
- Downloads last month
- 428