VynoDePal commited on
Commit
a373b8a
·
verified ·
1 Parent(s): e1e4a53

Publish Laya Mini CPU research artifacts, A/B results and limitations

Browse files

Original, control A and experimental B; CPU exports, optional FP32 reference checkpoints, text-free evaluation records and bilingual documentation. B remains experimental: composite criterion failed; FINAL not evaluated.

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. BENCHMARKS.md +100 -0
  2. LICENSE_NOTES.md +37 -0
  3. PUBLICATION_CHECKS.json +55 -0
  4. README.md +154 -0
  5. README_FR.md +61 -0
  6. REPRODUCIBILITY.md +76 -0
  7. RESEARCH.md +53 -0
  8. SHA256SUMS +58 -0
  9. benchmark_cpu.py +71 -0
  10. benchmarks/ab/decisions-no-text.jsonl +0 -0
  11. benchmarks/ab/dev-report.json +625 -0
  12. benchmarks/ab/protocol.json +82 -0
  13. benchmarks/cpu/control-a.json +41 -0
  14. benchmarks/cpu/experimental-b.json +41 -0
  15. benchmarks/cpu/original-current.json +41 -0
  16. benchmarks/history/original-copa-400-summary.json +113 -0
  17. benchmarks/history/original-cpu-earlier-session.json +41 -0
  18. benchmarks/history/original-test-3000-summary.json +249 -0
  19. benchmarks/history/pre-ab-robustness-audit.json +2154 -0
  20. checkpoints/control-a/model.safetensors +3 -0
  21. checkpoints/control-a/training.json +14 -0
  22. checkpoints/experimental-b/model.safetensors +3 -0
  23. checkpoints/experimental-b/training.json +14 -0
  24. checkpoints/original/model.safetensors +3 -0
  25. checkpoints/original/training.json +93 -0
  26. examples/example-canonical-request.json +15 -0
  27. examples/example-news-request.json +15 -0
  28. experiment-status.json +32 -0
  29. licenses/Apache-2.0.txt +202 -0
  30. models/control-a/manifest.json +32 -0
  31. models/control-a/model.int8.onnx +3 -0
  32. models/control-a/tokenizer.json +0 -0
  33. models/experimental-b/manifest.json +32 -0
  34. models/experimental-b/model.int8.onnx +3 -0
  35. models/experimental-b/tokenizer.json +0 -0
  36. models/original/manifest.json +111 -0
  37. models/original/model.int8.onnx +3 -0
  38. models/original/tokenizer.json +0 -0
  39. requirements-runtime.txt +3 -0
  40. requirements-stats.txt +1 -0
  41. research/corpus-manifest.json +0 -0
  42. research/exports/control-a.json +46 -0
  43. research/exports/experimental-b.json +46 -0
  44. research/original-selection.json +29 -0
  45. research/references.json +87 -0
  46. research/runtime-references-checked.json +18 -0
  47. research/src/ab_evaluate.py +211 -0
  48. research/src/ab_experiment.py +212 -0
  49. research/src/ab_train.py +334 -0
  50. research/src/audit_robustness.py +432 -0
