Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.
Python calibrationclassificationdecision-modelhuggingfacejevmodernbertmultilingualnlppythonpytorchroutingtyped-decisionszero-shot
docs(step4): state the measured runtime, one calibration path, and a threshold-free verdict
Bruce-Yii099937343dc2
diff --git a/research/scripts/step4_benchmark/GATE_D_RESULTS.md b/research/scripts/step4_benchmark/GATE_D_RESULTS.mdindex 44521ece..c59ae752 100644--- a/research/scripts/step4_benchmark/GATE_D_RESULTS.md+++ b/research/scripts/step4_benchmark/GATE_D_RESULTS.md@@ -18,6 +18,9 @@ default loss? It does not.## Result+All cells use the shipped-temperature path (`--temperatures shipped`); no raw-temperature cells+were measured.+| loss | seed | accuracy | ECE | Brier | wall (s) ||---|---|---|---|---|---|| `rlcd` | 0 | 0.7750 | 0.1504 | 0.0519 | 2691.3 |@@ -64,11 +67,12 @@ The small choice/noul gain and the score loss swap rank between seeds; neither i## Verdict-`INSUFFICIENT`. The paired accuracy delta changes sign across seeds and its mean (+0.0002) is far-below the 0.005 bar the analyser treats as material, while the soft-CE seed spread (std 0.0155) is-an order of magnitude larger than RLCD's (0.0016). Three training seeds cannot support changing a-shipped default in either direction, so `rlcd` remains the conservative default. This PR does not-change the default.+`INSUFFICIENT`. The paired accuracy delta changes sign across seeds (mean +0.0002, range −0.0145 to++0.0135), so the seeds disagree about direction; the soft-CE seed spread (std 0.0155) is also an+order of magnitude larger than RLCD's (0.0016). The analyser applies no materiality threshold — what+advantage would justify changing a shipped default is a maintainer judgement, not something this+panel can encode — but a sign that flips between seeds is not a basis for moving one. `rlcd` remains+the default; this PR does not change it.## Reproductiondiff --git a/research/scripts/step4_benchmark/README.md b/research/scripts/step4_benchmark/README.mdindex 9287e697..58d7ffea 100644--- a/research/scripts/step4_benchmark/README.md+++ b/research/scripts/step4_benchmark/README.md@@ -73,10 +73,11 @@ path that produced them (next section).`laya.train` fits with `laya.calibrate.fit_temperature_map` — per type, plus per option-countbucket above a floor — under the runtime clamp `[TEMP_MIN, TEMP_MAX] = [0.5, 5.0]`. The old-notebook fitted one LBFGS temperature per type under `[0.1, 10]`. So `evaluate.py` reports ECE and-Brier under **both** paths (`--temperatures shipped` uses the checkpoint's own fit; `--temperatures-raw` uses 1.0 everywhere). An ECE difference explained by the calibration-contract change is not a-training non-reproduction; say which path produced each number.+notebook fitted one LBFGS temperature per type under `[0.1, 10]`. So `evaluate.py` supports either+path, one per invocation: `--temperatures shipped` uses the checkpoint's own fit and+`--temperatures raw` uses 1.0 everywhere. **The Gate D table in `GATE_D_RESULTS.md` is the shipped+path only**; no raw-temperature cells were measured. An ECE difference explained by the+calibration-contract change is not a training non-reproduction; say which path produced each number.## Gates@@ -138,11 +139,12 @@ python research/scripts/step4_benchmark/smoke_test.py- **Reference (notebook, 2×T4):** ~4–6 minutes for the demo's 6,000 decisions.- **Guilherme measured (one T4):** ~48–54 minutes per run — but that is the **MASSIVE 20-option**experiment, not typed-decisions. Do not carry it over.-- **Our measured:** fill in from `manifest_*.json` (`runs[].elapsed_seconds`) after a real run.+- **Our measured (one T4):** 2691.3–2708.5 s (≈44.9–45.1 min) per cell, over the six Gate D cells+ (`rlcd` seed 0 is the reused Gate R run).Single-device `laya-train` uses micro-batch 8 × grad-accum 8 = effective 64; the notebook used-8 × 2 GPUs × 4 = effective 64. Same effective batch, different step count (single device does-~4% more optimizer steps on the same data).+8 × 2 GPUs × 4 = effective 64. Same effective batch, run on one GPU instead of two; the different+epoch-order RNG formula and environment are noted under Limitations above.## Constraintsdiff --git a/research/scripts/step4_benchmark/evaluate.py b/research/scripts/step4_benchmark/evaluate.pyindex a5fa9b67..cceceb71 100644--- a/research/scripts/step4_benchmark/evaluate.py+++ b/research/scripts/step4_benchmark/evaluate.py@@ -7,13 +7,16 @@ here: it belongs to `massive_intent.en`, not typed-decisions (see README).Calibration is not byte-comparable across contracts. `laya.train` fits temperatures with`fit_temperature_map` (per type, and per option-count bucket above a floor) under the runtimeclamp `[0.5, 5.0]`; the old notebook fitted one LBFGS temperature per type under `[0.1, 10]`.-So ECE and Brier are reported under **both** paths:+So ECE and Brier support either path, one per invocation:- ``--temperatures shipped`` (default) — the checkpoint's own fitted `temperature` and`temperature_by_options`, which is what the notebook's number also used;- ``--temperatures raw`` — temperature 1.0 everywhere, isolating the training from thecalibration contract.+Each run evaluates exactly one of the two and records which in the output; the committed Gate D+table is the shipped path.+Accuracy is unaffected by temperature (it only rescales the logits), so it is the cleanreproduction signal.diff --git a/research/scripts/step4_benchmark/results/step4_gate_d_results.json b/research/scripts/step4_benchmark/results/step4_gate_d_results.jsonindex 3eb8967e..aaca0c25 100644--- a/research/scripts/step4_benchmark/results/step4_gate_d_results.json+++ b/research/scripts/step4_benchmark/results/step4_gate_d_results.json@@ -305,4 +305,4 @@"split_line": "train items 5600, calibration items 400, skipped {}, device cuda","finite": true}-}\ No newline at end of file+}diff --git a/research/scripts/step4_benchmark/results/step4_gate_r_results.json b/research/scripts/step4_benchmark/results/step4_gate_r_results.jsonindex 96c55a19..e4cd8e17 100644--- a/research/scripts/step4_benchmark/results/step4_gate_r_results.json+++ b/research/scripts/step4_benchmark/results/step4_gate_r_results.json@@ -68,4 +68,4 @@},"n_brier_decisions": 1200}-}\ No newline at end of file+}