BENCHMARKS.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Benchmark methodology and complete decision
2
+
3
+ These measurements describe this experiment, not standard full-dataset leaderboard submissions. There is deliberately no `model-index` claiming otherwise.
4
+
5
+ ## Controlled A/B, recorded DEV predictions
6
+
7
+ There are 156 new text/premise families per domain, two held-out description styles and all cyclic option rotations: four for AG News, three for SNLI. Keys are opaque. Total: 312 texts, 2,184 requests. Repeated variants of a text are not independent observations.
8
+
9
+ Original historical partitions, DEV and reserved FINAL are separated by source/text/premise checks. This does not establish absence of pretraining exposure in BERT or Laya, or of all semantic paraphrases. Description pools are disjoint strings but remain lexically similar.
10
+
11
+ Evaluation used the same local CPU, four threads, batches of eight sorted by length, PyTorch FP32 and ONNX Runtime INT8 for both A and B. Confidence intervals use paired percentile bootstrap over families, 10,000 replicates, seed 20260926. They are conditional on these two trained models, not confidence intervals over retraining runs.
12
+
13
+ | Domain / precision | A | B | B−A, percentage points | Paired 95% CI |
14
+ | --- | ---: | ---: | ---: | ---: |
15
+ | AG News FP32 | 57.05% | 89.02% | +31.97 | [26.92, 37.02] |
16
+ | AG News INT8 | 54.89% | 88.46% | +33.57 | [28.76, 38.38] |
17
+ | SNLI FP32 | 53.42% | 71.05% | +17.63 | [13.78, 21.37] |
18
+ | SNLI INT8 | 50.11% | 65.60% | +15.49 | [11.97, 19.02] |
19
+
20
+ ### Preregistered gates, not reinterpreted after the result
21
+
22
+ 1. At least +10 accuracy points per domain and precision, with lower paired CI >0: all four pass.
23
+ 2. B order instability at most half A: AG FP32/INT8 and SNLI FP32 pass; **SNLI INT8 fails**.
24
+ 3. Fixed-validation lower global accuracy-difference CI ≥−2 points and no task point estimate below −4: both precisions pass.
25
+ 4. Upper CI for change in FP32/INT8 disagreement ≤+2 points, on each DEV domain and fixed validation overall: all pass.
26
+ 5. CPU payload 80–90 decimal MB: met.
27
+
28
+ **Composite result: FAIL. No checkpoint promotion and no FINAL evaluation.** No threshold, checkpoint or quantization setting was changed after inspecting DEV.
29
+
30
+ Order instability is the fraction of text/style pairs whose canonical class changes across rotations, averaged over styles. On SNLI INT8, A has 181 unstable cells out of 312, B has 105. Half of A allows at most 90 whole unstable cells, not 105. Accuracy is checked separately because a consistently wrong model can be stable.
31
+
32
+ ### SNLI by description style, INT8
33
+
34
+ | Style | A accuracy | B accuracy | Gain | B instability |
35
+ | --- | ---: | ---: | ---: | ---: |
36
+ | Short | 67.09% | 73.08% | +5.98 points | 21.79% |
37
+ | Long | 33.12% | 58.12% | +25.00 points | 45.51% |
38
+
39
+ The aggregate +10-point accuracy gate was per domain/precision, not per style. It would be incorrect to claim that every formulation improved by ten points.
40
+
41
+ ### Quantization is not harmless
42
+
43
+ | Domain | A FP32/INT8 disagreement | B disagreement | Change, points | Paired 95% CI |
44
+ | --- | ---: | ---: | ---: | ---: |
45
+ | AG News | 18.59% | 2.08% | −16.51 | [−19.23, −13.86] |
46
+ | SNLI | 22.76% | 11.00% | −11.75 | [−15.17, −8.33] |
47
+
48
+ On SNLI's 936 requests, A changes 213 predictions: 95 correct→wrong, 64 wrong→correct, 54 wrong→different-wrong. B changes 103: 73 correct→wrong, 22 wrong→correct, 8 wrong→different-wrong. B loses 51 net correct answers, **5.45 points**, versus A's 31 / 3.31 points.
49
+
50
+ Thus B has fewer changes but a larger accuracy loss. B's instability also rises from 16.03% in FP32 to 33.65% in INT8. Do not use the disagreement reduction as a blanket quantization-robustness claim.
51
+
52
+ ## Historical fixed validation used in A/B
53
+
54
+ 2,000 requests / 1,980 families, previously consulted during development. Same batch/CPU conditions as DEV.
55
+
56
+ | Precision | A | B | Difference, points | Paired 95% CI |
57
+ | --- | ---: | ---: | ---: | ---: |
58
+ | FP32 | 76.15% | 77.20% | +1.05 | [+0.20, +1.90] |
59
+ | INT8 | 76.05% | 75.65% | −0.40 | [−1.31, +0.55] |
60
+
61
+ The worst task point regression is −1.00 point. The overall increase in FP32/INT8 changes is +0.15 point, CI [−0.90, +1.20]. Non-regression guards pass on this development set; this is not a blind confirmation or a demonstrated inter-seed improvement.
62
+
63
+ ## Earlier original-model evaluations — NOT A/B scores
64
+
65
+ The original model was selected by historical validation. Earlier test results had already been seen before increasing training data, so the end-to-end development process was not entirely blind. COPA was excluded from training and checkpoint selection.
66
+
67
+ | Original INT8, historical test | Student | Laya teacher |
68
+ | --- | ---: | ---: |
69
+ | AG News, 600 requests | 91.00% | 91.17% |
70
+ | BoolQ, 600 | 69.00% | 83.33% |
71
+ | Emotion, 600 | 91.17% | 59.00% |
72
+ | SNLI, 600 | 78.17% | 76.33% |
73
+ | SST5, 600 | 45.00% | 33.33% |
74
+ | Balanced total, 3,000 | 74.87% | 68.63% |
75
+ | COPA out of domain, 400 | 49.25% | 69.75% |
76
+
77
+ These teacher annotations belong to the historical pipeline, not a fresh remeasurement using the A/B FP32 teacher cache. Supervised labels supplement distillation, so in-domain teacher-score comparisons do not establish general student superiority. COPA random-choice reference is 50%. An old descriptive per-answer-vocabulary majority oracle of 100% was not a usable predictor and is omitted from the publication summaries.
78
+
79
+ Original historical FP32/INT8 overall test accuracy: 75.00% / 74.87%. Batch size 16, four CPU threads, unlike the newer A/B batch-eight evaluation. Neither test-3000 nor COPA was rerun for A or B.
80
+
81
+ ## CPU benchmark
82
+
83
+ Linux x86-64, Intel Core i7-1260P, ONNX Runtime 1.24.4, two threads, batch one, four options, three warm-up calls per shape and 30 timed repetitions. Synthetic tokens, model already loaded, tokenization/network/loading excluded. Peak RSS is over all four sequence lengths.
84
+
85
+ | Variant | 128-token median | p95 | Peak RSS |
86
+ | --- | ---: | ---: | ---: |
87
+ | Original, current session | 21.36 ms | 33.24 ms | 195.74 MiB |
88
+ | Experimental B | 21.55 ms | 28.83 ms | 196.00 MiB |
89
+
90
+ Control A's median is 21.43 ms; its full measurement record is in `benchmarks/cpu/control-a.json`. These observations do not establish a speed difference. Raw individual timings/IQR were not retained. Background load, clock and power states were not controlled sufficiently to explain the original's older 10.79 ms figure; that separate-session number must not be used to claim a 2× slowdown or speedup.
91
+
92
+ ```bash
93
+ python benchmark_cpu.py models/experimental-b --threads 2 --repeats 30 --output my-cpu.json
94
+ ```
95
+
96
+ The benchmark uses Unix `resource`; Windows is not supported by this measurement script as written. The inference runtime itself does not depend on `resource`, but Windows/ARM64 compatibility remains untested. Dynamic quantization kernels and predictions can vary by CPU and batch composition.
97
+
98
+ ## What the evidence does not establish
99
+
100
+ Reliable decisions on new tasks, arbitrary paraphrases, broad out-of-distribution robustness, calibrated confidence, performance on every CPU, bitwise training reproducibility, variance across seeds, or game-playing ability. None of those claims follows from small model files, software test success or a successful ONNX export.
LICENSE_NOTES.md ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Source-specific rights and unresolved redistribution questions
2
+
3
+ **There is no single permissive license asserted for this mixed-source research release.** The model-card `license: other` and descriptive license name point to this notice; they do not create a new license, clear upstream rights or authorize every commercial use.
4
+
5
+ The owner requested a public research release with these reservations explicit. Public accessibility does not resolve copyright, database rights, contract terms or whether particular dataset terms apply to derived weights. This is a source inventory and limitation notice, not legal advice or a legal determination of derivative-work status.
6
+
7
+ ## Teacher and backbone
8
+
9
+ | Component | Pinned revision | Declared model-card license |
10
+ | --- | --- | --- |
11
+ | [Laya / convaiinnovations](https://huggingface.co/convaiinnovations/laya) | `55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851` | Apache-2.0 |
12
+ | [Google compact BERT](https://huggingface.co/google/bert_uncased_L-6_H-512_A-8) | `dd53ec6ca9d05e0a91b309c4e137f31988888071` | Apache-2.0 |
13
+
14
+ The Laya Python package used was 0.3.20; its [source repository](https://github.com/NandhaKishorM/laya) should also be reviewed for applicable notices and terms. The Apache-2.0 declarations are not a separate warranty about the teacher's pretraining data, outputs or every downstream distribution scenario. No broader permission for this student is inferred solely from those tags. A copy of the [Apache License 2.0 text](licenses/Apache-2.0.txt) is included for components declaring it; it is not a blanket relicensing of this repository or the mixed data.
15
+
16
+ ## Training and evaluation datasets
17
+
18
+ | Source | Pinned revision | Evidence and limitation |
19
+ | --- | --- | --- |
20
+ | [AG News / fancyzhx](https://huggingface.co/datasets/fancyzhx/ag_news) | `eb185aade064a813bc0b7f42de02595523103ca4` | Pinned card says `unknown` and describes research / non-commercial activity; no blanket commercial or redistribution clearance asserted. |
21
+ | [SST5 / SetFit](https://huggingface.co/datasets/SetFit/sst5) | `e51bdcd8cd3a30da231967c1a249ba59361279a3` | No license declaration in the pinned card; review-text rights not resolved here. |
22
+ | [BoolQ / Google](https://huggingface.co/datasets/google/boolq) | `35b264d03638db9f4ce671b711558bf7ff0f80d5` | Card declares [CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/); preserve attribution and applicable obligations. |
23
+ | [SNLI / Stanford NLP](https://huggingface.co/datasets/stanfordnlp/snli) | `cdb5c3d5eed6ead6e5a341c8e56e669bb666725b` | Card declares [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/); preserve attribution and applicable obligations. |
24
+ | [Emotion / DAIR.AI](https://huggingface.co/datasets/dair-ai/emotion) | `cab853a1dbdf4c42c2b3ef2173804746df8825fe` | Card says the dataset should be used for educational and research purposes only. |
25
+ | [COPA through SuperGLUE](https://huggingface.co/datasets/aps/super_glue) | `3de24cf8022e94f4ee4b9d55a6f539891524d646` | Historical evaluation only, not fitting; SuperGLUE refers to original task licenses, with COPA-specific rights unresolved in this project. |
26
+
27
+ Exact pinned-card links, original homepages, source partitions and provenance are recorded in `research/corpus-manifest.json`. No source corpus or teacher-cache contents are redistributed. Historical reports that contained example-specific answer vocabularies have been reduced to aggregate summaries before publication.
28
+
29
+ ## Practical restrictions
30
+
31
+ - Treat this as experimental research material, not a cleared commercial product or a universally licensed foundation model.
32
+ - Verify source-specific rights and obtain any necessary permission before redistribution or commercial deployment. A public download is not itself that permission.
33
+ - Retain source attribution and this notice when sharing permitted derivatives. Applicable upstream licenses/terms are not superseded by this notice.
34
+ - No license is invented for third-party corpus text or any right the maintainer does not hold.
35
+ - Research source files have no newly added blanket license grant in this snapshot. Review applicable upstream code licenses as well as data/model conditions before reuse.
36
+
37
+ The scientific claims are similarly limited: all variants have `quality_validated: false`, probabilities are uncalibrated, and the latest composite acceptance criterion failed. Publication must not be represented as certification of safety, generality, legal clearance or endorsement by upstream authors.
PUBLICATION_CHECKS.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "research_snapshot": "2026-09-26",
3
+ "package_scope": "Original, control A and experimental B; CPU exports and optional FP32 reference checkpoints.",
4
+ "software_unit_tests_passed": 57,
5
+ "hugging_face_model_card_validation": "passed",
6
+ "recomputed_statistics": {
7
+ "dev_rows": 2184,
8
+ "fixed_validation_rows": 2000,
9
+ "robustness_report_exactly_reproduced": true,
10
+ "fixed_validation_report_exactly_reproduced": true,
11
+ "new_inference_for_recomputation": false
12
+ },
13
+ "runtime": {
14
+ "runtime_checks": {
15
+ "original": {
16
+ "payload_bytes": 87157026,
17
+ "CPUExecutionProvider": true,
18
+ "known_example_answers": {
19
+ "example-canonical-request.json": "sports",
20
+ "example-news-request.json": "science"
21
+ }
22
+ },
23
+ "control-a": {
24
+ "payload_bytes": 87155068,
25
+ "CPUExecutionProvider": true,
26
+ "known_example_answers": {
27
+ "example-canonical-request.json": "sports",
28
+ "example-news-request.json": "science"
29
+ }
30
+ },
31
+ "experimental-b": {
32
+ "payload_bytes": 87155068,
33
+ "CPUExecutionProvider": true,
34
+ "known_example_answers": {
35
+ "example-canonical-request.json": "sports",
36
+ "example-news-request.json": "sports"
37
+ }
38
+ }
39
+ },
40
+ "torch_imported": false,
41
+ "note": "Known interface checks, not independent quality evaluations."
42
+ },
43
+ "quality_validated": false,
44
+ "dev_composite_passed": false,
45
+ "final_evaluated": false,
46
+ "privacy": {
47
+ "raw_dataset_text_in_recorded_decisions": false,
48
+ "source_family_ids_replaced_preserving_sort_order": true,
49
+ "credentials_included": false,
50
+ "private_conversation_transcripts_included": false,
51
+ "account_balances_included": false,
52
+ "final_input_files_included": false
53
+ },
54
+ "limitations": "Passing software checks and model-card validation are not evidence of general decision reliability or legal clearance."
55
+ }
README.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: other
5
+ license_name: research-use-with-unresolved-upstream-rights
6
+ license_link: https://huggingface.co/VynoDePal/laya-mini-cpu-research/blob/main/LICENSE_NOTES.md
7
+ library_name: onnx
8
+ pipeline_tag: text-classification
9
+ base_model: google/bert_uncased_L-6_H-512_A-8
10
+ base_model_relation: finetune
11
+ datasets:
12
+ - fancyzhx/ag_news
13
+ - google/boolq
14
+ - dair-ai/emotion
15
+ - stanfordnlp/snli
16
+ - SetFit/sst5
17
+ tags:
18
+ - bert
19
+ - onnx
20
+ - int8
21
+ - cpu
22
+ - knowledge-distillation
23
+ - multiple-choice
24
+ - experimental
25
+ - research
26
+ inference: false
27
+ ---
28
+
29
+ # Laya Mini CPU — research checkpoints and controlled A/B results
30
+
31
+ **English decision models, approximately 87.16 MB each. Research artifacts, not a validated general-purpose decision agent.**
32
+
33
+ [Français](README_FR.md) · [Benchmarks](BENCHMARKS.md) · [Research notes](RESEARCH.md) · [Reproducibility](REPRODUCIBILITY.md) · [Rights and restrictions](LICENSE_NOTES.md)
34
+
35
+ Maintained by [VynoDePal](https://huggingface.co/VynoDePal). Research snapshot: 26 September 2026. This is an independent student-model experiment using [Laya](https://huggingface.co/convaiinnovations/laya) as teacher, not an official Laya release or an affiliation claim.
36
+
37
+ ## Read this before choosing a checkpoint
38
+
39
+ **Experimental B improves accuracy on the tested close reformulations, but fails the preregistered composite acceptance criterion. It is NOT promoted as a replacement for the original.** None of these variants is validated for reliable general decisions. The reserved FINAL set was not evaluated.
40
+
41
+ The main experiment covers **312 texts / 2,184 correlated requests, two domains, two description styles and one training seed**. It is not an official full-dataset AG News or SNLI leaderboard evaluation.
42
+
43
+ | DEV domain / precision | Control A accuracy | Experimental B accuracy | A order instability | B order instability | Accuracy + stability gate |
44
+ | --- | ---: | ---: | ---: | ---: | --- |
45
+ | AG News FP32 | 57.05% | 89.02% | 61.54% | 3.53% | Pass |
46
+ | AG News INT8 | 54.89% | 88.46% | 65.06% | 6.41% | Pass |
47
+ | SNLI FP32 | 53.42% | 71.05% | 48.40% | 16.03% | Pass |
48
+ | **SNLI INT8** | **50.11%** | **65.60%** | **58.01%** | **33.65%** | **FAIL: B must be ≤29.01% unstable** |
49
+
50
+ - The SNLI INT8 **short-style gain is only 5.98 percentage points**, not the 15.49-point average across styles.
51
+ - B loses **5.45 points on SNLI from FP32 to INT8**, despite fewer FP32/INT8 prediction changes than A. Fewer changes do not establish better quantization robustness.
52
+ - Confidence intervals resample text/premise families, not individual rotations. They do **not** measure variation across training seeds.
53
+ - `experiment-status.json` records `quality_validated: false`, `dev_passed: false`, the failed gate and `final_evaluated: false`.
54
+
55
+ ## Model variants
56
+
57
+ | Directory | Role | CPU model payload | FP32 checkpoint |
58
+ | --- | --- | ---: | ---: |
59
+ | `models/original/` | Historical reference, before the A/B continuation | 87,157,026 bytes | 152,909,884 bytes |
60
+ | `models/control-a/` | Two more epochs using fixed descriptions | 87,155,068 bytes | 152,909,884 bytes |
61
+ | `models/experimental-b/` | Same continuation, with controlled description augmentation | 87,155,068 bytes | 152,909,884 bytes |
62
+
63
+ Payload means **ONNX INT8 + tokenizer + manifest**; 1 MB = 1,000,000 bytes. Each variant satisfies the 80–90 MB model-file target. The whole repository is larger because it contains multiple variants, optional FP32 reference checkpoints, code and evidence. Python, dependencies and working RAM are extra.
64
+
65
+ There is deliberately **no default model at the repository root**. Choose a variant explicitly. Original is a historical reference, not a claim that it is generally reliable. Checkpoints under `checkpoints/` are for inspection, comparison and possible re-export; downloading them is unnecessary for CPU INT8 inference.
66
+
67
+ ## Download only the CPU variant you need
68
+
69
+ Install the Hugging Face CLI if needed (`python -m pip install huggingface_hub`), then:
70
+
71
+ ```bash
72
+ hf download VynoDePal/laya-mini-cpu-research \
73
+ --include 'models/experimental-b/*' runtime.py schema.py requirements-runtime.txt 'examples/*' \
74
+ --local-dir laya-mini
75
+ cd laya-mini
76
+ python3 -m venv .venv
77
+ source .venv/bin/activate
78
+ python -m pip install -r requirements-runtime.txt
79
+ python runtime.py models/experimental-b examples/example-canonical-request.json --threads 2
80
+ ```
81
+
82
+ Use `models/original` or `models/control-a` to select another variant. The custom runtime uses only `CPUExecutionProvider`; it does not require PyTorch, a GPU, paid inference or network access after installation. It is **not** a Transformers `pipeline()` checkpoint, an Ollama/GGUF model or a hosted chat endpoint.
83
+
84
+ ```python
85
+ import json
86
+ from pathlib import Path
87
+ from runtime import DecisionSession
88
+
89
+ session = DecisionSession("models/experimental-b", threads=2)
90
+ request = json.loads(Path("examples/example-canonical-request.json").read_text())
91
+ result = session.predict(request["state"], request["questions"])
92
+ print(result["answers"])
93
+ ```
94
+
95
+ Keep the session loaded between requests. Inputs, instructions and option descriptions should be in English. The two included tennis examples are previously known interface checks, **not held-out evidence**. B answers `sports` on both in the recorded smoke test; the original fails the long-description version. Do not infer general reliability from either anecdote.
96
+
97
+ ### Interface and limits
98
+
99
+ - `choice`: chooses a key from a dictionary of option descriptions.
100
+ - `score`: returns the expectation over an ordered list of levels.
101
+ - `noul`: returns a soft boolean score.
102
+ - Software supports 2–20 options; training covered only 2–6.
103
+ - Maximum total context: 512 WordPiece tokens. Instructions/options have a 192-token budget; oversized question definitions are rejected. Long states may be truncated; check `truncated_state`.
104
+ - Probabilities are **not calibrated**. A high `max_probability` is not a factual correctness guarantee.
105
+ - No free-form generation, vision, screen reading or automatic action execution. A game-playing system would still need an adapter and game-specific evaluation.
106
+
107
+ ## CPU performance
108
+
109
+ Intel Core i7-1260P, Linux x86-64, ONNX Runtime 1.24.4, two threads, one question / four options, warm model, 30 repetitions. Synthetic inputs; excludes tokenization and loading.
110
+
111
+ | B input tokens | Median latency |
112
+ | --- | ---: |
113
+ | 64 | 11.08 ms |
114
+ | 128 | 21.55 ms |
115
+ | 256 | 44.83 ms |
116
+ | 512 | 111.79 ms |
117
+
118
+ B's 128-token p95 is **28.83 ms**, and peak process RSS is **196 MiB** across the benchmark. Original / A / B 128-token medians measured in the same session are **21.36 / 21.43 / 21.55 ms**. No meaningful speed ranking is established. The original's older 10.79 ms result came from a different session and is not a matched comparison; the difference is unexplained.
119
+
120
+ Raw per-repetition timings were not retained, so an IQR is unavailable. Windows, ARM64 and old/low-end CPUs were not validated. **“Runs easily on every CPU” is not established.** More settings and p95 values are in [BENCHMARKS.md](BENCHMARKS.md).
121
+
122
+ ## Architecture and training
123
+
124
+ - **38,223,873 parameters**: a pretrained six-layer, 512-wide BERT backbone, an additional decision layer, question-type embeddings and an option-marker scoring head.
125
+ - Backbone: `google/bert_uncased_L-6_H-512_A-8`, revision `dd53ec6ca9d05e0a91b309c4e137f31988888071`.
126
+ - Teacher: `convaiinnovations/laya`, revision `55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851`, package `laya==0.3.20`.
127
+ - Loss: teacher KL at temperature 1 + 2 × cross-entropy against actual labels. This is **distillation plus supervised learning**, not direct quantization of the original Laya weights.
128
+ - A/B both continue the same original checkpoint for exactly two epochs / 5,048 steps, seed 42, batch 32, identical schedules, shared padding and last-checkpoint selection. There is no DEV-based checkpoint selection.
129
+ - B replaces exactly 12,000 AG News and 12,000 SNLI descriptions, 50% of each training pool. All other fields/tasks remain unchanged. Both arms share **teacher targets on fixed prompts**, not teacher re-annotations of the variants.
130
+ - Student: CUDA BF16 with FP32 matmul mode `high` (TF32 allowed; kernels not traced). Shared teacher cache: FP32 CUDA without autocast/TF32. Bitwise training reproducibility is not established.
131
+ - Export: ONNX opset 18; dynamic INT8 linear-weight quantization, per channel, `reduce_range=True`; embeddings remain FP32. The reduced range uses seven effective weight bits in INT8 storage. No separate calibration corpus was used.
132
+
133
+ The 80,758 training rows comprise 24,000 AG News, 24,000 SNLI, 15,966 Emotion, 8,533 SST5 and 8,259 BoolQ examples. The original model's development history and different historical evaluations are documented separately; **old test/COPA scores must not be attributed to A or B**.
134
+
135
+ ## Evidence and reproducibility boundary
136
+
137
+ - [A/B report](benchmarks/ab/dev-report.json): all acceptance criteria, per-style diagnostics and confidence intervals.
138
+ - [Frozen protocol](benchmarks/ab/protocol.json): hyperparameters and cryptographic commitments to inputs, including unevaluated FINAL files.
139
+ - [Text-free recorded decisions](benchmarks/ab/decisions-no-text.jsonl): 2,184 DEV + 2,000 fixed-validation rows, allowing aggregate statistics to be recomputed without rerunning inference.
140
+ - [CPU reports](benchmarks/cpu): measurements for all three variants in the same session.
141
+ - [Historical results](benchmarks/history): clearly scoped to the original or the pre-A/B audit.
142
+ - [Research sources](research/src), checkpoint metadata and `SHA256SUMS`: code/provenance and integrity evidence.
143
+
144
+ No raw training corpus, teacher-cache contents, FINAL requests/descriptions, credentials, account balances or private conversation transcripts are included. The final-set preparation script is omitted. Published hashes/code are not a cryptographic guarantee that nobody could reconstruct held-out public examples; **the claim is that FINAL was not evaluated in this experiment**.
145
+
146
+ Recomputing the recorded statistics is reproducible here. **Training from scratch and rerunning the original DEV inputs are not fully self-contained**, because their data/cache artifacts are not redistributed. FP32 checkpoints do not remove that limitation. See [REPRODUCIBILITY.md](REPRODUCIBILITY.md).
147
+
148
+ ## Rights, safety and status
149
+
150
+ This public research snapshot is released at the owner's request **with unresolved upstream rights explicitly disclosed**. The `other` license tag is a pointer to source-specific restrictions, not a newly granted unified license. The Apache-2.0 model cards of the teacher/backbone do not by themselves clear the mixed training-data rights. Emotion is research/education only, AG News has unknown/non-commercial wording, and the pinned SST5 card declares no license. See [LICENSE_NOTES.md](LICENSE_NOTES.md) before redistribution or commercial use.
151
+
152
+ Do not use these experimental models for consequential decisions or irreversible actions without independent validation and safeguards. The size target is met; reliable general decision intelligence is **not**.
153
+
154
+ The engineering/review process used Codex and Claude Code assistance. Claude reviewed supplied excerpts and measurements, did not execute these tests, and did not provide independent human peer review. The reported total Vast.ai credit decrease was approximately **US$0.36**, including approximately **US$0.125 for A/B**; these are observations, not final invoices or a reproducible cost quote. Training instances were removed. No new paid job is required to use these CPU models.
README_FR.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Laya Mini CPU — guide français
2
+
3
+ [Carte complète en anglais](README.md) · [Benchmarks](BENCHMARKS.md) · [Recherche](RESEARCH.md) · [Reproductibilité](REPRODUCIBILITY.md) · [Droits](LICENSE_NOTES.md)
4
+
5
+ Ce dépôt de recherche contient **trois variantes réellement entraînées**, d'environ **87,16 Mo chacune** pour l'inférence CPU. Il ne s'agit ni d'une simple quantification des poids originaux de Laya, ni d'un chatbot, ni d'un agent de jeu prêt à l'emploi.
6
+
7
+ ## Quel modèle choisir ?
8
+
9
+ - `models/original/` : référence historique avant la dernière expérience, pas une garantie de fiabilité générale.
10
+ - `models/control-a/` : contrôle ayant reçu deux epochs supplémentaires avec descriptions fixes.
11
+ - `models/experimental-b/` : même continuation avec remplacement contrôlé de descriptions AG News/SNLI.
12
+
13
+ **B progresse sur les formulations proches étudiées, mais ne passe pas tous les critères préenregistrés.** Il reste expérimental et n'est pas promu comme remplacement de l'original. Aucun modèle n'est sélectionné par défaut à la racine du dépôt.
14
+
15
+ | DEV en INT8 | A | B |
16
+ | --- | ---: | ---: |
17
+ | AG News, catégories d'actualité | 54,89 % | 88,46 % |
18
+ | SNLI, inférence entre phrases | 50,11 % | 65,60 % |
19
+
20
+ Ces résultats concernent **312 textes, 2 184 requêtes corrélées, deux domaines et une seule graine**. Ils ne constituent pas les scores officiels sur les jeux de test complets.
21
+
22
+ La garde échouée est la stabilité SNLI après quantification : **33,65 %** des couples texte/style changent de réponse selon la rotation des options, contre un maximum admissible de **29,01 %**. Sur le style SNLI court, le gain n'est que de 5,98 points. B perd 5,45 points SNLI entre FP32 et INT8. Le jeu FINAL réservé n'a pas été évalué ; aucun réglage supplémentaire n'a été fait sur ce DEV consommé.
23
+
24
+ ## Installation minimale
25
+
26
+ Installer le CLI Hugging Face si nécessaire (`python -m pip install huggingface_hub`), puis télécharger uniquement la variante souhaitée :
27
+
28
+ ```bash
29
+ hf download VynoDePal/laya-mini-cpu-research \
30
+ --include 'models/experimental-b/*' runtime.py schema.py requirements-runtime.txt 'examples/*' \
31
+ --local-dir laya-mini
32
+ cd laya-mini
33
+ python3 -m venv .venv
34
+ source .venv/bin/activate
35
+ python -m pip install -r requirements-runtime.txt
36
+ python runtime.py models/experimental-b examples/example-canonical-request.json --threads 2
37
+ ```
38
+
39
+ L'inférence est locale, sur CPU, sans PyTorch ni accès réseau après installation. Les entrées doivent être en **anglais**. Le modèle choisit parmi des options ou produit un score ; il ne génère pas de texte libre. Les probabilités ne sont pas calibrées.
40
+
41
+ Le logiciel accepte 2 à 20 options, mais l'entraînement n'en couvre que 2 à 6. Le contexte est limité à 512 tokens WordPiece. Vérifier `truncated_state` pour les observations longues. Les exemples de tennis sont déjà connus : leur réussite éventuelle n'est pas un benchmark indépendant.
42
+
43
+ ## Taille et performances
44
+
45
+ - Modèle CPU B : **87 155 068 octets**, tokenizer et manifeste inclus, soit 87,155 Mo décimaux / 83,118 Mio.
46
+ - Sur Intel Core i7-1260P, Linux x86-64, deux threads : **21,55 ms médians à 128 tokens**, modèle chaud, hors tokenisation et chargement ; p95 28,83 ms.
47
+ - Pic RSS du benchmark : **196 Mio**. La RAM et les dépendances dépassent donc la taille des fichiers.
48
+ - A et l'original remesurés dans la même session ont des latences proches. L'ancien chiffre de 10,79 ms provient d'une autre session, non comparable directement.
49
+ - Windows, ARM64 et les CPU anciens ne sont pas testés. « Fonctionner aisément sur n'importe quel CPU » n'est pas garanti.
50
+
51
+ Les gros checkpoints FP32 de `checkpoints/` sont facultatifs et servent à l'inspection/comparaison/réexport. Le dépôt complet contient plusieurs modèles : sa taille totale dépasse volontairement 90 Mo, mais chaque variante CPU respecte la cible.
52
+
53
+ ## Recherche et limites de la publication
54
+
55
+ Le dépôt conserve les gains **et** le résultat négatif, les statistiques par style, le protocole, les hashes, le code et les mesures CPU. Les résultats historiques du test à 3 000 exemples et de COPA restent attribués uniquement à l'original : ils n'ont pas été réévalués pour A/B.
56
+
57
+ Les décisions enregistrées sont publiées sans les textes des corpus, avec identifiants de familles anonymisés conservant l'ordre utile au bootstrap. Elles permettent de recalculer les tableaux et intervalles. En revanche, le réentraînement complet et la nouvelle inférence DEV ne sont pas autonomes sans les données/cache non redistribués.
58
+
59
+ Le professeur Laya et le backbone BERT déclarent Apache-2.0, mais les données ont des droits hétérogènes, parfois incomplets ou limités à la recherche. **Une publication publique n'équivaut pas à une autorisation commerciale ni à une clarification juridique de ces droits.** Lire les [réserves de licence](LICENSE_NOTES.md). Aucun corpus brut, contenu FINAL, secret ou solde de compte n'est téléversé.
60
+
61
+ Le coût Vast.ai cumulé constaté est d'environ 0,36 USD, dont 0,125 USD pour A/B ; ce n'est pas une facture définitive. Les instances ont été détruites. L'objectif de taille est atteint ; la fiabilité générale recherchée ne l'est pas encore.
REPRODUCIBILITY.md ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Reproducibility and artifact boundaries
2
+
3
+ ## What is included
4
+
5
+ - Three ONNX CPU variants, with their original tokenizer and manifest.
6
+ - Three FP32 reference checkpoints and training metadata. These are optional for ordinary inference and are not 80–90 MB files.
7
+ - The custom runtime and CPU benchmark code.
8
+ - The frozen A/B protocol, checkpoint provenance, historical corpus manifest, aggregate reports and hashes.
9
+ - Recorded A/B DEV/fixed-validation decisions with dataset text and private identifiers removed.
10
+ - Selected research source snapshots. Training scripts are historical reference material, not a complete one-command reproduction bundle.
11
+
12
+ ## What is not included
13
+
14
+ Raw corpus text, teacher-cache contents, full DEV input prompts, reserved FINAL text/descriptions, the final-set preparation script, GPU orchestration, credentials, account balances, instance IDs and private conversations. Only FINAL file hashes are published as commitments. Generic algorithms and public source datasets do not provide cryptographic secrecy of the holdout; the verifiable experimental status is **FINAL not evaluated**.
15
+
16
+ This release can reproduce **statistics from recorded decisions** and run new CPU inference. It cannot independently recreate the whole training experiment or rerun its exact DEV prompts without the omitted data/cache. Public dataset revisions and the historical corpus manifest help describe the source material but do not establish reuse rights.
17
+
18
+ ## Verify downloaded files
19
+
20
+ For a complete snapshot:
21
+
22
+ ```bash
23
+ sha256sum -c SHA256SUMS
24
+ ```
25
+
26
+ If downloading only one model, filter the checksum list to those files instead of expecting the whole-repository check to pass. Model payloads include only `model.int8.onnx`, `tokenizer.json` and `manifest.json` in one variant directory. Source weights remain unchanged from the measured experiment.
27
+
28
+ Checkpoints use the same custom architecture in `research/src/model.py`. They are not standalone `AutoModel.from_pretrained()` directories. A checkpoint must be paired with its architecture, tokenizer and question serialization. The matching tokenizer is under the corresponding `models/` directory.
29
+
30
+ ## Recompute recorded A/B statistics, without inference
31
+
32
+ The local reference used **NumPy 2.5.3**. Install `requirements-stats.txt` in a suitable Python 3.12 environment. No PyTorch or GPU is needed for this operation.
33
+
34
+ Run this from the repository root:
35
+
36
+ ```bash
37
+ python - <<'PY'
38
+ import json
39
+ import sys
40
+ from pathlib import Path
41
+
42
+ sys.path.insert(0, str(Path("research/src").resolve()))
43
+ from ab_evaluate import fixed_summary, robustness_summary
44
+
45
+ rows = [json.loads(line) for line in Path("benchmarks/ab/decisions-no-text.jsonl").open()]
46
+ dev = [row for row in rows if row["style"] != "fixed"]
47
+ fixed = [row for row in rows if row["style"] == "fixed"]
48
+ expected = json.loads(Path("benchmarks/ab/dev-report.json").read_text())
49
+ robustness = robustness_summary(dev)
50
+ validation = fixed_summary(fixed)
51
+ assert robustness == expected["robustness"]
52
+ assert validation == expected["fixed_validation"]
53
+ assert not (robustness["passed"] and validation["passed"])
54
+ print("Recorded statistics reproduced; the composite criterion fails as reported.")
55
+ PY
56
+ ```
57
+
58
+ The 4,184 records comprise 2,184 DEV and 2,000 historical fixed-validation requests, each with the four A/B × FP32/INT8 predictions/probability vectors. Family identifiers are replaced with fixed-width ordinal IDs preserving the original sorted-family order. Thus both dependence groups and bootstrap index ordering are retained without exposing original identifiers.
59
+
60
+ For DEV, `canonical_label` and probability indices are canonical domain classes. For historical fixed validation, they follow each request's original option order; they are suitable for per-request correctness and flip comparisons, **not** a pooled semantic-class confusion matrix without the omitted option definitions. Do not treat every row as independent or interpret these anonymized predictions as a redistributed text dataset.
61
+
62
+ The expected original prediction-file SHA256 is `608003d576107260205f758b012ba9a42020c28d1d4d35b682930903dd3b4e7b`. The text-free derivative necessarily has a different hash, `a982420e45e2e16ece356619196cf49bfe36fe8adac2b208e4c9763b3d2b3f99`. The original predictions themselves are not published.
63
+
64
+ ## Inference and export reproducibility
65
+
66
+ Use `requirements-runtime.txt` and the README commands for ONNX CPU inference. Dynamic quantization can produce different results on other CPUs or different batches. The published predictions are the reference observations, not a promise of bitwise equality on every environment.
67
+
68
+ Remote export used PyTorch 2.8.0+cu126, Transformers 4.57.6, ONNX 1.20.1 and ONNX Runtime 1.24.4. Local A/B quality evaluation used ONNX Runtime 1.24.4 and NumPy 2.5.3. Dynamic per-channel INT8 used `reduce_range=True` and no separate calibration dataset. FP32 embeddings were retained.
69
+
70
+ Re-exporting the same checkpoint can depend on library/platform versions; byte-identical ONNX output is not guaranteed. Synthetic-shape FP32 ONNX parity checks had maximum logit errors of about 2.68×10⁻⁶ for A and 3.76×10⁻⁶ for B; this verifies export mechanics, not task accuracy.
71
+
72
+ ## Research-source limitations
73
+
74
+ `research/src/` contains copies of the actual model, loss, batching, cache-validation, training and evaluation logic. Some historical entry points refer to the original workspace layout or require omitted corpus/configuration files. They are supplied for inspection, not advertised as runnable full training recipes from this snapshot.
75
+
76
+ No training, teacher annotation or FINAL inference should be triggered to reproduce the published statistical table. A new experiment requires its own explicit protocol, data access/rights review and compute budget. The old development sets cannot be rebranded as fresh tests.
RESEARCH.md ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Research notes: from a size target to an invariance experiment
2
+
3
+ ## Objective and scope
4
+
5
+ The requested target was an English decision model with an **80–90 decimal MB inference payload**, usable on CPU. Reliable general decisions were the aspiration, not an achieved result. Directly shrinking the teacher by ordinary INT8 quantization was not the chosen solution: a smaller pretrained BERT student was trained with teacher distributions and ground-truth labels.
6
+
7
+ All reported numbers are project measurements unless explicitly described as claims in a cited source. This document is an engineering research note, not a peer-reviewed paper.
8
+
9
+ ## Development chronology
10
+
11
+ 1. **Architecture feasibility.** A 38.2M-parameter student was exported to about 87 MB using INT8 linear matrices and FP32 embeddings. Prototype size checks were not quality evidence.
12
+ 2. **Historical training.** A first 24,000-example run was followed by an 80,758-example run. The second was selected on validation; its epoch-6 checkpoint is `original`. The historical test improved, but COPA remained 49.25%, close to the 50% random reference. This did not meet the generality objective.
13
+ 3. **Wording diagnostic.** A known tennis sentence exposed sensitivity to longer option descriptions and option ordering. Correct marker positions, absence of truncation and FP32 export parity were checked; the error also existed before INT8. One sentence and its rotations were not treated as an independent benchmark.
14
+ 4. **Expanded development audit.** 60 AG News + 60 SNLI texts, four styles, two key families and cyclic rotations produced 3,360 requests per student precision. A bounded teacher audit completed 24 of these texts / 672 requests, not the entire 120-text pool. Teacher results were stronger in some conditions but also showed wording sensitivity. Aggregate evidence is in `benchmarks/history/pre-ab-robustness-audit.json`.
15
+ 5. **Preregistered A/B continuation.** New DEV/FINAL families and disjoint description pools were reserved. A and B shared start weights, optimizer/loss, teacher targets, batches/padding and selection rule. B alone changed exactly half the AG/SNLI descriptions. The protocol and files were hashed before training.
16
+ 6. **Result.** Localized reformulation accuracy improved substantially. One preregistered stability guard still failed in SNLI INT8. The experiment ended with B experimental, FINAL unevaluated, original preserved and no post-result tuning.
17
+
18
+ ## Why the contrast matters
19
+
20
+ A also receives the two extra epochs. Therefore B versus A measures the chosen description-augmentation contrast more cleanly than B versus the earlier original checkpoint would. The controls do not eliminate single-seed stochastic training uncertainty.
21
+
22
+ Both arms learn from the same Laya distributions on **fixed inputs**. This promotes invariance to semantically matched reformulations; it is not imitation of Laya's outputs on each reformulated prompt. Ground-truth cross-entropy remains present, so distillation is only part of the supervision.
23
+
24
+ The cache contains 80,758 annotations. On 64 pilot comparisons, decoded probability argmax agreed and maximum normalized-probability discrepancy was approximately 9.884×10⁻⁵. Native `choice` tie-breaking after rounding was not separately verified. No teacher truncation occurred; its longest encoded input was 383 tokens. A warning about `choice` with 11+ options lies outside this experiment's 2–6-option data.
25
+
26
+ Student training used BF16 and allowed TF32 for eligible FP32 matmuls; teacher annotations used strict FP32 CUDA. A seed is not a guarantee of deterministic kernels or bitwise reproducibility.
27
+
28
+ ## Main finding and unresolved issue
29
+
30
+ Augmentation produces positive measured changes on close, held-out formulations within these two domains. It does **not** establish arbitrary-prompt robustness or unseen-task intelligence. The remaining problem is particularly visible in the interaction between SNLI descriptions, option rotations and INT8.
31
+
32
+ Fewer FP32/INT8 prediction differences can coexist with a larger net accuracy drop. For B, 73 SNLI decisions change from correct to wrong and only 22 recover; A has 95 losses and 64 recoveries. The directional balance, not only the total disagreement rate, matters.
33
+
34
+ The next research direction would investigate this quantization-related loss under a **new, explicit protocol**. DEV is now consumed; it cannot honestly become a fresh test for variants chosen using its errors. The reserved FINAL must not be turned into a tuning set. No such next training run is included here.
35
+
36
+ ## Literature and primary documentation consulted
37
+
38
+ - [GLiClass: Generalist Lightweight Model for Sequence Classification Tasks](https://arxiv.org/html/2508.07662v1), Stepanov et al., 2025: text/label scoring and deliberate training variation motivated possible alternatives. No GLiClass weights were trained or benchmarked in this project.
39
+ - [GLiClass small v1.0 card/config](https://huggingface.co/knowledgator/gliclass-small-v1.0): “small” did not imply an 80–90 MB artifact. The consulted configuration's 128,003×768 word embedding table alone has 98,306,304 parameters. This is a size calculation, not an observed quantized-model benchmark.
40
+ - [Multitask Prompted Training Enables Zero-Shot Task Generalization](https://huggingface.co/papers/2110.08207), Sanh et al., 2021: the consulted abstract motivates prompt diversity and task-held-out evaluation. It does not predict performance for this much smaller encoder. Only metadata/abstract were reviewed for this source.
41
+ - [ONNX Runtime quantization](https://onnxruntime.ai/docs/performance/model-optimizations/quantization.html): quantization can reduce accuracy; dynamic quantization is commonly used for transformers; per-channel and reduced-range configurations have hardware-dependent tradeoffs.
42
+ - [PyTorch 2.8 reproducibility notes](https://raw.githubusercontent.com/pytorch/pytorch/v2.8.0/docs/source/notes/randomness.rst): reproducibility across versions, platforms and CPU/GPU is not guaranteed, even with matching seeds.
43
+ - [Laya](https://huggingface.co/convaiinnovations/laya) and its [source repository](https://github.com/NandhaKishorM/laya): teacher interface, architecture and reported capabilities. The student is not assumed to inherit all teacher capabilities or calibration.
44
+
45
+ More precise consulted sections and timestamps are in `research/references.json` and `research/runtime-references-checked.json`. Reading a source is not reproducing its experiments.
46
+
47
+ ## Review and research integrity
48
+
49
+ The owner requested recurring discussion with Claude Code. Actual exchanges covered semantic equivalence, cache/label ordering, experiment controls, quantization and interpretation. Suggestions were checked against local code and saved predictions; the final review supported non-promotion. One timed-out request produced no review and is not counted as approval.
50
+
51
+ Claude's conversational connection received excerpts and measurements, not direct workspace/shell access. It did not execute the tests. Two AI reviews are not independent human semantic validation or peer review. Private conversation IDs and transcripts are deliberately not published.
52
+
53
+ The trained exports are real, not random probe weights or padded files. The local pipeline had 57 passing unit tests, but software correctness checks are not certification of decision quality. Checkpoint sizes, hashes, mechanical export checks, research conclusions and quality gates are kept separate.
SHA256SUMS ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fe712bdfec1d7dffc809139de81571f5a3a87847b8907e9a866a92dfca8e3369 BENCHMARKS.md
2
+ cc992b2c269c6e24b027c57c2c8ce02121748c9f2e17da8bade9721e4f2016ee LICENSE_NOTES.md
3
+ b0cb8a5965b88db04ea8e6ae141e0d880a081a3391ccbf1bf0f933c889b5f3a5 PUBLICATION_CHECKS.json
4
+ e2ed8ff3e09f941b917497b145fe45fcb230fb76eeee8b895198b58329d4dbfe README.md
5
+ 079f860db190333db8dba1954dfad88c60fbda1a05728f38003d94ab9fbe9609 README_FR.md
6
+ 79852a1ae240ff20c00984c789349fb1fe3180063defee448f1de8cf33b62cf3 REPRODUCIBILITY.md
7
+ 4425e580d8f75e439c72668c1839f22dad215b495154f7f01ba958efe8c1730b RESEARCH.md
8
+ d6eb989eb736559dcac886a47c7be217a11c88f48a62728baff88954f78fec05 benchmark_cpu.py
9
+ a982420e45e2e16ece356619196cf49bfe36fe8adac2b208e4c9763b3d2b3f99 benchmarks/ab/decisions-no-text.jsonl
10
+ 50880c10e5167034f151765662c7b28c188ea99d1c9cbcc6e2db9c63a7599a77 benchmarks/ab/dev-report.json
11
+ 143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366 benchmarks/ab/protocol.json
12
+ 9749e9eaa665a549d9c570d0c48fdfdd83be7c7e3ccdfc2d33ef8048d90f6ad4 benchmarks/cpu/control-a.json
13
+ a5ea41cefb34c958d506f9e1103ef65718c53a7c80dbe744f531ba0c88ca525d benchmarks/cpu/experimental-b.json
14
+ ed2e2cbae4e233909e00186bafa2abe2543e8de84ffed677f8823e2f7b67a8d0 benchmarks/cpu/original-current.json
15
+ 61c50584cc5948781d922598db8e43fbfdd2adf0c05d9d0f3ce1aad600dd0e40 benchmarks/history/original-copa-400-summary.json
16
+ dc9eddd55ecf3cf960600252dd6c13efa8fe00c6c0020aa3fa65b92acd6b3ed9 benchmarks/history/original-cpu-earlier-session.json
17
+ 3a492329c63c6ee335855a6dfc11a2bee1ebfae282c85d681d090de4a48dc5ea benchmarks/history/original-test-3000-summary.json
18
+ 79b3a029073007e6cd4d02f0de5883294b86f0b157644c9d0f6f885005fe36f9 benchmarks/history/pre-ab-robustness-audit.json
19
+ 1da45906bfc7f513867875c5c5902a4909593f949d623b1eda4c25051cd2c53e checkpoints/control-a/model.safetensors
20
+ e1f24303468c4e9f3222a2cfd42651accf99ed5b4943f3d14f130486d4ea4491 checkpoints/control-a/training.json
21
+ 7dfc87cdeeb3b6885d54fce02beea64f55d7d93679ed1cc9850c533c3888e36c checkpoints/experimental-b/model.safetensors
22
+ d2638c9dd2f3f8dae44670c0f1c39acf707f7fe76038ed4dc705df3fb883c7c8 checkpoints/experimental-b/training.json
23
+ 5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008 checkpoints/original/model.safetensors
24
+ 3890e0ff94e4c0e0be926b9cba7d4fb7f2fa3a18e0b5957d47d11fc1f410de49 checkpoints/original/training.json
25
+ 3fb2dc9676522962dd1884ac2bef8ff56e1813bc7eed4317d96c805533e7b438 examples/example-canonical-request.json
26
+ 70333d48b9503ea7e3a8bce234d2ce3673a005168f4ae6ecbbfe88147335beb2 examples/example-news-request.json
27
+ a3156a3526dec6985b7d7ccf9a69e25c8ae6680fc183aca03c328d234e46fc01 experiment-status.json
28
+ cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 licenses/Apache-2.0.txt
29
+ d89ad68d5052361601017b76706847e1a3a8a8f1f91cc3f0c7d701bf77f8e725 models/control-a/manifest.json
30
+ 30c633d3bd6742714f3198c5e6d3176c05b312e967c6da2523ad6f6ff25e43b6 models/control-a/model.int8.onnx
31
+ 19a57dcc34c9491ae5049f69d49db9081ecf2556f728b31f24aafadfdc2025de models/control-a/tokenizer.json
32
+ d9ae2b6a6b628d8a91d07bc44a9501b2cd4ae7b1e12efbd52f5d63c69813653a models/experimental-b/manifest.json
33
+ d0aa20e2a2b2e2b054c4db668b98452362ce58968f24645a9f0f07543c0e1e31 models/experimental-b/model.int8.onnx
34
+ 19a57dcc34c9491ae5049f69d49db9081ecf2556f728b31f24aafadfdc2025de models/experimental-b/tokenizer.json
35
+ 319241a7af9e5328e337e73ed26f2b283e0167fd08d2169286dacd8175b7f498 models/original/manifest.json
36
+ 18b45a1a7979c4f98e93a4521bb59d0b1690c898670b44d484346b4849ab4fda models/original/model.int8.onnx
37
+ 19a57dcc34c9491ae5049f69d49db9081ecf2556f728b31f24aafadfdc2025de models/original/tokenizer.json
38
+ 2b96ffca45b3009f89bb3029f093223fdf289f28659343f0b6622bff043bf8a1 requirements-runtime.txt
39
+ 5c12d85e7c08038d1dd9ffbf8119d12ce808885230a47e2bf65dcd9f114659d5 requirements-stats.txt
40
+ 329afcca5672d548697a2948468641e61f266d4f5fc5515037e6b1d50c17b3f5 research/corpus-manifest.json
41
+ 5bce0fa7fd07ef2f57d0bc3649e24830c211941c3253c35cc8b806f5ffb79c9a research/exports/control-a.json
42
+ f635cfbab2de7b8a0cf40f2e20f067434da5b0f6e956608b906c4d2709affec8 research/exports/experimental-b.json
43
+ a0fc4d6bac89f02a15588323e28cecdee6f846c4ec3b37cd519fbaaab1e6fb26 research/original-selection.json
44
+ 5fa8d32d2a1833b60ebc7179d9f11f8d58f8b2067434c7181bb9d5a0cb2f540f research/references.json
45
+ 5439d40e6fbba568aa35b12e9a22c438f5b3c8570c81da7fc58376f4537d3200 research/runtime-references-checked.json
46
+ 0e0addbe20762637ccb8cd2d29d06351e8b6c2a9e571064e360ef676c557a464 research/src/ab_evaluate.py
47
+ 10d3ee98200d36ea79c60d4d2ef95e49e44c741f2747921b5d3b03f51cf8f0f1 research/src/ab_experiment.py
48
+ 93bc78d052d2b9bc6b36a42d0e039911fcb364d080b27da32fa81e2e2340c04b research/src/ab_train.py
49
+ 9863df1f565fc9a4ca4bf9b4fea7c705d4698d609ee37fe153b370c2801cc79b research/src/audit_robustness.py
50
+ 8d0cee025d53511162e6ca7991727cc733c26b75f8f09b2982d2a8047d85d503 research/src/audit_teacher.py
51
+ f75f03f0df896cb0c0b32f95a932a68616026323b821b91543696c7c4166f177 research/src/build_corpus.py
52
+ a518cab84b9b02885a7a97f369acefd5b9279a2a56b21962156ae6f6d313197f research/src/evaluate_model.py
53
+ e3470d5ba85fd97a4cb7804688043ad178e171d5dd25a9137118998d08a87e3f research/src/model.py
54
+ 9b46fc8df3977fdfea2a22176aadfaea73b545b66cecd0b5454eb510917816a5 research/src/pipeline.py
55
+ f9106f00c93d95946100ac13df374598abf9db0d8fa76c04f1d99964e3cd17b9 research/src/requirements-build.txt
56
+ 9db14f28d71221f7743a6e3602e5d6f07790cf11f4f215da181f050eecde0c10 research/src/schema.py
57
+ 3e059a7b71af78ffd6cb3c2fb99f3ecd5f0a29d9e7c7e278c1328731aa3b44eb runtime.py
58
+ 9db14f28d71221f7743a6e3602e5d6f07790cf11f4f215da181f050eecde0c10 schema.py
benchmark_cpu.py ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import gc
3
+ import json
4
+ import platform
5
+ import resource
6
+ import time
7
+ from pathlib import Path
8
+
9
+ import numpy as np
10
+ import onnxruntime as ort
11
+
12
+
13
+ def main():
14
+ parser = argparse.ArgumentParser()
15
+ parser.add_argument("model_directory")
16
+ parser.add_argument("--threads", type=int, default=2)
17
+ parser.add_argument("--repeats", type=int, default=20)
18
+ parser.add_argument("--output", required=True)
19
+ arguments = parser.parse_args()
20
+ if arguments.threads < 1 or arguments.repeats < 5:
21
+ parser.error("Use positive threads and at least five repeats")
22
+ directory = Path(arguments.model_directory)
23
+ manifest = json.loads((directory / "manifest.json").read_text())
24
+ settings = ort.SessionOptions()
25
+ settings.intra_op_num_threads = arguments.threads
26
+ settings.inter_op_num_threads = 1
27
+ settings.execution_mode = ort.ExecutionMode.ORT_SEQUENTIAL
28
+ session = ort.InferenceSession(str(directory / "model.int8.onnx"), settings, providers=["CPUExecutionProvider"])
29
+ generator = np.random.default_rng(42)
30
+ measurements = []
31
+ for length in [64, 128, 256, 512]:
32
+ inputs = {
33
+ "input_ids": generator.integers(105, 10000, size=(1, length), dtype=np.int64),
34
+ "attention_mask": np.ones((1, length), dtype=np.int64),
35
+ "marker_pos": np.array([[4, 8, 12, 16]], dtype=np.int64),
36
+ "marker_mask": np.ones((1, 4), dtype=np.bool_),
37
+ "qtype": np.zeros(1, dtype=np.int64),
38
+ }
39
+ for _ in range(3):
40
+ session.run(None, inputs)
41
+ timings = []
42
+ for _ in range(arguments.repeats):
43
+ started = time.perf_counter()
44
+ session.run(None, inputs)
45
+ timings.append((time.perf_counter() - started) * 1000)
46
+ measurements.append({
47
+ "tokens": length, "batch_size": 1, "options": 4,
48
+ "p50_ms": float(np.median(timings)),
49
+ "p95_ms": float(np.percentile(timings, 95)),
50
+ })
51
+ peak_rss = resource.getrusage(resource.RUSAGE_SELF).ru_maxrss
52
+ report = {
53
+ "architecture": manifest["architecture"],
54
+ "trained": manifest["trained"],
55
+ "machine": platform.machine(),
56
+ "platform": platform.platform(),
57
+ "onnxruntime": ort.__version__,
58
+ "threads": arguments.threads,
59
+ "repeats": arguments.repeats,
60
+ "peak_process_RSS_MiB": peak_rss / (1024 * 1024 if platform.system() == "Darwin" else 1024),
61
+ "measurements": measurements,
62
+ "limitations": "Synthetic inputs; warm model; excludes tokenization, network and loading. Not a quality evaluation or a guarantee for another CPU.",
63
+ }
64
+ Path(arguments.output).write_text(json.dumps(report, indent=2) + "\n")
65
+ print(json.dumps(report, indent=2))
66
+ del session
67
+ gc.collect()
68
+
69
+
70
+ if __name__ == "__main__":
71
+ main()
benchmarks/ab/decisions-no-text.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
benchmarks/ab/dev-report.json ADDED
@@ -0,0 +1,625 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "protocol_sha256": "143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366",
3
+ "split": "dev",
4
+ "texts_per_domain": 156,
5
+ "variant_requests": 2184,
6
+ "fixed_requests": 2000,
7
+ "passed": false,
8
+ "robustness": {
9
+ "domains": {
10
+ "ag_news": {
11
+ "fp32": {
12
+ "A_accuracy": 0.5705128205128205,
13
+ "B_accuracy": 0.8902243589743589,
14
+ "gain": {
15
+ "delta": 0.31971153846153844,
16
+ "ci95": [
17
+ 0.2692307692307692,
18
+ 0.3701923076923077
19
+ ],
20
+ "clusters": 156
21
+ },
22
+ "A_order_instability": 0.6153846153846154,
23
+ "B_order_instability": 0.035256410256410256,
24
+ "passed": true
25
+ },
26
+ "int8": {
27
+ "A_accuracy": 0.5488782051282052,
28
+ "B_accuracy": 0.8846153846153846,
29
+ "gain": {
30
+ "delta": 0.33573717948717946,
31
+ "ci95": [
32
+ 0.28764022435897435,
33
+ 0.38383413461538435
34
+ ],
35
+ "clusters": 156
36
+ },
37
+ "A_order_instability": 0.6506410256410257,
38
+ "B_order_instability": 0.0641025641025641,
39
+ "passed": true
40
+ },
41
+ "quantization": {
42
+ "A_flip_rate": 0.1858974358974359,
43
+ "B_flip_rate": 0.020833333333333332,
44
+ "change": {
45
+ "delta": -0.16506410256410256,
46
+ "ci95": [
47
+ -0.19230769230769232,
48
+ -0.13862179487179488
49
+ ],
50
+ "clusters": 156
51
+ },
52
+ "passed": true
53
+ },
54
+ "styles": {
55
+ "0": {
56
+ "A_fp32": {
57
+ "accuracy": 0.7435897435897436,
58
+ "order_instability": 0.391025641025641,
59
+ "confusion": [
60
+ [
61
+ 114,
62
+ 2,
63
+ 23,
64
+ 17
65
+ ],
66
+ [
67
+ 0,
68
+ 100,
69
+ 33,
70
+ 23
71
+ ],
72
+ [
73
+ 4,
74
+ 5,
75
+ 121,
76
+ 26
77
+ ],
78
+ [
79
+ 3,
80
+ 1,
81
+ 23,
82
+ 129
83
+ ]
84
+ ]
85
+ },
86
+ "A_int8": {
87
+ "accuracy": 0.717948717948718,
88
+ "order_instability": 0.4358974358974359,
89
+ "confusion": [
90
+ [
91
+ 110,
92
+ 3,
93
+ 29,
94
+ 14
95
+ ],
96
+ [
97
+ 0,
98
+ 105,
99
+ 28,
100
+ 23
101
+ ],
102
+ [
103
+ 4,
104
+ 6,
105
+ 122,
106
+ 24
107
+ ],
108
+ [
109
+ 2,
110
+ 3,
111
+ 40,
112
+ 111
113
+ ]
114
+ ]
115
+ },
116
+ "B_fp32": {
117
+ "accuracy": 0.8974358974358975,
118
+ "order_instability": 0.019230769230769232,
119
+ "confusion": [
120
+ [
121
+ 141,
122
+ 0,
123
+ 12,
124
+ 3
125
+ ],
126
+ [
127
+ 0,
128
+ 156,
129
+ 0,
130
+ 0
131
+ ],
132
+ [
133
+ 2,
134
+ 10,
135
+ 127,
136
+ 17
137
+ ],
138
+ [
139
+ 4,
140
+ 0,
141
+ 16,
142
+ 136
143
+ ]
144
+ ]
145
+ },
146
+ "B_int8": {
147
+ "accuracy": 0.8878205128205128,
148
+ "order_instability": 0.04487179487179487,
149
+ "confusion": [
150
+ [
151
+ 140,
152
+ 0,
153
+ 13,
154
+ 3
155
+ ],
156
+ [
157
+ 0,
158
+ 156,
159
+ 0,
160
+ 0
161
+ ],
162
+ [
163
+ 3,
164
+ 11,
165
+ 123,
166
+ 19
167
+ ],
168
+ [
169
+ 5,
170
+ 0,
171
+ 16,
172
+ 135
173
+ ]
174
+ ]
175
+ }
176
+ },
177
+ "1": {
178
+ "A_fp32": {
179
+ "accuracy": 0.3974358974358974,
180
+ "order_instability": 0.8397435897435898,
181
+ "confusion": [
182
+ [
183
+ 35,
184
+ 19,
185
+ 51,
186
+ 51
187
+ ],
188
+ [
189
+ 13,
190
+ 38,
191
+ 49,
192
+ 56
193
+ ],
194
+ [
195
+ 13,
196
+ 10,
197
+ 77,
198
+ 56
199
+ ],
200
+ [
201
+ 5,
202
+ 9,
203
+ 44,
204
+ 98
205
+ ]
206
+ ]
207
+ },
208
+ "A_int8": {
209
+ "accuracy": 0.3798076923076923,
210
+ "order_instability": 0.8653846153846154,
211
+ "confusion": [
212
+ [
213
+ 37,
214
+ 16,
215
+ 34,
216
+ 69
217
+ ],
218
+ [
219
+ 16,
220
+ 35,
221
+ 37,
222
+ 68
223
+ ],
224
+ [
225
+ 12,
226
+ 8,
227
+ 65,
228
+ 71
229
+ ],
230
+ [
231
+ 9,
232
+ 11,
233
+ 36,
234
+ 100
235
+ ]
236
+ ]
237
+ },
238
+ "B_fp32": {
239
+ "accuracy": 0.8830128205128205,
240
+ "order_instability": 0.05128205128205128,
241
+ "confusion": [
242
+ [
243
+ 138,
244
+ 0,
245
+ 14,
246
+ 4
247
+ ],
248
+ [
249
+ 1,
250
+ 155,
251
+ 0,
252
+ 0
253
+ ],
254
+ [
255
+ 5,
256
+ 8,
257
+ 121,
258
+ 22
259
+ ],
260
+ [
261
+ 4,
262
+ 0,
263
+ 15,
264
+ 137
265
+ ]
266
+ ]
267
+ },
268
+ "B_int8": {
269
+ "accuracy": 0.8814102564102564,
270
+ "order_instability": 0.08333333333333333,
271
+ "confusion": [
272
+ [
273
+ 134,
274
+ 0,
275
+ 16,
276
+ 6
277
+ ],
278
+ [
279
+ 0,
280
+ 156,
281
+ 0,
282
+ 0
283
+ ],
284
+ [
285
+ 5,
286
+ 7,
287
+ 122,
288
+ 22
289
+ ],
290
+ [
291
+ 2,
292
+ 0,
293
+ 16,
294
+ 138
295
+ ]
296
+ ]
297
+ }
298
+ }
299
+ }
300
+ },
301
+ "snli": {
302
+ "fp32": {
303
+ "A_accuracy": 0.5341880341880342,
304
+ "B_accuracy": 0.7104700854700855,
305
+ "gain": {
306
+ "delta": 0.1762820512820513,
307
+ "ci95": [
308
+ 0.13782051282051283,
309
+ 0.21367521367521367
310
+ ],
311
+ "clusters": 156
312
+ },
313
+ "A_order_instability": 0.483974358974359,
314
+ "B_order_instability": 0.16025641025641027,
315
+ "passed": true
316
+ },
317
+ "int8": {
318
+ "A_accuracy": 0.5010683760683761,
319
+ "B_accuracy": 0.655982905982906,
320
+ "gain": {
321
+ "delta": 0.15491452991452992,
322
+ "ci95": [
323
+ 0.11965811965811966,
324
+ 0.19017094017094016
325
+ ],
326
+ "clusters": 156
327
+ },
328
+ "A_order_instability": 0.5801282051282052,
329
+ "B_order_instability": 0.33653846153846156,
330
+ "passed": false
331
+ },
332
+ "quantization": {
333
+ "A_flip_rate": 0.22756410256410256,
334
+ "B_flip_rate": 0.11004273504273504,
335
+ "change": {
336
+ "delta": -0.11752136752136752,
337
+ "ci95": [
338
+ -0.1517094017094017,
339
+ -0.08333333333333333
340
+ ],
341
+ "clusters": 156
342
+ },
343
+ "passed": true
344
+ },
345
+ "styles": {
346
+ "0": {
347
+ "A_fp32": {
348
+ "accuracy": 0.7200854700854701,
349
+ "order_instability": 0.1346153846153846,
350
+ "confusion": [
351
+ [
352
+ 133,
353
+ 6,
354
+ 17
355
+ ],
356
+ [
357
+ 24,
358
+ 63,
359
+ 69
360
+ ],
361
+ [
362
+ 4,
363
+ 11,
364
+ 141
365
+ ]
366
+ ]
367
+ },
368
+ "A_int8": {
369
+ "accuracy": 0.6709401709401709,
370
+ "order_instability": 0.23076923076923078,
371
+ "confusion": [
372
+ [
373
+ 133,
374
+ 4,
375
+ 19
376
+ ],
377
+ [
378
+ 39,
379
+ 40,
380
+ 77
381
+ ],
382
+ [
383
+ 3,
384
+ 12,
385
+ 141
386
+ ]
387
+ ]
388
+ },
389
+ "B_fp32": {
390
+ "accuracy": 0.7692307692307693,
391
+ "order_instability": 0.0641025641025641,
392
+ "confusion": [
393
+ [
394
+ 135,
395
+ 11,
396
+ 10
397
+ ],
398
+ [
399
+ 20,
400
+ 86,
401
+ 50
402
+ ],
403
+ [
404
+ 4,
405
+ 13,
406
+ 139
407
+ ]
408
+ ]
409
+ },
410
+ "B_int8": {
411
+ "accuracy": 0.7307692307692307,
412
+ "order_instability": 0.21794871794871795,
413
+ "confusion": [
414
+ [
415
+ 138,
416
+ 7,
417
+ 11
418
+ ],
419
+ [
420
+ 31,
421
+ 70,
422
+ 55
423
+ ],
424
+ [
425
+ 6,
426
+ 16,
427
+ 134
428
+ ]
429
+ ]
430
+ }
431
+ },
432
+ "1": {
433
+ "A_fp32": {
434
+ "accuracy": 0.3482905982905983,
435
+ "order_instability": 0.8333333333333334,
436
+ "confusion": [
437
+ [
438
+ 36,
439
+ 34,
440
+ 86
441
+ ],
442
+ [
443
+ 29,
444
+ 43,
445
+ 84
446
+ ],
447
+ [
448
+ 28,
449
+ 44,
450
+ 84
451
+ ]
452
+ ]
453
+ },
454
+ "A_int8": {
455
+ "accuracy": 0.3311965811965812,
456
+ "order_instability": 0.9294871794871795,
457
+ "confusion": [
458
+ [
459
+ 45,
460
+ 34,
461
+ 77
462
+ ],
463
+ [
464
+ 44,
465
+ 51,
466
+ 61
467
+ ],
468
+ [
469
+ 50,
470
+ 47,
471
+ 59
472
+ ]
473
+ ]
474
+ },
475
+ "B_fp32": {
476
+ "accuracy": 0.6517094017094017,
477
+ "order_instability": 0.2564102564102564,
478
+ "confusion": [
479
+ [
480
+ 100,
481
+ 29,
482
+ 27
483
+ ],
484
+ [
485
+ 23,
486
+ 66,
487
+ 67
488
+ ],
489
+ [
490
+ 3,
491
+ 14,
492
+ 139
493
+ ]
494
+ ]
495
+ },
496
+ "B_int8": {
497
+ "accuracy": 0.5811965811965812,
498
+ "order_instability": 0.4551282051282051,
499
+ "confusion": [
500
+ [
501
+ 97,
502
+ 30,
503
+ 29
504
+ ],
505
+ [
506
+ 42,
507
+ 43,
508
+ 71
509
+ ],
510
+ [
511
+ 6,
512
+ 18,
513
+ 132
514
+ ]
515
+ ]
516
+ }
517
+ }
518
+ }
519
+ }
520
+ },
521
+ "passed": false
522
+ },
523
+ "fixed_validation": {
524
+ "passed": true,
525
+ "fp32": {
526
+ "A_accuracy": 0.7615,
527
+ "B_accuracy": 0.772,
528
+ "gain": {
529
+ "delta": 0.0105,
530
+ "ci95": [
531
+ 0.002006999422753962,
532
+ 0.01899050474762619
533
+ ],
534
+ "clusters": 1980
535
+ },
536
+ "tasks": {
537
+ "ag_news": {
538
+ "A_accuracy": 0.94,
539
+ "B_accuracy": 0.935,
540
+ "delta": -0.005
541
+ },
542
+ "boolq": {
543
+ "A_accuracy": 0.6625,
544
+ "B_accuracy": 0.6875,
545
+ "delta": 0.025
546
+ },
547
+ "emotion": {
548
+ "A_accuracy": 0.9175,
549
+ "B_accuracy": 0.92,
550
+ "delta": 0.0025
551
+ },
552
+ "snli": {
553
+ "A_accuracy": 0.805,
554
+ "B_accuracy": 0.825,
555
+ "delta": 0.02
556
+ },
557
+ "sst5": {
558
+ "A_accuracy": 0.4825,
559
+ "B_accuracy": 0.4925,
560
+ "delta": 0.01
561
+ }
562
+ },
563
+ "passed": true
564
+ },
565
+ "int8": {
566
+ "A_accuracy": 0.7605,
567
+ "B_accuracy": 0.7565,
568
+ "gain": {
569
+ "delta": -0.004,
570
+ "ci95": [
571
+ -0.013058928494809557,
572
+ 0.0054917623564653024
573
+ ],
574
+ "clusters": 1980
575
+ },
576
+ "tasks": {
577
+ "ag_news": {
578
+ "A_accuracy": 0.9325,
579
+ "B_accuracy": 0.93,
580
+ "delta": -0.0025
581
+ },
582
+ "boolq": {
583
+ "A_accuracy": 0.665,
584
+ "B_accuracy": 0.655,
585
+ "delta": -0.01
586
+ },
587
+ "emotion": {
588
+ "A_accuracy": 0.9075,
589
+ "B_accuracy": 0.9125,
590
+ "delta": 0.005
591
+ },
592
+ "snli": {
593
+ "A_accuracy": 0.8025,
594
+ "B_accuracy": 0.795,
595
+ "delta": -0.0075
596
+ },
597
+ "sst5": {
598
+ "A_accuracy": 0.495,
599
+ "B_accuracy": 0.49,
600
+ "delta": -0.005
601
+ }
602
+ },
603
+ "passed": true
604
+ },
605
+ "quantization": {
606
+ "change": {
607
+ "delta": 0.0015,
608
+ "ci95": [
609
+ -0.008995614692653673,
610
+ 0.011970074812967581
611
+ ],
612
+ "clusters": 1980
613
+ },
614
+ "passed": true
615
+ }
616
+ },
617
+ "cpu_evaluation_seconds": {
618
+ "A": 225.80804631299543,
619
+ "B": 250.6982191290008
620
+ },
621
+ "prediction_sha256": "608003d576107260205f758b012ba9a42020c28d1d4d35b682930903dd3b4e7b",
622
+ "quality_validated_for_general_decisions": false,
623
+ "instability_definition": "Fraction of text/style pairs whose canonical prediction changes across cyclic rotations; average over styles",
624
+ "uncertainty": "Paired family-cluster percentile bootstrap, 10000 replicates, seed20260926; not uncertainty over training seeds"
625
+ }
benchmarks/ab/protocol.json ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "purpose": "Single-seed controlled continuation; no claim of general decision intelligence",
3
+ "start_sha256": "5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008",
4
+ "teacher_revision": "55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851",
5
+ "seed": 42,
6
+ "epochs": 2,
7
+ "batch_size": 32,
8
+ "steps_per_arm": 5048,
9
+ "encoder_learning_rate": 2e-05,
10
+ "head_learning_rate": 0.0001,
11
+ "weight_decay": 0.01,
12
+ "warmup_fraction": 0.06,
13
+ "label_weight": 2,
14
+ "temperature": 1,
15
+ "selection": "terminal checkpoint after exactly epoch 2, identically for A and B",
16
+ "augmentation": "static exact half of each AG/SNLI pool, no filtering by teacher/student correctness",
17
+ "variant_counts": {
18
+ "ag_news:3": 3041,
19
+ "snli:0": 2939,
20
+ "snli:2": 3045,
21
+ "ag_news:0": 2950,
22
+ "snli:1": 3020,
23
+ "ag_news:1": 2970,
24
+ "ag_news:2": 3039,
25
+ "snli:3": 2996
26
+ },
27
+ "shared_targets": "one Laya FP32 CUDA cache on fixed A inputs",
28
+ "batch_schedule": "fixed A lengths; shared padding maxima over both arms; seed42+epoch",
29
+ "student_precision": "BF16 CUDA if supported, both arms identical",
30
+ "evaluation": "156 new unique families per domain and split, two held-out styles, all cyclic rotations, opaque keys",
31
+ "bootstrap": {
32
+ "seed": 20260926,
33
+ "replicates": 10000,
34
+ "cluster": "text/premise",
35
+ "interval": "two-sided percentile 95%"
36
+ },
37
+ "criteria": {
38
+ "dev_gain_each_domain_each_precision_min": 0.1,
39
+ "dev_gain_ci_lower_strict_min": 0,
40
+ "order_instability_B_to_A_max": 0.5,
41
+ "fixed_global_delta_ci_lower_min": -0.02,
42
+ "fixed_each_task_point_delta_min": -0.04,
43
+ "flip_increase_ci_upper_max": 0.02,
44
+ "flip_scope": "each DEV domain and fixed-validation global, paired family bootstrap",
45
+ "final": "only after all DEV gates pass; same robustness gates on reserved FINAL, no tuning",
46
+ "model_bytes_range": [
47
+ 80000000,
48
+ 90000000
49
+ ]
50
+ },
51
+ "budget": {
52
+ "total_task_cap_usd": 10,
53
+ "both_arms_cap_usd": 3,
54
+ "local_deadline_hours": 2,
55
+ "provider_cleanup_slack_hours": 2,
56
+ "bandwidth_reserve_gb_each_direction": 20
57
+ },
58
+ "train_rows": 80758,
59
+ "maximum_sequence_lengths": {
60
+ "A": 362,
61
+ "B": 393
62
+ },
63
+ "files": {
64
+ "dev-texts.jsonl": "e327763b227b5118f57b04be4da1ffb19aab2986e002041ce81d43b64218c104",
65
+ "test.jsonl": "47cc633fd7e1ae38a52c271d2ca36ded1d9002e9a7f84a62b1dc7b3c1adf3cb9",
66
+ "dev-requests.jsonl": "636db7df8f9d5fe5b5a4ab32851174ed7c02846c772c2c6decde69ba26d21461",
67
+ "final-requests.jsonl": "bb923215006f19601979e34832dfaaa1177a719210945e728065ed8b06de7c93",
68
+ "train.jsonl": "1f1ac0097b120404cabf1e315887907461a434d1369b693c82e2a910e899ab84",
69
+ "train-B.jsonl": "00553ac4ee1181195cc3d8689e9bf21bc6904936712d4f3a3f50d6cbf91fbbe7",
70
+ "validation.jsonl": "3e2840cd09a2372e812dbc8f37904abf31dff4c2a74c09f5aec00b9c3bc2e1ce",
71
+ "ood.jsonl": "cdad1edf8d687786bfaba10c0d3dfebb8216f94dba26afcb92d4a0699d8eac15",
72
+ "descriptions.json": "a0c9638e4659cc494df4e94ddc99daca9571b2ca6d94f7677620059621de90a4",
73
+ "final-texts.jsonl": "457f0e77ab4f5296106cbc33b9d1c5925106eb91000caee5e8fc37f0f0a5091a"
74
+ },
75
+ "licenses": "Private research only; unresolved dataset-license restrictions inherited from release",
76
+ "limitations": [
77
+ "Two-agent semantic review is not independent human review",
78
+ "Lexically similar reformulations; not broad prompt OOD",
79
+ "One seed does not measure training variance",
80
+ "Historical validation already used; old test and COPA not used for selection"
81
+ ]
82
+ }
benchmarks/cpu/control-a.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "BERT 6x512 + 1 decision layer + option-marker scorer",
3
+ "trained": true,
4
+ "machine": "x86_64",
5
+ "platform": "Linux-7.0.0-34-generic-x86_64-inconnu-with-glibc2.43",
6
+ "onnxruntime": "1.24.4",
7
+ "threads": 2,
8
+ "repeats": 30,
9
+ "peak_process_RSS_MiB": 195.97265625,
10
+ "measurements": [
11
+ {
12
+ "tokens": 64,
13
+ "batch_size": 1,
14
+ "options": 4,
15
+ "p50_ms": 11.29639999999199,
16
+ "p95_ms": 23.609198799022124
17
+ },
18
+ {
19
+ "tokens": 128,
20
+ "batch_size": 1,
21
+ "options": 4,
22
+ "p50_ms": 21.42894699863973,
23
+ "p95_ms": 21.64968539873371
24
+ },
25
+ {
26
+ "tokens": 256,
27
+ "batch_size": 1,
28
+ "options": 4,
29
+ "p50_ms": 43.88379150259425,
30
+ "p95_ms": 44.729615551477764
31
+ },
32
+ {
33
+ "tokens": 512,
34
+ "batch_size": 1,
35
+ "options": 4,
36
+ "p50_ms": 105.77025650127325,
37
+ "p95_ms": 115.75684060080675
38
+ }
39
+ ],
40
+ "limitations": "Synthetic inputs; warm model; excludes tokenization, network and loading. Not a quality evaluation or a guarantee for another CPU."
41
+ }
benchmarks/cpu/experimental-b.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "BERT 6x512 + 1 decision layer + option-marker scorer",
3
+ "trained": true,
4
+ "machine": "x86_64",
5
+ "platform": "Linux-7.0.0-34-generic-x86_64-inconnu-with-glibc2.43",
6
+ "onnxruntime": "1.24.4",
7
+ "threads": 2,
8
+ "repeats": 30,
9
+ "peak_process_RSS_MiB": 196.0,
10
+ "measurements": [
11
+ {
12
+ "tokens": 64,
13
+ "batch_size": 1,
14
+ "options": 4,
15
+ "p50_ms": 11.079036998125957,
16
+ "p95_ms": 11.426868901253329
17
+ },
18
+ {
19
+ "tokens": 128,
20
+ "batch_size": 1,
21
+ "options": 4,
22
+ "p50_ms": 21.55238850173191,
23
+ "p95_ms": 28.829175600912993
24
+ },
25
+ {
26
+ "tokens": 256,
27
+ "batch_size": 1,
28
+ "options": 4,
29
+ "p50_ms": 44.82588450264302,
30
+ "p95_ms": 45.46837649868394
31
+ },
32
+ {
33
+ "tokens": 512,
34
+ "batch_size": 1,
35
+ "options": 4,
36
+ "p50_ms": 111.79175250072149,
37
+ "p95_ms": 125.3648807516583
38
+ }
39
+ ],
40
+ "limitations": "Synthetic inputs; warm model; excludes tokenization, network and loading. Not a quality evaluation or a guarantee for another CPU."
41
+ }
benchmarks/cpu/original-current.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "BERT 6x512 + 1 decision layer + option-marker scorer",
3
+ "trained": true,
4
+ "machine": "x86_64",
5
+ "platform": "Linux-7.0.0-34-generic-x86_64-inconnu-with-glibc2.43",
6
+ "onnxruntime": "1.24.4",
7
+ "threads": 2,
8
+ "repeats": 30,
9
+ "peak_process_RSS_MiB": 195.7421875,
10
+ "measurements": [
11
+ {
12
+ "tokens": 64,
13
+ "batch_size": 1,
14
+ "options": 4,
15
+ "p50_ms": 11.094615500041982,
16
+ "p95_ms": 11.69740975165041
17
+ },
18
+ {
19
+ "tokens": 128,
20
+ "batch_size": 1,
21
+ "options": 4,
22
+ "p50_ms": 21.357893499953207,
23
+ "p95_ms": 33.236518100966336
24
+ },
25
+ {
26
+ "tokens": 256,
27
+ "batch_size": 1,
28
+ "options": 4,
29
+ "p50_ms": 44.78299600305036,
30
+ "p95_ms": 49.30807600176195
31
+ },
32
+ {
33
+ "tokens": 512,
34
+ "batch_size": 1,
35
+ "options": 4,
36
+ "p50_ms": 108.33085199919879,
37
+ "p95_ms": 136.28926924830006
38
+ }
39
+ ],
40
+ "limitations": "Synthetic inputs; warm model; excludes tokenization, network and loading. Not a quality evaluation or a guarantee for another CPU."
41
+ }
benchmarks/history/original-copa-400-summary.json ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "purpose": "historical_development_evaluation_for_original_weights_only",
3
+ "source_report_sha256": "d61d4526f7db3b3a96dcc1c02bf98334fec3a889db3c5e56d5ab8c9d1044b02a",
4
+ "rows": 400,
5
+ "calibrated": false,
6
+ "not_evaluated_for_control_A_or_experimental_B": true,
7
+ "development_limitation": "Earlier test outcomes were observed during development; this is not an entirely blind end-to-end test. COPA was excluded from fitting and checkpoint selection.",
8
+ "publication_redactions": "Raw example-specific option vocabularies, by-task tables, workspace paths, and descriptive-oracle majority baseline omitted.",
9
+ "runtime": {
10
+ "batch_size": 16,
11
+ "threads": 4,
12
+ "quantized_load_seconds": 0.24128931399900466,
13
+ "floating_load_seconds": 0.7911271149641834,
14
+ "encoding_seconds": 0.04855810495791957,
15
+ "collation_seconds": 0.0023445660481229424,
16
+ "evaluation_wall_seconds_excluding_output_writes": 11.097406168002635
17
+ },
18
+ "quantization_comparison": {
19
+ "rows": 400,
20
+ "labelled_rows": 400,
21
+ "prediction_agreement": 0.8775,
22
+ "accuracy_drop": 0.0225,
23
+ "accuracy_drop_definition": "floating accuracy minus quantized accuracy; positive means quantization is worse",
24
+ "floating_correct_quantized_wrong": 29,
25
+ "quantized_correct_floating_wrong": 20,
26
+ "logits": {
27
+ "valid_option_values": 800,
28
+ "mean_absolute_difference": 0.2002160781857674,
29
+ "max_absolute_difference": 1.521109938621521
30
+ },
31
+ "probabilities": {
32
+ "valid_option_values": 800,
33
+ "mean_absolute_difference": 0.04965776814257573,
34
+ "max_absolute_difference": 0.2278980684992542
35
+ }
36
+ },
37
+ "floating": {
38
+ "overall": {
39
+ "rows": 400,
40
+ "labelled_rows": 400,
41
+ "missing_label_rows": 0,
42
+ "truncated_rows": 0,
43
+ "correct": 206,
44
+ "ground_truth_accuracy": 0.515,
45
+ "teacher_ground_truth_accuracy": 0.6975,
46
+ "teacher_agreement": 0.4775,
47
+ "teacher_to_student_kl": 0.15669801502894715,
48
+ "score_mae": null,
49
+ "score_labelled_rows": 0,
50
+ "noul_brier": null,
51
+ "noul_labelled_rows": 0,
52
+ "ece_10_bins": 0.0948756083782432,
53
+ "uniform_random_baseline_accuracy": 0.5
54
+ },
55
+ "by_dataset": {
56
+ "copa": {
57
+ "rows": 400,
58
+ "labelled_rows": 400,
59
+ "missing_label_rows": 0,
60
+ "truncated_rows": 0,
61
+ "correct": 206,
62
+ "ground_truth_accuracy": 0.515,
63
+ "teacher_ground_truth_accuracy": 0.6975,
64
+ "teacher_agreement": 0.4775,
65
+ "teacher_to_student_kl": 0.15669801502894715,
66
+ "score_mae": null,
67
+ "score_labelled_rows": 0,
68
+ "noul_brier": null,
69
+ "noul_labelled_rows": 0,
70
+ "ece_10_bins": 0.0948756083782432,
71
+ "uniform_random_baseline_accuracy": 0.5
72
+ }
73
+ }
74
+ },
75
+ "quantized": {
76
+ "overall": {
77
+ "rows": 400,
78
+ "labelled_rows": 400,
79
+ "missing_label_rows": 0,
80
+ "truncated_rows": 0,
81
+ "correct": 197,
82
+ "ground_truth_accuracy": 0.4925,
83
+ "teacher_ground_truth_accuracy": 0.6975,
84
+ "teacher_agreement": 0.49,
85
+ "teacher_to_student_kl": 0.14061569682439606,
86
+ "score_mae": null,
87
+ "score_labelled_rows": 0,
88
+ "noul_brier": null,
89
+ "noul_labelled_rows": 0,
90
+ "ece_10_bins": 0.08862892688434312,
91
+ "uniform_random_baseline_accuracy": 0.5
92
+ },
93
+ "by_dataset": {
94
+ "copa": {
95
+ "rows": 400,
96
+ "labelled_rows": 400,
97
+ "missing_label_rows": 0,
98
+ "truncated_rows": 0,
99
+ "correct": 197,
100
+ "ground_truth_accuracy": 0.4925,
101
+ "teacher_ground_truth_accuracy": 0.6975,
102
+ "teacher_agreement": 0.49,
103
+ "teacher_to_student_kl": 0.14061569682439606,
104
+ "score_mae": null,
105
+ "score_labelled_rows": 0,
106
+ "noul_brier": null,
107
+ "noul_labelled_rows": 0,
108
+ "ece_10_bins": 0.08862892688434312,
109
+ "uniform_random_baseline_accuracy": 0.5
110
+ }
111
+ }
112
+ }
113
+ }
benchmarks/history/original-cpu-earlier-session.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "BERT 6x512 + 1 decision layer + option-marker scorer",
3
+ "trained": true,
4
+ "machine": "x86_64",
5
+ "platform": "Linux-7.0.0-34-generic-x86_64-inconnu-with-glibc2.43",
6
+ "onnxruntime": "1.24.4",
7
+ "threads": 2,
8
+ "repeats": 50,
9
+ "peak_process_RSS_MiB": 195.95703125,
10
+ "measurements": [
11
+ {
12
+ "tokens": 64,
13
+ "batch_size": 1,
14
+ "options": 4,
15
+ "p50_ms": 5.586627001321176,
16
+ "p95_ms": 6.451607048438743
17
+ },
18
+ {
19
+ "tokens": 128,
20
+ "batch_size": 1,
21
+ "options": 4,
22
+ "p50_ms": 10.78688699999475,
23
+ "p95_ms": 11.632900599579441
24
+ },
25
+ {
26
+ "tokens": 256,
27
+ "batch_size": 1,
28
+ "options": 4,
29
+ "p50_ms": 22.02214199860464,
30
+ "p95_ms": 30.23740555290714
31
+ },
32
+ {
33
+ "tokens": 512,
34
+ "batch_size": 1,
35
+ "options": 4,
36
+ "p50_ms": 63.14534450211795,
37
+ "p95_ms": 69.91638834915648
38
+ }
39
+ ],
40
+ "limitations": "Synthetic inputs; warm model; excludes tokenization, network and loading. Not a quality evaluation or a guarantee for another CPU."
41
+ }
benchmarks/history/original-test-3000-summary.json ADDED
@@ -0,0 +1,249 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "purpose": "historical_development_evaluation_for_original_weights_only",
3
+ "source_report_sha256": "057c53c602a6356c39e593879548b45e742e9eb193c4f8561f1b69eb96595692",
4
+ "rows": 3000,
5
+ "calibrated": false,
6
+ "not_evaluated_for_control_A_or_experimental_B": true,
7
+ "development_limitation": "Earlier test outcomes were observed during development; this is not an entirely blind end-to-end test. COPA was excluded from fitting and checkpoint selection.",
8
+ "publication_redactions": "Raw example-specific option vocabularies, by-task tables, workspace paths, and descriptive-oracle majority baseline omitted.",
9
+ "runtime": {
10
+ "batch_size": 16,
11
+ "threads": 4,
12
+ "quantized_load_seconds": 0.2457776820519939,
13
+ "floating_load_seconds": 0.8067200410296209,
14
+ "encoding_seconds": 0.7069170550093986,
15
+ "collation_seconds": 0.024417184351477772,
16
+ "evaluation_wall_seconds_excluding_output_writes": 58.057117588992696
17
+ },
18
+ "quantization_comparison": {
19
+ "rows": 3000,
20
+ "labelled_rows": 3000,
21
+ "prediction_agreement": 0.937,
22
+ "accuracy_drop": 0.0013333333333333333,
23
+ "accuracy_drop_definition": "floating accuracy minus quantized accuracy; positive means quantization is worse",
24
+ "floating_correct_quantized_wrong": 88,
25
+ "quantized_correct_floating_wrong": 84,
26
+ "logits": {
27
+ "valid_option_values": 12000,
28
+ "mean_absolute_difference": 0.4191225695454632,
29
+ "max_absolute_difference": 2.950909733772278
30
+ },
31
+ "probabilities": {
32
+ "valid_option_values": 12000,
33
+ "mean_absolute_difference": 0.03555099927094927,
34
+ "max_absolute_difference": 0.5201866639682322
35
+ }
36
+ },
37
+ "floating": {
38
+ "overall": {
39
+ "rows": 3000,
40
+ "labelled_rows": 3000,
41
+ "missing_label_rows": 0,
42
+ "truncated_rows": 0,
43
+ "correct": 2250,
44
+ "ground_truth_accuracy": 0.75,
45
+ "teacher_ground_truth_accuracy": 0.6863333333333334,
46
+ "teacher_agreement": 0.6693333333333333,
47
+ "teacher_to_student_kl": 0.4394546882317112,
48
+ "score_mae": 0.7635296451689558,
49
+ "score_labelled_rows": 600,
50
+ "noul_brier": 0.22620426238182129,
51
+ "noul_labelled_rows": 600,
52
+ "ece_10_bins": 0.03069561032879222,
53
+ "uniform_random_baseline_accuracy": 0.29000000000000004
54
+ },
55
+ "by_dataset": {
56
+ "ag_news": {
57
+ "rows": 600,
58
+ "labelled_rows": 600,
59
+ "missing_label_rows": 0,
60
+ "truncated_rows": 0,
61
+ "correct": 545,
62
+ "ground_truth_accuracy": 0.9083333333333333,
63
+ "teacher_ground_truth_accuracy": 0.9116666666666666,
64
+ "teacher_agreement": 0.9333333333333333,
65
+ "teacher_to_student_kl": 0.14562351508071758,
66
+ "score_mae": null,
67
+ "score_labelled_rows": 0,
68
+ "noul_brier": null,
69
+ "noul_labelled_rows": 0,
70
+ "ece_10_bins": 0.02919148973125299,
71
+ "uniform_random_baseline_accuracy": 0.25
72
+ },
73
+ "boolq": {
74
+ "rows": 600,
75
+ "labelled_rows": 600,
76
+ "missing_label_rows": 0,
77
+ "truncated_rows": 0,
78
+ "correct": 406,
79
+ "ground_truth_accuracy": 0.6766666666666666,
80
+ "teacher_ground_truth_accuracy": 0.8333333333333334,
81
+ "teacher_agreement": 0.7033333333333334,
82
+ "teacher_to_student_kl": 0.46581474517803506,
83
+ "score_mae": null,
84
+ "score_labelled_rows": 0,
85
+ "noul_brier": 0.22620426238182129,
86
+ "noul_labelled_rows": 600,
87
+ "ece_10_bins": 0.14024903248642293,
88
+ "uniform_random_baseline_accuracy": 0.5
89
+ },
90
+ "emotion": {
91
+ "rows": 600,
92
+ "labelled_rows": 600,
93
+ "missing_label_rows": 0,
94
+ "truncated_rows": 0,
95
+ "correct": 545,
96
+ "ground_truth_accuracy": 0.9083333333333333,
97
+ "teacher_ground_truth_accuracy": 0.59,
98
+ "teacher_agreement": 0.625,
99
+ "teacher_to_student_kl": 0.7589576663432547,
100
+ "score_mae": null,
101
+ "score_labelled_rows": 0,
102
+ "noul_brier": null,
103
+ "noul_labelled_rows": 0,
104
+ "ece_10_bins": 0.07844001209439692,
105
+ "uniform_random_baseline_accuracy": 0.16666666666666666
106
+ },
107
+ "snli": {
108
+ "rows": 600,
109
+ "labelled_rows": 600,
110
+ "missing_label_rows": 0,
111
+ "truncated_rows": 0,
112
+ "correct": 470,
113
+ "ground_truth_accuracy": 0.7833333333333333,
114
+ "teacher_ground_truth_accuracy": 0.7633333333333333,
115
+ "teacher_agreement": 0.7033333333333334,
116
+ "teacher_to_student_kl": 0.302764245855786,
117
+ "score_mae": null,
118
+ "score_labelled_rows": 0,
119
+ "noul_brier": null,
120
+ "noul_labelled_rows": 0,
121
+ "ece_10_bins": 0.038207785506182396,
122
+ "uniform_random_baseline_accuracy": 0.3333333333333333
123
+ },
124
+ "sst5": {
125
+ "rows": 600,
126
+ "labelled_rows": 600,
127
+ "missing_label_rows": 0,
128
+ "truncated_rows": 0,
129
+ "correct": 284,
130
+ "ground_truth_accuracy": 0.47333333333333333,
131
+ "teacher_ground_truth_accuracy": 0.3333333333333333,
132
+ "teacher_agreement": 0.38166666666666665,
133
+ "teacher_to_student_kl": 0.5241132687007625,
134
+ "score_mae": 0.7635296451689558,
135
+ "score_labelled_rows": 600,
136
+ "noul_brier": null,
137
+ "noul_labelled_rows": 0,
138
+ "ece_10_bins": 0.08556262397129752,
139
+ "uniform_random_baseline_accuracy": 0.2
140
+ }
141
+ }
142
+ },
143
+ "quantized": {
144
+ "overall": {
145
+ "rows": 3000,
146
+ "labelled_rows": 3000,
147
+ "missing_label_rows": 0,
148
+ "truncated_rows": 0,
149
+ "correct": 2246,
150
+ "ground_truth_accuracy": 0.7486666666666667,
151
+ "teacher_ground_truth_accuracy": 0.6863333333333334,
152
+ "teacher_agreement": 0.6763333333333333,
153
+ "teacher_to_student_kl": 0.3660636905206232,
154
+ "score_mae": 0.7933817943202061,
155
+ "score_labelled_rows": 600,
156
+ "noul_brier": 0.21363519516235982,
157
+ "noul_labelled_rows": 600,
158
+ "ece_10_bins": 0.022693194229737538,
159
+ "uniform_random_baseline_accuracy": 0.29000000000000004
160
+ },
161
+ "by_dataset": {
162
+ "ag_news": {
163
+ "rows": 600,
164
+ "labelled_rows": 600,
165
+ "missing_label_rows": 0,
166
+ "truncated_rows": 0,
167
+ "correct": 546,
168
+ "ground_truth_accuracy": 0.91,
169
+ "teacher_ground_truth_accuracy": 0.9116666666666666,
170
+ "teacher_agreement": 0.9283333333333333,
171
+ "teacher_to_student_kl": 0.11830738113161032,
172
+ "score_mae": null,
173
+ "score_labelled_rows": 0,
174
+ "noul_brier": null,
175
+ "noul_labelled_rows": 0,
176
+ "ece_10_bins": 0.026812594538814332,
177
+ "uniform_random_baseline_accuracy": 0.25
178
+ },
179
+ "boolq": {
180
+ "rows": 600,
181
+ "labelled_rows": 600,
182
+ "missing_label_rows": 0,
183
+ "truncated_rows": 0,
184
+ "correct": 414,
185
+ "ground_truth_accuracy": 0.69,
186
+ "teacher_ground_truth_accuracy": 0.8333333333333334,
187
+ "teacher_agreement": 0.73,
188
+ "teacher_to_student_kl": 0.3804193201203644,
189
+ "score_mae": null,
190
+ "score_labelled_rows": 0,
191
+ "noul_brier": 0.21363519516235982,
192
+ "noul_labelled_rows": 600,
193
+ "ece_10_bins": 0.08913086434644102,
194
+ "uniform_random_baseline_accuracy": 0.5
195
+ },
196
+ "emotion": {
197
+ "rows": 600,
198
+ "labelled_rows": 600,
199
+ "missing_label_rows": 0,
200
+ "truncated_rows": 0,
201
+ "correct": 547,
202
+ "ground_truth_accuracy": 0.9116666666666666,
203
+ "teacher_ground_truth_accuracy": 0.59,
204
+ "teacher_agreement": 0.6266666666666667,
205
+ "teacher_to_student_kl": 0.6541046259251772,
206
+ "score_mae": null,
207
+ "score_labelled_rows": 0,
208
+ "noul_brier": null,
209
+ "noul_labelled_rows": 0,
210
+ "ece_10_bins": 0.12286200104658901,
211
+ "uniform_random_baseline_accuracy": 0.16666666666666666
212
+ },
213
+ "snli": {
214
+ "rows": 600,
215
+ "labelled_rows": 600,
216
+ "missing_label_rows": 0,
217
+ "truncated_rows": 0,
218
+ "correct": 469,
219
+ "ground_truth_accuracy": 0.7816666666666666,
220
+ "teacher_ground_truth_accuracy": 0.7633333333333333,
221
+ "teacher_agreement": 0.7066666666666667,
222
+ "teacher_to_student_kl": 0.20679542158256595,
223
+ "score_mae": null,
224
+ "score_labelled_rows": 0,
225
+ "noul_brier": null,
226
+ "noul_labelled_rows": 0,
227
+ "ece_10_bins": 0.10508906707488629,
228
+ "uniform_random_baseline_accuracy": 0.3333333333333333
229
+ },
230
+ "sst5": {
231
+ "rows": 600,
232
+ "labelled_rows": 600,
233
+ "missing_label_rows": 0,
234
+ "truncated_rows": 0,
235
+ "correct": 270,
236
+ "ground_truth_accuracy": 0.45,
237
+ "teacher_ground_truth_accuracy": 0.3333333333333333,
238
+ "teacher_agreement": 0.39,
239
+ "teacher_to_student_kl": 0.47069170384339826,
240
+ "score_mae": 0.7933817943202061,
241
+ "score_labelled_rows": 600,
242
+ "noul_brier": null,
243
+ "noul_labelled_rows": 0,
244
+ "ece_10_bins": 0.04569868374631497,
245
+ "uniform_random_baseline_accuracy": 0.2
246
+ }
247
+ }
248
+ }
249
+ }
benchmarks/history/pre-ab-robustness-audit.json ADDED
@@ -0,0 +1,2154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "protocol_sha256": "f5f0a74e0ad1321e58d5ee59188aa962cb4fe95686f3a41a3114600fd653fcdf",
3
+ "texts": 120,
4
+ "requests": 3360,
5
+ "teacher_complete": false,
6
+ "teacher_requests_available": 672,
7
+ "teacher_subset_complete": true,
8
+ "teacher_base_texts": 24,
9
+ "teacher_comparison_cells_same_texts": [
10
+ {
11
+ "dataset": "ag_news",
12
+ "keys": "opaque",
13
+ "style": "fixed",
14
+ "model": "fp32",
15
+ "texts": 12,
16
+ "requests": 48,
17
+ "accuracy": 0.8958333333333334,
18
+ "accuracy_ci95_text_bootstrap": [
19
+ 0.7291666666666666,
20
+ 1.0
21
+ ],
22
+ "all_rotations_correct": 0.8333333333333334,
23
+ "order_instability": 0.08333333333333333,
24
+ "rotation_zero_accuracy": 0.9166666666666666
25
+ },
26
+ {
27
+ "dataset": "ag_news",
28
+ "keys": "opaque",
29
+ "style": "fixed",
30
+ "model": "int8",
31
+ "texts": 12,
32
+ "requests": 48,
33
+ "accuracy": 0.875,
34
+ "accuracy_ci95_text_bootstrap": [
35
+ 0.7083333333333334,
36
+ 1.0
37
+ ],
38
+ "all_rotations_correct": 0.8333333333333334,
39
+ "order_instability": 0.08333333333333333,
40
+ "rotation_zero_accuracy": 0.9166666666666666
41
+ },
42
+ {
43
+ "dataset": "ag_news",
44
+ "keys": "opaque",
45
+ "style": "fixed",
46
+ "model": "teacher",
47
+ "texts": 12,
48
+ "requests": 48,
49
+ "accuracy": 0.8333333333333334,
50
+ "accuracy_ci95_text_bootstrap": [
51
+ 0.5833333333333334,
52
+ 1.0
53
+ ],
54
+ "all_rotations_correct": 0.8333333333333334,
55
+ "order_instability": 0.0,
56
+ "rotation_zero_accuracy": 0.8333333333333334
57
+ },
58
+ {
59
+ "dataset": "ag_news",
60
+ "keys": "opaque",
61
+ "style": "short",
62
+ "model": "fp32",
63
+ "texts": 12,
64
+ "requests": 48,
65
+ "accuracy": 0.8541666666666666,
66
+ "accuracy_ci95_text_bootstrap": [
67
+ 0.6458333333333334,
68
+ 1.0
69
+ ],
70
+ "all_rotations_correct": 0.8333333333333334,
71
+ "order_instability": 0.08333333333333333,
72
+ "rotation_zero_accuracy": 0.8333333333333334
73
+ },
74
+ {
75
+ "dataset": "ag_news",
76
+ "keys": "opaque",
77
+ "style": "short",
78
+ "model": "int8",
79
+ "texts": 12,
80
+ "requests": 48,
81
+ "accuracy": 0.8541666666666666,
82
+ "accuracy_ci95_text_bootstrap": [
83
+ 0.6458333333333334,
84
+ 1.0
85
+ ],
86
+ "all_rotations_correct": 0.8333333333333334,
87
+ "order_instability": 0.08333333333333333,
88
+ "rotation_zero_accuracy": 0.8333333333333334
89
+ },
90
+ {
91
+ "dataset": "ag_news",
92
+ "keys": "opaque",
93
+ "style": "short",
94
+ "model": "teacher",
95
+ "texts": 12,
96
+ "requests": 48,
97
+ "accuracy": 0.8333333333333334,
98
+ "accuracy_ci95_text_bootstrap": [
99
+ 0.5833333333333334,
100
+ 1.0
101
+ ],
102
+ "all_rotations_correct": 0.8333333333333334,
103
+ "order_instability": 0.0,
104
+ "rotation_zero_accuracy": 0.8333333333333334
105
+ },
106
+ {
107
+ "dataset": "ag_news",
108
+ "keys": "opaque",
109
+ "style": "long",
110
+ "model": "fp32",
111
+ "texts": 12,
112
+ "requests": 48,
113
+ "accuracy": 0.5416666666666666,
114
+ "accuracy_ci95_text_bootstrap": [
115
+ 0.3333333333333333,
116
+ 0.7291666666666666
117
+ ],
118
+ "all_rotations_correct": 0.25,
119
+ "order_instability": 0.6666666666666666,
120
+ "rotation_zero_accuracy": 0.6666666666666666
121
+ },
122
+ {
123
+ "dataset": "ag_news",
124
+ "keys": "opaque",
125
+ "style": "long",
126
+ "model": "int8",
127
+ "texts": 12,
128
+ "requests": 48,
129
+ "accuracy": 0.5208333333333334,
130
+ "accuracy_ci95_text_bootstrap": [
131
+ 0.3125,
132
+ 0.7291666666666666
133
+ ],
134
+ "all_rotations_correct": 0.25,
135
+ "order_instability": 0.6666666666666666,
136
+ "rotation_zero_accuracy": 0.6666666666666666
137
+ },
138
+ {
139
+ "dataset": "ag_news",
140
+ "keys": "opaque",
141
+ "style": "long",
142
+ "model": "teacher",
143
+ "texts": 12,
144
+ "requests": 48,
145
+ "accuracy": 0.8541666666666666,
146
+ "accuracy_ci95_text_bootstrap": [
147
+ 0.6666666666666666,
148
+ 1.0
149
+ ],
150
+ "all_rotations_correct": 0.75,
151
+ "order_instability": 0.16666666666666666,
152
+ "rotation_zero_accuracy": 0.9166666666666666
153
+ },
154
+ {
155
+ "dataset": "ag_news",
156
+ "keys": "opaque",
157
+ "style": "long_named",
158
+ "model": "fp32",
159
+ "texts": 12,
160
+ "requests": 48,
161
+ "accuracy": 0.4375,
162
+ "accuracy_ci95_text_bootstrap": [
163
+ 0.16666666666666666,
164
+ 0.6875
165
+ ],
166
+ "all_rotations_correct": 0.3333333333333333,
167
+ "order_instability": 0.4166666666666667,
168
+ "rotation_zero_accuracy": 0.5
169
+ },
170
+ {
171
+ "dataset": "ag_news",
172
+ "keys": "opaque",
173
+ "style": "long_named",
174
+ "model": "int8",
175
+ "texts": 12,
176
+ "requests": 48,
177
+ "accuracy": 0.4375,
178
+ "accuracy_ci95_text_bootstrap": [
179
+ 0.16666666666666666,
180
+ 0.6875
181
+ ],
182
+ "all_rotations_correct": 0.3333333333333333,
183
+ "order_instability": 0.3333333333333333,
184
+ "rotation_zero_accuracy": 0.5
185
+ },
186
+ {
187
+ "dataset": "ag_news",
188
+ "keys": "opaque",
189
+ "style": "long_named",
190
+ "model": "teacher",
191
+ "texts": 12,
192
+ "requests": 48,
193
+ "accuracy": 0.8958333333333334,
194
+ "accuracy_ci95_text_bootstrap": [
195
+ 0.7291666666666666,
196
+ 1.0
197
+ ],
198
+ "all_rotations_correct": 0.8333333333333334,
199
+ "order_instability": 0.08333333333333333,
200
+ "rotation_zero_accuracy": 0.9166666666666666
201
+ },
202
+ {
203
+ "dataset": "ag_news",
204
+ "keys": "semantic",
205
+ "style": "fixed",
206
+ "model": "fp32",
207
+ "texts": 12,
208
+ "requests": 48,
209
+ "accuracy": 0.9166666666666666,
210
+ "accuracy_ci95_text_bootstrap": [
211
+ 0.75,
212
+ 1.0
213
+ ],
214
+ "all_rotations_correct": 0.9166666666666666,
215
+ "order_instability": 0.0,
216
+ "rotation_zero_accuracy": 0.9166666666666666
217
+ },
218
+ {
219
+ "dataset": "ag_news",
220
+ "keys": "semantic",
221
+ "style": "fixed",
222
+ "model": "int8",
223
+ "texts": 12,
224
+ "requests": 48,
225
+ "accuracy": 0.875,
226
+ "accuracy_ci95_text_bootstrap": [
227
+ 0.7083333333333334,
228
+ 1.0
229
+ ],
230
+ "all_rotations_correct": 0.8333333333333334,
231
+ "order_instability": 0.08333333333333333,
232
+ "rotation_zero_accuracy": 0.9166666666666666
233
+ },
234
+ {
235
+ "dataset": "ag_news",
236
+ "keys": "semantic",
237
+ "style": "fixed",
238
+ "model": "teacher",
239
+ "texts": 12,
240
+ "requests": 48,
241
+ "accuracy": 0.8333333333333334,
242
+ "accuracy_ci95_text_bootstrap": [
243
+ 0.5833333333333334,
244
+ 1.0
245
+ ],
246
+ "all_rotations_correct": 0.8333333333333334,
247
+ "order_instability": 0.0,
248
+ "rotation_zero_accuracy": 0.8333333333333334
249
+ },
250
+ {
251
+ "dataset": "ag_news",
252
+ "keys": "semantic",
253
+ "style": "short",
254
+ "model": "fp32",
255
+ "texts": 12,
256
+ "requests": 48,
257
+ "accuracy": 0.8541666666666666,
258
+ "accuracy_ci95_text_bootstrap": [
259
+ 0.6458333333333334,
260
+ 1.0
261
+ ],
262
+ "all_rotations_correct": 0.8333333333333334,
263
+ "order_instability": 0.08333333333333333,
264
+ "rotation_zero_accuracy": 0.8333333333333334
265
+ },
266
+ {
267
+ "dataset": "ag_news",
268
+ "keys": "semantic",
269
+ "style": "short",
270
+ "model": "int8",
271
+ "texts": 12,
272
+ "requests": 48,
273
+ "accuracy": 0.875,
274
+ "accuracy_ci95_text_bootstrap": [
275
+ 0.7083333333333334,
276
+ 1.0
277
+ ],
278
+ "all_rotations_correct": 0.8333333333333334,
279
+ "order_instability": 0.08333333333333333,
280
+ "rotation_zero_accuracy": 0.8333333333333334
281
+ },
282
+ {
283
+ "dataset": "ag_news",
284
+ "keys": "semantic",
285
+ "style": "short",
286
+ "model": "teacher",
287
+ "texts": 12,
288
+ "requests": 48,
289
+ "accuracy": 0.8333333333333334,
290
+ "accuracy_ci95_text_bootstrap": [
291
+ 0.5833333333333334,
292
+ 1.0
293
+ ],
294
+ "all_rotations_correct": 0.8333333333333334,
295
+ "order_instability": 0.0,
296
+ "rotation_zero_accuracy": 0.8333333333333334
297
+ },
298
+ {
299
+ "dataset": "ag_news",
300
+ "keys": "semantic",
301
+ "style": "long",
302
+ "model": "fp32",
303
+ "texts": 12,
304
+ "requests": 48,
305
+ "accuracy": 0.5416666666666666,
306
+ "accuracy_ci95_text_bootstrap": [
307
+ 0.3333333333333333,
308
+ 0.75
309
+ ],
310
+ "all_rotations_correct": 0.3333333333333333,
311
+ "order_instability": 0.5833333333333334,
312
+ "rotation_zero_accuracy": 0.6666666666666666
313
+ },
314
+ {
315
+ "dataset": "ag_news",
316
+ "keys": "semantic",
317
+ "style": "long",
318
+ "model": "int8",
319
+ "texts": 12,
320
+ "requests": 48,
321
+ "accuracy": 0.5208333333333334,
322
+ "accuracy_ci95_text_bootstrap": [
323
+ 0.31197916666666686,
324
+ 0.75
325
+ ],
326
+ "all_rotations_correct": 0.3333333333333333,
327
+ "order_instability": 0.5833333333333334,
328
+ "rotation_zero_accuracy": 0.6666666666666666
329
+ },
330
+ {
331
+ "dataset": "ag_news",
332
+ "keys": "semantic",
333
+ "style": "long",
334
+ "model": "teacher",
335
+ "texts": 12,
336
+ "requests": 48,
337
+ "accuracy": 0.8958333333333334,
338
+ "accuracy_ci95_text_bootstrap": [
339
+ 0.7291666666666666,
340
+ 1.0
341
+ ],
342
+ "all_rotations_correct": 0.8333333333333334,
343
+ "order_instability": 0.08333333333333333,
344
+ "rotation_zero_accuracy": 0.9166666666666666
345
+ },
346
+ {
347
+ "dataset": "ag_news",
348
+ "keys": "semantic",
349
+ "style": "long_named",
350
+ "model": "fp32",
351
+ "texts": 12,
352
+ "requests": 48,
353
+ "accuracy": 0.4583333333333333,
354
+ "accuracy_ci95_text_bootstrap": [
355
+ 0.20833333333333334,
356
+ 0.7083333333333334
357
+ ],
358
+ "all_rotations_correct": 0.3333333333333333,
359
+ "order_instability": 0.5,
360
+ "rotation_zero_accuracy": 0.5
361
+ },
362
+ {
363
+ "dataset": "ag_news",
364
+ "keys": "semantic",
365
+ "style": "long_named",
366
+ "model": "int8",
367
+ "texts": 12,
368
+ "requests": 48,
369
+ "accuracy": 0.4583333333333333,
370
+ "accuracy_ci95_text_bootstrap": [
371
+ 0.20833333333333334,
372
+ 0.7083333333333334
373
+ ],
374
+ "all_rotations_correct": 0.3333333333333333,
375
+ "order_instability": 0.5,
376
+ "rotation_zero_accuracy": 0.5
377
+ },
378
+ {
379
+ "dataset": "ag_news",
380
+ "keys": "semantic",
381
+ "style": "long_named",
382
+ "model": "teacher",
383
+ "texts": 12,
384
+ "requests": 48,
385
+ "accuracy": 0.8958333333333334,
386
+ "accuracy_ci95_text_bootstrap": [
387
+ 0.7291666666666666,
388
+ 1.0
389
+ ],
390
+ "all_rotations_correct": 0.8333333333333334,
391
+ "order_instability": 0.08333333333333333,
392
+ "rotation_zero_accuracy": 0.9166666666666666
393
+ },
394
+ {
395
+ "dataset": "snli",
396
+ "keys": "opaque",
397
+ "style": "fixed",
398
+ "model": "fp32",
399
+ "texts": 12,
400
+ "requests": 36,
401
+ "accuracy": 0.9166666666666666,
402
+ "accuracy_ci95_text_bootstrap": [
403
+ 0.75,
404
+ 1.0
405
+ ],
406
+ "all_rotations_correct": 0.9166666666666666,
407
+ "order_instability": 0.0,
408
+ "rotation_zero_accuracy": 0.9166666666666666
409
+ },
410
+ {
411
+ "dataset": "snli",
412
+ "keys": "opaque",
413
+ "style": "fixed",
414
+ "model": "int8",
415
+ "texts": 12,
416
+ "requests": 36,
417
+ "accuracy": 0.9166666666666666,
418
+ "accuracy_ci95_text_bootstrap": [
419
+ 0.75,
420
+ 1.0
421
+ ],
422
+ "all_rotations_correct": 0.9166666666666666,
423
+ "order_instability": 0.0,
424
+ "rotation_zero_accuracy": 0.9166666666666666
425
+ },
426
+ {
427
+ "dataset": "snli",
428
+ "keys": "opaque",
429
+ "style": "fixed",
430
+ "model": "teacher",
431
+ "texts": 12,
432
+ "requests": 36,
433
+ "accuracy": 0.75,
434
+ "accuracy_ci95_text_bootstrap": [
435
+ 0.5277777777777778,
436
+ 0.9444444444444445
437
+ ],
438
+ "all_rotations_correct": 0.6666666666666666,
439
+ "order_instability": 0.16666666666666666,
440
+ "rotation_zero_accuracy": 0.75
441
+ },
442
+ {
443
+ "dataset": "snli",
444
+ "keys": "opaque",
445
+ "style": "short",
446
+ "model": "fp32",
447
+ "texts": 12,
448
+ "requests": 36,
449
+ "accuracy": 0.16666666666666666,
450
+ "accuracy_ci95_text_bootstrap": [
451
+ 0.08333333333333333,
452
+ 0.25000000000000006
453
+ ],
454
+ "all_rotations_correct": 0.0,
455
+ "order_instability": 0.6666666666666666,
456
+ "rotation_zero_accuracy": 0.0
457
+ },
458
+ {
459
+ "dataset": "snli",
460
+ "keys": "opaque",
461
+ "style": "short",
462
+ "model": "int8",
463
+ "texts": 12,
464
+ "requests": 36,
465
+ "accuracy": 0.1111111111111111,
466
+ "accuracy_ci95_text_bootstrap": [
467
+ 0.027777777777777776,
468
+ 0.19444444444444445
469
+ ],
470
+ "all_rotations_correct": 0.0,
471
+ "order_instability": 0.6666666666666666,
472
+ "rotation_zero_accuracy": 0.0
473
+ },
474
+ {
475
+ "dataset": "snli",
476
+ "keys": "opaque",
477
+ "style": "short",
478
+ "model": "teacher",
479
+ "texts": 12,
480
+ "requests": 36,
481
+ "accuracy": 0.8055555555555555,
482
+ "accuracy_ci95_text_bootstrap": [
483
+ 0.5833333333333334,
484
+ 1.0
485
+ ],
486
+ "all_rotations_correct": 0.75,
487
+ "order_instability": 0.08333333333333333,
488
+ "rotation_zero_accuracy": 0.8333333333333334
489
+ },
490
+ {
491
+ "dataset": "snli",
492
+ "keys": "opaque",
493
+ "style": "long",
494
+ "model": "fp32",
495
+ "texts": 12,
496
+ "requests": 36,
497
+ "accuracy": 0.611111111111111,
498
+ "accuracy_ci95_text_bootstrap": [
499
+ 0.4444444444444444,
500
+ 0.7777777777777777
501
+ ],
502
+ "all_rotations_correct": 0.25,
503
+ "order_instability": 0.75,
504
+ "rotation_zero_accuracy": 0.4166666666666667
505
+ },
506
+ {
507
+ "dataset": "snli",
508
+ "keys": "opaque",
509
+ "style": "long",
510
+ "model": "int8",
511
+ "texts": 12,
512
+ "requests": 36,
513
+ "accuracy": 0.4444444444444444,
514
+ "accuracy_ci95_text_bootstrap": [
515
+ 0.3055555555555555,
516
+ 0.5833333333333334
517
+ ],
518
+ "all_rotations_correct": 0.0,
519
+ "order_instability": 0.9166666666666666,
520
+ "rotation_zero_accuracy": 0.3333333333333333
521
+ },
522
+ {
523
+ "dataset": "snli",
524
+ "keys": "opaque",
525
+ "style": "long",
526
+ "model": "teacher",
527
+ "texts": 12,
528
+ "requests": 36,
529
+ "accuracy": 0.611111111111111,
530
+ "accuracy_ci95_text_bootstrap": [
531
+ 0.3611111111111111,
532
+ 0.861111111111111
533
+ ],
534
+ "all_rotations_correct": 0.5,
535
+ "order_instability": 0.4166666666666667,
536
+ "rotation_zero_accuracy": 0.6666666666666666
537
+ },
538
+ {
539
+ "dataset": "snli",
540
+ "keys": "opaque",
541
+ "style": "long_named",
542
+ "model": "fp32",
543
+ "texts": 12,
544
+ "requests": 36,
545
+ "accuracy": 0.3333333333333333,
546
+ "accuracy_ci95_text_bootstrap": [
547
+ 0.16666666666666666,
548
+ 0.5277777777777778
549
+ ],
550
+ "all_rotations_correct": 0.16666666666666666,
551
+ "order_instability": 0.5,
552
+ "rotation_zero_accuracy": 0.25
553
+ },
554
+ {
555
+ "dataset": "snli",
556
+ "keys": "opaque",
557
+ "style": "long_named",
558
+ "model": "int8",
559
+ "texts": 12,
560
+ "requests": 36,
561
+ "accuracy": 0.4166666666666666,
562
+ "accuracy_ci95_text_bootstrap": [
563
+ 0.19444444444444442,
564
+ 0.6666666666666666
565
+ ],
566
+ "all_rotations_correct": 0.25,
567
+ "order_instability": 0.4166666666666667,
568
+ "rotation_zero_accuracy": 0.3333333333333333
569
+ },
570
+ {
571
+ "dataset": "snli",
572
+ "keys": "opaque",
573
+ "style": "long_named",
574
+ "model": "teacher",
575
+ "texts": 12,
576
+ "requests": 36,
577
+ "accuracy": 0.8333333333333334,
578
+ "accuracy_ci95_text_bootstrap": [
579
+ 0.5833333333333334,
580
+ 1.0
581
+ ],
582
+ "all_rotations_correct": 0.8333333333333334,
583
+ "order_instability": 0.0,
584
+ "rotation_zero_accuracy": 0.8333333333333334
585
+ },
586
+ {
587
+ "dataset": "snli",
588
+ "keys": "semantic",
589
+ "style": "fixed",
590
+ "model": "fp32",
591
+ "texts": 12,
592
+ "requests": 36,
593
+ "accuracy": 0.8055555555555557,
594
+ "accuracy_ci95_text_bootstrap": [
595
+ 0.611111111111111,
596
+ 0.9722222222222222
597
+ ],
598
+ "all_rotations_correct": 0.6666666666666666,
599
+ "order_instability": 0.25,
600
+ "rotation_zero_accuracy": 0.8333333333333334
601
+ },
602
+ {
603
+ "dataset": "snli",
604
+ "keys": "semantic",
605
+ "style": "fixed",
606
+ "model": "int8",
607
+ "texts": 12,
608
+ "requests": 36,
609
+ "accuracy": 0.6944444444444443,
610
+ "accuracy_ci95_text_bootstrap": [
611
+ 0.4444444444444444,
612
+ 0.9166666666666666
613
+ ],
614
+ "all_rotations_correct": 0.6666666666666666,
615
+ "order_instability": 0.08333333333333333,
616
+ "rotation_zero_accuracy": 0.6666666666666666
617
+ },
618
+ {
619
+ "dataset": "snli",
620
+ "keys": "semantic",
621
+ "style": "fixed",
622
+ "model": "teacher",
623
+ "texts": 12,
624
+ "requests": 36,
625
+ "accuracy": 0.9166666666666666,
626
+ "accuracy_ci95_text_bootstrap": [
627
+ 0.75,
628
+ 1.0
629
+ ],
630
+ "all_rotations_correct": 0.9166666666666666,
631
+ "order_instability": 0.0,
632
+ "rotation_zero_accuracy": 0.9166666666666666
633
+ },
634
+ {
635
+ "dataset": "snli",
636
+ "keys": "semantic",
637
+ "style": "short",
638
+ "model": "fp32",
639
+ "texts": 12,
640
+ "requests": 36,
641
+ "accuracy": 0.4166666666666667,
642
+ "accuracy_ci95_text_bootstrap": [
643
+ 0.19444444444444445,
644
+ 0.6388888888888888
645
+ ],
646
+ "all_rotations_correct": 0.25,
647
+ "order_instability": 0.4166666666666667,
648
+ "rotation_zero_accuracy": 0.25
649
+ },
650
+ {
651
+ "dataset": "snli",
652
+ "keys": "semantic",
653
+ "style": "short",
654
+ "model": "int8",
655
+ "texts": 12,
656
+ "requests": 36,
657
+ "accuracy": 0.36111111111111116,
658
+ "accuracy_ci95_text_bootstrap": [
659
+ 0.16666666666666666,
660
+ 0.5555555555555555
661
+ ],
662
+ "all_rotations_correct": 0.16666666666666666,
663
+ "order_instability": 0.5,
664
+ "rotation_zero_accuracy": 0.16666666666666666
665
+ },
666
+ {
667
+ "dataset": "snli",
668
+ "keys": "semantic",
669
+ "style": "short",
670
+ "model": "teacher",
671
+ "texts": 12,
672
+ "requests": 36,
673
+ "accuracy": 0.9166666666666666,
674
+ "accuracy_ci95_text_bootstrap": [
675
+ 0.75,
676
+ 1.0
677
+ ],
678
+ "all_rotations_correct": 0.9166666666666666,
679
+ "order_instability": 0.0,
680
+ "rotation_zero_accuracy": 0.9166666666666666
681
+ },
682
+ {
683
+ "dataset": "snli",
684
+ "keys": "semantic",
685
+ "style": "long",
686
+ "model": "fp32",
687
+ "texts": 12,
688
+ "requests": 36,
689
+ "accuracy": 0.38888888888888884,
690
+ "accuracy_ci95_text_bootstrap": [
691
+ 0.13888888888888887,
692
+ 0.6388888888888888
693
+ ],
694
+ "all_rotations_correct": 0.25,
695
+ "order_instability": 0.5,
696
+ "rotation_zero_accuracy": 0.3333333333333333
697
+ },
698
+ {
699
+ "dataset": "snli",
700
+ "keys": "semantic",
701
+ "style": "long",
702
+ "model": "int8",
703
+ "texts": 12,
704
+ "requests": 36,
705
+ "accuracy": 0.4166666666666667,
706
+ "accuracy_ci95_text_bootstrap": [
707
+ 0.16666666666666666,
708
+ 0.6666666666666666
709
+ ],
710
+ "all_rotations_correct": 0.4166666666666667,
711
+ "order_instability": 0.08333333333333333,
712
+ "rotation_zero_accuracy": 0.4166666666666667
713
+ },
714
+ {
715
+ "dataset": "snli",
716
+ "keys": "semantic",
717
+ "style": "long",
718
+ "model": "teacher",
719
+ "texts": 12,
720
+ "requests": 36,
721
+ "accuracy": 0.9166666666666666,
722
+ "accuracy_ci95_text_bootstrap": [
723
+ 0.75,
724
+ 1.0
725
+ ],
726
+ "all_rotations_correct": 0.9166666666666666,
727
+ "order_instability": 0.0,
728
+ "rotation_zero_accuracy": 0.9166666666666666
729
+ },
730
+ {
731
+ "dataset": "snli",
732
+ "keys": "semantic",
733
+ "style": "long_named",
734
+ "model": "fp32",
735
+ "texts": 12,
736
+ "requests": 36,
737
+ "accuracy": 0.3333333333333333,
738
+ "accuracy_ci95_text_bootstrap": [
739
+ 0.16666666666666666,
740
+ 0.5277777777777778
741
+ ],
742
+ "all_rotations_correct": 0.08333333333333333,
743
+ "order_instability": 0.8333333333333334,
744
+ "rotation_zero_accuracy": 0.3333333333333333
745
+ },
746
+ {
747
+ "dataset": "snli",
748
+ "keys": "semantic",
749
+ "style": "long_named",
750
+ "model": "int8",
751
+ "texts": 12,
752
+ "requests": 36,
753
+ "accuracy": 0.3333333333333333,
754
+ "accuracy_ci95_text_bootstrap": [
755
+ 0.13888888888888887,
756
+ 0.5277777777777778
757
+ ],
758
+ "all_rotations_correct": 0.08333333333333333,
759
+ "order_instability": 0.5833333333333334,
760
+ "rotation_zero_accuracy": 0.5
761
+ },
762
+ {
763
+ "dataset": "snli",
764
+ "keys": "semantic",
765
+ "style": "long_named",
766
+ "model": "teacher",
767
+ "texts": 12,
768
+ "requests": 36,
769
+ "accuracy": 0.9166666666666666,
770
+ "accuracy_ci95_text_bootstrap": [
771
+ 0.75,
772
+ 1.0
773
+ ],
774
+ "all_rotations_correct": 0.9166666666666666,
775
+ "order_instability": 0.0,
776
+ "rotation_zero_accuracy": 0.9166666666666666
777
+ }
778
+ ],
779
+ "teacher_comparison_style_deltas_same_texts": [
780
+ {
781
+ "dataset": "ag_news",
782
+ "keys": "opaque",
783
+ "style": "short",
784
+ "model": "fp32",
785
+ "texts": 12,
786
+ "delta": -0.041666666666666664,
787
+ "ci95": [
788
+ -0.125,
789
+ 0.0
790
+ ]
791
+ },
792
+ {
793
+ "dataset": "ag_news",
794
+ "keys": "opaque",
795
+ "style": "short",
796
+ "model": "int8",
797
+ "texts": 12,
798
+ "delta": -0.020833333333333332,
799
+ "ci95": [
800
+ -0.0625,
801
+ 0.0
802
+ ]
803
+ },
804
+ {
805
+ "dataset": "ag_news",
806
+ "keys": "opaque",
807
+ "style": "short",
808
+ "model": "teacher",
809
+ "texts": 12,
810
+ "delta": 0.0,
811
+ "ci95": [
812
+ 0.0,
813
+ 0.0
814
+ ]
815
+ },
816
+ {
817
+ "dataset": "ag_news",
818
+ "keys": "opaque",
819
+ "style": "long",
820
+ "model": "fp32",
821
+ "texts": 12,
822
+ "delta": -0.3541666666666667,
823
+ "ci95": [
824
+ -0.5208333333333334,
825
+ -0.1875
826
+ ]
827
+ },
828
+ {
829
+ "dataset": "ag_news",
830
+ "keys": "opaque",
831
+ "style": "long",
832
+ "model": "int8",
833
+ "texts": 12,
834
+ "delta": -0.3541666666666667,
835
+ "ci95": [
836
+ -0.5208333333333334,
837
+ -0.1875
838
+ ]
839
+ },
840
+ {
841
+ "dataset": "ag_news",
842
+ "keys": "opaque",
843
+ "style": "long",
844
+ "model": "teacher",
845
+ "texts": 12,
846
+ "delta": 0.020833333333333332,
847
+ "ci95": [
848
+ -0.0625,
849
+ 0.125
850
+ ]
851
+ },
852
+ {
853
+ "dataset": "ag_news",
854
+ "keys": "opaque",
855
+ "style": "long_named",
856
+ "model": "fp32",
857
+ "texts": 12,
858
+ "delta": -0.4583333333333333,
859
+ "ci95": [
860
+ -0.7083333333333334,
861
+ -0.20833333333333334
862
+ ]
863
+ },
864
+ {
865
+ "dataset": "ag_news",
866
+ "keys": "opaque",
867
+ "style": "long_named",
868
+ "model": "int8",
869
+ "texts": 12,
870
+ "delta": -0.4375,
871
+ "ci95": [
872
+ -0.6875,
873
+ -0.1875
874
+ ]
875
+ },
876
+ {
877
+ "dataset": "ag_news",
878
+ "keys": "opaque",
879
+ "style": "long_named",
880
+ "model": "teacher",
881
+ "texts": 12,
882
+ "delta": 0.0625,
883
+ "ci95": [
884
+ 0.0,
885
+ 0.1875
886
+ ]
887
+ },
888
+ {
889
+ "dataset": "ag_news",
890
+ "keys": "semantic",
891
+ "style": "short",
892
+ "model": "fp32",
893
+ "texts": 12,
894
+ "delta": -0.0625,
895
+ "ci95": [
896
+ -0.1875,
897
+ 0.0
898
+ ]
899
+ },
900
+ {
901
+ "dataset": "ag_news",
902
+ "keys": "semantic",
903
+ "style": "short",
904
+ "model": "int8",
905
+ "texts": 12,
906
+ "delta": 0.0,
907
+ "ci95": [
908
+ 0.0,
909
+ 0.0
910
+ ]
911
+ },
912
+ {
913
+ "dataset": "ag_news",
914
+ "keys": "semantic",
915
+ "style": "short",
916
+ "model": "teacher",
917
+ "texts": 12,
918
+ "delta": 0.0,
919
+ "ci95": [
920
+ 0.0,
921
+ 0.0
922
+ ]
923
+ },
924
+ {
925
+ "dataset": "ag_news",
926
+ "keys": "semantic",
927
+ "style": "long",
928
+ "model": "fp32",
929
+ "texts": 12,
930
+ "delta": -0.375,
931
+ "ci95": [
932
+ -0.5833333333333334,
933
+ -0.16666666666666666
934
+ ]
935
+ },
936
+ {
937
+ "dataset": "ag_news",
938
+ "keys": "semantic",
939
+ "style": "long",
940
+ "model": "int8",
941
+ "texts": 12,
942
+ "delta": -0.3541666666666667,
943
+ "ci95": [
944
+ -0.5416666666666666,
945
+ -0.16666666666666666
946
+ ]
947
+ },
948
+ {
949
+ "dataset": "ag_news",
950
+ "keys": "semantic",
951
+ "style": "long",
952
+ "model": "teacher",
953
+ "texts": 12,
954
+ "delta": 0.0625,
955
+ "ci95": [
956
+ 0.0,
957
+ 0.1875
958
+ ]
959
+ },
960
+ {
961
+ "dataset": "ag_news",
962
+ "keys": "semantic",
963
+ "style": "long_named",
964
+ "model": "fp32",
965
+ "texts": 12,
966
+ "delta": -0.4583333333333333,
967
+ "ci95": [
968
+ -0.7083333333333334,
969
+ -0.20833333333333334
970
+ ]
971
+ },
972
+ {
973
+ "dataset": "ag_news",
974
+ "keys": "semantic",
975
+ "style": "long_named",
976
+ "model": "int8",
977
+ "texts": 12,
978
+ "delta": -0.4166666666666667,
979
+ "ci95": [
980
+ -0.6458333333333334,
981
+ -0.1875
982
+ ]
983
+ },
984
+ {
985
+ "dataset": "ag_news",
986
+ "keys": "semantic",
987
+ "style": "long_named",
988
+ "model": "teacher",
989
+ "texts": 12,
990
+ "delta": 0.0625,
991
+ "ci95": [
992
+ 0.0,
993
+ 0.1875
994
+ ]
995
+ },
996
+ {
997
+ "dataset": "snli",
998
+ "keys": "opaque",
999
+ "style": "short",
1000
+ "model": "fp32",
1001
+ "texts": 12,
1002
+ "delta": -0.75,
1003
+ "ci95": [
1004
+ -0.9166666666666666,
1005
+ -0.5000000000000001
1006
+ ]
1007
+ },
1008
+ {
1009
+ "dataset": "snli",
1010
+ "keys": "opaque",
1011
+ "style": "short",
1012
+ "model": "int8",
1013
+ "texts": 12,
1014
+ "delta": -0.8055555555555555,
1015
+ "ci95": [
1016
+ -0.9722222222222223,
1017
+ -0.5555555555555557
1018
+ ]
1019
+ },
1020
+ {
1021
+ "dataset": "snli",
1022
+ "keys": "opaque",
1023
+ "style": "short",
1024
+ "model": "teacher",
1025
+ "texts": 12,
1026
+ "delta": 0.05555555555555556,
1027
+ "ci95": [
1028
+ 0.0,
1029
+ 0.16666666666666666
1030
+ ]
1031
+ },
1032
+ {
1033
+ "dataset": "snli",
1034
+ "keys": "opaque",
1035
+ "style": "long",
1036
+ "model": "fp32",
1037
+ "texts": 12,
1038
+ "delta": -0.30555555555555564,
1039
+ "ci95": [
1040
+ -0.5277777777777778,
1041
+ -0.05555555555555559
1042
+ ]
1043
+ },
1044
+ {
1045
+ "dataset": "snli",
1046
+ "keys": "opaque",
1047
+ "style": "long",
1048
+ "model": "int8",
1049
+ "texts": 12,
1050
+ "delta": -0.47222222222222227,
1051
+ "ci95": [
1052
+ -0.6944444444444445,
1053
+ -0.22222222222222224
1054
+ ]
1055
+ },
1056
+ {
1057
+ "dataset": "snli",
1058
+ "keys": "opaque",
1059
+ "style": "long",
1060
+ "model": "teacher",
1061
+ "texts": 12,
1062
+ "delta": -0.1388888888888889,
1063
+ "ci95": [
1064
+ -0.2777777777777778,
1065
+ -0.02777777777777778
1066
+ ]
1067
+ },
1068
+ {
1069
+ "dataset": "snli",
1070
+ "keys": "opaque",
1071
+ "style": "long_named",
1072
+ "model": "fp32",
1073
+ "texts": 12,
1074
+ "delta": -0.5833333333333334,
1075
+ "ci95": [
1076
+ -0.7777777777777778,
1077
+ -0.36111111111111116
1078
+ ]
1079
+ },
1080
+ {
1081
+ "dataset": "snli",
1082
+ "keys": "opaque",
1083
+ "style": "long_named",
1084
+ "model": "int8",
1085
+ "texts": 12,
1086
+ "delta": -0.5000000000000001,
1087
+ "ci95": [
1088
+ -0.7222222222222223,
1089
+ -0.2777777777777778
1090
+ ]
1091
+ },
1092
+ {
1093
+ "dataset": "snli",
1094
+ "keys": "opaque",
1095
+ "style": "long_named",
1096
+ "model": "teacher",
1097
+ "texts": 12,
1098
+ "delta": 0.08333333333333333,
1099
+ "ci95": [
1100
+ 0.0,
1101
+ 0.19513888888889147
1102
+ ]
1103
+ },
1104
+ {
1105
+ "dataset": "snli",
1106
+ "keys": "semantic",
1107
+ "style": "short",
1108
+ "model": "fp32",
1109
+ "texts": 12,
1110
+ "delta": -0.3888888888888889,
1111
+ "ci95": [
1112
+ -0.5555555555555557,
1113
+ -0.2222222222222222
1114
+ ]
1115
+ },
1116
+ {
1117
+ "dataset": "snli",
1118
+ "keys": "semantic",
1119
+ "style": "short",
1120
+ "model": "int8",
1121
+ "texts": 12,
1122
+ "delta": -0.3333333333333334,
1123
+ "ci95": [
1124
+ -0.5000000000000001,
1125
+ -0.16666666666666666
1126
+ ]
1127
+ },
1128
+ {
1129
+ "dataset": "snli",
1130
+ "keys": "semantic",
1131
+ "style": "short",
1132
+ "model": "teacher",
1133
+ "texts": 12,
1134
+ "delta": 0.0,
1135
+ "ci95": [
1136
+ 0.0,
1137
+ 0.0
1138
+ ]
1139
+ },
1140
+ {
1141
+ "dataset": "snli",
1142
+ "keys": "semantic",
1143
+ "style": "long",
1144
+ "model": "fp32",
1145
+ "texts": 12,
1146
+ "delta": -0.4166666666666667,
1147
+ "ci95": [
1148
+ -0.6388888888888888,
1149
+ -0.19444444444444445
1150
+ ]
1151
+ },
1152
+ {
1153
+ "dataset": "snli",
1154
+ "keys": "semantic",
1155
+ "style": "long",
1156
+ "model": "int8",
1157
+ "texts": 12,
1158
+ "delta": -0.27777777777777773,
1159
+ "ci95": [
1160
+ -0.5277777777777778,
1161
+ -0.05555555555555555
1162
+ ]
1163
+ },
1164
+ {
1165
+ "dataset": "snli",
1166
+ "keys": "semantic",
1167
+ "style": "long",
1168
+ "model": "teacher",
1169
+ "texts": 12,
1170
+ "delta": 0.0,
1171
+ "ci95": [
1172
+ 0.0,
1173
+ 0.0
1174
+ ]
1175
+ },
1176
+ {
1177
+ "dataset": "snli",
1178
+ "keys": "semantic",
1179
+ "style": "long_named",
1180
+ "model": "fp32",
1181
+ "texts": 12,
1182
+ "delta": -0.47222222222222227,
1183
+ "ci95": [
1184
+ -0.6944444444444445,
1185
+ -0.25000000000000006
1186
+ ]
1187
+ },
1188
+ {
1189
+ "dataset": "snli",
1190
+ "keys": "semantic",
1191
+ "style": "long_named",
1192
+ "model": "int8",
1193
+ "texts": 12,
1194
+ "delta": -0.36111111111111116,
1195
+ "ci95": [
1196
+ -0.5833333333333334,
1197
+ -0.16666666666666666
1198
+ ]
1199
+ },
1200
+ {
1201
+ "dataset": "snli",
1202
+ "keys": "semantic",
1203
+ "style": "long_named",
1204
+ "model": "teacher",
1205
+ "texts": 12,
1206
+ "delta": 0.0,
1207
+ "ci95": [
1208
+ 0.0,
1209
+ 0.0
1210
+ ]
1211
+ }
1212
+ ],
1213
+ "cells": [
1214
+ {
1215
+ "dataset": "ag_news",
1216
+ "keys": "opaque",
1217
+ "style": "fixed",
1218
+ "model": "fp32",
1219
+ "texts": 60,
1220
+ "requests": 240,
1221
+ "accuracy": 0.9208333333333333,
1222
+ "accuracy_ci95_text_bootstrap": [
1223
+ 0.85,
1224
+ 0.9791666666666666
1225
+ ],
1226
+ "all_rotations_correct": 0.9,
1227
+ "order_instability": 0.05,
1228
+ "rotation_zero_accuracy": 0.9333333333333333
1229
+ },
1230
+ {
1231
+ "dataset": "ag_news",
1232
+ "keys": "opaque",
1233
+ "style": "fixed",
1234
+ "model": "int8",
1235
+ "texts": 60,
1236
+ "requests": 240,
1237
+ "accuracy": 0.9166666666666666,
1238
+ "accuracy_ci95_text_bootstrap": [
1239
+ 0.8458333333333333,
1240
+ 0.975
1241
+ ],
1242
+ "all_rotations_correct": 0.8833333333333333,
1243
+ "order_instability": 0.06666666666666667,
1244
+ "rotation_zero_accuracy": 0.9333333333333333
1245
+ },
1246
+ {
1247
+ "dataset": "ag_news",
1248
+ "keys": "opaque",
1249
+ "style": "short",
1250
+ "model": "fp32",
1251
+ "texts": 60,
1252
+ "requests": 240,
1253
+ "accuracy": 0.9041666666666667,
1254
+ "accuracy_ci95_text_bootstrap": [
1255
+ 0.8333333333333334,
1256
+ 0.9625
1257
+ ],
1258
+ "all_rotations_correct": 0.8666666666666667,
1259
+ "order_instability": 0.1,
1260
+ "rotation_zero_accuracy": 0.8666666666666667
1261
+ },
1262
+ {
1263
+ "dataset": "ag_news",
1264
+ "keys": "opaque",
1265
+ "style": "short",
1266
+ "model": "int8",
1267
+ "texts": 60,
1268
+ "requests": 240,
1269
+ "accuracy": 0.9208333333333333,
1270
+ "accuracy_ci95_text_bootstrap": [
1271
+ 0.85,
1272
+ 0.975
1273
+ ],
1274
+ "all_rotations_correct": 0.8833333333333333,
1275
+ "order_instability": 0.08333333333333333,
1276
+ "rotation_zero_accuracy": 0.9166666666666666
1277
+ },
1278
+ {
1279
+ "dataset": "ag_news",
1280
+ "keys": "opaque",
1281
+ "style": "long",
1282
+ "model": "fp32",
1283
+ "texts": 60,
1284
+ "requests": 240,
1285
+ "accuracy": 0.5708333333333333,
1286
+ "accuracy_ci95_text_bootstrap": [
1287
+ 0.4791666666666667,
1288
+ 0.6625
1289
+ ],
1290
+ "all_rotations_correct": 0.3333333333333333,
1291
+ "order_instability": 0.5666666666666667,
1292
+ "rotation_zero_accuracy": 0.6833333333333333
1293
+ },
1294
+ {
1295
+ "dataset": "ag_news",
1296
+ "keys": "opaque",
1297
+ "style": "long",
1298
+ "model": "int8",
1299
+ "texts": 60,
1300
+ "requests": 240,
1301
+ "accuracy": 0.5666666666666667,
1302
+ "accuracy_ci95_text_bootstrap": [
1303
+ 0.475,
1304
+ 0.6625
1305
+ ],
1306
+ "all_rotations_correct": 0.3333333333333333,
1307
+ "order_instability": 0.6,
1308
+ "rotation_zero_accuracy": 0.6833333333333333
1309
+ },
1310
+ {
1311
+ "dataset": "ag_news",
1312
+ "keys": "opaque",
1313
+ "style": "long_named",
1314
+ "model": "fp32",
1315
+ "texts": 60,
1316
+ "requests": 240,
1317
+ "accuracy": 0.5375,
1318
+ "accuracy_ci95_text_bootstrap": [
1319
+ 0.43333333333333335,
1320
+ 0.6458333333333334
1321
+ ],
1322
+ "all_rotations_correct": 0.4,
1323
+ "order_instability": 0.48333333333333334,
1324
+ "rotation_zero_accuracy": 0.6333333333333333
1325
+ },
1326
+ {
1327
+ "dataset": "ag_news",
1328
+ "keys": "opaque",
1329
+ "style": "long_named",
1330
+ "model": "int8",
1331
+ "texts": 60,
1332
+ "requests": 240,
1333
+ "accuracy": 0.5375,
1334
+ "accuracy_ci95_text_bootstrap": [
1335
+ 0.43333333333333335,
1336
+ 0.6417708333333337
1337
+ ],
1338
+ "all_rotations_correct": 0.38333333333333336,
1339
+ "order_instability": 0.5,
1340
+ "rotation_zero_accuracy": 0.65
1341
+ },
1342
+ {
1343
+ "dataset": "ag_news",
1344
+ "keys": "semantic",
1345
+ "style": "fixed",
1346
+ "model": "fp32",
1347
+ "texts": 60,
1348
+ "requests": 240,
1349
+ "accuracy": 0.925,
1350
+ "accuracy_ci95_text_bootstrap": [
1351
+ 0.8583333333333333,
1352
+ 0.9833333333333333
1353
+ ],
1354
+ "all_rotations_correct": 0.9166666666666666,
1355
+ "order_instability": 0.03333333333333333,
1356
+ "rotation_zero_accuracy": 0.9166666666666666
1357
+ },
1358
+ {
1359
+ "dataset": "ag_news",
1360
+ "keys": "semantic",
1361
+ "style": "fixed",
1362
+ "model": "int8",
1363
+ "texts": 60,
1364
+ "requests": 240,
1365
+ "accuracy": 0.925,
1366
+ "accuracy_ci95_text_bootstrap": [
1367
+ 0.8583333333333333,
1368
+ 0.975
1369
+ ],
1370
+ "all_rotations_correct": 0.9,
1371
+ "order_instability": 0.05,
1372
+ "rotation_zero_accuracy": 0.9333333333333333
1373
+ },
1374
+ {
1375
+ "dataset": "ag_news",
1376
+ "keys": "semantic",
1377
+ "style": "short",
1378
+ "model": "fp32",
1379
+ "texts": 60,
1380
+ "requests": 240,
1381
+ "accuracy": 0.9125,
1382
+ "accuracy_ci95_text_bootstrap": [
1383
+ 0.8416666666666667,
1384
+ 0.9709375000000003
1385
+ ],
1386
+ "all_rotations_correct": 0.9,
1387
+ "order_instability": 0.05,
1388
+ "rotation_zero_accuracy": 0.9166666666666666
1389
+ },
1390
+ {
1391
+ "dataset": "ag_news",
1392
+ "keys": "semantic",
1393
+ "style": "short",
1394
+ "model": "int8",
1395
+ "texts": 60,
1396
+ "requests": 240,
1397
+ "accuracy": 0.9083333333333333,
1398
+ "accuracy_ci95_text_bootstrap": [
1399
+ 0.8333333333333334,
1400
+ 0.975
1401
+ ],
1402
+ "all_rotations_correct": 0.9,
1403
+ "order_instability": 0.03333333333333333,
1404
+ "rotation_zero_accuracy": 0.9
1405
+ },
1406
+ {
1407
+ "dataset": "ag_news",
1408
+ "keys": "semantic",
1409
+ "style": "long",
1410
+ "model": "fp32",
1411
+ "texts": 60,
1412
+ "requests": 240,
1413
+ "accuracy": 0.5875,
1414
+ "accuracy_ci95_text_bootstrap": [
1415
+ 0.49166666666666664,
1416
+ 0.6833333333333333
1417
+ ],
1418
+ "all_rotations_correct": 0.38333333333333336,
1419
+ "order_instability": 0.5833333333333334,
1420
+ "rotation_zero_accuracy": 0.7
1421
+ },
1422
+ {
1423
+ "dataset": "ag_news",
1424
+ "keys": "semantic",
1425
+ "style": "long",
1426
+ "model": "int8",
1427
+ "texts": 60,
1428
+ "requests": 240,
1429
+ "accuracy": 0.5791666666666667,
1430
+ "accuracy_ci95_text_bootstrap": [
1431
+ 0.48333333333333334,
1432
+ 0.675
1433
+ ],
1434
+ "all_rotations_correct": 0.4,
1435
+ "order_instability": 0.5666666666666667,
1436
+ "rotation_zero_accuracy": 0.6833333333333333
1437
+ },
1438
+ {
1439
+ "dataset": "ag_news",
1440
+ "keys": "semantic",
1441
+ "style": "long_named",
1442
+ "model": "fp32",
1443
+ "texts": 60,
1444
+ "requests": 240,
1445
+ "accuracy": 0.525,
1446
+ "accuracy_ci95_text_bootstrap": [
1447
+ 0.425,
1448
+ 0.625
1449
+ ],
1450
+ "all_rotations_correct": 0.3333333333333333,
1451
+ "order_instability": 0.6,
1452
+ "rotation_zero_accuracy": 0.6
1453
+ },
1454
+ {
1455
+ "dataset": "ag_news",
1456
+ "keys": "semantic",
1457
+ "style": "long_named",
1458
+ "model": "int8",
1459
+ "texts": 60,
1460
+ "requests": 240,
1461
+ "accuracy": 0.5333333333333333,
1462
+ "accuracy_ci95_text_bootstrap": [
1463
+ 0.43333333333333335,
1464
+ 0.6333333333333333
1465
+ ],
1466
+ "all_rotations_correct": 0.31666666666666665,
1467
+ "order_instability": 0.6,
1468
+ "rotation_zero_accuracy": 0.6
1469
+ },
1470
+ {
1471
+ "dataset": "snli",
1472
+ "keys": "opaque",
1473
+ "style": "fixed",
1474
+ "model": "fp32",
1475
+ "texts": 60,
1476
+ "requests": 180,
1477
+ "accuracy": 0.7833333333333333,
1478
+ "accuracy_ci95_text_bootstrap": [
1479
+ 0.6722222222222223,
1480
+ 0.8833333333333333
1481
+ ],
1482
+ "all_rotations_correct": 0.7666666666666667,
1483
+ "order_instability": 0.05,
1484
+ "rotation_zero_accuracy": 0.8
1485
+ },
1486
+ {
1487
+ "dataset": "snli",
1488
+ "keys": "opaque",
1489
+ "style": "fixed",
1490
+ "model": "int8",
1491
+ "texts": 60,
1492
+ "requests": 180,
1493
+ "accuracy": 0.8,
1494
+ "accuracy_ci95_text_bootstrap": [
1495
+ 0.6944444444444444,
1496
+ 0.8944444444444445
1497
+ ],
1498
+ "all_rotations_correct": 0.7833333333333333,
1499
+ "order_instability": 0.06666666666666667,
1500
+ "rotation_zero_accuracy": 0.8
1501
+ },
1502
+ {
1503
+ "dataset": "snli",
1504
+ "keys": "opaque",
1505
+ "style": "short",
1506
+ "model": "fp32",
1507
+ "texts": 60,
1508
+ "requests": 180,
1509
+ "accuracy": 0.14444444444444443,
1510
+ "accuracy_ci95_text_bootstrap": [
1511
+ 0.09999999999999999,
1512
+ 0.1888888888888889
1513
+ ],
1514
+ "all_rotations_correct": 0.0,
1515
+ "order_instability": 0.7666666666666667,
1516
+ "rotation_zero_accuracy": 0.11666666666666667
1517
+ },
1518
+ {
1519
+ "dataset": "snli",
1520
+ "keys": "opaque",
1521
+ "style": "short",
1522
+ "model": "int8",
1523
+ "texts": 60,
1524
+ "requests": 180,
1525
+ "accuracy": 0.20555555555555557,
1526
+ "accuracy_ci95_text_bootstrap": [
1527
+ 0.15555555555555553,
1528
+ 0.2555555555555556
1529
+ ],
1530
+ "all_rotations_correct": 0.016666666666666666,
1531
+ "order_instability": 0.8,
1532
+ "rotation_zero_accuracy": 0.18333333333333332
1533
+ },
1534
+ {
1535
+ "dataset": "snli",
1536
+ "keys": "opaque",
1537
+ "style": "long",
1538
+ "model": "fp32",
1539
+ "texts": 60,
1540
+ "requests": 180,
1541
+ "accuracy": 0.5222222222222221,
1542
+ "accuracy_ci95_text_bootstrap": [
1543
+ 0.42777777777777787,
1544
+ 0.6166666666666667
1545
+ ],
1546
+ "all_rotations_correct": 0.2833333333333333,
1547
+ "order_instability": 0.6166666666666667,
1548
+ "rotation_zero_accuracy": 0.48333333333333334
1549
+ },
1550
+ {
1551
+ "dataset": "snli",
1552
+ "keys": "opaque",
1553
+ "style": "long",
1554
+ "model": "int8",
1555
+ "texts": 60,
1556
+ "requests": 180,
1557
+ "accuracy": 0.49444444444444435,
1558
+ "accuracy_ci95_text_bootstrap": [
1559
+ 0.4111111111111111,
1560
+ 0.5777777777777777
1561
+ ],
1562
+ "all_rotations_correct": 0.16666666666666666,
1563
+ "order_instability": 0.7666666666666667,
1564
+ "rotation_zero_accuracy": 0.43333333333333335
1565
+ },
1566
+ {
1567
+ "dataset": "snli",
1568
+ "keys": "opaque",
1569
+ "style": "long_named",
1570
+ "model": "fp32",
1571
+ "texts": 60,
1572
+ "requests": 180,
1573
+ "accuracy": 0.24444444444444444,
1574
+ "accuracy_ci95_text_bootstrap": [
1575
+ 0.16666666666666666,
1576
+ 0.3279166666666672
1577
+ ],
1578
+ "all_rotations_correct": 0.06666666666666667,
1579
+ "order_instability": 0.55,
1580
+ "rotation_zero_accuracy": 0.23333333333333334
1581
+ },
1582
+ {
1583
+ "dataset": "snli",
1584
+ "keys": "opaque",
1585
+ "style": "long_named",
1586
+ "model": "int8",
1587
+ "texts": 60,
1588
+ "requests": 180,
1589
+ "accuracy": 0.3277777777777778,
1590
+ "accuracy_ci95_text_bootstrap": [
1591
+ 0.22777777777777777,
1592
+ 0.4333333333333333
1593
+ ],
1594
+ "all_rotations_correct": 0.2,
1595
+ "order_instability": 0.4166666666666667,
1596
+ "rotation_zero_accuracy": 0.3
1597
+ },
1598
+ {
1599
+ "dataset": "snli",
1600
+ "keys": "semantic",
1601
+ "style": "fixed",
1602
+ "model": "fp32",
1603
+ "texts": 60,
1604
+ "requests": 180,
1605
+ "accuracy": 0.6055555555555555,
1606
+ "accuracy_ci95_text_bootstrap": [
1607
+ 0.4888888888888889,
1608
+ 0.7166666666666666
1609
+ ],
1610
+ "all_rotations_correct": 0.5166666666666667,
1611
+ "order_instability": 0.18333333333333332,
1612
+ "rotation_zero_accuracy": 0.6
1613
+ },
1614
+ {
1615
+ "dataset": "snli",
1616
+ "keys": "semantic",
1617
+ "style": "fixed",
1618
+ "model": "int8",
1619
+ "texts": 60,
1620
+ "requests": 180,
1621
+ "accuracy": 0.5722222222222222,
1622
+ "accuracy_ci95_text_bootstrap": [
1623
+ 0.45,
1624
+ 0.6888888888888889
1625
+ ],
1626
+ "all_rotations_correct": 0.5166666666666667,
1627
+ "order_instability": 0.16666666666666666,
1628
+ "rotation_zero_accuracy": 0.5666666666666667
1629
+ },
1630
+ {
1631
+ "dataset": "snli",
1632
+ "keys": "semantic",
1633
+ "style": "short",
1634
+ "model": "fp32",
1635
+ "texts": 60,
1636
+ "requests": 180,
1637
+ "accuracy": 0.3222222222222222,
1638
+ "accuracy_ci95_text_bootstrap": [
1639
+ 0.22777777777777777,
1640
+ 0.41680555555555615
1641
+ ],
1642
+ "all_rotations_correct": 0.11666666666666667,
1643
+ "order_instability": 0.5166666666666667,
1644
+ "rotation_zero_accuracy": 0.31666666666666665
1645
+ },
1646
+ {
1647
+ "dataset": "snli",
1648
+ "keys": "semantic",
1649
+ "style": "short",
1650
+ "model": "int8",
1651
+ "texts": 60,
1652
+ "requests": 180,
1653
+ "accuracy": 0.3055555555555555,
1654
+ "accuracy_ci95_text_bootstrap": [
1655
+ 0.21666666666666667,
1656
+ 0.39444444444444443
1657
+ ],
1658
+ "all_rotations_correct": 0.11666666666666667,
1659
+ "order_instability": 0.5,
1660
+ "rotation_zero_accuracy": 0.25
1661
+ },
1662
+ {
1663
+ "dataset": "snli",
1664
+ "keys": "semantic",
1665
+ "style": "long",
1666
+ "model": "fp32",
1667
+ "texts": 60,
1668
+ "requests": 180,
1669
+ "accuracy": 0.36111111111111105,
1670
+ "accuracy_ci95_text_bootstrap": [
1671
+ 0.27777777777777773,
1672
+ 0.45000000000000007
1673
+ ],
1674
+ "all_rotations_correct": 0.13333333333333333,
1675
+ "order_instability": 0.6,
1676
+ "rotation_zero_accuracy": 0.38333333333333336
1677
+ },
1678
+ {
1679
+ "dataset": "snli",
1680
+ "keys": "semantic",
1681
+ "style": "long",
1682
+ "model": "int8",
1683
+ "texts": 60,
1684
+ "requests": 180,
1685
+ "accuracy": 0.3888888888888889,
1686
+ "accuracy_ci95_text_bootstrap": [
1687
+ 0.27777777777777773,
1688
+ 0.5
1689
+ ],
1690
+ "all_rotations_correct": 0.31666666666666665,
1691
+ "order_instability": 0.23333333333333334,
1692
+ "rotation_zero_accuracy": 0.38333333333333336
1693
+ },
1694
+ {
1695
+ "dataset": "snli",
1696
+ "keys": "semantic",
1697
+ "style": "long_named",
1698
+ "model": "fp32",
1699
+ "texts": 60,
1700
+ "requests": 180,
1701
+ "accuracy": 0.3111111111111111,
1702
+ "accuracy_ci95_text_bootstrap": [
1703
+ 0.23333333333333334,
1704
+ 0.3944444444444445
1705
+ ],
1706
+ "all_rotations_correct": 0.05,
1707
+ "order_instability": 0.8166666666666667,
1708
+ "rotation_zero_accuracy": 0.3
1709
+ },
1710
+ {
1711
+ "dataset": "snli",
1712
+ "keys": "semantic",
1713
+ "style": "long_named",
1714
+ "model": "int8",
1715
+ "texts": 60,
1716
+ "requests": 180,
1717
+ "accuracy": 0.31111111111111106,
1718
+ "accuracy_ci95_text_bootstrap": [
1719
+ 0.21666666666666667,
1720
+ 0.4111111111111111
1721
+ ],
1722
+ "all_rotations_correct": 0.15,
1723
+ "order_instability": 0.43333333333333335,
1724
+ "rotation_zero_accuracy": 0.36666666666666664
1725
+ }
1726
+ ],
1727
+ "paired_style_minus_fixed_accuracy": [
1728
+ {
1729
+ "dataset": "ag_news",
1730
+ "keys": "opaque",
1731
+ "style": "short",
1732
+ "model": "fp32",
1733
+ "texts": 60,
1734
+ "delta": -0.016666666666666666,
1735
+ "ci95": [
1736
+ -0.0625,
1737
+ 0.029166666666666667
1738
+ ]
1739
+ },
1740
+ {
1741
+ "dataset": "ag_news",
1742
+ "keys": "opaque",
1743
+ "style": "short",
1744
+ "model": "int8",
1745
+ "texts": 60,
1746
+ "delta": 0.004166666666666667,
1747
+ "ci95": [
1748
+ -0.0375,
1749
+ 0.05
1750
+ ]
1751
+ },
1752
+ {
1753
+ "dataset": "ag_news",
1754
+ "keys": "opaque",
1755
+ "style": "long",
1756
+ "model": "fp32",
1757
+ "texts": 60,
1758
+ "delta": -0.35,
1759
+ "ci95": [
1760
+ -0.44583333333333336,
1761
+ -0.25
1762
+ ]
1763
+ },
1764
+ {
1765
+ "dataset": "ag_news",
1766
+ "keys": "opaque",
1767
+ "style": "long",
1768
+ "model": "int8",
1769
+ "texts": 60,
1770
+ "delta": -0.35,
1771
+ "ci95": [
1772
+ -0.44583333333333336,
1773
+ -0.25
1774
+ ]
1775
+ },
1776
+ {
1777
+ "dataset": "ag_news",
1778
+ "keys": "opaque",
1779
+ "style": "long_named",
1780
+ "model": "fp32",
1781
+ "texts": 60,
1782
+ "delta": -0.38333333333333336,
1783
+ "ci95": [
1784
+ -0.49166666666666664,
1785
+ -0.2708333333333333
1786
+ ]
1787
+ },
1788
+ {
1789
+ "dataset": "ag_news",
1790
+ "keys": "opaque",
1791
+ "style": "long_named",
1792
+ "model": "int8",
1793
+ "texts": 60,
1794
+ "delta": -0.37916666666666665,
1795
+ "ci95": [
1796
+ -0.4875,
1797
+ -0.2625
1798
+ ]
1799
+ },
1800
+ {
1801
+ "dataset": "ag_news",
1802
+ "keys": "semantic",
1803
+ "style": "short",
1804
+ "model": "fp32",
1805
+ "texts": 60,
1806
+ "delta": -0.0125,
1807
+ "ci95": [
1808
+ -0.0625,
1809
+ 0.03333333333333333
1810
+ ]
1811
+ },
1812
+ {
1813
+ "dataset": "ag_news",
1814
+ "keys": "semantic",
1815
+ "style": "short",
1816
+ "model": "int8",
1817
+ "texts": 60,
1818
+ "delta": -0.016666666666666666,
1819
+ "ci95": [
1820
+ -0.06666666666666667,
1821
+ 0.016666666666666666
1822
+ ]
1823
+ },
1824
+ {
1825
+ "dataset": "ag_news",
1826
+ "keys": "semantic",
1827
+ "style": "long",
1828
+ "model": "fp32",
1829
+ "texts": 60,
1830
+ "delta": -0.3375,
1831
+ "ci95": [
1832
+ -0.4375,
1833
+ -0.23333333333333334
1834
+ ]
1835
+ },
1836
+ {
1837
+ "dataset": "ag_news",
1838
+ "keys": "semantic",
1839
+ "style": "long",
1840
+ "model": "int8",
1841
+ "texts": 60,
1842
+ "delta": -0.3458333333333333,
1843
+ "ci95": [
1844
+ -0.44583333333333336,
1845
+ -0.24583333333333332
1846
+ ]
1847
+ },
1848
+ {
1849
+ "dataset": "ag_news",
1850
+ "keys": "semantic",
1851
+ "style": "long_named",
1852
+ "model": "fp32",
1853
+ "texts": 60,
1854
+ "delta": -0.4,
1855
+ "ci95": [
1856
+ -0.5041666666666667,
1857
+ -0.29572916666666627
1858
+ ]
1859
+ },
1860
+ {
1861
+ "dataset": "ag_news",
1862
+ "keys": "semantic",
1863
+ "style": "long_named",
1864
+ "model": "int8",
1865
+ "texts": 60,
1866
+ "delta": -0.39166666666666666,
1867
+ "ci95": [
1868
+ -0.4875,
1869
+ -0.2875
1870
+ ]
1871
+ },
1872
+ {
1873
+ "dataset": "snli",
1874
+ "keys": "opaque",
1875
+ "style": "short",
1876
+ "model": "fp32",
1877
+ "texts": 60,
1878
+ "delta": -0.6388888888888888,
1879
+ "ci95": [
1880
+ -0.7444444444444444,
1881
+ -0.5277777777777779
1882
+ ]
1883
+ },
1884
+ {
1885
+ "dataset": "snli",
1886
+ "keys": "opaque",
1887
+ "style": "short",
1888
+ "model": "int8",
1889
+ "texts": 60,
1890
+ "delta": -0.5944444444444444,
1891
+ "ci95": [
1892
+ -0.711111111111111,
1893
+ -0.4722222222222223
1894
+ ]
1895
+ },
1896
+ {
1897
+ "dataset": "snli",
1898
+ "keys": "opaque",
1899
+ "style": "long",
1900
+ "model": "fp32",
1901
+ "texts": 60,
1902
+ "delta": -0.2611111111111112,
1903
+ "ci95": [
1904
+ -0.3944444444444445,
1905
+ -0.12222222222222223
1906
+ ]
1907
+ },
1908
+ {
1909
+ "dataset": "snli",
1910
+ "keys": "opaque",
1911
+ "style": "long",
1912
+ "model": "int8",
1913
+ "texts": 60,
1914
+ "delta": -0.3055555555555555,
1915
+ "ci95": [
1916
+ -0.4222222222222223,
1917
+ -0.1833333333333334
1918
+ ]
1919
+ },
1920
+ {
1921
+ "dataset": "snli",
1922
+ "keys": "opaque",
1923
+ "style": "long_named",
1924
+ "model": "fp32",
1925
+ "texts": 60,
1926
+ "delta": -0.5388888888888889,
1927
+ "ci95": [
1928
+ -0.6444444444444444,
1929
+ -0.4277777777777778
1930
+ ]
1931
+ },
1932
+ {
1933
+ "dataset": "snli",
1934
+ "keys": "opaque",
1935
+ "style": "long_named",
1936
+ "model": "int8",
1937
+ "texts": 60,
1938
+ "delta": -0.47222222222222227,
1939
+ "ci95": [
1940
+ -0.5833333333333335,
1941
+ -0.35555555555555557
1942
+ ]
1943
+ },
1944
+ {
1945
+ "dataset": "snli",
1946
+ "keys": "semantic",
1947
+ "style": "short",
1948
+ "model": "fp32",
1949
+ "texts": 60,
1950
+ "delta": -0.2833333333333334,
1951
+ "ci95": [
1952
+ -0.3777777777777778,
1953
+ -0.1888888888888889
1954
+ ]
1955
+ },
1956
+ {
1957
+ "dataset": "snli",
1958
+ "keys": "semantic",
1959
+ "style": "short",
1960
+ "model": "int8",
1961
+ "texts": 60,
1962
+ "delta": -0.26666666666666666,
1963
+ "ci95": [
1964
+ -0.35555555555555557,
1965
+ -0.1833333333333333
1966
+ ]
1967
+ },
1968
+ {
1969
+ "dataset": "snli",
1970
+ "keys": "semantic",
1971
+ "style": "long",
1972
+ "model": "fp32",
1973
+ "texts": 60,
1974
+ "delta": -0.24444444444444446,
1975
+ "ci95": [
1976
+ -0.34458333333333335,
1977
+ -0.14444444444444446
1978
+ ]
1979
+ },
1980
+ {
1981
+ "dataset": "snli",
1982
+ "keys": "semantic",
1983
+ "style": "long",
1984
+ "model": "int8",
1985
+ "texts": 60,
1986
+ "delta": -0.18333333333333332,
1987
+ "ci95": [
1988
+ -0.2833333333333333,
1989
+ -0.08888888888888889
1990
+ ]
1991
+ },
1992
+ {
1993
+ "dataset": "snli",
1994
+ "keys": "semantic",
1995
+ "style": "long_named",
1996
+ "model": "fp32",
1997
+ "texts": 60,
1998
+ "delta": -0.2944444444444444,
1999
+ "ci95": [
2000
+ -0.40555555555555556,
2001
+ -0.1833333333333334
2002
+ ]
2003
+ },
2004
+ {
2005
+ "dataset": "snli",
2006
+ "keys": "semantic",
2007
+ "style": "long_named",
2008
+ "model": "int8",
2009
+ "texts": 60,
2010
+ "delta": -0.2611111111111111,
2011
+ "ci95": [
2012
+ -0.3722222222222223,
2013
+ -0.15555555555555556
2014
+ ]
2015
+ }
2016
+ ],
2017
+ "quantization": [
2018
+ {
2019
+ "dataset": "ag_news",
2020
+ "keys": "opaque",
2021
+ "style": "fixed",
2022
+ "flip_rate": 0.0125,
2023
+ "mean_total_variation": 0.024744551112909283,
2024
+ "max_total_variation": 0.18720267309731498
2025
+ },
2026
+ {
2027
+ "dataset": "ag_news",
2028
+ "keys": "opaque",
2029
+ "style": "short",
2030
+ "flip_rate": 0.025,
2031
+ "mean_total_variation": 0.05402983263895219,
2032
+ "max_total_variation": 0.3253621078860362
2033
+ },
2034
+ {
2035
+ "dataset": "ag_news",
2036
+ "keys": "opaque",
2037
+ "style": "long",
2038
+ "flip_rate": 0.07916666666666666,
2039
+ "mean_total_variation": 0.08043902622275094,
2040
+ "max_total_variation": 0.29786696594217227
2041
+ },
2042
+ {
2043
+ "dataset": "ag_news",
2044
+ "keys": "opaque",
2045
+ "style": "long_named",
2046
+ "flip_rate": 0.05416666666666667,
2047
+ "mean_total_variation": 0.07193859290985224,
2048
+ "max_total_variation": 0.2695192629062798
2049
+ },
2050
+ {
2051
+ "dataset": "ag_news",
2052
+ "keys": "semantic",
2053
+ "style": "fixed",
2054
+ "flip_rate": 0.025,
2055
+ "mean_total_variation": 0.0325915520093269,
2056
+ "max_total_variation": 0.25381608388696264
2057
+ },
2058
+ {
2059
+ "dataset": "ag_news",
2060
+ "keys": "semantic",
2061
+ "style": "short",
2062
+ "flip_rate": 0.020833333333333332,
2063
+ "mean_total_variation": 0.054007280016479024,
2064
+ "max_total_variation": 0.24714846232905585
2065
+ },
2066
+ {
2067
+ "dataset": "ag_news",
2068
+ "keys": "semantic",
2069
+ "style": "long",
2070
+ "flip_rate": 0.058333333333333334,
2071
+ "mean_total_variation": 0.07145547211515127,
2072
+ "max_total_variation": 0.3291973613101394
2073
+ },
2074
+ {
2075
+ "dataset": "ag_news",
2076
+ "keys": "semantic",
2077
+ "style": "long_named",
2078
+ "flip_rate": 0.05,
2079
+ "mean_total_variation": 0.07524021821331758,
2080
+ "max_total_variation": 0.20842211509776506
2081
+ },
2082
+ {
2083
+ "dataset": "snli",
2084
+ "keys": "opaque",
2085
+ "style": "fixed",
2086
+ "flip_rate": 0.03333333333333333,
2087
+ "mean_total_variation": 0.08573770352915598,
2088
+ "max_total_variation": 0.25184783845498604
2089
+ },
2090
+ {
2091
+ "dataset": "snli",
2092
+ "keys": "opaque",
2093
+ "style": "short",
2094
+ "flip_rate": 0.25555555555555554,
2095
+ "mean_total_variation": 0.051259924176761874,
2096
+ "max_total_variation": 0.19821004365653805
2097
+ },
2098
+ {
2099
+ "dataset": "snli",
2100
+ "keys": "opaque",
2101
+ "style": "long",
2102
+ "flip_rate": 0.17777777777777778,
2103
+ "mean_total_variation": 0.040942129139137515,
2104
+ "max_total_variation": 0.16281755752157304
2105
+ },
2106
+ {
2107
+ "dataset": "snli",
2108
+ "keys": "opaque",
2109
+ "style": "long_named",
2110
+ "flip_rate": 0.28888888888888886,
2111
+ "mean_total_variation": 0.03427239545958374,
2112
+ "max_total_variation": 0.18796492410460625
2113
+ },
2114
+ {
2115
+ "dataset": "snli",
2116
+ "keys": "semantic",
2117
+ "style": "fixed",
2118
+ "flip_rate": 0.07222222222222222,
2119
+ "mean_total_variation": 0.14792474831060787,
2120
+ "max_total_variation": 0.31995717234851995
2121
+ },
2122
+ {
2123
+ "dataset": "snli",
2124
+ "keys": "semantic",
2125
+ "style": "short",
2126
+ "flip_rate": 0.15555555555555556,
2127
+ "mean_total_variation": 0.04652275458967452,
2128
+ "max_total_variation": 0.1480863505686345
2129
+ },
2130
+ {
2131
+ "dataset": "snli",
2132
+ "keys": "semantic",
2133
+ "style": "long",
2134
+ "flip_rate": 0.18333333333333332,
2135
+ "mean_total_variation": 0.029969332447007797,
2136
+ "max_total_variation": 0.08305757636515404
2137
+ },
2138
+ {
2139
+ "dataset": "snli",
2140
+ "keys": "semantic",
2141
+ "style": "long_named",
2142
+ "flip_rate": 0.15555555555555556,
2143
+ "mean_total_variation": 0.037899451248389115,
2144
+ "max_total_variation": 0.10310639855638526
2145
+ }
2146
+ ],
2147
+ "limitations": [
2148
+ "Development validation already used for checkpoint selection",
2149
+ "Only AG News and SNLI choice tasks",
2150
+ "One alternative wording set per style",
2151
+ "No score/noul or unseen-task conclusions",
2152
+ "No weight changes, no GPU rental, no COPA evaluation"
2153
+ ]
2154
+ }
checkpoints/control-a/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1da45906bfc7f513867875c5c5902a4909593f949d623b1eda4c25051cd2c53e
3
+ size 152909884
checkpoints/control-a/training.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "trained": true,
3
+ "quality_validated": false,
4
+ "arm": "A",
5
+ "steps": 5048,
6
+ "selection": "terminal checkpoint after exactly epoch 2, identically for A and B",
7
+ "start_sha256": "5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008",
8
+ "protocol_sha256": "143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366",
9
+ "shared_cache_sha256": "2857aaa26b592d6a2add814e9764b841ca1cbe43479c9c085d6f56d9efb1843a",
10
+ "shared_schedule_sha256": "d495a21cc69ddc56bcaea92c0cb4db020f9120814e5653456c166fe093677896",
11
+ "seed": 42,
12
+ "bf16": true,
13
+ "elapsed_seconds": 304.6381041610148
14
+ }
checkpoints/experimental-b/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7dfc87cdeeb3b6885d54fce02beea64f55d7d93679ed1cc9850c533c3888e36c
3
+ size 152909884
checkpoints/experimental-b/training.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "trained": true,
3
+ "quality_validated": false,
4
+ "arm": "B",
5
+ "steps": 5048,
6
+ "selection": "terminal checkpoint after exactly epoch 2, identically for A and B",
7
+ "start_sha256": "5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008",
8
+ "protocol_sha256": "143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366",
9
+ "shared_cache_sha256": "2857aaa26b592d6a2add814e9764b841ca1cbe43479c9c085d6f56d9efb1843a",
10
+ "shared_schedule_sha256": "d495a21cc69ddc56bcaea92c0cb4db020f9120814e5653456c166fe093677896",
11
+ "seed": 42,
12
+ "bf16": true,
13
+ "elapsed_seconds": 288.4059911170043
14
+ }
checkpoints/original/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008
3
+ size 152909884
checkpoints/original/training.json ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "trained": true,
3
+ "smoke_test": false,
4
+ "quality_validated": false,
5
+ "base_model": "google/bert_uncased_L-6_H-512_A-8",
6
+ "base_revision": "dd53ec6ca9d05e0a91b309c4e137f31988888071",
7
+ "seed": 42,
8
+ "best_epoch": 6,
9
+ "selection": "validation ground-truth accuracy; teacher KL as tiebreaker",
10
+ "train_sha256": "9f1e076aedb2bb9f9bfd353933d7af863a0943dd681660ff4856b16bec5b8e2b",
11
+ "validation_sha256": "8cfabd613dde690e6bbf8092132f0100ecbb1041ec996bfa1de9dd6fe9420e49",
12
+ "hyperparameters": {
13
+ "epochs": 8,
14
+ "batch_size": 32,
15
+ "encoder_learning_rate": 2e-05,
16
+ "head_learning_rate": 0.0001,
17
+ "label_weight": 2.0,
18
+ "bf16_training": true
19
+ },
20
+ "elapsed_seconds": 1027.408421811997,
21
+ "training_rows": 80758,
22
+ "validation_rows": 2000,
23
+ "truncated_training_states": 0,
24
+ "teacher_sources": [
25
+ "convaiinnovations/laya"
26
+ ],
27
+ "history": [
28
+ {
29
+ "rows": 2000,
30
+ "teacher_KL": 0.4694688792228699,
31
+ "teacher_agreement": 0.573,
32
+ "labelled_rows": 2000,
33
+ "ground_truth_accuracy": 0.62,
34
+ "epoch": 1
35
+ },
36
+ {
37
+ "rows": 2000,
38
+ "teacher_KL": 0.4274449801445007,
39
+ "teacher_agreement": 0.6015,
40
+ "labelled_rows": 2000,
41
+ "ground_truth_accuracy": 0.683,
42
+ "epoch": 2
43
+ },
44
+ {
45
+ "rows": 2000,
46
+ "teacher_KL": 0.4418224000930786,
47
+ "teacher_agreement": 0.636,
48
+ "labelled_rows": 2000,
49
+ "ground_truth_accuracy": 0.7365,
50
+ "epoch": 3
51
+ },
52
+ {
53
+ "rows": 2000,
54
+ "teacher_KL": 0.4513157923221588,
55
+ "teacher_agreement": 0.6375,
56
+ "labelled_rows": 2000,
57
+ "ground_truth_accuracy": 0.734,
58
+ "epoch": 4
59
+ },
60
+ {
61
+ "rows": 2000,
62
+ "teacher_KL": 0.49970576214790347,
63
+ "teacher_agreement": 0.6315,
64
+ "labelled_rows": 2000,
65
+ "ground_truth_accuracy": 0.75,
66
+ "epoch": 5
67
+ },
68
+ {
69
+ "rows": 2000,
70
+ "teacher_KL": 0.46601298499107363,
71
+ "teacher_agreement": 0.647,
72
+ "labelled_rows": 2000,
73
+ "ground_truth_accuracy": 0.7595,
74
+ "epoch": 6
75
+ },
76
+ {
77
+ "rows": 2000,
78
+ "teacher_KL": 0.5017643827199936,
79
+ "teacher_agreement": 0.649,
80
+ "labelled_rows": 2000,
81
+ "ground_truth_accuracy": 0.759,
82
+ "epoch": 7
83
+ },
84
+ {
85
+ "rows": 2000,
86
+ "teacher_KL": 0.5062610116004944,
87
+ "teacher_agreement": 0.649,
88
+ "labelled_rows": 2000,
89
+ "ground_truth_accuracy": 0.759,
90
+ "epoch": 8
91
+ }
92
+ ]
93
+ }
examples/example-canonical-request.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "state": "The tennis player won the tournament after defeating the defending champion in the final match.",
3
+ "questions": {
4
+ "topic": {
5
+ "type": "choice",
6
+ "instructions": "Choose the topic that best describes this news item.",
7
+ "criteria": {
8
+ "world": "World",
9
+ "sports": "Sports",
10
+ "business": "Business",
11
+ "science": "Sci/Tech"
12
+ }
13
+ }
14
+ }
15
+ }
examples/example-news-request.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "state": "The tennis player won the tournament after defeating the defending champion in the final match.",
3
+ "questions": {
4
+ "topic": {
5
+ "type": "choice",
6
+ "instructions": "Choose the topic that best describes this news item.",
7
+ "criteria": {
8
+ "world": "World: international events, politics and public affairs",
9
+ "sports": "Sports: matches, athletes and competitions",
10
+ "business": "Business: companies, markets and the economy",
11
+ "science": "Science and technology: research, computing and inventions"
12
+ }
13
+ }
14
+ }
15
+ }
experiment-status.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "status": "experimental_not_promoted",
3
+ "subject_variant": "models/experimental-b",
4
+ "trained": true,
5
+ "quality_validated": false,
6
+ "dev_passed": false,
7
+ "final_evaluated": false,
8
+ "historical_test_3000_evaluated_for_these_weights": false,
9
+ "copa_evaluated_for_these_weights": false,
10
+ "model_payload_bytes": 87155068,
11
+ "protocol_sha256": "143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366",
12
+ "failed_gate": {
13
+ "dataset": "snli",
14
+ "precision": "int8",
15
+ "metric": "fraction of text/style pairs with changing canonical prediction across cyclic rotations",
16
+ "A": 0.5801282051282052,
17
+ "B": 0.33653846153846156,
18
+ "required_B_max": 0.2900641025641026,
19
+ "A_unstable_cells": 181,
20
+ "B_unstable_cells": 105,
21
+ "total_cells": 312,
22
+ "maximum_allowed_integer_count": 90
23
+ },
24
+ "evidence": "benchmarks/ab/dev-report.json",
25
+ "limitations": [
26
+ "Positive gains on close reformulations only; general decision reliability not established.",
27
+ "Single seed (42); bootstrap intervals do not measure training variance.",
28
+ "DEV consumed; no post-result tuning or FINAL evaluation.",
29
+ "Fewer FP32/INT8 flips do not prove lower accuracy loss from quantization.",
30
+ "CPU compatibility and speed beyond Linux x86-64 i7-1260P not validated."
31
+ ]
32
+ }
licenses/Apache-2.0.txt ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
models/control-a/manifest.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "BERT 6x512 + 1 decision layer + option-marker scorer",
3
+ "parameters": 38223873,
4
+ "base_model": "google/bert_uncased_L-6_H-512_A-8",
5
+ "language": "en",
6
+ "max_sequence_length": 512,
7
+ "max_options": 20,
8
+ "question_types": [
9
+ "choice",
10
+ "score",
11
+ "noul"
12
+ ],
13
+ "quantization": "dynamic INT8 linear weights, per-channel, reduce_range=True; FP32 embeddings",
14
+ "opset": 18,
15
+ "trained": true,
16
+ "quality_validated": false,
17
+ "calibrated": false,
18
+ "provenance": {
19
+ "trained": true,
20
+ "quality_validated": false,
21
+ "arm": "A",
22
+ "steps": 5048,
23
+ "selection": "terminal checkpoint after exactly epoch 2, identically for A and B",
24
+ "start_sha256": "5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008",
25
+ "protocol_sha256": "143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366",
26
+ "shared_cache_sha256": "2857aaa26b592d6a2add814e9764b841ca1cbe43479c9c085d6f56d9efb1843a",
27
+ "shared_schedule_sha256": "d495a21cc69ddc56bcaea92c0cb4db020f9120814e5653456c166fe093677896",
28
+ "seed": 42,
29
+ "bf16": true,
30
+ "elapsed_seconds": 304.6381041610148
31
+ }
32
+ }
models/control-a/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30c633d3bd6742714f3198c5e6d3176c05b312e967c6da2523ad6f6ff25e43b6
3
+ size 86443598
models/control-a/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
models/experimental-b/manifest.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "BERT 6x512 + 1 decision layer + option-marker scorer",
3
+ "parameters": 38223873,
4
+ "base_model": "google/bert_uncased_L-6_H-512_A-8",
5
+ "language": "en",
6
+ "max_sequence_length": 512,
7
+ "max_options": 20,
8
+ "question_types": [
9
+ "choice",
10
+ "score",
11
+ "noul"
12
+ ],
13
+ "quantization": "dynamic INT8 linear weights, per-channel, reduce_range=True; FP32 embeddings",
14
+ "opset": 18,
15
+ "trained": true,
16
+ "quality_validated": false,
17
+ "calibrated": false,
18
+ "provenance": {
19
+ "trained": true,
20
+ "quality_validated": false,
21
+ "arm": "B",
22
+ "steps": 5048,
23
+ "selection": "terminal checkpoint after exactly epoch 2, identically for A and B",
24
+ "start_sha256": "5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008",
25
+ "protocol_sha256": "143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366",
26
+ "shared_cache_sha256": "2857aaa26b592d6a2add814e9764b841ca1cbe43479c9c085d6f56d9efb1843a",
27
+ "shared_schedule_sha256": "d495a21cc69ddc56bcaea92c0cb4db020f9120814e5653456c166fe093677896",
28
+ "seed": 42,
29
+ "bf16": true,
30
+ "elapsed_seconds": 288.4059911170043
31
+ }
32
+ }
models/experimental-b/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0aa20e2a2b2e2b054c4db668b98452362ce58968f24645a9f0f07543c0e1e31
3
+ size 86443598
models/experimental-b/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
models/original/manifest.json ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architecture": "BERT 6x512 + 1 decision layer + option-marker scorer",
3
+ "parameters": 38223873,
4
+ "base_model": "google/bert_uncased_L-6_H-512_A-8",
5
+ "language": "en",
6
+ "max_sequence_length": 512,
7
+ "max_options": 20,
8
+ "question_types": [
9
+ "choice",
10
+ "score",
11
+ "noul"
12
+ ],
13
+ "quantization": "dynamic INT8 linear weights, per-channel, reduce_range=True; FP32 embeddings",
14
+ "opset": 18,
15
+ "trained": true,
16
+ "quality_validated": false,
17
+ "calibrated": false,
18
+ "provenance": {
19
+ "trained": true,
20
+ "smoke_test": false,
21
+ "quality_validated": false,
22
+ "base_model": "google/bert_uncased_L-6_H-512_A-8",
23
+ "base_revision": "dd53ec6ca9d05e0a91b309c4e137f31988888071",
24
+ "seed": 42,
25
+ "best_epoch": 6,
26
+ "selection": "validation ground-truth accuracy; teacher KL as tiebreaker",
27
+ "train_sha256": "9f1e076aedb2bb9f9bfd353933d7af863a0943dd681660ff4856b16bec5b8e2b",
28
+ "validation_sha256": "8cfabd613dde690e6bbf8092132f0100ecbb1041ec996bfa1de9dd6fe9420e49",
29
+ "hyperparameters": {
30
+ "epochs": 8,
31
+ "batch_size": 32,
32
+ "encoder_learning_rate": 2e-05,
33
+ "head_learning_rate": 0.0001,
34
+ "label_weight": 2.0,
35
+ "bf16_training": true
36
+ },
37
+ "elapsed_seconds": 1027.408421811997,
38
+ "training_rows": 80758,
39
+ "validation_rows": 2000,
40
+ "truncated_training_states": 0,
41
+ "teacher_sources": [
42
+ "convaiinnovations/laya"
43
+ ],
44
+ "history": [
45
+ {
46
+ "rows": 2000,
47
+ "teacher_KL": 0.4694688792228699,
48
+ "teacher_agreement": 0.573,
49
+ "labelled_rows": 2000,
50
+ "ground_truth_accuracy": 0.62,
51
+ "epoch": 1
52
+ },
53
+ {
54
+ "rows": 2000,
55
+ "teacher_KL": 0.4274449801445007,
56
+ "teacher_agreement": 0.6015,
57
+ "labelled_rows": 2000,
58
+ "ground_truth_accuracy": 0.683,
59
+ "epoch": 2
60
+ },
61
+ {
62
+ "rows": 2000,
63
+ "teacher_KL": 0.4418224000930786,
64
+ "teacher_agreement": 0.636,
65
+ "labelled_rows": 2000,
66
+ "ground_truth_accuracy": 0.7365,
67
+ "epoch": 3
68
+ },
69
+ {
70
+ "rows": 2000,
71
+ "teacher_KL": 0.4513157923221588,
72
+ "teacher_agreement": 0.6375,
73
+ "labelled_rows": 2000,
74
+ "ground_truth_accuracy": 0.734,
75
+ "epoch": 4
76
+ },
77
+ {
78
+ "rows": 2000,
79
+ "teacher_KL": 0.49970576214790347,
80
+ "teacher_agreement": 0.6315,
81
+ "labelled_rows": 2000,
82
+ "ground_truth_accuracy": 0.75,
83
+ "epoch": 5
84
+ },
85
+ {
86
+ "rows": 2000,
87
+ "teacher_KL": 0.46601298499107363,
88
+ "teacher_agreement": 0.647,
89
+ "labelled_rows": 2000,
90
+ "ground_truth_accuracy": 0.7595,
91
+ "epoch": 6
92
+ },
93
+ {
94
+ "rows": 2000,
95
+ "teacher_KL": 0.5017643827199936,
96
+ "teacher_agreement": 0.649,
97
+ "labelled_rows": 2000,
98
+ "ground_truth_accuracy": 0.759,
99
+ "epoch": 7
100
+ },
101
+ {
102
+ "rows": 2000,
103
+ "teacher_KL": 0.5062610116004944,
104
+ "teacher_agreement": 0.649,
105
+ "labelled_rows": 2000,
106
+ "ground_truth_accuracy": 0.759,
107
+ "epoch": 8
108
+ }
109
+ ]
110
+ }
111
+ }
models/original/model.int8.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18b45a1a7979c4f98e93a4521bb59d0b1690c898670b44d484346b4849ab4fda
3
+ size 86443598
models/original/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
requirements-runtime.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ onnxruntime==1.24.4
2
+ numpy>=1.26,<3
3
+ tokenizers>=0.22,<0.23
requirements-stats.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ numpy==2.5.3
research/corpus-manifest.json ADDED
The diff for this file is too large to render. See raw diff
 
research/exports/control-a.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "status": "trained_export_requires_quality_evaluation",
3
+ "parameters": 38223873,
4
+ "fp32_onnx_bytes": 153022850,
5
+ "int8_onnx_bytes": 86443598,
6
+ "tokenizer_bytes": 710348,
7
+ "payload_bytes": 87155068,
8
+ "payload_MB_decimal": 87.155068,
9
+ "payload_MiB_binary": 83.11754989624023,
10
+ "fits_80_to_90_MB": true,
11
+ "checks": [
12
+ {
13
+ "batch": 1,
14
+ "sequence": 24,
15
+ "options": 2,
16
+ "fp32_max_logit_error": 1.3709068298339844e-06,
17
+ "int8_max_probability_difference": 0.03501194715499878
18
+ },
19
+ {
20
+ "batch": 3,
21
+ "sequence": 96,
22
+ "options": 5,
23
+ "fp32_max_logit_error": 2.5033950805664062e-06,
24
+ "int8_max_probability_difference": 0.030787497758865356
25
+ },
26
+ {
27
+ "batch": 1,
28
+ "sequence": 256,
29
+ "options": 10,
30
+ "fp32_max_logit_error": 2.682209014892578e-06,
31
+ "int8_max_probability_difference": 0.014649853110313416
32
+ },
33
+ {
34
+ "batch": 1,
35
+ "sequence": 512,
36
+ "options": 20,
37
+ "fp32_max_logit_error": 1.862645149230957e-06,
38
+ "int8_max_probability_difference": 0.04665376618504524
39
+ }
40
+ ],
41
+ "limitations": [
42
+ "Checks validate export mechanics, not English decision quality.",
43
+ "Payload excludes the runtime, Python, temporary training files and RAM.",
44
+ "CPU portability beyond the tested machine requires separate validation."
45
+ ]
46
+ }
research/exports/experimental-b.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "status": "trained_export_requires_quality_evaluation",
3
+ "parameters": 38223873,
4
+ "fp32_onnx_bytes": 153022850,
5
+ "int8_onnx_bytes": 86443598,
6
+ "tokenizer_bytes": 710348,
7
+ "payload_bytes": 87155068,
8
+ "payload_MB_decimal": 87.155068,
9
+ "payload_MiB_binary": 83.11754989624023,
10
+ "fits_80_to_90_MB": true,
11
+ "checks": [
12
+ {
13
+ "batch": 1,
14
+ "sequence": 24,
15
+ "options": 2,
16
+ "fp32_max_logit_error": 4.76837158203125e-07,
17
+ "int8_max_probability_difference": 0.006500035524368286
18
+ },
19
+ {
20
+ "batch": 3,
21
+ "sequence": 96,
22
+ "options": 5,
23
+ "fp32_max_logit_error": 3.159046173095703e-06,
24
+ "int8_max_probability_difference": 0.029584228992462158
25
+ },
26
+ {
27
+ "batch": 1,
28
+ "sequence": 256,
29
+ "options": 10,
30
+ "fp32_max_logit_error": 3.7550926208496094e-06,
31
+ "int8_max_probability_difference": 0.010657772421836853
32
+ },
33
+ {
34
+ "batch": 1,
35
+ "sequence": 512,
36
+ "options": 20,
37
+ "fp32_max_logit_error": 1.9669532775878906e-06,
38
+ "int8_max_probability_difference": 0.040227651596069336
39
+ }
40
+ ],
41
+ "limitations": [
42
+ "Checks validate export mechanics, not English decision quality.",
43
+ "Payload excludes the runtime, Python, temporary training files and RAM.",
44
+ "CPU portability beyond the tested machine requires separate validation."
45
+ ]
46
+ }
research/original-selection.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "selected": "refined",
3
+ "criterion": "validation ground-truth accuracy; teacher KL as tiebreaker",
4
+ "same_holdout_input_sha256_verified": true,
5
+ "holdout_input_sha256": {
6
+ "validation": "3e2840cd09a2372e812dbc8f37904abf31dff4c2a74c09f5aec00b9c3bc2e1ce",
7
+ "test": "47cc633fd7e1ae38a52c271d2ca36ded1d9002e9a7f84a62b1dc7b3c1adf3cb9",
8
+ "ood": "cdad1edf8d687786bfaba10c0d3dfebb8216f94dba26afcb92d4a0699d8eac15"
9
+ },
10
+ "candidates": {
11
+ "baseline": {
12
+ "training_rows": 24000,
13
+ "best_epoch": 4,
14
+ "validation_accuracy": 0.627,
15
+ "teacher_KL": 0.43756801056861877
16
+ },
17
+ "refined": {
18
+ "training_rows": 80758,
19
+ "best_epoch": 6,
20
+ "validation_accuracy": 0.7595,
21
+ "teacher_KL": 0.46601298499107363
22
+ }
23
+ },
24
+ "development_limitations": [
25
+ "First-pass tests were inspected before increasing the training data; this is not a fully blind end-to-end benchmark.",
26
+ "Checkpoint and run selection use validation, never test or OOD accuracy.",
27
+ "All COPA data are excluded from fitting and checkpoint selection."
28
+ ]
29
+ }
research/references.json ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "consulted_on": "2026-09-26",
3
+ "scope": "Primary-source reading for a design review, not a reproduction of published model benchmarks.",
4
+ "sources": [
5
+ {
6
+ "title": "GLiClass: Generalist Lightweight Model for Sequence Classification Tasks",
7
+ "authors": "Ihor Stepanov et al.",
8
+ "year": 2025,
9
+ "urls": [
10
+ "https://arxiv.org/html/2508.07662v1",
11
+ "https://huggingface.co/api/papers/2508.07662",
12
+ "https://github.com/Knowledgator/GLiClass"
13
+ ],
14
+ "verified_sections": [
15
+ "Abstract",
16
+ "Architecture: scoring text and label representations",
17
+ "Training data: logic/NLI and text-length/label-density streams",
18
+ "Training framework"
19
+ ],
20
+ "findings": [
21
+ "The paper describes pooled text and label representations scored using a dot product or a learned scorer.",
22
+ "The training description includes logic/NLI examples and deliberate variation of text length and label density.",
23
+ "These are possible design directions, not evidence that changing our 38M-parameter model will improve its generalization.",
24
+ "Dataset grouping before augmentation remains necessary in our own protocol; do not copy a random split after duplication."
25
+ ]
26
+ },
27
+ {
28
+ "title": "GLiClass small v1.0 model card and configuration",
29
+ "urls": [
30
+ "https://huggingface.co/knowledgator/gliclass-small-v1.0",
31
+ "https://huggingface.co/knowledgator/gliclass-small-v1.0/raw/main/config.json"
32
+ ],
33
+ "verified_facts": {
34
+ "card_parameter_count": 144000000,
35
+ "encoder_type": "deberta-v2",
36
+ "hidden_size": 768,
37
+ "layers": 6,
38
+ "vocabulary": 128003,
39
+ "word_embedding_parameters": 98306304
40
+ },
41
+ "findings": [
42
+ "The card reports Apache-2.0 and synthetic training data; this does not resolve the licenses of our current training datasets.",
43
+ "The adjective small does not imply an 80–90 MB INT8 artifact: this checkpoint's word embeddings alone require about 98.3 MB at one byte per parameter, before scales and the rest of the network.",
44
+ "No GLiClass weights were downloaded, trained, or benchmarked during this review."
45
+ ]
46
+ },
47
+ {
48
+ "title": "Multitask Prompted Training Enables Zero-Shot Task Generalization",
49
+ "authors": "Victor Sanh et al.",
50
+ "year": 2021,
51
+ "urls": [
52
+ "https://huggingface.co/papers/2110.08207",
53
+ "https://huggingface.co/api/papers/2110.08207"
54
+ ],
55
+ "verified_sections": [
56
+ "Title, publication metadata and abstract"
57
+ ],
58
+ "findings": [
59
+ "The abstract describes explicit multitask learning with diverse prompt formulations and evaluation on fully held-out tasks.",
60
+ "This motivates a task-held-out evaluation protocol; it does not predict a score for our compact encoder, whose architecture and scale differ.",
61
+ "Only the abstract was inspected for this source, not a full reproduction of its experiments."
62
+ ]
63
+ },
64
+ {
65
+ "title": "ONNX Runtime — Quantize ONNX models",
66
+ "urls": [
67
+ "https://onnxruntime.ai/docs/performance/model-optimizations/quantization.html"
68
+ ],
69
+ "verified_sections": [
70
+ "Quantization debugging",
71
+ "Dynamic versus static quantization",
72
+ "Data type selection",
73
+ "Reduce-range and per-channel"
74
+ ],
75
+ "findings": [
76
+ "Quantization can harm accuracy; comparing weights and activations can help localize errors and identify tensors to keep unquantized.",
77
+ "The documentation recommends dynamic quantization in general for transformers.",
78
+ "The current model already uses per-channel quantization and reduce_range=True.",
79
+ "Small aggregate accuracy changes do not establish local parity, probability calibration, or portability across every CPU."
80
+ ]
81
+ }
82
+ ],
83
+ "failed_research_routes": [
84
+ "Both Hugging Face paper_search connector calls returned 'Tool paper_search not found'. Research continued through primary-source HTTP requests.",
85
+ "An initial HTML parsing attempt required an unavailable bs4 module; the successful read used Python standard-library HTML cleanup without installing dependencies."
86
+ ]
87
+ }
research/runtime-references-checked.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "url": "https://raw.githubusercontent.com/pytorch/pytorch/v2.8.0/docs/source/notes/randomness.rst",
4
+ "checked_at_utc": "2026-09-26T11:33:44.146287+00:00",
5
+ "snippets": [
6
+ "_reproducibility: Reproducibility =============== Completely reproducible results are not guaranteed across PyTorch releases, individual commits, or different platforms. Furthermore, results may not be reproducible between CPU and GPU executions, even when using identical seeds. However, there are some steps you can take to limit the number of sources of nondeterministic behavior for a specific platform, device, and PyTorch release. First, you can control sources of randomness",
7
+ "e between CPU and GPU executions, even when using identical seeds. However, there are some steps you can take to limit the number of sources of nondeterministic behavior for a specific platform, device, and PyTorch release. First, you can control sources of randomness that can cause multiple executions of your application to behave differently. Second, you can configure PyTorch to avoid using nondeterministic algorithms for some operations, so that multiple cal"
8
+ ]
9
+ },
10
+ {
11
+ "url": "https://onnxruntime.ai/docs/performance/model-optimizations/quantization.html",
12
+ "checked_at_utc": "2026-09-26T11:33:45.102559+00:00",
13
+ "snippets": [
14
+ "efer to the Method selection section. When to use reduce-range and per-channel quantization? Reduce-range will quantize the weights to 7 bits. It is designed for the U8S8 format on AVX2 and AVX512 (non-VNNI) machines to mitigate saturation issues . This is not needed on machines supporting VNNI. Per-channel quantization can improve the accuracy for models whose weight ranges are large. Try it if the accuracy loss is large. On AVX2 and AVX512 machines, you wi",
15
+ " 0 uniquely after quantization, it will result in accuracy errors. ONNX quantization representation format There are two ways to represent quantized ONNX models: Operator-oriented (QOperator) : All the quantized operators have their own ONNX definitions, like QLinearConv, MatMulInteger and etc. Tensor-oriented (QDQ; Quantize and DeQuantize) : This format inserts DeQuantizeLinear(QuantizeLinear(tensor)) between the original operators to simulate the quant"
16
+ ]
17
+ }
18
+ ]
research/src/ab_evaluate.py ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import json
3
+ import time
4
+ from collections import defaultdict
5
+ from pathlib import Path
6
+
7
+ import numpy as np
8
+
9
+ from ab_experiment import checked_feature, family_key, file_hash, write_json, write_rows
10
+ from schema import collate, options_for, read_rows
11
+
12
+
13
+ def clustered_change(rows, value):
14
+ grouped = defaultdict(list)
15
+ for row in rows:
16
+ grouped[row["family_group"]].append(float(value(row)))
17
+ if not grouped:
18
+ raise ValueError("Empty paired comparison")
19
+ groups = [grouped[key] for key in sorted(grouped)]
20
+ sums = np.array([sum(group) for group in groups])
21
+ counts = np.array([len(group) for group in groups])
22
+ generator = np.random.default_rng(20260926)
23
+ draws = []
24
+ for offset in range(0, 10000, 500):
25
+ indices = generator.integers(0, len(groups), size=(500, len(groups)))
26
+ draws.extend((sums[indices].sum(axis=1) / counts[indices].sum(axis=1)).tolist())
27
+ return {"delta": float(sums.sum() / counts.sum()), "ci95": np.quantile(draws, [0.025, 0.975]).tolist(), "clusters": len(groups)}
28
+
29
+
30
+ def accuracy(rows, name):
31
+ return float(np.mean([row["prediction"][name] == row["canonical_label"] for row in rows]))
32
+
33
+
34
+ def confusion(rows, name):
35
+ labels = max(max(row["canonical_label"], row["prediction"][name]) for row in rows) + 1
36
+ matrix = [[0] * labels for _ in range(labels)]
37
+ for row in rows:
38
+ matrix[row["canonical_label"]][row["prediction"][name]] += 1
39
+ return matrix
40
+
41
+
42
+ def instability(rows, name):
43
+ grouped = defaultdict(set)
44
+ for row in rows:
45
+ grouped[(row["family_group"], row["style"])].add(row["prediction"][name])
46
+ return float(np.mean([len(predictions) > 1 for predictions in grouped.values()]))
47
+
48
+
49
+ def flips(row, arm):
50
+ return int(row["prediction"][arm + "_fp32"] != row["prediction"][arm + "_int8"])
51
+
52
+
53
+ def robustness_summary(rows):
54
+ summary = {"domains": {}, "passed": True}
55
+ for domain in ["ag_news", "snli"]:
56
+ subset = [row for row in rows if row["dataset"] == domain]
57
+ result = {}
58
+ for precision in ["fp32", "int8"]:
59
+ left, right = "A_" + precision, "B_" + precision
60
+ gain = clustered_change(subset, lambda row: int(row["prediction"][right] == row["canonical_label"]) - int(row["prediction"][left] == row["canonical_label"]))
61
+ order_a, order_b = instability(subset, left), instability(subset, right)
62
+ passed = gain["delta"] >= 0.10 and gain["ci95"][0] > 0 and order_b <= order_a / 2
63
+ result[precision] = {"A_accuracy": accuracy(subset, left), "B_accuracy": accuracy(subset, right),
64
+ "gain": gain, "A_order_instability": order_a, "B_order_instability": order_b, "passed": passed}
65
+ summary["passed"] &= passed
66
+ change = clustered_change(subset, lambda row: flips(row, "B") - flips(row, "A"))
67
+ result["quantization"] = {"A_flip_rate": float(np.mean([flips(row, "A") for row in subset])),
68
+ "B_flip_rate": float(np.mean([flips(row, "B") for row in subset])),
69
+ "change": change, "passed": change["ci95"][1] <= 0.02}
70
+ summary["passed"] &= result["quantization"]["passed"]
71
+ result["styles"] = {}
72
+ for style in sorted({row["style"] for row in subset}):
73
+ cell = [row for row in subset if row["style"] == style]
74
+ result["styles"][str(style)] = {
75
+ name: {"accuracy": accuracy(cell, name), "order_instability": instability(cell, name), "confusion": confusion(cell, name)}
76
+ for name in ["A_fp32", "A_int8", "B_fp32", "B_int8"]
77
+ }
78
+ summary["domains"][domain] = result
79
+ return summary
80
+
81
+
82
+ def fixed_summary(rows):
83
+ summary = {"passed": True}
84
+ for precision in ["fp32", "int8"]:
85
+ left, right = "A_" + precision, "B_" + precision
86
+ metric = lambda row: int(row["prediction"][right] == row["canonical_label"]) - int(row["prediction"][left] == row["canonical_label"])
87
+ gain = clustered_change(rows, metric)
88
+ tasks = {}
89
+ for domain in sorted({row["dataset"] for row in rows}):
90
+ subset = [row for row in rows if row["dataset"] == domain]
91
+ tasks[domain] = {"A_accuracy": accuracy(subset, left), "B_accuracy": accuracy(subset, right), "delta": float(np.mean([metric(row) for row in subset]))}
92
+ passed = gain["ci95"][0] >= -0.02 and all(task["delta"] >= -0.04 for task in tasks.values())
93
+ summary[precision] = {"A_accuracy": accuracy(rows, left), "B_accuracy": accuracy(rows, right), "gain": gain, "tasks": tasks, "passed": passed}
94
+ summary["passed"] &= passed
95
+ change = clustered_change(rows, lambda row: flips(row, "B") - flips(row, "A"))
96
+ summary["quantization"] = {"change": change, "passed": change["ci95"][1] <= 0.02}
97
+ summary["passed"] &= summary["quantization"]["passed"]
98
+ return summary
99
+
100
+
101
+ def fixed_requests(rows):
102
+ output = []
103
+ for row in rows:
104
+ question = row["questions"]["decision"]
105
+ labels, _ = options_for(question)
106
+ expected = row["expected"]["decision"]
107
+ canonical = int(expected) if question["type"] == "noul" else labels.index(str(expected))
108
+ output.append({
109
+ "request_id": row["source_group"] + "|fixed", "source_group": row["source_group"],
110
+ "family_group": row["dataset"] + ":" + family_key(row), "dataset": row["dataset"],
111
+ "state": row["state"], "question": question, "canonical_label": canonical,
112
+ "semantic_order": list(range(len(labels))), "style": "fixed", "rotation": 0,
113
+ })
114
+ return output
115
+
116
+
117
+ def infer(requests, result_directory):
118
+ import onnxruntime as ort
119
+ import torch
120
+ from safetensors.torch import load_file
121
+ from tokenizers import Tokenizer
122
+ from model import MiniDecisionModel
123
+
124
+ torch.set_num_threads(4)
125
+ tokenizer = Tokenizer.from_file(str(result_directory / "A/tokenizer.json"))
126
+ features = [checked_feature(row, tokenizer) for row in requests]
127
+ ordered = sorted(range(len(requests)), key=lambda index: len(features[index]["input_ids"]))
128
+ records = [{**row, "prediction": {}, "probabilities": {}} for row in requests]
129
+ timings = {}
130
+ for arm in ["A", "B"]:
131
+ if file_hash(result_directory / arm / "tokenizer.json") != file_hash(result_directory / "A/tokenizer.json"):
132
+ raise ValueError("A and B tokenizers differ")
133
+ model = MiniDecisionModel()
134
+ model.load_state_dict(load_file(result_directory / arm / "model.safetensors"))
135
+ model.eval()
136
+ settings = ort.SessionOptions()
137
+ settings.intra_op_num_threads = 4
138
+ settings.inter_op_num_threads = 1
139
+ session = ort.InferenceSession(str(result_directory / arm / "model/model.int8.onnx"), settings, providers=["CPUExecutionProvider"])
140
+ started = time.perf_counter()
141
+ with torch.inference_mode():
142
+ for offset in range(0, len(ordered), 8):
143
+ indices = ordered[offset:offset + 8]
144
+ arrays = collate([features[index] for index in indices])
145
+ floating = model(**{name: torch.from_numpy(value) for name, value in arrays.items()}).numpy()
146
+ quantized = session.run(None, arrays)[0]
147
+ for name, logits in [(arm + "_fp32", floating), (arm + "_int8", quantized)]:
148
+ if not np.isfinite(logits).all():
149
+ raise ValueError("Nonfinite logits")
150
+ for position, index in enumerate(indices):
151
+ order = requests[index]["semantic_order"]
152
+ values = torch.tensor(logits[position, :len(order)]).softmax(-1).numpy()
153
+ canonical = np.empty(len(order))
154
+ canonical[order] = values
155
+ records[index]["probabilities"][name] = canonical.tolist()
156
+ records[index]["prediction"][name] = int(canonical.argmax())
157
+ if offset % 800 == 0:
158
+ print(json.dumps({"evaluation_arm": arm, "requests": min(offset + 8, len(ordered)), "seconds": time.perf_counter() - started}), flush=True)
159
+ timings[arm] = time.perf_counter() - started
160
+ del model, session
161
+ return records, timings
162
+
163
+
164
+ def main():
165
+ parser = argparse.ArgumentParser()
166
+ parser.add_argument("--data", type=Path, required=True)
167
+ parser.add_argument("--results", type=Path, required=True)
168
+ parser.add_argument("--split", choices=["dev", "final"], default="dev")
169
+ arguments = parser.parse_args()
170
+ directory = arguments.data
171
+ protocol = json.loads((directory / "protocol.json").read_text())
172
+ from ab_train import PROTOCOL_SHA256
173
+ if file_hash(directory / "protocol.json") != PROTOCOL_SHA256:
174
+ raise ValueError("Frozen evaluation protocol changed")
175
+ if file_hash(directory / "validation.jsonl") != protocol["files"]["validation.jsonl"]:
176
+ raise ValueError("Fixed validation changed")
177
+ provenance = [json.loads((arguments.results / arm / "training.json").read_text()) for arm in ["A", "B"]]
178
+ for key in ["start_sha256", "protocol_sha256", "shared_cache_sha256", "shared_schedule_sha256", "seed", "steps", "selection", "bf16"]:
179
+ if provenance[0][key] != provenance[1][key]:
180
+ raise ValueError(f"A/B training provenance differs: {key}")
181
+ if provenance[0]["protocol_sha256"] != PROTOCOL_SHA256 or provenance[0]["steps"] != protocol["steps_per_arm"]:
182
+ raise ValueError("Training did not follow this protocol")
183
+ if arguments.split == "final" and not json.loads((directory / "dev-report.json").read_text())["passed"]:
184
+ raise ValueError("FINAL remains sealed because DEV did not pass")
185
+ destination = directory / f"{arguments.split}-predictions.jsonl"
186
+ if destination.exists() or (directory / f"{arguments.split}-report.json").exists():
187
+ raise FileExistsError("Evaluation already exists")
188
+ request_file = directory / f"{arguments.split}-requests.jsonl"
189
+ if file_hash(request_file) != protocol["files"][request_file.name]:
190
+ raise ValueError("Evaluation input changed")
191
+ requests = read_rows(request_file)
192
+ fixed = fixed_requests(read_rows(directory / "validation.jsonl")) if arguments.split == "dev" else []
193
+ predictions, timings = infer(requests + fixed, arguments.results)
194
+ write_rows(destination, predictions)
195
+ robust = robustness_summary(predictions[:len(requests)])
196
+ regression = fixed_summary(predictions[len(requests):]) if fixed else None
197
+ report = {
198
+ "protocol_sha256": file_hash(directory / "protocol.json"), "split": arguments.split,
199
+ "texts_per_domain": 156, "variant_requests": len(requests), "fixed_requests": len(fixed),
200
+ "passed": robust["passed"] and (regression is None or regression["passed"]),
201
+ "robustness": robust, "fixed_validation": regression, "cpu_evaluation_seconds": timings,
202
+ "prediction_sha256": file_hash(destination), "quality_validated_for_general_decisions": False,
203
+ "instability_definition": "Fraction of text/style pairs whose canonical prediction changes across cyclic rotations; average over styles",
204
+ "uncertainty": "Paired family-cluster percentile bootstrap, 10000 replicates, seed20260926; not uncertainty over training seeds",
205
+ }
206
+ write_json(directory / f"{arguments.split}-report.json", report)
207
+ print(json.dumps(report, indent=2), flush=True)
208
+
209
+
210
+ if __name__ == "__main__":
211
+ main()
research/src/ab_experiment.py ADDED
@@ -0,0 +1,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import copy
2
+ import hashlib
3
+ import json
4
+ import math
5
+ import random
6
+ import sys
7
+ from pathlib import Path
8
+
9
+ RELEASE = Path(__file__).resolve().parents[2] / "outputs/laya-mini-cpu"
10
+ if RELEASE.is_dir():
11
+ sys.path.insert(0, str(RELEASE))
12
+
13
+ import build_corpus
14
+ from schema import encode_question, normalized_probabilities, options_for
15
+
16
+ SEED = 42
17
+ TEACHER_REVISION = "55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851"
18
+ START_SHA256 = "5f3cfb2292b5ffb24a7e44e0c7dbad6d80e483bce439b02d431124b8572b4008"
19
+ DOMAINS = ("ag_news", "snli")
20
+
21
+
22
+ def file_hash(path):
23
+ with Path(path).open("rb") as handle:
24
+ return hashlib.file_digest(handle, "sha256").hexdigest()
25
+
26
+
27
+ def write_json(path, value):
28
+ with Path(path).open("x", encoding="utf-8") as handle:
29
+ json.dump(value, handle, ensure_ascii=False, indent=2)
30
+ handle.write("\n")
31
+
32
+
33
+ def write_rows(path, rows):
34
+ with Path(path).open("x", encoding="utf-8") as handle:
35
+ for row in rows:
36
+ handle.write(json.dumps(row, ensure_ascii=False, separators=(",", ":")) + "\n")
37
+
38
+
39
+ def validate_pools(pools):
40
+ if set(pools) != {"train", "dev", "final"}:
41
+ raise ValueError("Expected TRAIN/DEV/FINAL pools")
42
+ seen = set()
43
+ for split, domains in pools.items():
44
+ if set(domains) != set(DOMAINS):
45
+ raise ValueError("Missing domain")
46
+ for dataset, variants in domains.items():
47
+ if len(variants) < 2:
48
+ raise ValueError("At least two variants required per pool")
49
+ for descriptions in variants:
50
+ if len(descriptions) != len(build_corpus.CHOICES[dataset]):
51
+ raise ValueError("Incorrect class count")
52
+ for description in descriptions:
53
+ normalized = build_corpus.normalize_text(description).casefold()
54
+ if normalized in seen:
55
+ raise ValueError("Description pools must be disjoint")
56
+ seen.add(normalized)
57
+
58
+
59
+ def class_order(row, descriptions=None):
60
+ descriptions = descriptions or build_corpus.CHOICES[row["dataset"]]
61
+ question = row.get("question") or row["questions"]["decision"]
62
+ order = [list(descriptions).index(value) for value in question["criteria"].values()]
63
+ if sorted(order) != list(range(len(descriptions))):
64
+ raise ValueError("Criteria must be a class permutation")
65
+ return order
66
+
67
+
68
+ def replace_descriptions(row, descriptions):
69
+ result = copy.deepcopy(row)
70
+ criteria = result["questions"]["decision"]["criteria"]
71
+ order = class_order(row)
72
+ if len(descriptions) != len(order):
73
+ raise ValueError("Description count mismatch")
74
+ result["questions"]["decision"]["criteria"] = {
75
+ key: descriptions[semantic] for key, semantic in zip(criteria, order)
76
+ }
77
+ return result
78
+
79
+
80
+ def augmentation_groups(rows, seed):
81
+ selected = set()
82
+ for dataset in DOMAINS:
83
+ groups = [row["source_group"] for row in rows if row["dataset"] == dataset]
84
+ if len(groups) != len(set(groups)) or len(groups) % 2:
85
+ raise ValueError("Need unique even-sized domain pools for exactly 50 percent")
86
+ groups.sort(key=lambda group: build_corpus.digest(seed, "augment", group))
87
+ selected.update(groups[:len(groups) // 2])
88
+ return selected
89
+
90
+
91
+ def remap_probabilities(values, source_order, target_order):
92
+ count = len(source_order)
93
+ if sorted(source_order) != list(range(count)) or sorted(target_order) != list(range(count)):
94
+ raise ValueError("Class orders must be permutations")
95
+ probabilities = normalized_probabilities(values, count)
96
+ canonical = dict(zip(source_order, probabilities.tolist()))
97
+ return [canonical[index] for index in target_order]
98
+
99
+
100
+ def validate_cache(fixed_rows, annotated_rows):
101
+ expected = {row["source_group"]: row for row in fixed_rows}
102
+ observed = {row["source_group"]: row for row in annotated_rows}
103
+ if len(expected) != len(fixed_rows) or len(observed) != len(annotated_rows) or expected.keys() != observed.keys():
104
+ raise ValueError("Teacher cache groups differ from fixed corpus")
105
+ for group, fixed in expected.items():
106
+ cached = observed[group]
107
+ question = fixed["questions"]["decision"]
108
+ if cached["state"] != fixed["state"] or cached["question"] != question:
109
+ raise ValueError("Teacher cache does not match the fixed input")
110
+ if "label" in cached and cached["label"] != fixed["expected"]["decision"]:
111
+ raise ValueError("Teacher cache label differs")
112
+ labels, _ = options_for(question)
113
+ if options_for(cached["question"])[0] != labels:
114
+ raise ValueError("Teacher cache probability order differs from the fixed input")
115
+ normalized_probabilities(cached["probabilities"], len(labels))
116
+ return observed
117
+
118
+
119
+ def family_key(row):
120
+ text = row["state"]
121
+ if row["dataset"] == "snli":
122
+ if not text.startswith("Premise: ") or "\nHypothesis: " not in text:
123
+ raise ValueError("Invalid SNLI state")
124
+ text = text[len("Premise: "):].split("\nHypothesis: ", 1)[0]
125
+ return build_corpus.state_key(text)
126
+
127
+
128
+ def checked_feature(row, tokenizer):
129
+ question = row.get("question") or row["questions"]["decision"]
130
+ feature = encode_question(tokenizer, row["state"], question)
131
+ if feature["truncated_state"]:
132
+ raise ValueError("A/B inputs must not be truncated")
133
+ return feature
134
+
135
+
136
+ def gold_class(row):
137
+ question = row["questions"]["decision"]
138
+ labels, _ = options_for(question)
139
+ return class_order(row)[labels.index(str(row["expected"]["decision"]))]
140
+
141
+
142
+ def select_holdout(candidates, count, forbidden_families, split):
143
+ if not candidates:
144
+ raise ValueError("No candidates")
145
+ classes = len(build_corpus.CHOICES[candidates[0]["dataset"]])
146
+ if count < 1 or count % classes:
147
+ raise ValueError("Balanced selection requires a multiple of class count")
148
+ used = set(forbidden_families)
149
+ ordered = sorted(candidates, key=lambda row: build_corpus.digest(SEED, split, row["source_group"]))
150
+ selected = []
151
+ for label in range(classes):
152
+ chosen = []
153
+ for row in ordered:
154
+ family = family_key(row)
155
+ if gold_class(row) == label and family not in used:
156
+ chosen.append(row)
157
+ used.add(family)
158
+ if len(chosen) == count // classes:
159
+ break
160
+ if len(chosen) != count // classes:
161
+ raise ValueError("Insufficient disjoint families")
162
+ selected.extend(chosen)
163
+ return selected
164
+
165
+
166
+ def evaluation_requests(records, pool):
167
+ requests = []
168
+ for row in records:
169
+ order = class_order(row)
170
+ criteria = row["questions"]["decision"]["criteria"]
171
+ key_by_class = dict(zip(order, criteria))
172
+ for style, descriptions in enumerate(pool[row["dataset"]]):
173
+ for rotation in range(len(order)):
174
+ rotated = order[rotation:] + order[:rotation]
175
+ question = {**row["questions"]["decision"], "criteria": {
176
+ key_by_class[label]: descriptions[label] for label in rotated
177
+ }}
178
+ requests.append({
179
+ "request_id": f"{row['source_group']}|style{style}|{rotation}",
180
+ "source_group": row["source_group"], "family_group": family_key(row),
181
+ "dataset": row["dataset"], "state": row["state"], "question": question,
182
+ "canonical_label": gold_class(row), "label": row["expected"]["decision"],
183
+ "semantic_order": rotated, "style": style, "rotation": rotation,
184
+ })
185
+ return requests
186
+
187
+
188
+ def reserved_cost(hourly_rate, maximum_hours, down_per_gb, up_per_gb):
189
+ values = [hourly_rate, maximum_hours, down_per_gb, up_per_gb]
190
+ if not all(math.isfinite(value) and value >= 0 for value in values):
191
+ raise ValueError("Invalid cost values")
192
+ return hourly_rate * (maximum_hours + 2) + 20 * (down_per_gb + up_per_gb) + 0.2
193
+
194
+
195
+ def budget_allowed(prior_spend, reservation):
196
+ return (all(math.isfinite(value) and value >= 0 for value in [prior_spend, reservation])
197
+ and reservation <= 3 and prior_spend + reservation <= 10)
198
+
199
+
200
+ def batch_indices(lengths, batch_size, seed, epoch):
201
+ if batch_size < 1 or not lengths:
202
+ raise ValueError("Need nonempty data and positive batch size")
203
+ generator = random.Random(seed + epoch)
204
+ indices = list(range(len(lengths)))
205
+ generator.shuffle(indices)
206
+ batches = []
207
+ window = batch_size * 20
208
+ for offset in range(0, len(indices), window):
209
+ ordered = sorted(indices[offset:offset + window], key=lambda index: lengths[index])
210
+ batches.extend(ordered[start:start + batch_size] for start in range(0, len(ordered), batch_size))
211
+ generator.shuffle(batches)
212
+ return batches
research/src/ab_train.py ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import copy
3
+ import gc
4
+ import json
5
+ import math
6
+ import random
7
+ import shutil
8
+ import time
9
+ from pathlib import Path
10
+
11
+ import numpy as np
12
+ import torch
13
+ from safetensors.torch import load_file, save_file
14
+ from tokenizers import Tokenizer
15
+
16
+ from ab_experiment import (
17
+ DOMAINS, START_SHA256, TEACHER_REVISION, batch_indices, checked_feature,
18
+ class_order, file_hash, remap_probabilities, validate_cache, write_json, write_rows,
19
+ )
20
+ from model import MiniDecisionModel
21
+ from pipeline import answer_probabilities, distillation_loss, dummy_inputs, export_model, prepare_rows, training_batch
22
+ from schema import normalized_probabilities, options_for, read_rows
23
+
24
+
25
+ PROTOCOL_SHA256 = "143e0890279a6fe339b8a0cc6f394c61e9d806e9b9b1800272418716f3a5b366"
26
+
27
+
28
+ def prepare_pair(fixed, variants, cached, tokenizer, pools):
29
+ mapping = validate_cache(fixed, cached)
30
+ if len(fixed) != len(variants):
31
+ raise ValueError("A and B counts differ")
32
+ paired = {"A": [], "B": []}
33
+ for original, variant in zip(fixed, variants):
34
+ restored = copy.deepcopy(variant)
35
+ if original["dataset"] in DOMAINS:
36
+ if list(original["questions"]["decision"]["criteria"]) != list(variant["questions"]["decision"]["criteria"]):
37
+ raise ValueError("A/B changed key order")
38
+ domain = original["dataset"]
39
+ for key, semantic in zip(original["questions"]["decision"]["criteria"], class_order(original)):
40
+ allowed = {descriptions[semantic] for descriptions in pools["train"][domain]}
41
+ allowed.add(original["questions"]["decision"]["criteria"][key])
42
+ if variant["questions"]["decision"]["criteria"][key] not in allowed:
43
+ raise ValueError("Variant description is assigned to the wrong class")
44
+ restored["questions"]["decision"]["criteria"] = original["questions"]["decision"]["criteria"]
45
+ if restored != original:
46
+ raise ValueError("A/B differ beyond allowed descriptions")
47
+ target = mapping[original["source_group"]]
48
+ values = target["probabilities"]
49
+ if original["dataset"] in DOMAINS:
50
+ order = class_order(original)
51
+ values = remap_probabilities(values, order, order)
52
+ for arm, row in [("A", original), ("B", variant)]:
53
+ feature = checked_feature(row, tokenizer)
54
+ annotation = {**target, "question": row["questions"]["decision"], "probabilities": values}
55
+ prepared = prepare_rows([annotation], tokenizer)[0]
56
+ paired[arm].append((feature, prepared[1], prepared[2]))
57
+ return paired
58
+
59
+
60
+ def shared_batch(paired, indices, arm, device):
61
+ inputs, targets, labels = training_batch([paired[arm][index] for index in indices], device)
62
+ length = max(len(paired[version][index][0]["input_ids"]) for version in ["A", "B"] for index in indices)
63
+ padding = length - inputs["input_ids"].shape[1]
64
+ for name in ["input_ids", "attention_mask"]:
65
+ inputs[name] = torch.nn.functional.pad(inputs[name], (0, padding), value=0)
66
+ return inputs, targets, labels
67
+
68
+
69
+ def encode_teacher(teacher, row):
70
+ from laya.common import build_sequence
71
+
72
+ question = row["questions"]["decision"]
73
+ teacher._check_question("decision", question)
74
+ internal = {"decision": teacher._to_internal(question)}
75
+ items = teacher._encode_state(row["state"], ["decision"], internal)
76
+ full_ids, markers = build_sequence(teacher.tok, row["state"], internal["decision"], 8192, 8192)
77
+ if len(items) != 1 or items[0]["ids"] != full_ids or items[0]["markers"] != markers:
78
+ raise ValueError(f"Teacher would truncate {row['source_group']}")
79
+ return row, items, internal
80
+
81
+
82
+ @torch.inference_mode()
83
+ def teacher_batch(teacher, entries):
84
+ from laya.common import collate_items
85
+
86
+ batch = collate_items([entry[1] for entry in entries], teacher.tok.pad_token_id)
87
+ logits, actions = teacher._forward(batch)
88
+ if (teacher.device.type != "cuda" or teacher.amp_enabled
89
+ or torch.backends.cuda.matmul.allow_tf32 or torch.backends.cudnn.allow_tf32
90
+ or torch.get_float32_matmul_precision() != "highest"
91
+ or next(teacher.model.parameters()).dtype != torch.float32):
92
+ raise RuntimeError("Teacher precision/device changed")
93
+ records = []
94
+ for position, (row, items, internal) in enumerate(entries):
95
+ answer = teacher._decode_answers(logits, actions, items, ["decision"], internal, position)["decision"]
96
+ question = row["questions"]["decision"]
97
+ labels, _ = options_for(question)
98
+ values = answer_probabilities(answer, question, labels)
99
+ records.append({
100
+ "source_group": row["source_group"], "dataset": row["dataset"],
101
+ "state": row["state"], "question": question, "label": row["expected"]["decision"],
102
+ "probabilities": normalized_probabilities(values, len(labels)).tolist(),
103
+ })
104
+ return records
105
+
106
+
107
+ def remaining_seconds(deadline):
108
+ return deadline - time.time()
109
+
110
+
111
+ def make_cache(directory, deadline):
112
+ from huggingface_hub import snapshot_download
113
+ import laya
114
+
115
+ if (directory / "teacher-cache.jsonl").exists():
116
+ raise FileExistsError("Teacher cache already exists; do not regenerate")
117
+ rows = read_rows(directory / "train.jsonl")
118
+ if len({row["source_group"] for row in rows}) != len(rows):
119
+ raise ValueError("Cache needs unique row-level source groups")
120
+ location = snapshot_download("convaiinnovations/laya", revision=TEACHER_REVISION, token=False,
121
+ allow_patterns=["model.safetensors", "rl_agent_config.json", "encoder/config.json", "tokenizer/*"])
122
+ teacher_hash = file_hash(Path(location) / "model.safetensors")
123
+ if teacher_hash != "891102d372688fc2a094dac56a384bc537b87c63f21f9f3dac0be2b7cbc8d86c":
124
+ raise ValueError("Pinned teacher weights differ")
125
+ teacher = laya.load(location, device="cuda", token=False)
126
+ teacher.amp_enabled = False
127
+ teacher.dtype = torch.float32
128
+ teacher.model.float().eval()
129
+ torch.backends.cuda.matmul.allow_tf32 = False
130
+ torch.backends.cudnn.allow_tf32 = False
131
+ torch.set_float32_matmul_precision("highest")
132
+ started = time.perf_counter()
133
+ encoded = [encode_teacher(teacher, row) for row in rows]
134
+ encoded.sort(key=lambda entry: len(entry[1][0]["ids"]))
135
+ preprocessing = time.perf_counter() - started
136
+ pilot = [encoded[index] for index in np.linspace(0, len(encoded) - 1, 64, dtype=int)]
137
+ teacher_batch(teacher, pilot[:16])
138
+ torch.cuda.synchronize()
139
+ started = time.perf_counter()
140
+ results = [record for offset in range(0, len(pilot), 16) for record in teacher_batch(teacher, pilot[offset:offset + 16])]
141
+ torch.cuda.synchronize()
142
+ elapsed = time.perf_counter() - started
143
+ checks = []
144
+ covered = set()
145
+ for entry, result in zip(pilot, results):
146
+ row = entry[0]
147
+ kind = row["questions"]["decision"]["type"]
148
+ question = row["questions"]["decision"]
149
+ answer = teacher.predict(row["state"], {"decision": question})["answers"]["decision"]
150
+ labels, _ = options_for(question)
151
+ reference = normalized_probabilities(answer_probabilities(answer, question, labels), len(labels))
152
+ difference = float(np.max(np.abs(reference - result["probabilities"])))
153
+ if difference > 0.001 or int(reference.argmax()) != int(np.argmax(result["probabilities"])):
154
+ raise ValueError("Teacher batch/public mismatch")
155
+ checks.append({"type": kind, "max_probability_delta": difference})
156
+ covered.add(kind)
157
+ estimate = elapsed / len(pilot) * len(encoded) * 2
158
+ if covered != {row["questions"]["decision"]["type"] for row in rows}:
159
+ raise ValueError("Teacher pilot misses a question type")
160
+ training_estimate = json.loads((directory / "pre-cache-training-pilot.json").read_text())["both_arms_seconds_conservative"]
161
+ write_json(directory / "teacher-pilot.json", {
162
+ "teacher_revision": TEACHER_REVISION, "teacher_sha256": teacher_hash,
163
+ "precision": "FP32 CUDA, no autocast, no TF32", "pilot_rows": 64,
164
+ "pilot_seconds": elapsed, "preprocessing_seconds": preprocessing,
165
+ "conservative_cache_seconds": estimate, "public_parity": checks,
166
+ "truncated_teacher_rows": 0, "maximum_teacher_tokens": max(len(entry[1][0]["ids"]) for entry in encoded),
167
+ })
168
+ if remaining_seconds(deadline) < estimate + training_estimate + 900:
169
+ raise RuntimeError("Measured annotation throughput leaves insufficient time for both arms and collection")
170
+ started = time.perf_counter()
171
+ output_path = directory / "teacher-cache.jsonl"
172
+ with output_path.open("x") as handle:
173
+ for offset in range(0, len(encoded), 16):
174
+ if remaining_seconds(deadline) < training_estimate + 900:
175
+ raise RuntimeError("Cache time bound reached")
176
+ for record in teacher_batch(teacher, encoded[offset:offset + 16]):
177
+ handle.write(json.dumps(record, separators=(",", ":"), ensure_ascii=False) + "\n")
178
+ if offset % 4000 == 0:
179
+ handle.flush()
180
+ print(json.dumps({"cache_rows": min(offset + 16, len(encoded)), "elapsed": time.perf_counter() - started}), flush=True)
181
+ validate_cache(rows, read_rows(output_path))
182
+ write_json(directory / "teacher-cache-meta.json", {
183
+ "rows": len(rows), "fixed_input_sha256": file_hash(directory / "train.jsonl"),
184
+ "cache_sha256": file_hash(output_path), "teacher_revision": TEACHER_REVISION,
185
+ "precision": "FP32 CUDA, no autocast, no TF32", "elapsed_seconds": time.perf_counter() - started,
186
+ })
187
+
188
+
189
+ def fit(directory, checkpoint, deadline):
190
+ protocol = json.loads((directory / "protocol.json").read_text())
191
+ if file_hash(checkpoint / "model.safetensors") != START_SHA256:
192
+ raise ValueError("Wrong initial checkpoint")
193
+ if any((directory / arm).exists() for arm in ["A", "B"]):
194
+ raise FileExistsError("A/B output already exists; do not restart the experiment")
195
+ cache_meta = json.loads((directory / "teacher-cache-meta.json").read_text())
196
+ if file_hash(directory / "teacher-cache.jsonl") != cache_meta["cache_sha256"]:
197
+ raise ValueError("Teacher cache changed since verification")
198
+ fixed, variants = read_rows(directory / "train.jsonl"), read_rows(directory / "train-B.jsonl")
199
+ tokenizer = Tokenizer.from_file(str(checkpoint / "tokenizer.json"))
200
+ pools = json.loads((directory / "descriptions.json").read_text())
201
+ paired = prepare_pair(fixed, variants, read_rows(directory / "teacher-cache.jsonl"), tokenizer, pools)
202
+ lengths = [len(row[0]["input_ids"]) for row in paired["A"]]
203
+ schedules = [batch_indices(lengths, protocol["batch_size"], protocol["seed"], epoch) for epoch in range(protocol["epochs"])]
204
+ total_steps = sum(len(batches) for batches in schedules)
205
+ if total_steps != protocol["steps_per_arm"]:
206
+ raise ValueError("Actual step count differs from protocol")
207
+ write_json(directory / "batch-schedule.json", schedules)
208
+ schedule_hash = file_hash(directory / "batch-schedule.json")
209
+ use_amp = torch.cuda.is_bf16_supported()
210
+ torch.set_float32_matmul_precision("high")
211
+ for arm in ["A", "B"]:
212
+ random.seed(protocol["seed"])
213
+ np.random.seed(protocol["seed"])
214
+ torch.manual_seed(protocol["seed"])
215
+ torch.cuda.manual_seed_all(protocol["seed"])
216
+ model = MiniDecisionModel()
217
+ model.load_state_dict(load_file(checkpoint / "model.safetensors"), strict=True)
218
+ model.to("cuda").train()
219
+ optimizer = torch.optim.AdamW([
220
+ {"params": model.encoder.parameters(), "lr": protocol["encoder_learning_rate"]},
221
+ {"params": [parameter for name, parameter in model.named_parameters() if not name.startswith("encoder.")], "lr": protocol["head_learning_rate"]},
222
+ ], weight_decay=protocol["weight_decay"])
223
+ warmup = max(1, int(total_steps * protocol["warmup_fraction"]))
224
+ def multiplier(step):
225
+ return (step + 1) / warmup if step < warmup else max(0.05, (total_steps - step) / (total_steps - warmup))
226
+ scheduler = torch.optim.lr_scheduler.LambdaLR(optimizer, multiplier)
227
+ started = time.perf_counter()
228
+ steps = 0
229
+ for epoch, batches in enumerate(schedules):
230
+ for indices in batches:
231
+ if remaining_seconds(deadline) < 900:
232
+ raise RuntimeError("Training deadline preserves artifact retrieval reserve")
233
+ inputs, targets, labels = shared_batch(paired, indices, arm, "cuda")
234
+ optimizer.zero_grad(set_to_none=True)
235
+ with torch.autocast("cuda", dtype=torch.bfloat16, enabled=use_amp):
236
+ loss = distillation_loss(model(**inputs), targets, labels, protocol["label_weight"])
237
+ if not torch.isfinite(loss):
238
+ raise RuntimeError("Nonfinite training loss")
239
+ loss.backward()
240
+ torch.nn.utils.clip_grad_norm_(model.parameters(), 1.0)
241
+ optimizer.step()
242
+ scheduler.step()
243
+ steps += 1
244
+ if steps == 100 and arm == "A":
245
+ torch.cuda.synchronize()
246
+ elapsed = time.perf_counter() - started
247
+ estimated_remaining = elapsed / steps * (2 * total_steps - steps) * 1.5 + 900
248
+ write_json(directory / "training-pilot.json", {"steps": steps, "seconds": elapsed, "both_arms_remaining_seconds_conservative": estimated_remaining})
249
+ if estimated_remaining > remaining_seconds(deadline):
250
+ raise RuntimeError("Measured training throughput exceeds the guarded lease")
251
+ if steps % 200 == 0:
252
+ print(json.dumps({"arm": arm, "epoch": epoch + 1, "step": steps, "total_steps": total_steps, "loss": loss.item(), "seconds": time.perf_counter() - started}), flush=True)
253
+ output = directory / arm
254
+ output.mkdir()
255
+ save_file({name: value.detach().cpu().contiguous() for name, value in model.state_dict().items()}, output / "model.safetensors")
256
+ shutil.copyfile(checkpoint / "tokenizer.json", output / "tokenizer.json")
257
+ write_json(output / "training.json", {
258
+ "trained": True, "quality_validated": False, "arm": arm, "steps": steps,
259
+ "selection": protocol["selection"], "start_sha256": START_SHA256,
260
+ "protocol_sha256": file_hash(directory / "protocol.json"),
261
+ "shared_cache_sha256": file_hash(directory / "teacher-cache.jsonl"),
262
+ "shared_schedule_sha256": schedule_hash, "seed": protocol["seed"],
263
+ "bf16": use_amp, "elapsed_seconds": time.perf_counter() - started,
264
+ })
265
+ del model, optimizer, scheduler
266
+ gc.collect()
267
+ torch.cuda.empty_cache()
268
+
269
+
270
+ def training_pilot(directory, checkpoint):
271
+ if file_hash(checkpoint / "model.safetensors") != START_SHA256:
272
+ raise ValueError("Wrong pilot checkpoint")
273
+ torch.manual_seed(42)
274
+ torch.set_float32_matmul_precision("high")
275
+ model = MiniDecisionModel()
276
+ model.load_state_dict(load_file(checkpoint / "model.safetensors"), strict=True)
277
+ model.cuda().train()
278
+ optimizer = torch.optim.AdamW(model.parameters(), lr=2e-5)
279
+ inputs = {name: value.cuda() for name, value in dummy_inputs(32, 512, 6).items()}
280
+ targets = torch.full((32, 6), 1 / 6, device="cuda")
281
+ labels = torch.arange(32, device="cuda") % 6
282
+ started = None
283
+ for step in range(35):
284
+ if step == 5:
285
+ torch.cuda.synchronize()
286
+ started = time.perf_counter()
287
+ optimizer.zero_grad(set_to_none=True)
288
+ with torch.autocast("cuda", dtype=torch.bfloat16, enabled=torch.cuda.is_bf16_supported()):
289
+ loss = distillation_loss(model(**inputs), targets, labels, 2)
290
+ loss.backward()
291
+ torch.nn.utils.clip_grad_norm_(model.parameters(), 1)
292
+ optimizer.step()
293
+ torch.cuda.synchronize()
294
+ elapsed = time.perf_counter() - started
295
+ write_json(directory / "pre-cache-training-pilot.json", {
296
+ "steps_timed": 30, "warmup_steps": 5, "batch": 32, "sequence": 512, "options": 6,
297
+ "seconds": elapsed, "both_arms_seconds_conservative": elapsed / 30 * 10096 * 1.5,
298
+ "targets": "synthetic uniform for throughput only; no pilot weights saved or reused",
299
+ })
300
+
301
+
302
+ def main():
303
+ parser = argparse.ArgumentParser()
304
+ parser.add_argument("action", choices=["pilot", "cache", "fit", "export"])
305
+ parser.add_argument("--data", type=Path, required=True)
306
+ parser.add_argument("--checkpoint", type=Path, required=True)
307
+ parser.add_argument("--deadline", type=float, required=True)
308
+ arguments = parser.parse_args()
309
+ torch.set_num_threads(4)
310
+ protocol = json.loads((arguments.data / "protocol.json").read_text())
311
+ if file_hash(arguments.data / "protocol.json") != PROTOCOL_SHA256:
312
+ raise ValueError("Frozen protocol changed")
313
+ for name in ["train.jsonl", "train-B.jsonl", "descriptions.json"]:
314
+ if file_hash(arguments.data / name) != protocol["files"][name]:
315
+ raise ValueError(f"Frozen input changed: {name}")
316
+ if arguments.action == "pilot":
317
+ training_pilot(arguments.data, arguments.checkpoint)
318
+ elif arguments.action == "cache":
319
+ make_cache(arguments.data, arguments.deadline)
320
+ elif arguments.action == "fit":
321
+ fit(arguments.data, arguments.checkpoint, arguments.deadline)
322
+ else:
323
+ for arm in ["A", "B"]:
324
+ checkpoint = arguments.data / arm
325
+ model = MiniDecisionModel()
326
+ model.load_state_dict(load_file(checkpoint / "model.safetensors"))
327
+ provenance = json.loads((checkpoint / "training.json").read_text())
328
+ torch.manual_seed(42)
329
+ report = export_model(model, checkpoint / "model", provenance, checkpoint / "tokenizer.json")
330
+ write_json(checkpoint / "export-report.json", report)
331
+
332
+
333
+ if __name__ == "__main__":
334
+ main()
research/src/audit_robustness.py ADDED
@@ -0,0 +1,432 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import hashlib
3
+ import json
4
+ import shutil
5
+ import sys
6
+ import time
7
+ import urllib.request
8
+ from collections import defaultdict
9
+ from pathlib import Path
10
+
11
+ import numpy as np
12
+
13
+
14
+ ROOT = Path(__file__).resolve().parents[2]
15
+ RELEASE = ROOT / "outputs/laya-mini-cpu"
16
+ LAB = Path(__file__).resolve().parent
17
+ DIRECTORY = LAB / "robustness-audit"
18
+ SEED = 20260926
19
+ sys.path.insert(0, str(RELEASE))
20
+
21
+ import build_corpus
22
+ from schema import collate, encode_question, normalized_probabilities, read_rows
23
+
24
+
25
+ SEMANTIC_KEYS = {
26
+ "ag_news": ["world", "sports", "business", "science"],
27
+ "snli": ["entailment", "neutral", "contradiction"],
28
+ }
29
+ SHORT = {
30
+ "ag_news": ["world news", "sporting events", "business news", "science or technology"],
31
+ "snli": ["entailed by the premise", "not determined by the premise", "inconsistent with the premise"],
32
+ }
33
+ LONG = {
34
+ "ag_news": [
35
+ "International events, politics, diplomacy and public affairs.",
36
+ "Competitive sports, athletes, teams, tournaments and match results.",
37
+ "Companies, financial markets, trade, industries and the economy.",
38
+ "Scientific research, computing, technological products and inventions.",
39
+ ],
40
+ "snli": [
41
+ "The hypothesis must be true if the premise is true; it is supported by the stated facts.",
42
+ "The premise does not establish whether the hypothesis is true or false; either remains possible.",
43
+ "The hypothesis cannot be true if the premise is true; the two statements are incompatible.",
44
+ ],
45
+ }
46
+
47
+
48
+ def digest_file(path):
49
+ with Path(path).open("rb") as handle:
50
+ return hashlib.file_digest(handle, "sha256").hexdigest()
51
+
52
+
53
+ def write_json(path, value):
54
+ with Path(path).open("x", encoding="utf-8") as handle:
55
+ json.dump(value, handle, ensure_ascii=False, indent=2)
56
+ handle.write("\n")
57
+
58
+
59
+ def write_rows(path, rows):
60
+ with Path(path).open("x", encoding="utf-8") as handle:
61
+ for row in rows:
62
+ handle.write(json.dumps(row, ensure_ascii=False, separators=(",", ":")) + "\n")
63
+
64
+
65
+ def build_variants(record):
66
+ dataset = record["dataset"]
67
+ fixed = list(build_corpus.CHOICES[dataset])
68
+ original = record["questions"]["decision"]
69
+ base_order = [fixed.index(value) for value in original["criteria"].values()]
70
+ original_keys = {fixed.index(value): key for key, value in original["criteria"].items()}
71
+ named = [f"{name}: {description}" for name, description in
72
+ zip(build_corpus.SOURCE_BY_NAME[dataset].labels, LONG[dataset])]
73
+ styles = {"fixed": fixed, "short": SHORT[dataset], "long": LONG[dataset], "long_named": named}
74
+ variants = []
75
+ for keys in ["opaque", "semantic"]:
76
+ key_mapping = original_keys if keys == "opaque" else dict(enumerate(SEMANTIC_KEYS[dataset]))
77
+ for style, descriptions in styles.items():
78
+ for rotation in range(len(base_order)):
79
+ order = base_order[rotation:] + base_order[:rotation]
80
+ question = {**original, "criteria": {key_mapping[index]: descriptions[index] for index in order}}
81
+ variants.append({
82
+ "request_id": f"{record['source_group']}|{keys}|{style}|{rotation}",
83
+ "source_group": record["source_group"], "dataset": dataset,
84
+ "state": record["state"], "question": question,
85
+ "canonical_label": record["canonical_label"],
86
+ "label": key_mapping[record["canonical_label"]],
87
+ "semantic_order": order, "keys": keys, "style": style, "rotation": rotation,
88
+ })
89
+ return variants
90
+
91
+
92
+ def canonical_probabilities(values, semantic_order):
93
+ count = len(semantic_order)
94
+ if sorted(semantic_order) != list(range(count)):
95
+ raise ValueError("Semantic order must be a permutation")
96
+ normalized = normalized_probabilities(values, count)
97
+ canonical = np.empty(count, dtype=np.float64)
98
+ canonical[semantic_order] = normalized
99
+ return canonical.tolist()
100
+
101
+
102
+ def select_balanced(rows, dataset, count):
103
+ label_count = len(SEMANTIC_KEYS[dataset])
104
+ if count <= 0 or count % label_count:
105
+ raise ValueError("Count must be positive and divisible by the class count")
106
+ selected, families = [], set()
107
+ for label in range(label_count):
108
+ candidates = [row for row in rows if row["dataset"] == dataset and row["canonical_label"] == label]
109
+ candidates.sort(key=lambda row: build_corpus.digest(SEED, "audit", row["source_group"]))
110
+ chosen = []
111
+ for row in candidates:
112
+ if row["family_group"] not in families:
113
+ chosen.append(row)
114
+ families.add(row["family_group"])
115
+ if len(chosen) == count // label_count:
116
+ break
117
+ if len(chosen) != count // label_count:
118
+ raise ValueError("Not enough distinct families for balanced sampling")
119
+ selected.extend(chosen)
120
+ return selected
121
+
122
+
123
+ def interval(values):
124
+ values = np.asarray(values, dtype=np.float64)
125
+ if values.ndim != 1 or not len(values):
126
+ raise ValueError("Bootstrap needs nonempty text-level values")
127
+ generator = np.random.default_rng(SEED)
128
+ means = values[generator.integers(0, len(values), size=(4000, len(values)))].mean(axis=1)
129
+ return [float(value) for value in np.quantile(means, [0.025, 0.975])]
130
+
131
+
132
+ def grouped_accuracy(rows, model):
133
+ grouped = defaultdict(list)
134
+ for row in rows:
135
+ grouped[row["source_group"]].append(float(row["prediction"][model] == row["canonical_label"]))
136
+ return {group: float(np.mean(values)) for group, values in grouped.items()}
137
+
138
+
139
+ def paired_interval(reference, variant):
140
+ if not reference or set(reference) != set(variant):
141
+ raise ValueError("Paired comparisons require identical nonempty source groups")
142
+ differences = [variant[group] - reference[group] for group in sorted(reference)]
143
+ return {"texts": len(differences), "delta": float(np.mean(differences)), "ci95": interval(differences)}
144
+
145
+
146
+ def summarize_cell(rows, model):
147
+ groups = defaultdict(list)
148
+ for row in rows:
149
+ groups[row["source_group"]].append(row)
150
+ scores = grouped_accuracy(rows, model)
151
+ original = [row for row in rows if row["rotation"] == 0]
152
+ return {
153
+ "texts": len(groups), "requests": len(rows),
154
+ "accuracy": float(np.mean(list(scores.values()))),
155
+ "accuracy_ci95_text_bootstrap": interval(list(scores.values())),
156
+ "all_rotations_correct": float(np.mean([value == 1.0 for value in scores.values()])),
157
+ "order_instability": float(np.mean([
158
+ len({row["prediction"][model] for row in values}) > 1 for values in groups.values()
159
+ ])),
160
+ "rotation_zero_accuracy": float(np.mean([
161
+ row["prediction"][model] == row["canonical_label"] for row in original
162
+ ])),
163
+ }
164
+
165
+
166
+ def retrieve_source(source, original_split):
167
+ import pyarrow.parquet as parquet
168
+
169
+ filename = source.files[original_split]
170
+ suffix = ".parquet" if source.format == "parquet" else ".jsonl"
171
+ path = DIRECTORY / "sources" / f"{source.name}-{original_split}-{source.revision}{suffix}"
172
+ path.parent.mkdir(parents=True, exist_ok=True)
173
+ if not path.exists():
174
+ if shutil.disk_usage(DIRECTORY).free < 256_000_000:
175
+ raise RuntimeError("Keep at least 256 MB disk free; source download not started")
176
+ with urllib.request.urlopen(source.url(filename), timeout=120) as response:
177
+ payload = response.read(64_000_001)
178
+ if len(payload) > 64_000_000:
179
+ raise RuntimeError("Source exceeds the audit download bound")
180
+ path.write_bytes(payload)
181
+ if source.format == "parquet":
182
+ return parquet.read_table(path).to_pylist()
183
+ return read_rows(path)
184
+
185
+
186
+ def prepare():
187
+ if (DIRECTORY / "protocol.json").exists():
188
+ raise FileExistsError("Audit protocol already exists")
189
+ DIRECTORY.mkdir(parents=True, exist_ok=True)
190
+ manifest = json.loads((RELEASE / "reports/corpus-manifest.json").read_text())
191
+ validation, enriched = [], []
192
+ forbidden_groups = set()
193
+ for pool in manifest["pools"]:
194
+ for source_split, selection in pool["source_splits"].items():
195
+ if pool["output_split"] != "validation":
196
+ forbidden_groups.update(f"{pool['dataset']}:{source_split}:{index}" for index in selection["selected_indices"])
197
+ for pool in manifest["pools"]:
198
+ if pool["output_split"] != "validation":
199
+ continue
200
+ source = build_corpus.SOURCE_BY_NAME[pool["dataset"]]
201
+ for source_split, selection in pool["source_splits"].items():
202
+ raw_rows = retrieve_source(source, source_split)
203
+ for index in selection["selected_indices"]:
204
+ raw = raw_rows[index]
205
+ record = build_corpus.render_record(source, source_split, index, raw, "validation", manifest["seed"])
206
+ if record["source_group"] in forbidden_groups:
207
+ raise ValueError("Validation source group overlaps another split")
208
+ validation.append(record)
209
+ if source.name in SEMANTIC_KEYS:
210
+ family_text = raw["premise"] if source.name == "snli" else raw["text"]
211
+ enriched.append({**record, "canonical_label": raw["label"],
212
+ "family_group": build_corpus.state_key(family_text)})
213
+ print(json.dumps({"recovered_validation": source.name, "rows": len(selection["selected_indices"])}), flush=True)
214
+ validation.sort(key=lambda row: (build_corpus.digest(manifest["seed"], "output-order", "validation", row["source_group"]), row["source_group"]))
215
+ payload = "".join(json.dumps(row, ensure_ascii=False, separators=(",", ":")) + "\n" for row in validation).encode()
216
+ checksum = hashlib.sha256(payload).hexdigest()
217
+ if checksum != manifest["files"]["validation"]["sha256"]:
218
+ raise ValueError(f"Reconstructed validation hash differs: {checksum}")
219
+ write_rows(DIRECTORY / "validation.jsonl", validation)
220
+ selected = [row for dataset in SEMANTIC_KEYS for row in select_balanced(enriched, dataset, 60)]
221
+ requests = [variant for record in selected for variant in build_variants(record)]
222
+ tokenizer, _ = build_corpus.load_tokenizer(RELEASE / "model/tokenizer.json")
223
+ lengths = []
224
+ for request in requests:
225
+ feature = encode_question(tokenizer, request["state"], request["question"])
226
+ if feature["truncated_state"]:
227
+ raise ValueError("Audit variant would truncate the student state")
228
+ lengths.append(len(feature["input_ids"]))
229
+ write_rows(DIRECTORY / "selected.jsonl", selected)
230
+ write_rows(DIRECTORY / "requests.jsonl", requests)
231
+ write_json(DIRECTORY / "protocol.json", {
232
+ "seed": SEED, "purpose": "Exploratory development audit, not a held-out generalization benchmark",
233
+ "validation_sha256": checksum, "original_validation_rows": len(validation),
234
+ "selection": "60 per task, label-balanced hash sampling; unique normalized premises for SNLI",
235
+ "base_texts": len(selected), "requests": len(requests),
236
+ "source_groups": [row["source_group"] for row in selected],
237
+ "selected_sha256": digest_file(DIRECTORY / "selected.jsonl"),
238
+ "requests_sha256": digest_file(DIRECTORY / "requests.jsonl"),
239
+ "maximum_student_tokens": max(lengths), "student_truncation": False,
240
+ "keys": ["opaque original per-example keys", "semantic keys"],
241
+ "styles": {"fixed": build_corpus.CHOICES, "short": SHORT, "long": LONG,
242
+ "long_named": "Source class name followed by the identical long description"},
243
+ "order": "All cyclic rotations of original validation order, not all permutations",
244
+ "statistics": "Paired source-text bootstrap, 4000 resamples, exploratory marginal 95% intervals; no multiplicity correction",
245
+ "primary_contrasts": [
246
+ "AG News: FP32, opaque keys, long without prefix minus fixed descriptions, mean over rotations",
247
+ "SNLI: FP32, opaque keys, long without prefix minus fixed descriptions, mean over rotations",
248
+ ],
249
+ "secondary_analyses": "Other styles, key families, order sensitivity, INT8 and teacher comparisons are exploratory",
250
+ "teacher": "convaiinnovations/laya@55cf4c4ebb4ebe31b2550e8bdf3bd21b99753851",
251
+ "teacher_runtime": "laya==0.3.20, CPU, verify single/batch parity and token budgets",
252
+ "student_int8_batch": 1,
253
+ "limitations": ["Development validation already used for checkpoint selection", "Only AG News and SNLI choice tasks",
254
+ "One alternative wording set per style", "No score/noul or unseen-task conclusions",
255
+ "No weight changes, no GPU rental, no COPA evaluation"],
256
+ })
257
+ print(json.dumps({"validation_sha256": checksum, "texts": len(selected), "requests": len(requests), "maximum_tokens": max(lengths)}), flush=True)
258
+
259
+
260
+ def inference_record(request, probabilities):
261
+ metadata = {key: request[key] for key in ["request_id", "source_group", "dataset", "canonical_label", "keys", "style", "rotation"]}
262
+ metadata["probabilities"] = probabilities
263
+ metadata["prediction"] = {name: int(np.argmax(values)) for name, values in probabilities.items()}
264
+ return metadata
265
+
266
+
267
+ def run_student():
268
+ import onnxruntime as ort
269
+ import torch
270
+ from safetensors.torch import load_file
271
+ from model import MiniDecisionModel
272
+
273
+ torch.set_num_threads(4)
274
+ requests = read_rows(DIRECTORY / "requests.jsonl")
275
+ tokenizer, _ = build_corpus.load_tokenizer(RELEASE / "model/tokenizer.json")
276
+ prepared = [(request, encode_question(tokenizer, request["state"], request["question"])) for request in requests]
277
+ prepared.sort(key=lambda pair: len(pair[1]["input_ids"]))
278
+ model = MiniDecisionModel().eval()
279
+ model.load_state_dict(load_file(LAB / "collected/checkpoint/model.safetensors"), strict=True)
280
+ settings = ort.SessionOptions()
281
+ settings.intra_op_num_threads = 2
282
+ settings.inter_op_num_threads = 1
283
+ quantized = ort.InferenceSession(str(RELEASE / "model/model.int8.onnx"), settings, providers=["CPUExecutionProvider"])
284
+ started = time.perf_counter()
285
+ with (DIRECTORY / "student.jsonl").open("x", encoding="utf-8") as handle, torch.inference_mode():
286
+ for offset in range(0, len(prepared), 8):
287
+ chunk = prepared[offset:offset + 8]
288
+ arrays = collate([feature for _, feature in chunk])
289
+ floating = model(**{name: torch.from_numpy(value) for name, value in arrays.items()}).softmax(-1).numpy()
290
+ for position, (request, feature) in enumerate(chunk):
291
+ logits = quantized.run(None, collate([feature]))[0][0]
292
+ exponentials = np.exp(logits - logits.max())
293
+ count = len(feature["labels"])
294
+ values = {
295
+ "fp32": canonical_probabilities(floating[position, :count], request["semantic_order"]),
296
+ "int8": canonical_probabilities(exponentials / exponentials.sum(), request["semantic_order"]),
297
+ }
298
+ handle.write(json.dumps(inference_record(request, values)) + "\n")
299
+ handle.flush()
300
+ if offset % 256 == 0:
301
+ print(json.dumps({"student_done": min(offset + 8, len(prepared)), "total": len(prepared),
302
+ "elapsed_seconds": time.perf_counter() - started}), flush=True)
303
+ write_json(DIRECTORY / "student-meta.json", {
304
+ "decisions": len(prepared), "elapsed_seconds": time.perf_counter() - started,
305
+ "fp32_threads": 4, "fp32_batch": 8, "int8_threads": 2, "int8_batch": 1,
306
+ "checkpoint_sha256": digest_file(LAB / "collected/checkpoint/model.safetensors"),
307
+ "int8_sha256": digest_file(RELEASE / "model/model.int8.onnx"),
308
+ })
309
+
310
+
311
+ def teacher_coverage(requests, teacher):
312
+ expected = {row["request_id"]: row for row in requests}
313
+ observed = {row["request_id"]: row for row in teacher}
314
+ if len(observed) != len(teacher) or not set(observed) <= set(expected):
315
+ raise ValueError("Teacher predictions have duplicate or unknown request IDs")
316
+ for identifier, row in observed.items():
317
+ if any(row[field] != expected[identifier][field]
318
+ for field in ["source_group", "dataset", "canonical_label", "keys", "style", "rotation"]):
319
+ raise ValueError("Teacher prediction metadata differs from the frozen request")
320
+ groups = {row["source_group"] for row in teacher}
321
+ required = {row["request_id"] for row in requests if row["source_group"] in groups}
322
+ if set(observed) != required:
323
+ raise ValueError("Teacher coverage must contain all variants for every included text")
324
+ return groups
325
+
326
+
327
+ def confusion_matrix(rows, model, label_count):
328
+ matrix = np.zeros((label_count, label_count), dtype=np.int64)
329
+ for row in rows:
330
+ matrix[row["canonical_label"], row["prediction"][model]] += 1
331
+ return matrix.tolist()
332
+
333
+
334
+ def diagnostics():
335
+ students = read_rows(DIRECTORY / "student.jsonl")
336
+ teachers = read_rows(DIRECTORY / "teacher.jsonl")
337
+ matrices, margins = [], []
338
+ for dataset, labels in SEMANTIC_KEYS.items():
339
+ for keys in ["opaque", "semantic"]:
340
+ for style in ["fixed", "short", "long", "long_named"]:
341
+ subset = [row for row in students if row["dataset"] == dataset and row["keys"] == keys and row["style"] == style]
342
+ reference = [row for row in teachers if row["dataset"] == dataset and row["keys"] == keys and row["style"] == style]
343
+ for model, rows in [("fp32", subset), ("int8", subset), ("teacher", reference)]:
344
+ matrices.append({"dataset": dataset, "keys": keys, "style": style, "model": model,
345
+ "labels": labels, "texts": len({row["source_group"] for row in rows}),
346
+ "matrix_true_rows_predicted_columns": confusion_matrix(rows, model, len(labels))})
347
+ disagreements = [row for row in subset if row["prediction"]["fp32"] != row["prediction"]["int8"]]
348
+ values = [float(np.sort(row["probabilities"]["fp32"])[-1] - np.sort(row["probabilities"]["fp32"])[-2])
349
+ for row in disagreements]
350
+ margins.append({"dataset": dataset, "keys": keys, "style": style,
351
+ "disagreements": len(disagreements),
352
+ "fp32_margin_min_median_p90_max": [float(value) for value in np.quantile(values, [0, 0.5, 0.9, 1])] if values else None})
353
+ result = {"purpose": "Post-audit exploratory diagnostics; repeated rotations are not independent examples",
354
+ "confusion_matrices": matrices, "quantization_disagreement_margins": margins}
355
+ write_json(DIRECTORY / "diagnostics.json", result)
356
+ print(json.dumps({"snli_opaque_fp32": [row for row in matrices if row["dataset"] == "snli" and row["keys"] == "opaque" and row["model"] == "fp32"],
357
+ "snli_opaque_margins": [row for row in margins if row["dataset"] == "snli" and row["keys"] == "opaque"]}, indent=2))
358
+
359
+
360
+ def report():
361
+ requests = read_rows(DIRECTORY / "requests.jsonl")
362
+ expected_ids = {row["request_id"] for row in requests}
363
+ rows = read_rows(DIRECTORY / "student.jsonl")
364
+ if len(rows) != len(expected_ids) or {row["request_id"] for row in rows} != expected_ids:
365
+ raise ValueError("Student predictions do not cover exactly the frozen audit requests")
366
+ models = ["fp32", "int8"]
367
+ teacher_path = DIRECTORY / "teacher.jsonl"
368
+ teacher = read_rows(teacher_path) if teacher_path.exists() else []
369
+ teacher_groups = teacher_coverage(requests, teacher)
370
+ teacher_complete = len(teacher) == len(expected_ids) and {row["request_id"] for row in teacher} == expected_ids
371
+ if teacher:
372
+ by_id = {row["request_id"]: row for row in teacher}
373
+ for row in rows:
374
+ if row["request_id"] not in by_id:
375
+ continue
376
+ match = by_id[row["request_id"]]
377
+ row["prediction"].update(match["prediction"])
378
+ row["probabilities"].update(match["probabilities"])
379
+ if teacher_complete:
380
+ models.append("teacher")
381
+ cells, deltas, quantization = [], [], []
382
+ for dataset in SEMANTIC_KEYS:
383
+ for keys in ["opaque", "semantic"]:
384
+ baseline = [row for row in rows if row["dataset"] == dataset and row["keys"] == keys and row["style"] == "fixed"]
385
+ for style in ["fixed", "short", "long", "long_named"]:
386
+ subset = [row for row in rows if row["dataset"] == dataset and row["keys"] == keys and row["style"] == style]
387
+ for model in models:
388
+ cells.append({"dataset": dataset, "keys": keys, "style": style, "model": model, **summarize_cell(subset, model)})
389
+ if style != "fixed":
390
+ deltas.append({"dataset": dataset, "keys": keys, "style": style, "model": model,
391
+ **paired_interval(grouped_accuracy(baseline, model), grouped_accuracy(subset, model))})
392
+ distances = [float(np.abs(np.asarray(row["probabilities"]["fp32"]) - row["probabilities"]["int8"]).sum() / 2) for row in subset]
393
+ quantization.append({"dataset": dataset, "keys": keys, "style": style,
394
+ "flip_rate": float(np.mean([row["prediction"]["fp32"] != row["prediction"]["int8"] for row in subset])),
395
+ "mean_total_variation": float(np.mean(distances)), "max_total_variation": max(distances)})
396
+ paired_teacher_cells, paired_teacher_deltas = [], []
397
+ for dataset in SEMANTIC_KEYS:
398
+ for keys in ["opaque", "semantic"]:
399
+ baseline = [row for row in rows if row["source_group"] in teacher_groups and row["dataset"] == dataset and row["keys"] == keys and row["style"] == "fixed"]
400
+ for style in ["fixed", "short", "long", "long_named"]:
401
+ subset = [row for row in rows if row["source_group"] in teacher_groups and row["dataset"] == dataset and row["keys"] == keys and row["style"] == style]
402
+ if not subset:
403
+ continue
404
+ for model in ["fp32", "int8", "teacher"]:
405
+ paired_teacher_cells.append({"dataset": dataset, "keys": keys, "style": style, "model": model,
406
+ **summarize_cell(subset, model)})
407
+ if style != "fixed":
408
+ paired_teacher_deltas.append({"dataset": dataset, "keys": keys, "style": style, "model": model,
409
+ **paired_interval(grouped_accuracy(baseline, model), grouped_accuracy(subset, model))})
410
+ teacher_meta = DIRECTORY / "teacher-meta.json"
411
+ teacher_subset_complete = json.loads(teacher_meta.read_text())["complete"] if teacher_meta.exists() else False
412
+ result = {"protocol_sha256": digest_file(DIRECTORY / "protocol.json"), "texts": len({row["source_group"] for row in rows}),
413
+ "requests": len(rows), "teacher_complete": teacher_complete, "teacher_requests_available": len(teacher),
414
+ "teacher_subset_complete": teacher_subset_complete, "teacher_base_texts": len(teacher_groups),
415
+ "teacher_comparison_cells_same_texts": paired_teacher_cells,
416
+ "teacher_comparison_style_deltas_same_texts": paired_teacher_deltas,
417
+ "cells": cells, "paired_style_minus_fixed_accuracy": deltas, "quantization": quantization,
418
+ "limitations": json.loads((DIRECTORY / "protocol.json").read_text())["limitations"]}
419
+ output = DIRECTORY / ("report.json" if teacher else "student-report.json")
420
+ write_json(output, result)
421
+ print(json.dumps({"output": str(output), "teacher_complete": teacher_complete, "cells": cells}, indent=2))
422
+
423
+
424
+ def main():
425
+ parser = argparse.ArgumentParser()
426
+ parser.add_argument("command", choices=["prepare", "student", "report", "diagnostics"])
427
+ arguments = parser.parse_args()
428
+ {"prepare": prepare, "student": run_student, "report": report, "diagnostics": diagnostics}[arguments.command]()
429
+
430
+
431
+ if __name__ == "__main__":
432
+ main()