michaljach commited on
Commit
25ccbd9
·
verified ·
1 Parent(s): ee7d33e

Archive detailed training artifacts and simplify model Files view

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +6 -2
  2. TRAINING_HISTORY.md +10 -8
  3. docs/training/initial-results.md +0 -77
  4. docs/training/jet-next.md +0 -64
  5. docs/training/jet-next/baseline-adapter-check.json +0 -6
  6. docs/training/jet-next/baseline-score_eval.json +0 -65
  7. docs/training/jet-next/baseline-test.json +0 -112
  8. docs/training/jet-next/baseline-test_v3_new.json +0 -92
  9. docs/training/jet-next/baseline-test_v4_new.json +0 -43
  10. docs/training/jet-next/baseline-test_v4_tools.json +0 -29
  11. docs/training/jet-next/build-v4-snapshot.py +0 -169
  12. docs/training/jet-next/check-baseline-adapter.py +0 -18
  13. docs/training/jet-next/code/scripts/audit_v4_tools.py +0 -31
  14. docs/training/jet-next/code/scripts/audit_v4_transfer.py +0 -43
  15. docs/training/jet-next/code/scripts/bench_index_cuda.sh +0 -17
  16. docs/training/jet-next/code/scripts/build_v4_tools.py +0 -89
  17. docs/training/jet-next/code/scripts/build_v4_transfer.py +0 -169
  18. docs/training/jet-next/code/scripts/evaluate_next_code.sh +0 -27
  19. docs/training/jet-next/code/scripts/evaluate_next_extra.sh +0 -46
  20. docs/training/jet-next/code/scripts/finalize_next.py +0 -54
  21. docs/training/jet-next/code/scripts/prepare_v4_focus.py +0 -35
  22. docs/training/jet-next/code/scripts/run_next_cuda.sh +0 -62
  23. docs/training/jet-next/code/scripts/summarize_next.py +0 -61
  24. docs/training/jet-next/code/src/bench_decision_index.py +0 -158
  25. docs/training/jet-next/code/src/data/decision_training.py +0 -280
  26. docs/training/jet-next/code/src/decision_index_engine.py +0 -133
  27. docs/training/jet-next/code/src/evaluate.py +0 -190
  28. docs/training/jet-next/code/src/format.py +0 -143
  29. docs/training/jet-next/code/src/inference.py +0 -41
  30. docs/training/jet-next/code/src/model.py +0 -151
  31. docs/training/jet-next/code/src/train.py +0 -304
  32. docs/training/jet-next/code/train_cuda.sh +0 -21
  33. docs/training/jet-next/comparison.json +0 -0
  34. docs/training/jet-next/completion-audit.json +0 -20
  35. docs/training/jet-next/cruxeval-full-baseline.json +0 -148
  36. docs/training/jet-next/cruxeval-full-sample.json +0 -6
  37. docs/training/jet-next/cruxeval-full-v3.json +0 -152
  38. docs/training/jet-next/cruxeval-full-v4.json +0 -152
  39. docs/training/jet-next/cruxeval-full-warm.json +0 -152
  40. docs/training/jet-next/diagnostic-v4.json +0 -515
  41. docs/training/jet-next/diagnostic-warm.json +0 -515
  42. docs/training/jet-next/environment-freeze.txt +0 -82
  43. docs/training/jet-next/esci-baseline.json +0 -154
  44. docs/training/jet-next/esci-coverage.json +0 -49
  45. docs/training/jet-next/esci-training-overlap.json +0 -7
  46. docs/training/jet-next/esci-v3.json +0 -158
  47. docs/training/jet-next/esci-v4.json +0 -158
  48. docs/training/jet-next/esci-warm.json +0 -158
  49. docs/training/jet-next/isarcasm-en-baseline.json +0 -156
  50. docs/training/jet-next/isarcasm-en-v3.json +0 -160
README.md CHANGED
@@ -14,6 +14,8 @@ tags:
14
 
15
  # Jet
16
 
 
 
17
  Jet is a small decision model built on **Qwen3-0.6B**. Give it a state and named,
18
  typed questions; it returns choices, scores, and probabilities without generating
19
  free-form text. Answers always follow the requested type, but decisions can still
@@ -84,11 +86,11 @@ These are single-order adapter measurements. They are not a Decision Index
84
  leaderboard score. Partial public benchmark reconstructions do not cover the
85
  complete current suite. Cross-dataset text overlap inherited during training
86
  also prevents a certified decontamination claim. Performance varies by task;
87
- see the [evaluation report](docs/training/jet-v5/summary.md) for full methodology,
88
  limitations, and the separate two-order results.
89
 
90
  To reproduce training, source acquisition, audits, and evaluation, use the
91
- [recorded protocol](docs/training/jet-v5/protocol.md) and scripts under `scripts/`.
92
  Dataset sources, revisions, exclusion checks, configuration, and checkpoint hashes
93
  are recorded under `docs/training/`.
94
 
@@ -124,3 +126,5 @@ quantization can change probabilities.
124
  - `src/data/`, `scripts/`: data builders and reproducible experiments
125
  - `src/decision_index_engine.py`, `src/decision_index_ensemble.py`: benchmark adapters
126
  - `deploy/huggingface/`: hosted demo and API deployment
 
 
 
14
 
15
  # Jet
16
 
17
+ The new **[Jet 4B release](https://huggingface.co/michaljach/jet-4b)** is available separately. This repository contains the Qwen3-0.6B model.
18
+
19
  Jet is a small decision model built on **Qwen3-0.6B**. Give it a state and named,
20
  typed questions; it returns choices, scores, and probabilities without generating
21
  free-form text. Answers always follow the requested type, but decisions can still
 
86
  leaderboard score. Partial public benchmark reconstructions do not cover the
87
  complete current suite. Cross-dataset text overlap inherited during training
88
  also prevents a certified decontamination claim. Performance varies by task;
89
+ see the [evaluation report](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v5/summary.md) for full methodology,
90
  limitations, and the separate two-order results.
91
 
92
  To reproduce training, source acquisition, audits, and evaluation, use the
93
+ [recorded protocol](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v5/protocol.md) and scripts under `scripts/`.
94
  Dataset sources, revisions, exclusion checks, configuration, and checkpoint hashes
95
  are recorded under `docs/training/`.
96
 
 
126
  - `src/data/`, `scripts/`: data builders and reproducible experiments
127
  - `src/decision_index_engine.py`, `src/decision_index_ensemble.py`: benchmark adapters
128
  - `deploy/huggingface/`: hosted demo and API deployment
129
+
130
+ Detailed experiment files are preserved in the [training archive](https://huggingface.co/michaljach/jet/tree/training-archive-20260924/docs/training).
TRAINING_HISTORY.md CHANGED
@@ -13,7 +13,7 @@ step 2,750 by validation NLL. The fused release reached about 67.7% accuracy on
13
  the 3,683-row general test. A Qwen3-1.7B comparison was evaluated but not retained.
14
 
15
  The complete original tables, earlier 1,500-row experiment, ordinal evaluation,
16
- and Kev transfer evaluation are preserved in [initial results](docs/training/initial-results.md).
17
 
18
  ## V3 — broader decision training
19
 
@@ -22,7 +22,7 @@ arithmetic and code behavior. Trained on 47,313 rows for two epochs / 4,888
22
  steps with rank-16 LoRA and learning rate `1e-4`.
23
  New-family accuracy reached 80.6%; general-test accuracy regressed to 65.2%.
24
 
25
- [Experiment report](docs/training/jet-v3/summary.md)
26
 
27
  ## Warm start and V4 — transfer and routing
28
 
@@ -31,8 +31,8 @@ V4 reached 66.4% general-test accuracy and 93.3% on domain-held-out tool routing
31
  It improved several partial language/relevance diagnostics but regressed on code.
32
  A CPU-fused bf16/q8 release package was prepared separately.
33
 
34
- [Training and comparisons](docs/training/jet-next/summary.md) ·
35
- [Export preparation](docs/training/jet-v4-release.md)
36
 
37
  ## V5 — wider intent and adversarial language tasks
38
 
@@ -58,12 +58,14 @@ benchmark adapter. This increases inference work and is not part of standard
58
  serving. Gains and regressions on fixed public benchmark samples are recorded
59
  separately; no overall leaderboard result or win has been established.
60
 
61
- [Results](docs/training/jet-v5/summary.md) ·
62
- [Protocol](docs/training/jet-v5/protocol.md) ·
63
- [Completion audit](docs/training/jet-v5/completion-audit.json)
64
 
65
  ## Release — 2026-09-24
66
 
67
  The current release is the V5 R2 selected checkpoint, fused with native MLX CUDA,
68
  with a calibrated bf16 model and validated q8 ONNX export. Export and publication
69
- receipts are recorded in [release notes](docs/training/jet-v5-release.md).
 
 
 
13
  the 3,683-row general test. A Qwen3-1.7B comparison was evaluated but not retained.
14
 
15
  The complete original tables, earlier 1,500-row experiment, ordinal evaluation,
16
+ and Kev transfer evaluation are preserved in [initial results](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/initial-results.md).
17
 
18
  ## V3 — broader decision training
19
 
 
22
  steps with rank-16 LoRA and learning rate `1e-4`.
23
  New-family accuracy reached 80.6%; general-test accuracy regressed to 65.2%.
24
 
25
+ [Experiment report](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v3/summary.md)
26
 
27
  ## Warm start and V4 — transfer and routing
28
 
 
31
  It improved several partial language/relevance diagnostics but regressed on code.
32
  A CPU-fused bf16/q8 release package was prepared separately.
33
 
34
+ [Training and comparisons](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-next/summary.md) ·
35
+ [Export preparation](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v4-release.md)
36
 
37
  ## V5 — wider intent and adversarial language tasks
38
 
 
58
  serving. Gains and regressions on fixed public benchmark samples are recorded
59
  separately; no overall leaderboard result or win has been established.
60
 
61
+ [Results](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v5/summary.md) ·
62
+ [Protocol](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v5/protocol.md) ·
63
+ [Completion audit](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v5/completion-audit.json)
64
 
65
  ## Release — 2026-09-24
66
 
67
  The current release is the V5 R2 selected checkpoint, fused with native MLX CUDA,
68
  with a calibrated bf16 model and validated q8 ONNX export. Export and publication
69
+ receipts are recorded in [release notes](https://huggingface.co/michaljach/jet/blob/ee7d33ecae2b8bee30891657dd57c92d34e0ce53/docs/training/jet-v5-release.md).
70
+
71
+ Detailed experiment files are preserved in the [training archive](https://huggingface.co/michaljach/jet/tree/training-archive-20260924/docs/training).
docs/training/initial-results.md DELETED
@@ -1,77 +0,0 @@
1
- # Initial training results
2
-
3
-
4
- The released model is `jet` (`adapters/jet`, `models/jet`, and [michaljach/jet](https://huggingface.co/michaljach/jet)
5
- on Hugging Face). It is Qwen3-0.6B trained on `train_v2` (public data plus varied-scale score questions,
6
- no Claude distillation yet) on an RTX 4080: 2 epochs, 2,910 steps, best checkpoint at step 2,750 by
7
- validation NLL (0.485), then calibrated and fused. A Qwen3-1.7B variant was trained the same way for
8
- comparison (best at step 2,500, val NLL 0.420) and not kept: `jet` is better calibrated and about 1.8×
9
- faster, for half a point of accuracy. The test set has 3,683 rows. `emotion` makes up two-thirds of them
10
- and is held out of training entirely, so it measures transfer to a task the model never saw.
11
-
12
- | model | accuracy | NLL | Brier | ECE | trained tasks acc | held-out `emotion` acc | ms / question |
13
- | ------------------------- | --------- | -------- | --------- | --------- | ----------------- | ---------------------- | ------------- |
14
- | Qwen3-0.6B, untrained | 46.7% | 2.63 | 0.885 | 0.428 | 46.6% | 46.7% | 6.1 |
15
- | **jet** (0.6B, fused) | 67.7% | 0.87 | **0.427** | **0.061** | 83.2% | 60.3% | **6.1** |
16
- | Qwen3-1.7B, untrained | 60.5% | 5.67 | 0.741 | 0.375 | 62.1% | 59.8% | 11.1 |
17
- | 1.7B variant (fused) | **68.2%** | **0.86** | 0.430 | 0.100 | **83.8%** | **60.9%** | 11.1 |
18
-
19
- Latency is batched eval time (batch size 4) on the 4080. Per source, `jet`: dbpedia 99%, civil_comments 92%,
20
- massive 92%, banking77 89%, ag_news 88%, mnli 82%, boolq 81%, yelp 72%, emotion (held out) 60%, stsb 56%.
21
- By type: noul 79%, choice 62%, score 61%.
22
-
23
- The larger base model learns the trained tasks better: test NLL drops on 8 of 9 of them (mnli 0.48 → 0.36,
24
- massive 0.33 → 0.18, yelp 0.69 → 0.58), and on its in-distribution validation data it needs almost no
25
- temperature correction (T 1.00–1.09, against 1.03–1.30 for `jet`). It does not transfer better. Untrained
26
- Qwen3-1.7B already reaches 59.8% on `emotion` zero-shot and training only takes it to 60.9%, while it becomes
27
- more overconfident there (ECE 0.095 → 0.144). The temperatures are fit on trained tasks, so they can't correct
28
- that, and it is why the 1.7B variant's overall ECE is worse. Varied training tasks, such as the
29
- Claude-distilled set, still look like the lever for generalization, not model size.
30
-
31
- On the ordinal set (`score_eval.jsonl`, 2,400 score questions from held-out splits):
32
-
33
- | model | exact level | within one level | Spearman | ECE | Spearman per source (stsb / yelp / amazon / sst5) |
34
- | ------------ | ----------- | ---------------- | -------- | ----- | ------------------------------------------------- |
35
- | `jet` | 52.1% | 91.4% | 0.83 | 0.035 | 0.90 / 0.89 / 0.79 / 0.74 |
36
- | 1.7B variant | 53.9% | 93.5% | 0.86 | 0.071 | 0.93 / 0.91 / 0.83 / 0.79 |
37
-
38
- Fusing leaves the metrics unchanged (`jet` test accuracy 67.6% → 67.7%, 1.7B variant 68.0% → 68.2%) and
39
- cuts batched eval time by about a third (`jet` 9.1 → 6.1 ms, 1.7B variant 16.5 → 11.1 ms per question).
40
-
41
- ### Against Kev and Jev, on Kev's out-of-domain suite
42
-
43
- ![jet next to the Kev family and Jev](docs/jet-vs-kev.png)
44
-
45
- [Kev](https://github.com/jaredpalmer/kev) publishes a frozen out-of-domain suite (`transfer-v4`, 656 clean rows,
46
- 11 sources) and per-source numbers for its family and for Jev. `jet-bench-kev` converts those rows to jet's format
47
- and scores them. `jet` gets **54.9%** (Brier 0.622), up from 51.7% for untrained Qwen3-0.6B. That is below
48
- Kev-0.8B (65.2%) and the Kev-0.5B prototype (56.1%), and far below Kev-4B/9B (≈80%) and Jev (85.7%). It holds up
49
- on sources that look like its training mix (SciQ 90%, QNLI 76%, TweetEval 72%) and is at or below chance on
50
- everything else. On the policy, rule and PAWS rows it mostly picks the same answer for every row (always "yes" on
51
- authorization and PAWS, always "late but accepted" on deadline). MMLU is at chance (29%). jet has never trained on
52
- rule-following or knowledge questions. Kev's policy and rule families are exactly the varied tasks that
53
- distillation is meant to add.
54
-
55
- ```sh
56
- uv run jet-bench-kev --base-model michaljach/jet --name jet # → docs/bench/kev-transfer-v4/jet.json
57
- uv run jet-bench-kev --name qwen3-0.6b-untrained # untrained baseline
58
- uv sync --extra plot && uv run jet-plot-kev # → docs/jet-vs-kev.png
59
- ```
60
-
61
- ### Earlier run (1,500-row test split)
62
-
63
- Before the held-out sets were versioned: public data only, 2 epochs, 2,378 steps, best checkpoint at step
64
- 2,250. These rows come from a different split, so compare them with each other, not with the table above.
65
-
66
- | model | accuracy | NLL | Brier | ECE | trained tasks acc | held-out `emotion` acc | 1 question |
67
- | ----------------------- | -------- | ---- | ----- | ----- | ----------------- | ---------------------- | ---------- |
68
- | Qwen3-0.6B, untrained | 46.6% | 2.66 | 0.886 | 0.428 | 44.6% | 47.6% | 82 ms |
69
- | Jet step 1,000 | 65.8% | 0.92 | 0.462 | 0.101 | 79.9% | 58.8% | 59 ms |
70
- | Jet final (fused) | 66.7% | 0.86 | 0.441 | 0.079 | 82.7% | 58.7% | 59 ms |
71
-
72
- Latency is for one question on an M2 Pro. Ten questions about one ~640-token state take about 500 ms
73
- together, because the state is encoded once.
74
-
75
- The second epoch helped the trained tasks (79.9% → 82.7%) but not the unseen one (58.8% → 58.7%). More
76
- varied training tasks, such as the Claude-distilled set, are the likely lever for generalization.
77
- Jet has not been benchmarked against the hosted Jev API yet; `jet-bench-jev` does that.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next.md DELETED
@@ -1,64 +0,0 @@
1
- # Qwen3-0.6B transfer experiment
2
-
3
- User target: best possible local result while keeping Qwen3-0.6B. No hosted API calls, publication, or submission. This is a bounded follow-up experiment, not a claim that a leaderboard score has been beaten.
4
-
5
- ## Protocol fixed before post-training testing
6
-
7
- 1. Warm-start released Jet's local rank-16 adapter on immutable `train_v3.jsonl`, one epoch, LR 2e-5, seed 230923, 4096 batch tokens, 1024 state tokens. Fresh AdamW state and schedule. Select by `selection_v3` NLL. This ablation isolates warm-start/lower learning rate from new data.
8
- 2. Continue its best validation checkpoint on `train_v4_tools_focus.jsonl`, one epoch, LR 1e-5, seed 230924, 3072 batch tokens, 2048 state tokens. Fresh optimizer. This mixture retains 18,000 V3 rows sampled without replacement, balanced by source, and adds all 9,000 V4 transfer rows plus 3,000 native intent-routing rows. Select by `selection_v4_tools` NLL. Capped inverse-frequency weights apply only to new stance/contract classes; validation is unweighted.
9
- 3. Fit temperatures on independent calibration files. Compare both candidates with released Jet and V3 on unchanged old test sets and the 500-request partial diagnostic. Evaluate new template/document/article-held-out tests at 2048 state tokens. No test results choose a checkpoint, epoch, or temperature.
10
-
11
- All runs use base revision `42096995f6402fde107068cf530136fe64b604f8`, all-layer LoRA rank 16, scale 10, dropout .05, gradient checkpointing, BF16 base, cache limit 1 GB. All trained checkpoint directories are new. Initial weights remain eligible if fine-tuning never improves validation; final optimizer/weights are retained separately in `last/`.
12
-
13
- The local released adapter was compared tensor by tensor after CPU BF16 fusion against the unchanged published fused model. Tensor names match, 120 tensors match exactly, 190 differ by at most 0.00048828125 (consistent with fusion rounding). This is a close numerical reconstruction, not bit-identical fused inference. See `jet-next/baseline-adapter-check.json`.
14
-
15
- ## New data
16
-
17
- - [VAST](https://github.com/emilyallaway/zero-shot-stance), revision `e7c4775182b184730f350995f8260579c9e066fe`, `data/VAST/vast_train.csv`. Native development/test posts are excluded. Related articles and identical documents stay together. 3,000 training examples; 240 each validation/calibration/test.
18
- - [ContractNLI](https://github.com/stanfordnlp/contract-nli), revision `eced6528dd3c1d14d73f9a87df8f7bdbc03126f9`, archive `resources/contract-nli.zip`, member `contract-nli/train.json`. Full contracts only, fitting 2048 state tokens. Native development/test document text is excluded; one duplicate train/test document was removed. 3,000 training, 240 validation, 238 calibration, 240 test examples. These are sampled from native training documents, not the native evaluation labels.
19
- - Local executable Python: 3,000 training, 240 each validation/calibration/test. Eighteen complete templates: twelve train, two validation, two calibration, two test. Loops, early exits, accumulators, filtering, ordering, slicing and list mutation. Counterfactual inputs supply plausible distractors. Options are shuffled and anonymous keys reassigned; every answer is checked by execution.
20
-
21
- - [Schema-Guided Dialogue](https://github.com/google-research-datasets/dstc8-schema-guided-dialogue), revision `e852981ae34990f4358979625854259302feaa78`, native `train/` only. 3,000 training and 240 each validation/calibration/test, split by entire service domain. Native same-service intents plus NONE are the candidate set; complete dialogue prefixes determine the native active intent. All 3,720 annotations verified. Native intent routing is distinct from ToolRet ranking or BFCL execution. ToolRet public evaluation queries are exclusion-only.
22
-
23
- Builder: `scripts/build_v4_transfer.py`; audit: `scripts/audit_v4_transfer.py`; retention mixture: `scripts/prepare_v4_focus.py`. Data hashes, source hashes, source revisions, group identities, class weights and exclusions are in `data/train_v4.provenance.json`. Existing V3, validation and test files are unchanged. V4 uses 56,313 rows before retention subsampling; initial focus mixture uses 27,000; the final tools-augmented focus mixture uses 30,000. `scripts/build_v4_tools.py` and `scripts/audit_v4_tools.py` create/audit this extension, with provenance in `data/train_v4_tools.provenance.json`.
24
-
25
- Limitations: exact normalized matching is not semantic paraphrase detection; contracts longer than 2048 state tokens do not train; code templates share Python primitives; V3 tool tests remain small/easy and do not establish tool-ranking quality. Neither the frozen suite nor all its content is available for exclusion auditing.
26
-
27
- ## Scoring target
28
-
29
- The official leaderboard snapshot at Space commit `eec4fe1b0a8f55eb150ae537715ff35cf211f47b` reports 19 panel benchmarks, with five equally weighted categories. The installed pinned reproduction kit's `index-panel.json` is an older proposal and differs from this deployed panel. Consequently, use native benchmark metrics from partial diagnostics, not its category totals or a reconstructed headline score.
30
-
31
- Actual deployed panel: knowledge 24/25/30/43/44/31; language 11/40/41; retrieval 36/37; tools 1/2/6; arts 20/21/22/23/50. Snapshot archived as `jet-next/leaderboard-snapshot.json`. [Official source](https://huggingface.co/spaces/multimodalart/jev-decision-index/tree/eec4fe1b0a8f55eb150ae537715ff35cf211f47b).
32
-
33
- The public frozen-suite dataset still returned repository-not-found at this experiment's start. Partial results cannot establish a leaderboard win.
34
-
35
- ## Reproduction
36
-
37
- After the V3 prerequisites and sources are available:
38
-
39
- ```sh
40
- .venv/bin/python scripts/build_v4_transfer.py
41
- .venv/bin/python scripts/audit_v4_transfer.py
42
- .venv/bin/python scripts/prepare_v4_focus.py
43
- .venv/bin/python scripts/build_v4_tools.py
44
- .venv/bin/python scripts/audit_v4_tools.py
45
- bash train_cuda.sh --init-adapter adapters/jet \
46
- --base-revision 42096995f6402fde107068cf530136fe64b604f8 \
47
- --train data/train_v3.jsonl --val data/selection_v3.jsonl \
48
- --out adapters/jet-v3-warm-20260924 --epochs 1 --lr 2e-5 \
49
- --eval-every 250 --val-limit 10000 --seed 230923
50
- # prepare_v4_focus also creates the 64-row training-only smoke file.
51
- bash scripts/run_next_cuda.sh
52
- ```
53
-
54
- Commands refuse existing dataset/checkpoint outputs. Logs are in `logs/jet-next/`; validation metrics and exact configurations are in each adapter directory. Warm-run source snapshot is preserved separately because weighted-example support was added while that already-loaded process was running.
55
-
56
- ## Additional evaluation coverage
57
-
58
- Amazon ESCI was rebuilt in a separate directory with the pinned official normalizer and original test partition: 5,000 selected requests, uncompressed SHA256 `db1d2d3d4dde242dc04262149153bfd596044ad8986e0ae5de8443383973e386`. A deterministic complete-group 500-request sample is reserved for comparison after training. Original eight-benchmark artifacts remain unchanged. This remains a partial public reconstruction, not the frozen suite. `scripts/evaluate_next_extra.sh` compares the same rows across released Jet, V3, warm-start and V4.
59
-
60
- The initial diagnostic contains only 19 English-A sarcasm examples. All 1,400 available English-A rows were therefore selected, solely by track ID, for a separate fixed post-training evaluation. Its metric is positive-class F1 from the official static scorer, whose headline track is `iSarcasmEval-A-En`. No aggregate score is inferred from this single track. Sample provenance is in `jet-next/isarcasm-english-sample.json`.
61
-
62
- Evaluation context is explicit: original test/score_eval/V3 heldout data use 4096 state tokens, matching the earlier baseline inference default; all new V4 heldouts use 2048. Calibration uses 4096. Training context remains 1024 for the warm ablation and 2048 for V4. The distinction between training and inference limits is intentional and recorded.
63
-
64
- After the fixed 55-case CRUXEval diagnostic showed a regression, evaluation was expanded to all 570 available eligible CRUXEval requests after official exclusions, across all four models. This is a targeted regression check, not another training or checkpoint-selection round. No training settings, weights, or calibration were adjusted using that result. `scripts/evaluate_next_code.sh` records these runs separately.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/baseline-adapter-check.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "keys_match": true,
3
- "exact_tensors": 120,
4
- "different_tensors": 190,
5
- "max_abs_difference": 0.00048828125
6
- }
 
 
 
 
 
 
 
docs/training/jet-next/baseline-score_eval.json DELETED
@@ -1,65 +0,0 @@
1
- {
2
- "overall": {
3
- "n": 2400,
4
- "acc": 0.5170833333333333,
5
- "nll": 1.0893632032843228,
6
- "brier": 0.5287154496496189,
7
- "ece": 0.03900318566709756
8
- },
9
- "by_source": {
10
- "stsb": {
11
- "n": 600,
12
- "acc": 0.5216666666666666,
13
- "nll": 1.1038147784073833,
14
- "brier": 0.33254204642705393,
15
- "ece": 0.04424463902910554,
16
- "mae": 0.10265430813162432,
17
- "within1": 0.88,
18
- "spearman": 0.9022189976505913
19
- },
20
- "yelp": {
21
- "n": 600,
22
- "acc": 0.6033333333333334,
23
- "nll": 0.8791397150792182,
24
- "brier": 0.5038029301388466,
25
- "ece": 0.04722331101695697,
26
- "mae": 0.12401153839202986,
27
- "within1": 0.97,
28
- "spearman": 0.8922031203071111
29
- },
30
- "sst5": {
31
- "n": 600,
32
- "acc": 0.475,
33
- "nll": 1.198184583062927,
34
- "brier": 0.6437840936114044,
35
- "ece": 0.031442425797382975,
36
- "mae": 0.1737434748756156,
37
- "within1": 0.9066666666666666,
38
- "spearman": 0.7429955533970433
39
- },
40
- "amazon": {
41
- "n": 600,
42
- "acc": 0.4683333333333333,
43
- "nll": 1.1763137365877627,
44
- "brier": 0.6347327284211705,
45
- "ece": 0.09294485206405323,
46
- "mae": 0.17271815862875275,
47
- "within1": 0.8966666666666666,
48
- "spearman": 0.7921592534430197
49
- }
50
- },
51
- "by_type": {
52
- "score": {
53
- "n": 2400,
54
- "acc": 0.5170833333333333,
55
- "nll": 1.0893632032843228,
56
- "brier": 0.5287154496496189,
57
- "ece": 0.03900318566709756,
58
- "mae": 0.14328187000700565,
59
- "within1": 0.9133333333333333,
60
- "spearman": 0.832342527754484
61
- }
62
- },
63
- "ms_per_question": 8.335110699583007,
64
- "max_state_tokens": 4096
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/baseline-test.json DELETED
@@ -1,112 +0,0 @@
1
- {
2
- "overall": {
3
- "n": 3683,
4
- "acc": 0.6760792831930491,
5
- "nll": 0.871394003472334,
6
- "brier": 0.42748423587682505,
7
- "ece": 0.06219506579315473
8
- },
9
- "by_source": {
10
- "dbpedia": {
11
- "n": 90,
12
- "acc": 0.9888888888888889,
13
- "nll": 0.04892235172964218,
14
- "brier": 0.020441859866866866,
15
- "ece": 0.002619326776928345
16
- },
17
- "boolq": {
18
- "n": 145,
19
- "acc": 0.8,
20
- "nll": 0.4566301124234652,
21
- "brier": 0.2894317164731869,
22
- "ece": 0.04909670681789005
23
- },
24
- "emotion": {
25
- "n": 2500,
26
- "acc": 0.6036,
27
- "nll": 1.061848826275766,
28
- "brier": 0.5326494158453977,
29
- "ece": 0.09432493007183075
30
- },
31
- "ag_news": {
32
- "n": 135,
33
- "acc": 0.8814814814814815,
34
- "nll": 0.3042688087249796,
35
- "brier": 0.1724398602199645,
36
- "ece": 0.030876177770120094
37
- },
38
- "stsb": {
39
- "n": 117,
40
- "acc": 0.5641025641025641,
41
- "nll": 1.133929574747437,
42
- "brier": 0.3139340576398371,
43
- "ece": 0.06830696112070328,
44
- "mae": 0.09924938618105988,
45
- "within1": 0.8803418803418803,
46
- "spearman": 0.8588398930237986
47
- },
48
- "mnli": {
49
- "n": 142,
50
- "acc": 0.8169014084507042,
51
- "nll": 0.47927640531290794,
52
- "brier": 0.268308599548532,
53
- "ece": 0.08220711266490774
54
- },
55
- "yelp": {
56
- "n": 146,
57
- "acc": 0.7191780821917808,
58
- "nll": 0.6889766353144221,
59
- "brier": 0.3981368921297408,
60
- "ece": 0.08682229931223884
61
- },
62
- "banking77": {
63
- "n": 140,
64
- "acc": 0.8857142857142857,
65
- "nll": 0.38170325982251335,
66
- "brier": 0.15168387780774686,
67
- "ece": 0.053875945082732635
68
- },
69
- "massive": {
70
- "n": 119,
71
- "acc": 0.9159663865546218,
72
- "nll": 0.33522919206459373,
73
- "brier": 0.11903663498667257,
74
- "ece": 0.026440266551089928
75
- },
76
- "civil_comments": {
77
- "n": 149,
78
- "acc": 0.9194630872483222,
79
- "nll": 0.3247184777021575,
80
- "brier": 0.04936214179418669,
81
- "ece": 0.07150244792835826
82
- }
83
- },
84
- "by_type": {
85
- "choice": {
86
- "n": 2267,
87
- "acc": 0.6241729157476842,
88
- "nll": 1.0613521105481916,
89
- "brier": 0.5002384772375326,
90
- "ece": 0.08481803025029859
91
- },
92
- "noul": {
93
- "n": 1185,
94
- "acc": 0.7881856540084389,
95
- "nll": 0.48529899323149145,
96
- "brier": 0.29418788896638004,
97
- "ece": 0.03554945349190307
98
- },
99
- "score": {
100
- "n": 231,
101
- "acc": 0.6103896103896104,
102
- "nll": 0.9877903601581737,
103
- "brier": 0.39727776801601805,
104
- "ece": 0.05583026837476918,
105
- "mae": 0.10864421681236895,
106
- "within1": 0.9307359307359307,
107
- "spearman": 0.8929563754198246
108
- }
109
- },
110
- "ms_per_question": 7.412202802334466,
111
- "max_state_tokens": 4096
112
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/baseline-test_v3_new.json DELETED
@@ -1,92 +0,0 @@
1
- {
2
- "overall": {
3
- "n": 1364,
4
- "acc": 0.4567448680351906,
5
- "nll": 1.3997251274893088,
6
- "brier": 0.7614422661756503,
7
- "ece": 0.28511070977907377
8
- },
9
- "by_source": {
10
- "v3:stance": {
11
- "n": 160,
12
- "acc": 0.46875,
13
- "nll": 1.3125342436600476,
14
- "brier": 0.7248338334245858,
15
- "ece": 0.18823765367269515
16
- },
17
- "v3:entailment": {
18
- "n": 160,
19
- "acc": 0.66875,
20
- "nll": 0.7707340998575092,
21
- "brier": 0.445276258289386,
22
- "ece": 0.10283493064343929
23
- },
24
- "v3:sarcasm_irony": {
25
- "n": 160,
26
- "acc": 0.50625,
27
- "nll": 1.2612553351966198,
28
- "brier": 0.7811341016274713,
29
- "ece": 0.33411078229546554
30
- },
31
- "v3:tool_selection": {
32
- "n": 59,
33
- "acc": 1.0,
34
- "nll": 0.01032785861358299,
35
- "brier": 0.00037024526307215803,
36
- "ece": 0.010188460350036621
37
- },
38
- "v3:code_behavior": {
39
- "n": 160,
40
- "acc": 0.2,
41
- "nll": 1.8659685906022787,
42
- "brier": 0.9681135361388087,
43
- "ece": 0.350784395635128
44
- },
45
- "v3:document_relevance": {
46
- "n": 160,
47
- "acc": 0.54375,
48
- "nll": 1.0387783478654455,
49
- "brier": 0.6880096149279901,
50
- "ece": 0.33221421800553796
51
- },
52
- "v3:arithmetic": {
53
- "n": 160,
54
- "acc": 0.20625,
55
- "nll": 2.169761631079018,
56
- "brier": 0.9876360526115023,
57
- "ece": 0.32759805452078583
58
- },
59
- "v3:product_relevance": {
60
- "n": 160,
61
- "acc": 0.25625,
62
- "nll": 2.6546468422631735,
63
- "brier": 1.2787821977853926,
64
- "ece": 0.6251898461952805
65
- },
66
- "v3:boolean_rules": {
67
- "n": 160,
68
- "acc": 0.51875,
69
- "nll": 0.8461553640197963,
70
- "brier": 0.615775613120263,
71
- "ece": 0.2303109876811505
72
- },
73
- "v3:tool_relevance": {
74
- "n": 25,
75
- "acc": 1.0,
76
- "nll": 0.05768870040774345,
77
- "brier": 0.010224533000073113,
78
- "ece": 0.05483078479766846
79
- }
80
- },
81
- "by_type": {
82
- "choice": {
83
- "n": 1364,
84
- "acc": 0.4567448680351906,
85
- "nll": 1.3997251274893088,
86
- "brier": 0.7614422661756503,
87
- "ece": 0.28511070977907377
88
- }
89
- },
90
- "ms_per_question": 9.546318121700155,
91
- "max_state_tokens": 4096
92
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/baseline-test_v4_new.json DELETED
@@ -1,43 +0,0 @@
1
- {
2
- "overall": {
3
- "n": 720,
4
- "acc": 0.3416666666666667,
5
- "nll": 1.4211787942176064,
6
- "brier": 0.8029851960497246,
7
- "ece": 0.23449580069217418
8
- },
9
- "by_source": {
10
- "v4:stance_transfer": {
11
- "n": 240,
12
- "acc": 0.32916666666666666,
13
- "nll": 1.603874272511651,
14
- "brier": 0.8979469405703165,
15
- "ece": 0.3367636108150085
16
- },
17
- "v4:code_transfer": {
18
- "n": 240,
19
- "acc": 0.3,
20
- "nll": 1.3962707759191593,
21
- "brier": 0.7587345977402417,
22
- "ece": 0.11225773791472118
23
- },
24
- "v4:contract_entailment": {
25
- "n": 240,
26
- "acc": 0.3958333333333333,
27
- "nll": 1.2633913342220089,
28
- "brier": 0.7522740498386156,
29
- "ece": 0.2594969267646472
30
- }
31
- },
32
- "by_type": {
33
- "choice": {
34
- "n": 720,
35
- "acc": 0.3416666666666667,
36
- "nll": 1.4211787942176064,
37
- "brier": 0.8029851960497246,
38
- "ece": 0.23449580069217418
39
- }
40
- },
41
- "ms_per_question": 21.310045005556177,
42
- "max_state_tokens": 2048
43
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/baseline-test_v4_tools.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "overall": {
3
- "n": 240,
4
- "acc": 0.3625,
5
- "nll": 1.7029224928080415,
6
- "brier": 0.8800043840538005,
7
- "ece": 0.3612365548809369
8
- },
9
- "by_source": {
10
- "v4:tool_intent_routing": {
11
- "n": 240,
12
- "acc": 0.3625,
13
- "nll": 1.7029224928080415,
14
- "brier": 0.8800043840538005,
15
- "ece": 0.3612365548809369
16
- }
17
- },
18
- "by_type": {
19
- "choice": {
20
- "n": 240,
21
- "acc": 0.3625,
22
- "nll": 1.7029224928080415,
23
- "brier": 0.8800043840538005,
24
- "ece": 0.3612365548809369
25
- }
26
- },
27
- "ms_per_question": 21.0819619958329,
28
- "max_state_tokens": 2048
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/build-v4-snapshot.py DELETED
@@ -1,169 +0,0 @@
1
- """Add training-partition stance/contracts and executable multi-step Python tasks.
2
-
3
- Never uses evaluation labels. Existing files are read-only exclusion/retention inputs.
4
- New holdouts are grouped by article/document or whole program template.
5
- """
6
- import csv
7
- import hashlib
8
- import json
9
- import random
10
- import zipfile
11
- from collections import Counter, defaultdict
12
- from pathlib import Path
13
-
14
- from data.decision_training import ROOT, atoms, choice, digest, normalized, read, statekey, write
15
- from format import Question, render_state, build_prompt
16
- from transformers import AutoTokenizer
17
-
18
- SEED = 230924
19
- RAW = ROOT / 'artifacts/decision-index/rebuild/artifacts/benchmark-suite/raw'
20
- # Distinct complete templates are assigned to each split before generating inputs.
21
- PROGRAMS = [
22
- 'out = []\nfor v in x:\n if v > k:\n out.append(v * 2)\nreturn out',
23
- 'out = 0\nfor i, v in enumerate(x):\n out += v if i % 2 == 0 else -v\nreturn out + k',
24
- 'out = []\nfor v in x:\n if v not in out:\n out.append(v)\nreturn out[k:]',
25
- 'out = []\nfor i in range(1, len(x)):\n out.append(x[i] - x[i-1])\nreturn out[:k]',
26
- 'out = 1\nfor v in x:\n if v != 0:\n out *= v\nreturn out + k',
27
- 'out = []\nfor v in x:\n if v >= k:\n out.insert(0, v)\nreturn out',
28
- 'out = 0\nfor v in x:\n if v == k:\n break\n out += v\nreturn out',
29
- 'out = []\nfor v in x:\n if v % 2:\n continue\n out.append(v + k)\nreturn out',
30
- 'out = []\nfor a, b in zip(x, x[1:]):\n if a < b:\n out.append(a + b + k)\nreturn out',
31
- 'out = []\nfor v in x:\n out.append(sum(x[:len(out)+1]))\nreturn out[k:]',
32
- 'out = sorted(x)\nif k % 2:\n out.reverse()\nreturn out[:k]',
33
- 'out = []\nfor v in x:\n if x.count(v) > k and v not in out:\n out.append(v)\nreturn out',
34
- 'out = 0\nfor v in reversed(x):\n out = out * 2 + v\nreturn out - k',
35
- 'out = []\nfor i, v in enumerate(x):\n if v > sum(x[:i]):\n out.append(i)\nreturn out[k:]',
36
- 'out = []\nfor v in x:\n if out and out[-1] == v:\n out.pop()\n else:\n out.append(v)\nreturn out + [k]',
37
- 'out = 0\nfor a in x:\n for b in x:\n if a + b == k:\n out += 1\nreturn out',
38
- 'out = list(x)\nfor i in range(k):\n out = out[1:] + out[:1]\nreturn out',
39
- 'out = []\nfor v in x:\n out.append(v)\n if v == k:\n out.append(-v)\nreturn out',
40
- ]
41
-
42
- def program_rows():
43
- safe = dict(enumerate=enumerate, range=range, len=len, zip=zip, sum=sum,
44
- sorted=sorted, reversed=reversed, list=list)
45
- for tid, body in enumerate(PROGRAMS):
46
- split = 'train' if tid < 12 else 'val' if tid < 14 else 'calibration' if tid < 16 else 'test'
47
- code = 'def f(x, k):\n' + '\n'.join(' '+line for line in body.splitlines())
48
- ns = {}; exec(code, {'__builtins__': {}, **safe}, ns); fn = ns['f']
49
- rng = random.Random(SEED + tid)
50
- for i in range(300 if split == 'train' else 120):
51
- x = [rng.randint(-4, 7) for _ in range(rng.randint(3, 8))]; k = rng.randint(0, 4)
52
- result = fn(x.copy(), k)
53
- # Counterfactual inputs/parameters produce plausible same-type distractors.
54
- alternatives = [fn(x.copy(), k+1), fn(x[::-1], k), fn(x[1:], k), fn(x+[k], k)]
55
- alternatives += ([result+[k], result+[k+1], result+[k+2]] if isinstance(result, list)
56
- else [result-1, result+1, result+2])
57
- vals = list(dict.fromkeys([repr(result)] + [repr(v) for v in alternatives]))[:4]
58
- options = {f'candidate_{j}': v for j,v in enumerate(vals)}
59
- r = choice({'code':code,'arguments':{'x':x,'k':k}}, 'What does f(**arguments) return?',
60
- options,'candidate_0','code_behavior',f'local-v4:{tid}:{i}',f'v4-template:{tid}')
61
- # choice randomizes semantic keys again for this family.
62
- r['family']='code_transfer'; r['source']='v4:code_transfer'
63
- r['provenance'].update(split=split, oracle={'result':result,'template':tid}, original_split='generated')
64
- yield r
65
-
66
- def main():
67
- data=ROOT/'data'; outputs=['train_v4.jsonl','selection_v4.jsonl','calibration_v4.jsonl','test_v4_new.jsonl']
68
- if any((data/p).exists() for p in outputs): raise SystemExit('Refusing to overwrite existing v4 files')
69
- tokenizer=AutoTokenizer.from_pretrained('mlx-community/Qwen3-0.6B-bf16',revision='42096995f6402fde107068cf530136fe64b604f8')
70
- old_train=read(data/'train_v3.jsonl')
71
- protected=[data/p for p in ['val.jsonl','test.jsonl','score_eval.jsonl','val_v3_new.jsonl','calibration_v3_new.jsonl','test_v3_new.jsonl']]
72
- protected += [ROOT/'artifacts/decision-index/rebuild/artifacts/benchmark-suite/release-v1-rebuilt/selected-rows.jsonl']
73
- held_atoms={a for p in protected for r in read(p) for a in atoms(r['state'])}
74
- held_states={statekey(r['state']) for p in protected for r in read(p)}
75
- seen={digest([r['state'],r['question']]) for r in old_train}
76
- old_atoms={a for r in old_train for a in atoms(r['state'])}
77
- sources=[]; candidates=list(program_rows()); excluded=Counter()
78
- vast=RAW/'vast/data/VAST/vast_train.csv'
79
- sources.append(dict(repository='https://github.com/emilyallaway/zero-shot-stance',revision='e7c4775182b184730f350995f8260579c9e066fe',file='data/VAST/vast_train.csv',sha256=hashlib.sha256(vast.read_bytes()).hexdigest(),split='train'))
80
- # Native development/test posts are exclusion-only, including all topic variants.
81
- blocked_posts={normalized(r['post']) for f in ['vast_dev.csv','vast_test.csv'] for r in csv.DictReader((vast.parent/f).open())}
82
- for r in csv.DictReader(vast.open()):
83
- if normalized(r['post']) in blocked_posts: excluded['vast_native_heldout_post']+=1; continue
84
- row=choice({'text':r['post'],'target':r['new_topic']},'What stance does the author express towards the target?',
85
- dict(against='opposes the target',favor='supports the target',none='no clear stance towards the target'),
86
- ['against','favor','none'][int(r['label'])],'stance_transfer','vast-train:'+r['new_id'],'vast-article:'+r['arc_id'])
87
- candidates.append(row)
88
- archive=RAW/'repos/contractnli/resources/contract-nli.zip'
89
- sources.append(dict(repository='https://github.com/stanfordnlp/contract-nli',revision='eced6528dd3c1d14d73f9a87df8f7bdbc03126f9',file='resources/contract-nli.zip!contract-nli/train.json',sha256=hashlib.sha256(archive.read_bytes()).hexdigest(),split='train'))
90
- with zipfile.ZipFile(archive) as z:
91
- contracts=json.loads(z.read('contract-nli/train.json'))
92
- held_contracts={normalized(d['text']) for s in ['dev','test'] for d in json.loads(z.read(f'contract-nli/{s}.json'))['documents']}
93
- for d in contracts['documents']:
94
- if normalized(d['text']) in held_contracts: excluded['contract_native_heldout_text']+=1; continue
95
- # Keep the full contract. Never assign a full-document label to a cropped context.
96
- for lid,a in d['annotation_sets'][0]['annotations'].items():
97
- row=choice({'contract':d['text'],'hypothesis':contracts['labels'][lid]['hypothesis']},
98
- 'Does the full contract entail, contradict, or leave the hypothesis undetermined?',
99
- dict(Entailment='entailed by the contract',Contradiction='contradicted by the contract',NotMentioned='not determined by the contract'),
100
- a['choice'],'contract_entailment',f'contractnli-train:{d["id"]}:{lid}',f'contractnli-document:{d["id"]}')
101
- candidates.append(row)
102
- # Same normalized document/post stays grouped even if source IDs differ.
103
- from data.decision_training import Components
104
- components=Components()
105
- for r in candidates:
106
- group=r['provenance']['group']; s=r['state']
107
- text=s.get('contract',s.get('text'))
108
- if text: components.union(group,'document:'+digest(normalized(text)))
109
- forced_train=set()
110
- for r in candidates:
111
- s=r['state']; text=s.get('contract',s.get('text'))
112
- if text and digest(normalized(text)) in old_atoms:
113
- forced_train.add(components.find(r['provenance']['group']))
114
- bins=defaultdict(list)
115
- for r in candidates:
116
- p=r['provenance'];s=r['state'];text=s.get('contract',s.get('text'))
117
- # Global hypotheses recur by design; only document content is an exclusion key.
118
- if statekey(s) in held_states or (text and digest(normalized(text)) in held_atoms):
119
- excluded['existing_evaluation_content']+=1;continue
120
- signature=digest([s,r['question']])
121
- if signature in seen: excluded['duplicate']+=1;continue
122
- seen.add(signature)
123
- if len(tokenizer.encode(render_state(s),add_special_tokens=False))>2048:
124
- excluded['over_2048_full_state']+=1;continue
125
- if len(tokenizer.encode(build_prompt(tokenizer,s,Question.from_dict(r['question'])),add_special_tokens=False))>2304:
126
- excluded['over_2304_full_prompt']+=1;continue
127
- group=components.find(p['group']); b=int(digest([SEED,group])[:8],16)/2**32
128
- split=p.get('split') or ('train' if group in forced_train or b<.8 else 'val' if b<.87 else 'calibration' if b<.94 else 'test')
129
- p.update(component=group,split=split);r['source']='v4:'+r['family'];bins[(split,r['family'])].append(r)
130
- splits=defaultdict(list);counts={}
131
- for (split,family),rows in sorted(bins.items()):
132
- random.Random(SEED).shuffle(rows)
133
- classes=defaultdict(list)
134
- for r in rows:classes[r['gold'] if family!='code_transfer' else 'all'].append(r)
135
- selected=[];limit=3000 if split=='train' else 240
136
- while classes and len(selected)<limit:
137
- for key in list(classes):
138
- selected.append(classes[key].pop())
139
- if not classes[key]:del classes[key]
140
- if len(selected)==limit:break
141
- splits[split].extend(selected);counts[split+':'+family]=len(selected)
142
- owners={}
143
- for split,rows in splits.items():
144
- for r in rows:
145
- for key in [r['provenance']['component'],r['provenance']['origin'],statekey(r['state'])]:
146
- assert owners.setdefault(key,split)==split,(key,split)
147
- payload={outputs[0]:old_train+splits['train'],outputs[1]:read(data/'selection_v3.jsonl')+splits['val'],
148
- outputs[2]:read(data/'calibration_v3.jsonl')+splits['calibration'],outputs[3]:splits['test']}
149
- class_weights={}
150
- for family in ['contract_entailment','stance_transfer']:
151
- rows=[r for r in splits['train'] if r['family']==family]
152
- counts_by_class=Counter(r['gold'] for r in rows)
153
- raw={k:min(3.0,len(rows)/(len(counts_by_class)*n)) for k,n in counts_by_class.items()}
154
- mean=sum(raw[k]*n for k,n in counts_by_class.items())/len(rows)
155
- weights={k:w/mean for k,w in raw.items()};class_weights[family]=weights
156
- for r in rows:r['weight']=weights[r['gold']]
157
- hashes={}
158
- for name,rows in payload.items():
159
- random.Random(SEED).shuffle(rows);write(data/name,rows);hashes[name]=hashlib.sha256((data/name).read_bytes()).hexdigest()
160
- report=dict(seed=SEED,sources=sources,counts=counts,excluded=dict(excluded),files=hashes,class_weights=class_weights,
161
- code_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),
162
- retained_train_v3_sha256=hashlib.sha256((data/'train_v3.jsonl').read_bytes()).hexdigest(),
163
- protected_sha256={str(p.relative_to(ROOT)):hashlib.sha256(p.read_bytes()).hexdigest() for p in protected},
164
- limitations=['Full frozen suite remains unavailable.', 'ContractNLI restricted to complete contracts fitting 2048 state tokens.',
165
- 'Source article/document groups are held together. Code holdouts use disjoint complete templates, but share Python primitives.',
166
- 'Exact normalized content exclusion is not a semantic paraphrase detector.', 'V3 tool tests remain small and easy; do not interpret their accuracy as strong tool retrieval evidence.'])
167
- (data/'train_v4.provenance.json').write_text(json.dumps(report,indent=2));print(json.dumps(report,indent=2))
168
-
169
- if __name__=='__main__': main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/check-baseline-adapter.py DELETED
@@ -1,18 +0,0 @@
1
- import json
2
- from pathlib import Path
3
- import mlx.core as mx
4
- from huggingface_hub import snapshot_download
5
- mx.set_default_device(mx.cpu)
6
- base=Path(snapshot_download('mlx-community/Qwen3-0.6B-bf16',revision='42096995f6402fde107068cf530136fe64b604f8'))
7
- b=mx.load(str(base/'model.safetensors')); a=mx.load('adapters/jet/adapters.safetensors'); pub=mx.load('models/jet/model.safetensors')
8
- report={'keys_match':b.keys()==pub.keys(),'exact_tensors':0,'different_tensors':0,'max_abs_difference':0.0}
9
- for key,weight in b.items():
10
- prefix=key.removesuffix('.weight')
11
- if prefix+'.lora_a' in a:
12
- delta=((10*a[prefix+'.lora_b'].T)@a[prefix+'.lora_a'].T).astype(weight.dtype)
13
- weight=weight+delta
14
- diff=float(mx.max(mx.abs(weight.astype(mx.float32)-pub[key].astype(mx.float32))).item())
15
- report['exact_tensors' if diff==0 else 'different_tensors']+=1
16
- report['max_abs_difference']=max(report['max_abs_difference'],diff)
17
- Path('docs/training/jet-next/baseline-adapter-check.json').write_text(json.dumps(report,indent=2))
18
- print(report)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/audit_v4_tools.py DELETED
@@ -1,31 +0,0 @@
1
- """Validate every SGD example against native train annotations and check isolation."""
2
- import json
3
- from collections import Counter
4
- from functools import lru_cache
5
- from pathlib import Path
6
- from data.decision_training import ROOT, read, atoms, normalized, digest, statekey
7
-
8
- src=ROOT/'work/jet-next/sgd/train'
9
- schema={s['service_name']:s for s in json.loads((src/'schema.json').read_text())}
10
- @lru_cache(None)
11
- def source(name):return {d['dialogue_id']:d for d in json.loads((src/name).read_text())}
12
- parents=read(ROOT/'data/train_v4_focus.jsonl');parent_atoms={a for r in parents for a in atoms(r['state'])}
13
- owners={};counts=Counter();options=Counter()
14
- for split,name in dict(train='train_v4_tools_focus.jsonl',val='selection_v4_tools.jsonl',calibration='calibration_v4_tools.jsonl',test='test_v4_tools.jsonl').items():
15
- for r in read(ROOT/'data'/name):
16
- if r['source']!='v4:tool_intent_routing':continue
17
- p=r['provenance'];_,filename,did,turn=p['origin'].split(':');turn=int(turn)
18
- d=source(filename)[did];native=d['turns'][turn]['frames'][0]
19
- assert native['service']==p['native_service']
20
- assert native['state']['active_intent']==r['gold']
21
- assert r['state']['conversation']==[dict(role=t['speaker'].lower(),text=t['utterance']) for t in d['turns'][:turn+1]]
22
- opts={i['name']:i['description'] for i in schema[p['native_service']]['intents']}
23
- opts['NONE']='No active intent; no service action is currently requested.'
24
- assert r['question']['criteria']==opts
25
- assert list(r['question']['criteria'])[r['target'].index(1.0)]==r['gold']
26
- if split!='train': assert not any(digest(normalized(t['text'])) in parent_atoms for t in r['state']['conversation'])
27
- for key in [p['component'],p['origin'],*p['identities'],statekey(r['state'])]:assert owners.setdefault(key,split)==split
28
- counts[split]+=1;options[len(opts)]+=1
29
- report=dict(status='passed',native_annotations_checked=sum(counts.values()),counts=dict(counts),option_counts=dict(options),parent_training_overlap=0,
30
- checks=['Whole domains and dialogues held together','Native intent targets and complete conversation prefixes match source','Held-out conversation utterances absent from parent training content','Options are the native same-service catalog plus NONE'])
31
- (ROOT/'docs/training/jet-next/v4-tool-audit.json').write_text(json.dumps(report,indent=2));print(report)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/audit_v4_transfer.py DELETED
@@ -1,43 +0,0 @@
1
- """Check V4 isolation, public annotations and every generated executable target."""
2
- import ast
3
- import csv
4
- import json
5
- import zipfile
6
- from collections import Counter
7
- from pathlib import Path
8
- from data.decision_training import read, digest, statekey
9
- from build_v4_transfer import ROOT, RAW, PROGRAMS
10
-
11
- def main():
12
- paths={s:ROOT/'data'/p for s,p in dict(train='train_v4.jsonl',val='selection_v4.jsonl',calibration='calibration_v4.jsonl',test='test_v4_new.jsonl').items()}
13
- owners={};identities={};counts=Counter();positions=Counter()
14
- vast={r['new_id']:r for r in csv.DictReader((RAW/'vast/data/VAST/vast_train.csv').open())}
15
- z=zipfile.ZipFile(RAW/'repos/contractnli/resources/contract-nli.zip')
16
- c=json.loads(z.read('contract-nli/train.json'));contracts={str(d['id']):d for d in c['documents']}
17
- safe=dict(enumerate=enumerate,range=range,len=len,zip=zip,sum=sum,sorted=sorted,reversed=reversed,list=list)
18
- for split,path in paths.items():
19
- for r in read(path):
20
- key=statekey(r['state']); assert owners.setdefault(key,split)==split,('state overlap',split)
21
- if not r.get('source','').startswith('v4:'):continue
22
- p=r['provenance']; assert p['split']==split
23
- for key in [p['component'],p['origin']]: assert identities.setdefault(key,split)==split,key
24
- q=r['question'];idx=r['target'].index(1.0);gold=list(q['criteria'])[idx];chosen=list(q['criteria'].values())[idx]
25
- assert gold==r['gold']; assert sum(r['target'])==1.0
26
- family=r['family'];counts[split+':'+family]+=1;positions[(family,idx)]+=1
27
- if family=='code_transfer':
28
- ns={};exec(r['state']['code'],{'__builtins__':{},**safe},ns)
29
- out=ns['f'](**r['state']['arguments']);assert ast.literal_eval(chosen)==out==p['oracle']['result']
30
- assert len(set(q['criteria'].values()))==len(q['criteria'])
31
- elif family=='stance_transfer':
32
- source=vast[p['origin'].split(':')[-1]]
33
- assert r['state']['text']==source['post'] and r['state']['target']==source['new_topic']
34
- assert gold==['against','favor','none'][int(source['label'])]
35
- elif family=='contract_entailment':
36
- _,did,lid=p['origin'].split(':');source=contracts[did]
37
- assert r['state']['contract']==source['text']
38
- assert r['state']['hypothesis']==c['labels'][lid]['hypothesis']
39
- assert gold==source['annotation_sets'][0]['annotations'][lid]['choice']
40
- report=dict(status='passed',counts=dict(counts),gold_positions={str(k):v for k,v in positions.items()},checks=['No state or component crosses a split','All VAST and ContractNLI targets checked against native train annotations','Every generated program executed and selected answer verified'])
41
- out=ROOT/'docs/training/jet-next/v4-data-audit.json';out.write_text(json.dumps(report,indent=2));print(json.dumps(report,indent=2))
42
-
43
- if __name__=='__main__':main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/bench_index_cuda.sh DELETED
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Decision Index CLI with Jet's MLX CUDA environment. No cloud job or upload.
3
- set -euo pipefail
4
- cd "$(dirname "$0")/.."
5
- uv sync --extra cuda --extra benchmark --inexact
6
- export CUDA_HOME="$PWD/.venv/cuda_home"
7
- mkdir -p "$CUDA_HOME/include"
8
- shopt -s nullglob
9
- for pkg in .venv/lib/python*/site-packages/nvidia/{cuda_runtime,cuda_cccl,cuda_nvrtc}/include; do
10
- for header in "$PWD/$pkg"/*; do
11
- [ "$(basename "$header")" = __init__.py ] || ln -sfn "$header" "$CUDA_HOME/include/"
12
- done
13
- done
14
- export MLX_USE_CUDA_GRAPHS=0
15
- export MLX_CUDA_SDPA_CACHE_SIZE="${MLX_CUDA_SDPA_CACHE_SIZE:-2048}"
16
- export MLX_PTX_CACHE_DIR="$PWD/.venv/ptx_cache"
17
- exec .venv/bin/python -m decision_index "$@"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/build_v4_tools.py DELETED
@@ -1,89 +0,0 @@
1
- """Native SGD training intent routing with whole-domain heldouts and ToolRet exclusion."""
2
- import hashlib
3
- import json
4
- import random
5
- from collections import Counter, defaultdict
6
- from pathlib import Path
7
- import pyarrow.parquet as pq
8
- from huggingface_hub import snapshot_download
9
- from transformers import AutoTokenizer
10
- from data.decision_training import ROOT, choice, read, write, normalized, statekey, atoms, digest
11
- from format import render_state
12
-
13
- SEED=230924
14
- REV='e852981ae34990f4358979625854259302feaa78'
15
-
16
- def main():
17
- data=ROOT/'data'; prefix='v4_tools'
18
- files={s:data/p for s,p in dict(train='train_v4_tools_focus.jsonl',val='selection_v4_tools.jsonl',calibration='calibration_v4_tools.jsonl',test='test_v4_tools.jsonl').items()}
19
- if any(p.exists() for p in files.values()):raise SystemExit('Refusing to overwrite tool experiment')
20
- src=ROOT/'work/jet-next/sgd/train'
21
- if not src.exists():
22
- from decision_index.suite.build.acquire import git_fetch
23
- git_fetch(src.parent,'https://github.com/google-research-datasets/dstc8-schema-guided-dialogue.git',REV,['train'])
24
- schemas={s['service_name']:s for s in json.loads((src/'schema.json').read_text())}
25
- domains=sorted({s.split('_')[0] for s,v in schemas.items() if len(v['intents'])>=2})
26
- random.Random(SEED).shuffle(domains)
27
- splits={d:'val' if i<2 else 'calibration' if i<4 else 'test' if i<6 else 'train' for i,d in enumerate(domains)}
28
- queries_path=Path(snapshot_download('mangopy/ToolRet-Queries',repo_type='dataset',revision='b8c76ad3349ff17497b6bdb28bb5b8f61a0f6445',allow_patterns=['*/*.parquet']))
29
- blocked={normalized(r['query']) for p in queries_path.rglob('*.parquet') for r in pq.read_table(p).to_pylist()}
30
- protected=[data/p for p in ['val.jsonl','test.jsonl','score_eval.jsonl','val_v3_new.jsonl','calibration_v3_new.jsonl','test_v3_new.jsonl','selection_v4.jsonl','calibration_v4.jsonl','test_v4_new.jsonl']]
31
- held_atoms={a for p in protected for r in read(p) for a in atoms(r['state'])}
32
- tokenizer=AutoTokenizer.from_pretrained('mlx-community/Qwen3-0.6B-bf16',revision='42096995f6402fde107068cf530136fe64b604f8')
33
- bins=defaultdict(list);excluded=Counter();seen=set();source_hashes={p.name:hashlib.sha256(p.read_bytes()).hexdigest() for p in src.glob('*.json')}
34
- for p in sorted(src.glob('dialogues_*.json')):
35
- for d in json.loads(p.read_text()):
36
- first=d['turns'][0]
37
- if len(first['frames'])!=1:continue
38
- service=first['frames'][0]['service'];schema=schemas[service];domain=service.split('_')[0]
39
- if domain not in splits:continue
40
- # Long exact query overlap excludes the entire dialogue, without inspecting answers.
41
- if any(len(normalized(t['utterance']))>=32 and (normalized(t['utterance']) in blocked or digest(normalized(t['utterance'])) in held_atoms) for t in d['turns']):
42
- excluded['dialogue_with_evaluation_query']+=1;continue
43
- history=[]
44
- for turn,t in enumerate(d['turns'][:12]):
45
- history.append({'role':t['speaker'].lower(),'text':t['utterance']})
46
- if any(f['service']!=service for f in t['frames']):break
47
- if t['speaker']!='USER' or len(t['frames'])!=1:continue
48
- gold=t['frames'][0]['state']['active_intent']
49
- options={i['name']:i['description'] for i in schema['intents']}
50
- options['NONE']='No active intent; no service action is currently requested.'
51
- if gold not in options:continue
52
- state={'service':schema['description'],'conversation':list(history)}
53
- if len(tokenizer.encode(render_state(state),add_special_tokens=False))>1024:
54
- excluded['over_capacity']+=1;continue
55
- key=statekey(state)
56
- if key in seen:excluded['duplicate_state']+=1;continue
57
- seen.add(key)
58
- r=choice(state,'Which service intent is active after the last user turn?',options,gold,
59
- 'tool_intent_routing',f'sgd:{p.name}:{d["dialogue_id"]}:{turn}',f'sgd-domain:{domain}',
60
- identities=[f'sgd-dialogue:{d["dialogue_id"]}'])
61
- r['source']='v4:tool_intent_routing';r['provenance'].update(split=splits[domain],component=f'sgd-domain:{domain}',native_service=service,source_file=p.name)
62
- bins[splits[domain]].append(r)
63
- selected={};counts={};rng=random.Random(SEED)
64
- for split,rows in bins.items():
65
- rng.shuffle(rows);classes=defaultdict(list)
66
- for r in rows:classes[r['gold']].append(r)
67
- out=[];limit=3000 if split=='train' else 240
68
- while classes and len(out)<limit:
69
- for k in list(classes):
70
- out.append(classes[k].pop())
71
- if not classes[k]:del classes[k]
72
- if len(out)==limit:break
73
- selected[split]=out;counts[split]=len(out)
74
- assert all(counts.get(s,0)>=200 for s in ['val','calibration','test']),counts
75
- parents=dict(train=data/'train_v4_focus.jsonl',val=data/'selection_v4.jsonl',calibration=data/'calibration_v4.jsonl')
76
- hashes={};owners={}
77
- for split,rows in selected.items():
78
- for r in rows:
79
- p=r['provenance']
80
- for key in [p['component'],p['origin'],*p['identities'],statekey(r['state'])]:assert owners.setdefault(key,split)==split
81
- payload=(read(parents[split]) if split in parents else [])+rows;rng.shuffle(payload);write(files[split],payload)
82
- hashes[files[split].name]=hashlib.sha256(files[split].read_bytes()).hexdigest()
83
- report=dict(seed=SEED,repository='https://github.com/google-research-datasets/dstc8-schema-guided-dialogue',revision=REV,native_split='train',source_files=source_hashes,
84
- domain_splits=splits,counts=counts,exclusions=dict(excluded),toolret_query_revision='b8c76ad3349ff17497b6bdb28bb5b8f61a0f6445',toolret_queries=len(blocked),files=hashes,
85
- parents={p.name:hashlib.sha256(p.read_bytes()).hexdigest() for p in parents.values()},code_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),
86
- limitations=['Intent routing within one native service; not a ToolRet ranking score or BFCL multi-tool execution task.', 'Six heldout domains are entirely absent from added SGD training data; base-model pretraining coverage is unknown.', 'Exact long-query exclusion does not detect paraphrases.'])
87
- (data/'train_v4_tools.provenance.json').write_text(json.dumps(report,indent=2));print(json.dumps(report,indent=2))
88
-
89
- if __name__=='__main__':main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/build_v4_transfer.py DELETED
@@ -1,169 +0,0 @@
1
- """Add training-partition stance/contracts and executable multi-step Python tasks.
2
-
3
- Never uses evaluation labels. Existing files are read-only exclusion/retention inputs.
4
- New holdouts are grouped by article/document or whole program template.
5
- """
6
- import csv
7
- import hashlib
8
- import json
9
- import random
10
- import zipfile
11
- from collections import Counter, defaultdict
12
- from pathlib import Path
13
-
14
- from data.decision_training import ROOT, atoms, choice, digest, normalized, read, statekey, write
15
- from format import Question, render_state, build_prompt
16
- from transformers import AutoTokenizer
17
-
18
- SEED = 230924
19
- RAW = ROOT / 'artifacts/decision-index/rebuild/artifacts/benchmark-suite/raw'
20
- # Distinct complete templates are assigned to each split before generating inputs.
21
- PROGRAMS = [
22
- 'out = []\nfor v in x:\n if v > k:\n out.append(v * 2)\nreturn out',
23
- 'out = 0\nfor i, v in enumerate(x):\n out += v if i % 2 == 0 else -v\nreturn out + k',
24
- 'out = []\nfor v in x:\n if v not in out:\n out.append(v)\nreturn out[k:]',
25
- 'out = []\nfor i in range(1, len(x)):\n out.append(x[i] - x[i-1])\nreturn out[:k]',
26
- 'out = 1\nfor v in x:\n if v != 0:\n out *= v\nreturn out + k',
27
- 'out = []\nfor v in x:\n if v >= k:\n out.insert(0, v)\nreturn out',
28
- 'out = 0\nfor v in x:\n if v == k:\n break\n out += v\nreturn out',
29
- 'out = []\nfor v in x:\n if v % 2:\n continue\n out.append(v + k)\nreturn out',
30
- 'out = []\nfor a, b in zip(x, x[1:]):\n if a < b:\n out.append(a + b + k)\nreturn out',
31
- 'out = []\nfor v in x:\n out.append(sum(x[:len(out)+1]))\nreturn out[k:]',
32
- 'out = sorted(x)\nif k % 2:\n out.reverse()\nreturn out[:k]',
33
- 'out = []\nfor v in x:\n if x.count(v) > k and v not in out:\n out.append(v)\nreturn out',
34
- 'out = 0\nfor v in reversed(x):\n out = out * 2 + v\nreturn out - k',
35
- 'out = []\nfor i, v in enumerate(x):\n if v > sum(x[:i]):\n out.append(i)\nreturn out[k:]',
36
- 'out = []\nfor v in x:\n if out and out[-1] == v:\n out.pop()\n else:\n out.append(v)\nreturn out + [k]',
37
- 'out = 0\nfor a in x:\n for b in x:\n if a + b == k:\n out += 1\nreturn out',
38
- 'out = list(x)\nfor i in range(k):\n out = out[1:] + out[:1]\nreturn out',
39
- 'out = []\nfor v in x:\n out.append(v)\n if v == k:\n out.append(-v)\nreturn out',
40
- ]
41
-
42
- def program_rows():
43
- safe = dict(enumerate=enumerate, range=range, len=len, zip=zip, sum=sum,
44
- sorted=sorted, reversed=reversed, list=list)
45
- for tid, body in enumerate(PROGRAMS):
46
- split = 'train' if tid < 12 else 'val' if tid < 14 else 'calibration' if tid < 16 else 'test'
47
- code = 'def f(x, k):\n' + '\n'.join(' '+line for line in body.splitlines())
48
- ns = {}; exec(code, {'__builtins__': {}, **safe}, ns); fn = ns['f']
49
- rng = random.Random(SEED + tid)
50
- for i in range(300 if split == 'train' else 120):
51
- x = [rng.randint(-4, 7) for _ in range(rng.randint(3, 8))]; k = rng.randint(0, 4)
52
- result = fn(x.copy(), k)
53
- # Counterfactual inputs/parameters produce plausible same-type distractors.
54
- alternatives = [fn(x.copy(), k+1), fn(x[::-1], k), fn(x[1:], k), fn(x+[k], k)]
55
- alternatives += ([result+[k], result+[k+1], result+[k+2]] if isinstance(result, list)
56
- else [result-1, result+1, result+2])
57
- vals = list(dict.fromkeys([repr(result)] + [repr(v) for v in alternatives]))[:4]
58
- options = {f'candidate_{j}': v for j,v in enumerate(vals)}
59
- r = choice({'code':code,'arguments':{'x':x,'k':k}}, 'What does f(**arguments) return?',
60
- options,'candidate_0','code_behavior',f'local-v4:{tid}:{i}',f'v4-template:{tid}')
61
- # choice randomizes semantic keys again for this family.
62
- r['family']='code_transfer'; r['source']='v4:code_transfer'
63
- r['provenance'].update(split=split, oracle={'result':result,'template':tid}, original_split='generated')
64
- yield r
65
-
66
- def main():
67
- data=ROOT/'data'; outputs=['train_v4.jsonl','selection_v4.jsonl','calibration_v4.jsonl','test_v4_new.jsonl']
68
- if any((data/p).exists() for p in outputs): raise SystemExit('Refusing to overwrite existing v4 files')
69
- tokenizer=AutoTokenizer.from_pretrained('mlx-community/Qwen3-0.6B-bf16',revision='42096995f6402fde107068cf530136fe64b604f8')
70
- old_train=read(data/'train_v3.jsonl')
71
- protected=[data/p for p in ['val.jsonl','test.jsonl','score_eval.jsonl','val_v3_new.jsonl','calibration_v3_new.jsonl','test_v3_new.jsonl']]
72
- protected += [ROOT/'artifacts/decision-index/rebuild/artifacts/benchmark-suite/release-v1-rebuilt/selected-rows.jsonl']
73
- held_atoms={a for p in protected for r in read(p) for a in atoms(r['state'])}
74
- held_states={statekey(r['state']) for p in protected for r in read(p)}
75
- seen={digest([r['state'],r['question']]) for r in old_train}
76
- old_atoms={a for r in old_train for a in atoms(r['state'])}
77
- sources=[]; candidates=list(program_rows()); excluded=Counter()
78
- vast=RAW/'vast/data/VAST/vast_train.csv'
79
- sources.append(dict(repository='https://github.com/emilyallaway/zero-shot-stance',revision='e7c4775182b184730f350995f8260579c9e066fe',file='data/VAST/vast_train.csv',sha256=hashlib.sha256(vast.read_bytes()).hexdigest(),split='train'))
80
- # Native development/test posts are exclusion-only, including all topic variants.
81
- blocked_posts={normalized(r['post']) for f in ['vast_dev.csv','vast_test.csv'] for r in csv.DictReader((vast.parent/f).open())}
82
- for r in csv.DictReader(vast.open()):
83
- if normalized(r['post']) in blocked_posts: excluded['vast_native_heldout_post']+=1; continue
84
- row=choice({'text':r['post'],'target':r['new_topic']},'What stance does the author express towards the target?',
85
- dict(against='opposes the target',favor='supports the target',none='no clear stance towards the target'),
86
- ['against','favor','none'][int(r['label'])],'stance_transfer','vast-train:'+r['new_id'],'vast-article:'+r['arc_id'])
87
- candidates.append(row)
88
- archive=RAW/'repos/contractnli/resources/contract-nli.zip'
89
- sources.append(dict(repository='https://github.com/stanfordnlp/contract-nli',revision='eced6528dd3c1d14d73f9a87df8f7bdbc03126f9',file='resources/contract-nli.zip!contract-nli/train.json',sha256=hashlib.sha256(archive.read_bytes()).hexdigest(),split='train'))
90
- with zipfile.ZipFile(archive) as z:
91
- contracts=json.loads(z.read('contract-nli/train.json'))
92
- held_contracts={normalized(d['text']) for s in ['dev','test'] for d in json.loads(z.read(f'contract-nli/{s}.json'))['documents']}
93
- for d in contracts['documents']:
94
- if normalized(d['text']) in held_contracts: excluded['contract_native_heldout_text']+=1; continue
95
- # Keep the full contract. Never assign a full-document label to a cropped context.
96
- for lid,a in d['annotation_sets'][0]['annotations'].items():
97
- row=choice({'contract':d['text'],'hypothesis':contracts['labels'][lid]['hypothesis']},
98
- 'Does the full contract entail, contradict, or leave the hypothesis undetermined?',
99
- dict(Entailment='entailed by the contract',Contradiction='contradicted by the contract',NotMentioned='not determined by the contract'),
100
- a['choice'],'contract_entailment',f'contractnli-train:{d["id"]}:{lid}',f'contractnli-document:{d["id"]}')
101
- candidates.append(row)
102
- # Same normalized document/post stays grouped even if source IDs differ.
103
- from data.decision_training import Components
104
- components=Components()
105
- for r in candidates:
106
- group=r['provenance']['group']; s=r['state']
107
- text=s.get('contract',s.get('text'))
108
- if text: components.union(group,'document:'+digest(normalized(text)))
109
- forced_train=set()
110
- for r in candidates:
111
- s=r['state']; text=s.get('contract',s.get('text'))
112
- if text and digest(normalized(text)) in old_atoms:
113
- forced_train.add(components.find(r['provenance']['group']))
114
- bins=defaultdict(list)
115
- for r in candidates:
116
- p=r['provenance'];s=r['state'];text=s.get('contract',s.get('text'))
117
- # Global hypotheses recur by design; only document content is an exclusion key.
118
- if statekey(s) in held_states or (text and digest(normalized(text)) in held_atoms):
119
- excluded['existing_evaluation_content']+=1;continue
120
- signature=digest([s,r['question']])
121
- if signature in seen: excluded['duplicate']+=1;continue
122
- seen.add(signature)
123
- if len(tokenizer.encode(render_state(s),add_special_tokens=False))>2048:
124
- excluded['over_2048_full_state']+=1;continue
125
- if len(tokenizer.encode(build_prompt(tokenizer,s,Question.from_dict(r['question'])),add_special_tokens=False))>2304:
126
- excluded['over_2304_full_prompt']+=1;continue
127
- group=components.find(p['group']); b=int(digest([SEED,group])[:8],16)/2**32
128
- split=p.get('split') or ('train' if group in forced_train or b<.8 else 'val' if b<.87 else 'calibration' if b<.94 else 'test')
129
- p.update(component=group,split=split);r['source']='v4:'+r['family'];bins[(split,r['family'])].append(r)
130
- splits=defaultdict(list);counts={}
131
- for (split,family),rows in sorted(bins.items()):
132
- random.Random(SEED).shuffle(rows)
133
- classes=defaultdict(list)
134
- for r in rows:classes[r['gold'] if family!='code_transfer' else 'all'].append(r)
135
- selected=[];limit=3000 if split=='train' else 240
136
- while classes and len(selected)<limit:
137
- for key in list(classes):
138
- selected.append(classes[key].pop())
139
- if not classes[key]:del classes[key]
140
- if len(selected)==limit:break
141
- splits[split].extend(selected);counts[split+':'+family]=len(selected)
142
- owners={}
143
- for split,rows in splits.items():
144
- for r in rows:
145
- for key in [r['provenance']['component'],r['provenance']['origin'],statekey(r['state'])]:
146
- assert owners.setdefault(key,split)==split,(key,split)
147
- payload={outputs[0]:old_train+splits['train'],outputs[1]:read(data/'selection_v3.jsonl')+splits['val'],
148
- outputs[2]:read(data/'calibration_v3.jsonl')+splits['calibration'],outputs[3]:splits['test']}
149
- class_weights={}
150
- for family in ['contract_entailment','stance_transfer']:
151
- rows=[r for r in splits['train'] if r['family']==family]
152
- counts_by_class=Counter(r['gold'] for r in rows)
153
- raw={k:min(3.0,len(rows)/(len(counts_by_class)*n)) for k,n in counts_by_class.items()}
154
- mean=sum(raw[k]*n for k,n in counts_by_class.items())/len(rows)
155
- weights={k:w/mean for k,w in raw.items()};class_weights[family]=weights
156
- for r in rows:r['weight']=weights[r['gold']]
157
- hashes={}
158
- for name,rows in payload.items():
159
- random.Random(SEED).shuffle(rows);write(data/name,rows);hashes[name]=hashlib.sha256((data/name).read_bytes()).hexdigest()
160
- report=dict(seed=SEED,sources=sources,counts=counts,excluded=dict(excluded),files=hashes,class_weights=class_weights,
161
- code_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),
162
- retained_train_v3_sha256=hashlib.sha256((data/'train_v3.jsonl').read_bytes()).hexdigest(),
163
- protected_sha256={str(p.relative_to(ROOT)):hashlib.sha256(p.read_bytes()).hexdigest() for p in protected},
164
- limitations=['Full frozen suite remains unavailable.', 'ContractNLI restricted to complete contracts fitting 2048 state tokens.',
165
- 'Source article/document groups are held together. Code holdouts use disjoint complete templates, but share Python primitives.',
166
- 'Exact normalized content exclusion is not a semantic paraphrase detector.', 'V3 tool tests remain small and easy; do not interpret their accuracy as strong tool retrieval evidence.'])
167
- (data/'train_v4.provenance.json').write_text(json.dumps(report,indent=2));print(json.dumps(report,indent=2))
168
-
169
- if __name__=='__main__': main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/evaluate_next_code.sh DELETED
@@ -1,27 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Larger fixed CRUXEval check after a regression on the original 55-case sample.
3
- set -euo pipefail
4
- cd "$(dirname "$0")/.."
5
- export PYTHONUNBUFFERED=1
6
- if [[ -n "${1:-}" ]]; then while kill -0 "$1" 2>/dev/null; do sleep 10; done; fi
7
- [[ -f docs/training/jet-next/isarcasm-en-v4.json ]]
8
- for name in baseline v3 warm v4; do
9
- if [[ "$name" == baseline ]]; then
10
- ARGS=(--option model=michaljach/jet --option revision=8a97cfea2df622bb03f5dc9b02567e21abd2551c)
11
- else
12
- case "$name" in
13
- v3) RUN=adapters/jet-v3-decision-20260923;;
14
- warm) RUN=adapters/jet-v3-warm-20260924;;
15
- v4) RUN=adapters/jet-v4-transfer-20260924;;
16
- esac
17
- ARGS=(--option model=mlx-community/Qwen3-0.6B-bf16 --option revision=42096995f6402fde107068cf530136fe64b604f8 --option adapter="$RUN")
18
- fi
19
- bash scripts/bench_index_cuda.sh run --engine decision_index_engine:JetEngine \
20
- --rows artifacts/decision-index/cruxeval-full-diagnostic.jsonl.gz \
21
- --out "artifacts/decision-index/runs/cruxeval-full-cuda-next-$name" \
22
- --option max_tokens=8192 --option max_cached_tokens=8192 "${ARGS[@]}" > "logs/jet-next/$name-cruxeval-full.log" 2>&1
23
- uv run --no-sync jet-bench-index report --rows artifacts/decision-index/cruxeval-full-diagnostic.jsonl.gz \
24
- --results "artifacts/decision-index/runs/cruxeval-full-cuda-next-$name/results.jsonl" \
25
- --out "docs/training/jet-next/cruxeval-full-$name.json" > "logs/jet-next/$name-cruxeval-full-report.log" 2>&1
26
- done
27
- printf 'Full available CRUXEval comparison completed.\n'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/evaluate_next_extra.sh DELETED
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- cd "$(dirname "$0")/.."
4
- export PYTHONUNBUFFERED=1 CUDA_HOME="$PWD/.venv/cuda_home" MLX_USE_CUDA_GRAPHS=0
5
- export MLX_CUDA_SDPA_CACHE_SIZE=2048 MLX_PTX_CACHE_DIR="$PWD/.venv/ptx_cache"
6
- if [[ -n "${1:-}" ]]; then while kill -0 "$1" 2>/dev/null; do sleep 10; done; fi
7
- [[ -f docs/training/jet-next/baseline-test_v4_tools.json ]]
8
- for dataset in test score_eval test_v3_new; do
9
- uv run --no-sync jet-eval --base-model models/jet --data "data/$dataset.jsonl" \
10
- --batch-size 2 --max-state-tokens 4096 --json "docs/training/jet-next/baseline-$dataset.json" \
11
- > "logs/jet-next/baseline-$dataset.log" 2>&1
12
- done
13
- for dataset in test score_eval test_v3_new test_v4_new test_v4_tools; do
14
- CONTEXT=4096
15
- if [[ "$dataset" == test_v4_new || "$dataset" == test_v4_tools ]]; then CONTEXT=2048; fi
16
- uv run --no-sync jet-eval --adapter adapters/jet-v3-decision-20260923 --data "data/$dataset.jsonl" \
17
- --batch-size 2 --max-state-tokens "$CONTEXT" --json "docs/training/jet-next/v3-$dataset.json" \
18
- > "logs/jet-next/v3-$dataset.log" 2>&1
19
- done
20
- for name in baseline v3 warm v4; do
21
- if [[ "$name" == baseline ]]; then
22
- ARGS=(--option model=michaljach/jet --option revision=8a97cfea2df622bb03f5dc9b02567e21abd2551c)
23
- else
24
- case "$name" in
25
- v3) RUN=adapters/jet-v3-decision-20260923;;
26
- warm) RUN=adapters/jet-v3-warm-20260924;;
27
- v4) RUN=adapters/jet-v4-transfer-20260924;;
28
- esac
29
- ARGS=(--option model=mlx-community/Qwen3-0.6B-bf16 --option revision=42096995f6402fde107068cf530136fe64b604f8 --option adapter="$RUN")
30
- fi
31
- bash scripts/bench_index_cuda.sh run --engine decision_index_engine:JetEngine \
32
- --rows artifacts/decision-index/esci-diagnostic/diagnostic.jsonl.gz \
33
- --out "artifacts/decision-index/runs/esci-cuda-next-$name" \
34
- --option max_tokens=8192 --option max_cached_tokens=8192 "${ARGS[@]}" > "logs/jet-next/$name-esci.log" 2>&1
35
- uv run --no-sync jet-bench-index report --rows artifacts/decision-index/esci-diagnostic/diagnostic.jsonl.gz \
36
- --results "artifacts/decision-index/runs/esci-cuda-next-$name/results.jsonl" \
37
- --out "docs/training/jet-next/esci-$name.json" > "logs/jet-next/$name-esci-report.log" 2>&1
38
- bash scripts/bench_index_cuda.sh run --engine decision_index_engine:JetEngine \
39
- --rows artifacts/decision-index/isarcasm-english-diagnostic.jsonl.gz \
40
- --out "artifacts/decision-index/runs/isarcasm-en-cuda-next-$name" \
41
- --option max_tokens=8192 --option max_cached_tokens=8192 "${ARGS[@]}" > "logs/jet-next/$name-isarcasm-en.log" 2>&1
42
- uv run --no-sync jet-bench-index report --rows artifacts/decision-index/isarcasm-english-diagnostic.jsonl.gz \
43
- --results "artifacts/decision-index/runs/isarcasm-en-cuda-next-$name/results.jsonl" \
44
- --out "docs/training/jet-next/isarcasm-en-$name.json" > "logs/jet-next/$name-isarcasm-en-report.log" 2>&1
45
- done
46
- printf 'Additional heldouts and ESCI diagnostics completed.\n'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/finalize_next.py DELETED
@@ -1,54 +0,0 @@
1
- """Require completed runs, verify preserved files, and archive reproducibility metadata."""
2
- import hashlib
3
- import csv
4
- import json
5
- import shutil
6
- import subprocess
7
- from pathlib import Path
8
- ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'docs/training/jet-next'
9
- def sha(p):return hashlib.sha256(p.read_bytes()).hexdigest()
10
-
11
- def main():
12
- for name in ['warm','v4']:
13
- for prefix in ['diagnostic','esci','isarcasm-en','cruxeval-full']:
14
- r=json.loads((OUT/f'{prefix}-{name}.json').read_text())
15
- assert r['complete_for_supplied_rows'] and r['pending_requests']==0
16
- assert r['summary']['counts']=={'ok':r['planned_requests']},r['summary']['counts']
17
- runs={}
18
- for name,directory in [('warm','jet-v3-warm-20260924'),('v4','jet-v4-transfer-20260924')]:
19
- p=ROOT/'adapters'/directory;c=json.loads((p/'training_config.json').read_text())
20
- metrics=[json.loads(l) for l in (p/'metrics.jsonl').read_text().splitlines()]
21
- assert metrics[-1]['step']==c['total_steps']
22
- for filename,expected in c['data_sha256'].items():assert sha(ROOT/filename)==expected
23
- assert sha(ROOT/c['init_adapter']/'adapters.safetensors')==c['init_adapter_sha256']
24
- best=min(metrics,key=lambda m:m['nll'])
25
- runs[name]=dict(directory=str(p.relative_to(ROOT)),config=c,best=best,
26
- weights_sha256=sha(p/'adapters.safetensors'),last_weights_sha256=sha(p/'last/adapters.safetensors'),
27
- calibration=json.loads((p/'calibration.json').read_text()))
28
- for f in ['training_config.json','metrics.jsonl','calibration.json']:
29
- shutil.copy2(p/f,OUT/f'{name}-{f.replace("_", "-")}')
30
- for name in ['protected','published']:
31
- subprocess.run(['sha256sum','-c',str(ROOT/f'work/jet-v3/{name}.sha256')],cwd=ROOT,check=True,stdout=subprocess.DEVNULL)
32
- current=subprocess.check_output(['git','diff','--','README.md','src/data/distill.py'],cwd=ROOT)
33
- assert current==(ROOT/'work/jet-v3/preexisting.patch').read_bytes(),'Preexisting user changes differ'
34
- code=['src/train.py','src/evaluate.py','src/model.py','src/inference.py','src/format.py','src/decision_index_engine.py','src/bench_decision_index.py','src/data/decision_training.py','train_cuda.sh','scripts/bench_index_cuda.sh','scripts/evaluate_next_code.sh']
35
- code += ['scripts/'+n for n in ['build_v4_transfer.py','audit_v4_transfer.py','prepare_v4_focus.py','build_v4_tools.py','audit_v4_tools.py','run_next_cuda.sh','evaluate_next_extra.sh','summarize_next.py','finalize_next.py']]
36
- for relative in code:
37
- dest=OUT/'code'/relative;dest.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(ROOT/relative,dest)
38
- hashes={p:sha(ROOT/p) for p in code+['uv.lock','pyproject.toml']}
39
- corpus={p.name:sha(p) for p in (ROOT/'data').glob('*v4*.jsonl')}
40
- samples=list(csv.DictReader((ROOT/'logs/jet-next/gpu.csv').open(),skipinitialspace=True))
41
- peak=max(int(r['memory.used [MiB]'].split()[0]) for r in samples)
42
- hardware=subprocess.check_output(['nvidia-smi','--query-gpu=name,memory.total,driver_version','--format=csv,noheader'],text=True).strip()
43
- manifest=dict(status='completed',base='mlx-community/Qwen3-0.6B-bf16',base_revision='42096995f6402fde107068cf530136fe64b604f8',
44
- git_head=subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT,text=True).strip(),
45
- branch=subprocess.check_output(['git','branch','--show-current'],cwd=ROOT,text=True).strip(),
46
- runs=runs,hardware=hardware,monitored_device_peak_mib=peak,monitor_scope='V4 training and subsequent evaluations, including desktop GPU use',code_sha256=hashes,data_sha256=corpus,protected_original_files='unchanged',published_model='unchanged',preexisting_user_changes='unchanged',
47
- warm_source_snapshot_sha256=sha(OUT/'train-warm-snapshot.py'),
48
- limitations=['No official full-suite or leaderboard score','Native metrics only; installed panel proposal differs from deployed panel','Partial diagnostic differences are descriptive, not significance tests'])
49
- (OUT/'run-manifest.json').write_text(json.dumps(manifest,indent=2))
50
- destination=Path('/home/jach/Documents/Codex/2026-09-23/cl/outputs');destination.mkdir(parents=True,exist_ok=True)
51
- shutil.copy2(OUT/'run-manifest.json',destination/'jet-next-run-manifest.json')
52
- shutil.copy2(OUT/'comparison.json',destination/'jet-next-results.json')
53
- print('Completed runs verified; published model, original files and prior changes preserved.')
54
- if __name__=='__main__':main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/prepare_v4_focus.py DELETED
@@ -1,35 +0,0 @@
1
- """Create a bounded retention mixture from V4 training rows only."""
2
- import hashlib
3
- import json
4
- import random
5
- from collections import defaultdict
6
- from pathlib import Path
7
- from data.decision_training import ROOT, read, write
8
-
9
- p=ROOT/'data/train_v4_focus.jsonl'
10
- if p.exists(): raise SystemExit('Refusing to overwrite a training mixture')
11
- rows=read(ROOT/'data/train_v4.jsonl'); buckets=defaultdict(list); new=[]
12
- for r in rows:
13
- if r['source'].startswith('v4:'):new.append(r)
14
- else:buckets[r['source']].append(r)
15
- rng=random.Random(230924); selected=[]
16
- # Round robin by original source, preserving rare families without replacement.
17
- for rows in buckets.values():rng.shuffle(rows)
18
- while buckets and len(selected)<18000:
19
- for key in list(buckets):
20
- selected.append(buckets[key].pop())
21
- if not buckets[key]:del buckets[key]
22
- if len(selected)==18000:break
23
- rows=selected+new;rng.shuffle(rows);write(p,rows)
24
- smoke=sorted([r for r in rows if r['source']=='v4:contract_entailment'],
25
- key=lambda r:len(r['state']['contract']),reverse=True)[:32]
26
- smoke += [r for r in rows if r['source']=='v4:stance_transfer'][:16]
27
- smoke += [r for r in rows if r['source']=='v4:code_transfer'][:16]
28
- smoke_path=ROOT/'work/jet-next/v4-smoke.jsonl'
29
- smoke_path.parent.mkdir(parents=True,exist_ok=True);write(smoke_path,smoke)
30
- report=dict(seed=230924,retained_v3=len(selected),new_v4=len(new),total=len(rows),
31
- source_sha256=hashlib.sha256((ROOT/'data/train_v4.jsonl').read_bytes()).hexdigest(),
32
- output_sha256=hashlib.sha256(p.read_bytes()).hexdigest(),
33
- smoke_sha256=hashlib.sha256(smoke_path.read_bytes()).hexdigest(),
34
- note='Without-replacement source-balanced subsample of training only; all 9000 V4 additions retained. Existing heldouts unchanged.')
35
- (ROOT/'data/train_v4_focus.provenance.json').write_text(json.dumps(report,indent=2));print(report)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/run_next_cuda.sh DELETED
@@ -1,62 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Continue after the one-epoch V3 warm-start ablation; all outputs are local.
3
- set -euo pipefail
4
- cd "$(dirname "$0")/.."
5
- export PYTHONUNBUFFERED=1 CUDA_HOME="$PWD/.venv/cuda_home" MLX_USE_CUDA_GRAPHS=0
6
- export MLX_CUDA_SDPA_CACHE_SIZE=2048 MLX_PTX_CACHE_DIR="$PWD/.venv/ptx_cache"
7
- WARM=adapters/jet-v3-warm-20260924
8
- NEXT=adapters/jet-v4-transfer-20260924
9
- # Waiting PID is supplied only by the live parent session, never discovered by pattern.
10
- if [[ -n "${1:-}" ]]; then
11
- while kill -0 "$1" 2>/dev/null; do sleep 10; done
12
- fi
13
- .venv/bin/python - <<'PY'
14
- import json
15
- from pathlib import Path
16
- p=Path('adapters/jet-v3-warm-20260924')
17
- config=json.loads((p/'training_config.json').read_text())
18
- metrics=[json.loads(x) for x in (p/'metrics.jsonl').read_text().splitlines()]
19
- assert metrics[-1]['step']==config['total_steps'], 'Warm-start run did not finish'
20
- PY
21
- bash train_cuda.sh --init-adapter "$WARM" --base-revision 42096995f6402fde107068cf530136fe64b604f8 \
22
- --train work/jet-next/v4-smoke.jsonl --val work/jet-next/v4-smoke.jsonl \
23
- --out adapters/jet-v4-transfer-smoke --epochs 1 --lr 1e-5 --max-batch-tokens 3072 \
24
- --max-state-tokens 2048 --use-example-weights --val-limit 64 --eval-every 10 --seed 230924 \
25
- > logs/jet-next/v4-smoke.log 2>&1
26
- bash train_cuda.sh --init-adapter "$WARM" --base-revision 42096995f6402fde107068cf530136fe64b604f8 \
27
- --train data/train_v4_tools_focus.jsonl --val data/selection_v4_tools.jsonl --out "$NEXT" \
28
- --epochs 1 --rank 16 --lr 1e-5 --grad-checkpoint --max-batch-tokens 3072 \
29
- --max-state-tokens 2048 --use-example-weights --val-limit 10000 --eval-every 250 --seed 230924 \
30
- > logs/jet-next/v4-train.log 2>&1
31
- for name in warm v4; do
32
- if [[ "$name" == warm ]]; then RUN="$WARM"; CAL=data/calibration_v3.jsonl;
33
- else RUN="$NEXT"; CAL=data/calibration_v4_tools.jsonl; fi
34
- CONTEXT=4096
35
- uv run --no-sync jet-calibrate --adapter "$RUN" --data "$CAL" --limit 10000 \
36
- --batch-size 2 --max-state-tokens "$CONTEXT" > "logs/jet-next/$name-calibration.log" 2>&1
37
- for dataset in test score_eval test_v3_new test_v4_new test_v4_tools; do
38
- CONTEXT=4096
39
- if [[ "$dataset" == test_v4_new || "$dataset" == test_v4_tools ]]; then CONTEXT=2048; fi
40
- uv run --no-sync jet-eval --adapter "$RUN" --data "data/$dataset.jsonl" --batch-size 2 \
41
- --max-state-tokens "$CONTEXT" --json "docs/training/jet-next/$name-$dataset.json" \
42
- > "logs/jet-next/$name-$dataset.log" 2>&1
43
- done
44
- bash scripts/bench_index_cuda.sh run --engine decision_index_engine:JetEngine \
45
- --rows artifacts/decision-index/diagnostic/diagnostic.jsonl.gz \
46
- --out "artifacts/decision-index/runs/diagnostic-cuda-next-$name" \
47
- --option model=mlx-community/Qwen3-0.6B-bf16 \
48
- --option revision=42096995f6402fde107068cf530136fe64b604f8 --option adapter="$RUN" \
49
- --option max_tokens=8192 --option max_cached_tokens=8192 > "logs/jet-next/$name-diagnostic.log" 2>&1
50
- uv run --no-sync jet-bench-index report --rows artifacts/decision-index/diagnostic/diagnostic.jsonl.gz \
51
- --results "artifacts/decision-index/runs/diagnostic-cuda-next-$name/results.jsonl" \
52
- --out "docs/training/jet-next/diagnostic-$name.json" > "logs/jet-next/$name-report.log" 2>&1
53
- done
54
- uv run --no-sync jet-eval --base-model models/jet --data data/test_v4_new.jsonl --batch-size 2 \
55
- --max-state-tokens 2048 --json docs/training/jet-next/baseline-test_v4_new.json \
56
- > logs/jet-next/baseline-test_v4_new.log 2>&1
57
- uv run --no-sync jet-eval --base-model models/jet --data data/test_v4_tools.jsonl --batch-size 2 \
58
- --max-state-tokens 2048 --json docs/training/jet-next/baseline-test_v4_tools.json \
59
- > logs/jet-next/baseline-test_v4_tools.log 2>&1
60
- sha256sum -c work/jet-v3/protected.sha256 > logs/jet-next/protected-check.log
61
- sha256sum -c work/jet-v3/published.sha256 > logs/jet-next/published-check.log
62
- printf 'Next checkpoint training and evaluation completed.\n'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/scripts/summarize_next.py DELETED
@@ -1,61 +0,0 @@
1
- """Summarize completed, fixed-test comparisons without a reconstructed index."""
2
- import hashlib
3
- import json
4
- from pathlib import Path
5
-
6
- ROOT=Path(__file__).resolve().parents[1];OLD=ROOT/'docs/training/jet-v3';OUT=ROOT/'docs/training/jet-next'
7
- MODELS=['baseline','v3','warm','v4'];LABELS=['Released Jet','V3','Warm start','V4 transfer']
8
- def load(path):return json.loads(path.read_text())
9
- def pct(x):return '—' if x is None else f'{100*x:.1f}'
10
- def main():
11
- data={}
12
- for dataset in ['test','score_eval','test_v3_new','test_v4_new','test_v4_tools']:
13
- data[dataset]={m:load(OUT/f'{m}-{dataset}.json') for m in MODELS}
14
- diagnostics={m:load((OLD if m in ['baseline','v3'] else OUT)/f'diagnostic-{m}.json') for m in MODELS}
15
- esci={m:load(OUT/f'esci-{m}.json') for m in MODELS}
16
- sarcasm={m:load(OUT/f'isarcasm-en-{m}.json') for m in MODELS}
17
- code={m:load(OUT/f'cruxeval-full-{m}.json') for m in MODELS}
18
- for group in [diagnostics,esci,sarcasm,code]:
19
- assert len({r['rows_sha256'] for r in group.values()})==1
20
- assert all(r['complete_for_supplied_rows'] and r['pending_requests']==0 for r in group.values())
21
- results=dict(local_tests=data,diagnostics=diagnostics,esci=esci,isarcasm_english=sarcasm,cruxeval_full=code)
22
- (OUT/'comparison.json').write_text(json.dumps(results,indent=2))
23
- lines=['# Jet Qwen3-0.6B follow-up results','',
24
- 'Two more local checkpoints were trained: a lower-learning-rate warm start from released Jet, then targeted transfer training. No weights were published and no leaderboard entry was submitted.',
25
- '', 'V4 substantially improves contract entailment, product relevance, stance, and English sarcasm over released Jet on the evaluations below. Confirmed regressions remain in CRUXEval and original-test accuracy. The warm checkpoint preserves original-test accuracy more closely. Neither candidate is an across-the-board replacement.',
26
- '', '**These results do not establish a leaderboard win.** The official frozen suite remains unavailable. Diagnostics are partial public reconstructions; the installed kit also contains an older panel definition. Native benchmark metrics below are comparable across these four models on identical rows, but are not an overall index.',
27
- '', '| Held-out accuracy (%) | Released Jet | V3 | Warm start | V4 transfer |', '|---|---:|---:|---:|---:|']
28
- names=dict(test='Original test (3,683)',score_eval='Ordinal test (2,400)',test_v3_new='V3 new families (1,364)',test_v4_new='Harder transfer tasks (720)',test_v4_tools='SGD domain-held-out routing (240)')
29
- for ds,reports in data.items():lines.append('| '+names[ds]+' | '+' | '.join(pct(reports[m]['overall']['acc']) for m in MODELS)+' |')
30
- lines += ['', '| Partial benchmark — native metric (%) | Released Jet | V3 | Warm start | V4 transfer |','|---|---:|---:|---:|---:|']
31
- for group in [diagnostics,esci]:
32
- tables={m:{r['catalog_id']:r for r in report['summary']['benchmarks']} for m,report in group.items()}
33
- for bid,base in tables['baseline'].items():
34
- lines.append('| '+base['dataset']+' — '+str(base.get('metric') or 'unavailable')+' | '+' | '.join(pct(tables[m][bid].get('score')) for m in MODELS)+' |')
35
- english={m:next(t for t in r['panel_metrics_on_sample']['40']['tracks'] if t['track']=='iSarcasmEval-A-En')['raw'] for m,r in sarcasm.items()}
36
- lines.append('| iSarcasmEval English A, all 1,400 cases — positive F1 | '+' | '.join(pct(english[m]) for m in MODELS)+' |')
37
- lines.append('| CRUXEval, all '+str(code['baseline']['planned_requests'])+' available eligible cases — accuracy | '+' | '.join(pct(code[m]['summary']['benchmarks'][0]['score']) for m in MODELS)+' |')
38
- lines += ['', 'iSarcasmEval has no aggregate native score in the pinned summary report. A missing value is not zero. The separate English-A row uses the native positive-class F1 scorer on all 1,400 available cases (the official headline track), without combining other sarcasm tracks. The 500-request eight-benchmark sample and separate 500-request ESCI sample are small; differences are descriptive, not statistical significance claims.',
39
- '', '| V4 task family — accuracy (%) | Released Jet | V3 | Warm start | V4 transfer |','|---|---:|---:|---:|---:|']
40
- for ds in ['test_v4_new','test_v4_tools']:
41
- for family in sorted(data[ds]['baseline']['by_source']):
42
- lines.append('| '+family.removeprefix('v4:')+' | '+' | '.join(pct(data[ds][m]['by_source'][family]['acc']) for m in MODELS)+' |')
43
- lines += ['', '| Original family — accuracy (%) | Released Jet | V3 | Warm start | V4 transfer |','|---|---:|---:|---:|---:|']
44
- for family in sorted(data['test']['baseline']['by_source']):
45
- lines.append('| '+family+' | '+' | '.join(pct(data['test'][m]['by_source'][family]['acc']) for m in MODELS)+' |')
46
- lines += ['', '| Calibration metric | Released Jet | V3 | Warm start | V4 transfer |','|---|---:|---:|---:|---:|']
47
- for ds in ['test','test_v3_new','test_v4_new','test_v4_tools']:
48
- for metric in ['nll','ece']:
49
- lines.append('| '+ds+' '+metric.upper()+' | '+' | '.join(f"{data[ds][m]['overall'][metric]:.4f}" for m in MODELS)+' |')
50
- for metric in ['spearman','mae']:
51
- lines.append('| Ordinal test '+metric+' | '+' | '.join(f"{data['score_eval'][m]['by_type']['score'][metric]:.4f}" for m in MODELS)+' |')
52
- lines += ['', 'Both candidates were selected by held-out validation NLL and calibrated on separate data before these test runs. Original three test sets use the same 4,096-token state limit for all models; new V4 tests use 2,048 for all models. Benchmark adapters preserve complete prompts up to 8,192 tokens.', '', '## Training and provenance', '']
53
- for name,directory in [('Warm start','jet-v3-warm-20260924'),('V4 transfer','jet-v4-transfer-20260924')]:
54
- p=ROOT/'adapters'/directory;c=load(p/'training_config.json');metrics=[json.loads(l) for l in (p/'metrics.jsonl').read_text().splitlines()]
55
- best=min(metrics,key=lambda r:r['nll'])
56
- lines.append(f"- {name}: `{p.relative_to(ROOT)}`; {c['train_examples']:,} rows, {c['total_steps']:,} steps, LR {c['lr']}, best validation step {best['step']}, NLL {best['nll']:.4f}, accuracy {best['acc']:.4f}. Weight SHA256 `{hashlib.sha256((p/'adapters.safetensors').read_bytes()).hexdigest()}`.")
57
- lines += ['', 'The published model remains unchanged. V4 retains 18,000 earlier training examples and adds 3,000 examples each for full-contract entailment, stance, executable multi-step code, and native service-intent routing. Sources are pinned; original training labels were verified; related documents/articles/domains stay together. No hosted model APIs were used.', '', 'Full experimental protocol and reproduction details follow.', '', (ROOT/'docs/training/jet-next.md').read_text()]
58
- (OUT/'summary.md').write_text('\n'.join(lines)+'\n')
59
- destination=Path('/home/jach/Documents/Codex/2026-09-23/cl/outputs/jet-next-report.md');destination.parent.mkdir(parents=True,exist_ok=True);destination.write_text('\n'.join(lines)+'\n')
60
- print(destination)
61
- if __name__=='__main__':main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/bench_decision_index.py DELETED
@@ -1,158 +0,0 @@
1
- """Prepare, audit, and report Decision Index diagnostics without training on them."""
2
- from __future__ import annotations
3
-
4
- import argparse
5
- from collections import Counter, defaultdict
6
- import gzip
7
- import hashlib
8
- import json
9
- from pathlib import Path
10
-
11
- import numpy as np
12
- from decision_index.engines import Unsupported
13
- from decision_index.scoring.index import score_panel
14
- from decision_index.scoring.report import benchmark_summary, load_results
15
- from decision_index.suite.io import Suite, atomic_json, read_jsonl, sha256_file
16
- from decision_index.suite.sample import stratified_sample
17
-
18
- from decision_index_engine import load_assets, prepare_request
19
-
20
-
21
- def write_rows(path, rows):
22
- path = Path(path)
23
- path.parent.mkdir(parents=True, exist_ok=True)
24
- opener = gzip.open if path.suffix == ".gz" else open
25
- with opener(path, "wt", encoding="utf-8") as f:
26
- for row in rows:
27
- f.write(json.dumps(row, ensure_ascii=False) + "\n")
28
-
29
-
30
- def prepare(suite, out, n, allow_partial=False):
31
- verification = suite.verify(strict=not allow_partial)
32
- # Even partial rebuilds must use the published exclusions.
33
- if not verification.get("exclusions_match"):
34
- raise ValueError("Missing or mismatched official exclusions file")
35
- out.mkdir(parents=True, exist_ok=True)
36
- tracks = defaultdict(list)
37
- for row in suite.rows(apply_exclusions=True):
38
- key = row["_evaluation"]["track"]
39
- # Deterministic, label-independent selection, independent of file order.
40
- rank = hashlib.sha256(row["_evaluation"]["run_id"].encode()).hexdigest()
41
- tracks[key].append((rank, row))
42
- tracks[key] = sorted(tracks[key], key=lambda x: x[0])[:2]
43
- smoke = [row for key in sorted(tracks) for _, row in tracks[key]]
44
- write_rows(out / "compatibility.jsonl.gz", smoke)
45
- sample = stratified_sample(suite, n, out / "diagnostic.jsonl.gz")
46
- report = {"verification": verification, "full_frozen_suite": verification["match"],
47
- "compatibility_requests": len(smoke), "tracks": len(tracks),
48
- "diagnostic": sample, "note": "Compatibility is two requests per available track; diagnostic sampling keeps complete source groups. Neither is a leaderboard score."}
49
- atomic_json(out / "preparation.json", report)
50
- return report
51
-
52
-
53
- def audit(rows_path, out):
54
- path, tokenizer, config = load_assets()
55
- limits = [4096, 6144, 8192, 16384, 32768, config["max_position_embeddings"]]
56
- stats = defaultdict(lambda: {"requests": 0, "fields": 0, "lengths": [],
57
- "options": Counter(), "questions_per_request": Counter(),
58
- "supported_requests": Counter(), "capacity_failures": Counter()})
59
- groups = defaultdict(lambda: {limit: True for limit in limits})
60
- for i, row in enumerate(read_jsonl(rows_path)):
61
- e = row["_evaluation"]
62
- s = stats[e["dataset"]]
63
- s["requests"] += 1
64
- s["fields"] += len(row["questions"])
65
- s["questions_per_request"][len(row["questions"])] += 1
66
- for q in row["questions"].values():
67
- s["options"][len(q["criteria"])] += 1
68
- try:
69
- prepared = prepare_request(tokenizer, row["state"], row["questions"], 10**12)
70
- lengths = [len(p[2]) for p in prepared]
71
- s["lengths"].extend(lengths)
72
- maximum = max(lengths)
73
- except Unsupported as exc:
74
- s["capacity_failures"][str(exc)] += 1
75
- maximum = float("inf")
76
- group = groups[(e["dataset"], e["group_id"])]
77
- for limit in limits:
78
- supported = maximum <= limit
79
- s["supported_requests"][limit] += int(supported)
80
- group[limit] &= supported
81
- if (i + 1) % 500 == 0:
82
- print(f"Audited {i + 1} requests", flush=True)
83
- for name, s in stats.items():
84
- lengths = s.pop("lengths")
85
- s["prompt_tokens"] = dict(zip(["p50", "p95", "max"], map(float, np.percentile(lengths, [50, 95, 100])))) if lengths else None
86
- selected = [g for (dataset, _), g in groups.items() if dataset == name]
87
- s["source_groups"] = len(selected)
88
- s["supported_complete_groups"] = {limit: sum(g[limit] for g in selected) for limit in limits}
89
- report = {"rows_sha256": sha256_file(rows_path),
90
- "rows_uncompressed_sha256": sha256_file(rows_path, gunzip=Path(rows_path).suffix == ".gz"),
91
- "model_revision": path.name,
92
- "scope": "Only the supplied rows; token capacity, not measured accuracy or validated long-context quality.",
93
- "limits": limits, "benchmarks": dict(stats)}
94
- out.parent.mkdir(parents=True, exist_ok=True)
95
- atomic_json(out, report)
96
- return report
97
-
98
-
99
- class SampleSuite:
100
- """Read exactly the diagnostic rows, with no invented full-suite denominator."""
101
- def __init__(self, rows_path):
102
- self.rows_path = rows_path
103
-
104
- def rows(self, apply_exclusions=False):
105
- yield from read_jsonl(self.rows_path)
106
-
107
-
108
- def report(rows_path, results_path, out):
109
- suite = SampleSuite(rows_path)
110
- results = load_results(results_path)
111
- summary = benchmark_summary(suite, results, "jet")
112
- panel = score_panel(suite, results)
113
- planned = {r["_evaluation"]["run_id"] for r in suite.rows()}
114
- present = planned & results.keys()
115
- environment_path = Path(results_path).with_name("environment.json")
116
- data = {"scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
117
- "rows_sha256": sha256_file(rows_path), "results_sha256": sha256_file(results_path),
118
- "planned_requests": len(planned), "processed_requests": len(present),
119
- "pending_requests": len(planned - present),
120
- "complete_for_supplied_rows": planned == present,
121
- "environment": json.loads(environment_path.read_text()) if environment_path.exists() else None,
122
- "summary": summary, "panel_metrics_on_sample": panel}
123
- out.parent.mkdir(parents=True, exist_ok=True)
124
- atomic_json(out, data)
125
- return data
126
-
127
-
128
- def main():
129
- ap = argparse.ArgumentParser(description=__doc__)
130
- sub = ap.add_subparsers(dest="command", required=True)
131
- p = sub.add_parser("prepare")
132
- p.add_argument("--suite-dir", type=Path, required=True)
133
- p.add_argument("--out", type=Path, required=True)
134
- p.add_argument("--n", type=int, default=500)
135
- p.add_argument("--allow-partial", action="store_true", help="Explicitly permit a nonmatching partial rebuilt corpus")
136
- p = sub.add_parser("audit")
137
- p.add_argument("--rows", type=Path, required=True)
138
- p.add_argument("--out", type=Path, required=True)
139
- p = sub.add_parser("report")
140
- p.add_argument("--rows", type=Path, required=True)
141
- p.add_argument("--results", type=Path, required=True)
142
- p.add_argument("--out", type=Path, required=True)
143
- args = ap.parse_args()
144
- if args.command == "prepare":
145
- if args.n < 1:
146
- ap.error("--n must be positive")
147
- data = prepare(Suite(args.suite_dir), args.out, args.n, args.allow_partial)
148
- print(json.dumps(data, indent=2))
149
- elif args.command == "audit":
150
- audit(args.rows, args.out)
151
- print(f"Wrote {args.out}")
152
- else:
153
- report(args.rows, args.results, args.out)
154
- print(f"Wrote {args.out}")
155
-
156
-
157
- if __name__ == "__main__":
158
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/data/decision_training.py DELETED
@@ -1,280 +0,0 @@
1
- """Reproducible v3 data from pinned TRAIN files and locally executable generators.
2
-
3
- Run after scripts/rebuild_index_diagnostic.py and scripts/download_v3_sources.py:
4
- uv run --no-sync python -m data.decision_training
5
- No benchmark normalizer supplies training rows. Evaluation is exclusion-only.
6
- """
7
- from __future__ import annotations
8
- import ast
9
- import csv
10
- import hashlib
11
- import json
12
- import random
13
- import re
14
- from collections import Counter, defaultdict
15
- from pathlib import Path
16
-
17
- import pyarrow.parquet as pq
18
- from format import Question, render_state, build_prompt
19
-
20
- SEED = 230923
21
- ROOT = Path(__file__).resolve().parents[2]
22
-
23
- def digest(x):
24
- return hashlib.sha256(json.dumps(x, sort_keys=True, ensure_ascii=False).encode()).hexdigest()
25
-
26
- def normalized(s):
27
- return ' '.join(s.casefold().split())
28
-
29
- def atoms(value):
30
- if isinstance(value, str):
31
- if len(normalized(value)) >= 32:
32
- yield digest(normalized(value))
33
- elif isinstance(value, dict):
34
- for v in value.values(): yield from atoms(v)
35
- elif isinstance(value, list):
36
- for v in value: yield from atoms(v)
37
-
38
- def statekey(value):
39
- return digest(normalized(value) if isinstance(value, str) else value)
40
-
41
- def choice(state, instruction, options, gold, family, origin, group, identities=(), oracle=None):
42
- rng = random.Random(SEED + int(digest([origin, family])[:12], 16))
43
- keys = list(options); rng.shuffle(keys)
44
- if family in ('arithmetic', 'code_behavior'):
45
- # Anonymous keys must not reveal the right answer (e.g. output_0).
46
- gold_position = keys.index(gold)
47
- options = {f'option_{i}': options[k] for i, k in enumerate(keys)}
48
- keys = list(options)
49
- gold = keys[gold_position]
50
- result = dict(state=state, question=dict(type='choice', instructions=instruction,
51
- criteria={k: options[k] for k in keys}), target=[float(k == gold) for k in keys],
52
- source='v3:'+family, family=family, provenance=dict(origin=origin, original_split='train',
53
- group=group, identities=list(identities)), gold=gold)
54
- if oracle is not None: result['provenance']['oracle'] = oracle
55
- return result
56
-
57
- def public_candidates(sources):
58
- for spec in sources:
59
- repo, file = spec['repo'], spec['file']
60
- if 'glaive' in repo:
61
- yield from tool_candidates(spec)
62
- continue
63
- table = pq.read_table(spec['path'])
64
- indices = list(range(len(table))); random.Random(SEED).shuffle(indices)
65
- # Bounded deterministic subset, not a new partition of the public evaluation files.
66
- for idx in indices[:40000]:
67
- r = table.slice(idx, 1).to_pylist()[0]
68
- origin = f'{repo}@{spec["revision"]}/{file}:{r.get("example_id", r.get("idx",idx))}'
69
- if 'esci' in repo:
70
- if r['product_locale'] != 'us': continue
71
- product = {k: r[k] for k in ['product_title','product_description','product_bullet_point','product_brand','product_color'] if r[k]}
72
- if len(json.dumps(product)) > 5000: continue
73
- options = dict(Exact='exact match to the requested product', Substitute='a substitute that can satisfy the same need', Complement='an accessory or complementary product', Irrelevant='irrelevant to the search intent')
74
- yield choice(dict(search_query=r['query'],product=product),'How relevant is the product to the search query?',options,r['esci_label'],'product_relevance',origin,f'esci-query:{r["query_id"]}',[f'esci-product:{r["product_id"]}', 'query:'+normalized(r['query'])])
75
- elif 'snli' in repo:
76
- if r['label'] < 0: continue
77
- options=dict(entailment='the premise implies the hypothesis',neutral='the premise does not determine whether the hypothesis is true',contradiction='the premise contradicts the hypothesis')
78
- yield choice(dict(premise=r['premise'],hypothesis=r['hypothesis']),'What is the relation of the hypothesis to the premise?',options,list(options)[r['label']],'entailment',origin,'snli-premise:'+normalized(r['premise']))
79
- elif 'glue' in repo:
80
- yield choice(dict(query=r['question'],document=r['sentence']),'Does this document sentence contain the answer to the query?',dict(yes='contains the answer',no='does not contain the answer'),'yes' if r['label']==0 else 'no','document_relevance',origin,'qnli-query:'+normalized(r['question']),['qnli-doc:'+normalized(r['sentence'])])
81
- elif 'irony' in file:
82
- yield choice(r['text'],'Does the text express verbal irony?',dict(yes='ironic',no='not ironic'),'yes' if r['label'] else 'no','sarcasm_irony',origin,'tweet:'+normalized(r['text']))
83
- elif 'stance' in file:
84
- topic={'stance_abortion':'legalization of abortion','stance_atheism':'atheism','stance_climate':'climate change is a real concern','stance_feminist':'the feminist movement','stance_hillary':'Hillary Clinton'}[file.split('/')[0]]
85
- options=dict(none='no clear stance towards the target',against='opposes the target',favor='supports the target')
86
- yield choice(dict(text=r['text'],target=topic),'What stance does the author express towards the target?',options,list(options)[r['label']],'stance',origin,'tweet:'+normalized(r['text']))
87
- # Actual author-labelled sarcasm, separate official TRAIN partition. Rephrases stay grouped.
88
- file=ROOT/'artifacts/decision-index/rebuild/artifacts/benchmark-suite/raw/repos/isarcasm/train/train.En.csv'
89
- for idx,r in enumerate(csv.DictReader(file.open())):
90
- if not r.get('tweet'): continue
91
- origin=f'iSarcasmEval@dfc708b53bde1bb571abfb5692f63231c2232195/train/train.En.csv:{idx}'
92
- group='isarcasm:'+str(idx)
93
- yield choice(r['tweet'],'Is the author being sarcastic?',dict(yes='sarcastic',no='not sarcastic'),'yes' if int(r['sarcastic']) else 'no','sarcasm_irony',origin,group)
94
- if r.get('rephrase'):
95
- yield choice(r['rephrase'],'Is the author being sarcastic?',dict(yes='sarcastic',no='not sarcastic'),'no','sarcasm_irony',origin+':rephrase',group)
96
-
97
- def tool_candidates(spec):
98
- records=json.load(open(spec['path']))
99
- parsed=[]
100
- relevance=[]
101
- for idx,r in enumerate(records):
102
- # Use only the first request and its immediate labelled function call.
103
- match=re.search(r'USER:\s*(.*?)\n+ASSISTANT:\s*(.*?)(?:<\|endoftext\|>|\n\n)',r['chat'],re.S)
104
- if not match: continue
105
- try:
106
- positive=match[2].startswith('<functioncall>')
107
- call=ast.literal_eval(match[2].replace('<functioncall>', '', 1).strip()) if positive else None
108
- tools=[]; rem=r['system'][r['system'].index('{'):]
109
- while rem.strip():
110
- item,end=json.JSONDecoder().raw_decode(rem.lstrip());tools.append(item);rem=rem.lstrip()[end:]
111
- names=[x['name'] for x in tools]
112
- if len(set(names)) != len(names): continue
113
- if positive and call['name'] not in names: continue
114
- if not positive and not re.search(r"(don't|do not) have (the )?(capability|function|ability)|only (have|allows|function)|cannot (assist|help|perform)", match[2], re.I): continue
115
- if len(match[1]) > 1800: continue
116
- except (ValueError,SyntaxError,KeyError,TypeError): continue
117
- if len(tools)==1:
118
- relevance.append((idx,match[1].strip(),tools,positive))
119
- if positive: parsed.append((idx,match[1].strip(),tools,call['name']))
120
- catalog={t['name']:t['description'] for _,_,ts,_ in parsed for t in ts}
121
- names=sorted(catalog)
122
- for idx,query,tools,gold in parsed:
123
- origin=f'{spec["repo"]}@{spec["revision"]}/{spec["file"]}:{idx}'
124
- group='tool-catalog:'+digest(sorted(t['name'] for t in tools))
125
- rng=random.Random(SEED+idx)
126
- options={t['name']:t['description'] for t in tools}
127
- # Selection uses source-labelled calls plus catalog distractors. Binary relevance
128
- # uses the native single-tool call/refusal annotation, without added distractors.
129
- others=[n for n in names if n not in options]
130
- for n in rng.sample(others,min(5,len(others))): options[n]=catalog[n]
131
- if sum(len(x) for x in options.values())>2200: continue
132
- yield choice(query,'Select the tool that directly fulfills the user request.',options,gold,'tool_selection',origin,group)
133
- for idx,query,tools,positive in relevance:
134
- tool=tools[0]
135
- origin=f'{spec["repo"]}@{spec["revision"]}/{spec["file"]}:{idx}'
136
- group='tool-catalog:'+digest([tool['name']])
137
- yield choice(dict(request=query,tool=tool),'Is this tool relevant for fulfilling the user request?',
138
- dict(yes='the tool can fulfill the request',no='the request requires a different capability'),
139
- 'yes' if positive else 'no','tool_relevance',origin,group)
140
-
141
- def generators(n=10000):
142
- rng=random.Random(SEED)
143
- for i in range(n):
144
- values={x:bool(rng.getrandbits(1)) for x in ['active','verified','paid','blocked','admin']}
145
- def rule(depth):
146
- if depth==0 or rng.random()<0.22:
147
- name=rng.choice(list(values));return f'not {name}' if rng.random()<0.3 else name
148
- return f'({rule(depth-1)} {rng.choice(["and","or"])} {rule(depth-1)})'
149
- expr=rule(rng.randint(2,4)); result=bool(eval(expr,{'__builtins__':{}},values))
150
- origin=f'generator:boolean:{i}'; group='boolean-rule:'+expr
151
- yield choice(dict(facts=values,allow_if=expr),'Under this exact Boolean rule, is access allowed?',dict(allow='access is allowed',deny='access is denied'),'allow' if result else 'deny','boolean_rules',origin,group,oracle=dict(expression=expr,variables=values,result=result))
152
- a,b,c=[rng.randint(-30,50) for _ in range(3)];d=rng.randint(1,12)
153
- expr=rng.choice([f'({a} + {b}) * {c}',f'{a} * {b} - {c}',f'({a} - {b}) // {d}',f'{a} + {b} * {c}',f'({a} * {b}) % {d}',f'abs({a} - {b}) + {c}'])
154
- result=eval(expr,{'__builtins__':{},'abs':abs})
155
- choices={result,result+1,result-1,result+rng.choice([3,5,10])}
156
- options={f'value_{j}':str(v) for j,v in enumerate(sorted(choices))};gold=next(k for k,v in options.items() if v==str(result))
157
- yield choice(dict(expression=expr),'Evaluate the Python integer expression. // is floor division and % is modulo.',options,gold,'arithmetic',f'generator:arithmetic:{i}','arithmetic:'+expr,oracle=dict(expression=expr,result=result))
158
- k=rng.randint(-8,12);m=rng.randint(2,8);inp=[rng.randint(-10,15) for _ in range(rng.randint(3,7))]
159
- body=rng.choice([f'return sum(v + {k} for v in x if v % {m} != 0)',f'return [v * {k} for v in x][::{m}]',f'return sorted(set(x + [{k}]))[:{m}]',f'return sum(x[-{m}:]) + {k}',f'return [v for v in x if v > {k}][::-1]',f'return len([v for v in x if v % {m} == {k%m}])'])
160
- code='def f(x):\n '+body
161
- ns={};exec(code,{'__builtins__':{},'sum':sum,'sorted':sorted,'set':set,'len':len},ns)
162
- result=ns['f'](inp)
163
- if isinstance(result,list): bad=[result[::-1],result+[k],result[1:],[]]
164
- else: bad=[result-1,result+1,result+3,0]
165
- outputs=list(dict.fromkeys([repr(result)]+[repr(x) for x in bad]))[:4]
166
- if len(outputs)<2: continue
167
- options={f'output_{j}':v for j,v in enumerate(outputs)}
168
- yield choice(dict(code=code,input=inp),'What value does f return for the supplied input?',options,'output_0','code_behavior',f'generator:code:{i}','program:'+code,oracle=dict(result=result,executable=True))
169
-
170
- class Components:
171
- def __init__(self):self.parent={}
172
- def find(self,x):
173
- self.parent.setdefault(x,x)
174
- while x!=self.parent[x]:
175
- self.parent[x]=self.parent[self.parent[x]];x=self.parent[x]
176
- return x
177
- def union(self,a,b):
178
- a,b=self.find(a),self.find(b)
179
- if a!=b:self.parent[max(a,b)]=min(a,b)
180
-
181
- def read(path):return [json.loads(line) for line in path.open() if line.strip()]
182
- def write(path,rows):
183
- path.write_text(''.join(json.dumps(r,ensure_ascii=False)+'\n' for r in rows))
184
-
185
- def main():
186
- sources=json.load(open(ROOT/'work/jet-v3/sources.json'))
187
- from transformers import AutoTokenizer
188
- tokenizer=AutoTokenizer.from_pretrained('mlx-community/Qwen3-0.6B-bf16')
189
- data=ROOT/'data'; protected=[data/x for x in ['val.jsonl','test.jsonl','score_eval.jsonl']]
190
- suite=ROOT/'artifacts/decision-index/rebuild/artifacts/benchmark-suite/release-v1-rebuilt/selected-rows.jsonl'
191
- assert suite.exists(), 'Rebuild the evaluation corpus first, for exclusion-only use.'
192
- held=[r for p in protected+[suite] for r in read(p)]
193
- blocked_states={statekey(r['state']) for r in held}
194
- blocked_atoms={a for r in held for a in atoms(r['state'])}
195
- legacy=read(data/'train_v2.jsonl')
196
- legacy_keys={statekey(r['state']) for r in legacy}
197
- legacy_atoms={a for r in legacy for a in atoms(r['state'])}
198
- stats=Counter();seen=set();candidates=[]
199
- for r in list(public_candidates(sources))+list(generators()):
200
- if statekey(r['state']) in blocked_states or set(atoms(r['state'])) & blocked_atoms:
201
- stats['excluded_evaluation_content']+=1;continue
202
- # Original identity + family permits multiple tasks from one source row, kept together.
203
- identity=(r['provenance']['origin'],r['family'])
204
- semantic=digest([r['state'],r['question']['instructions'],r['question']['criteria']])
205
- if identity in seen or semantic in seen:
206
- stats['duplicate']+=1;continue
207
- if len(tokenizer.encode(render_state(r['state']), add_special_tokens=False)) > 1024:
208
- stats['over_state_capacity']+=1;continue
209
- if len(tokenizer.encode(build_prompt(tokenizer,r['state'],Question.from_dict(r['question'])), add_special_tokens=False)) > 2048:
210
- stats['over_prompt_capacity']+=1;continue
211
- seen.add(identity);seen.add(semantic);candidates.append(r)
212
- components=Components()
213
- for r in candidates:
214
- p=r['provenance'];key=p['group']
215
- links=['origin:'+p['origin'],'state:'+statekey(r['state'])]+p['identities']
216
- if r['family'] in ('tool_selection', 'tool_relevance'):
217
- query=r['state'] if isinstance(r['state'],str) else r['state']['request']
218
- links.append('tool-query:'+normalized(query))
219
- # Entire same tweet/premise/query/product/program components stay in one partition.
220
- for link in links:components.union(key,link)
221
- forced_train=set()
222
- for r in candidates:
223
- if statekey(r['state']) in legacy_keys or set(atoms(r['state'])) & legacy_atoms:
224
- forced_train.add(components.find(r['provenance']['group']))
225
- bins=defaultdict(list)
226
- for r in candidates:
227
- group=components.find(r['provenance']['group']);b=int(digest([SEED,group])[:8],16)/2**32
228
- split='train' if group in forced_train or b<.76 else 'val' if b<.84 else 'calibration' if b<.92 else 'test'
229
- r['provenance']['component']=group;r['provenance']['split']=split
230
- bins[(split,r['family'])].append(r)
231
- out=defaultdict(list);counts={}
232
- for (split,family),rows in sorted(bins.items()):
233
- # Equal family budget, with round-robin classes; no duplicate oversampling.
234
- random.Random(SEED).shuffle(rows);classes=defaultdict(list)
235
- for r in rows:classes[r['gold'] if family not in ['tool_selection','arithmetic','code_behavior'] else 'all'].append(r)
236
- selected=[];limit=2000 if split=='train' else 160
237
- while classes and len(selected)<limit:
238
- for key in list(classes):
239
- selected.append(classes[key].pop())
240
- if not classes[key]:del classes[key]
241
- if len(selected)==limit:break
242
- out[split].extend(selected);counts[split+':'+family]=len(selected)
243
- # Remove legacy content colliding with known protected evaluation; never alter train_v2.
244
- clean_legacy=[];seen_legacy=set()
245
- for r in legacy:
246
- if statekey(r['state']) in blocked_states:
247
- stats['legacy_evaluation_overlap']+=1;continue
248
- signature=digest([r['state'],r['question']])
249
- if signature in seen_legacy:stats['legacy_duplicate']+=1;continue
250
- seen_legacy.add(signature);clean_legacy.append(r)
251
- out['train']=clean_legacy+out['train']
252
- # Split existing val by state into checkpoint-selection and calibration (file untouched).
253
- original_val=read(data/'val.jsonl')
254
- selection=[r for r in original_val if int(statekey(r['state'])[:8],16)%2==0]
255
- calibration=[r for r in original_val if int(statekey(r['state'])[:8],16)%2!=0]
256
- files={'train_v3.jsonl':out['train'],'val_v3_new.jsonl':out['val'],
257
- 'calibration_v3_new.jsonl':out['calibration'],'test_v3_new.jsonl':out['test'],
258
- 'selection_v3.jsonl':selection+out['val'],'calibration_v3.jsonl':calibration+out['calibration']}
259
- hashes={}
260
- for name,rows in files.items():
261
- random.Random(SEED).shuffle(rows)
262
- for r in rows:
263
- Question.from_dict(r['question']); assert abs(sum(r['target'])-1)<1e-6
264
- write(data/name,rows);hashes[name]=hashlib.sha256((data/name).read_bytes()).hexdigest()
265
- # A group and original source ID may occur many times, but only in one split.
266
- owners={}
267
- for split,rows in out.items():
268
- for r in rows:
269
- if 'provenance' not in r:continue
270
- for key in [r['provenance']['component'],r['provenance']['origin'],statekey(r['state'])]:
271
- assert owners.setdefault(key,split)==split, (key,split)
272
- provenance=dict(seed=SEED,sources=[{**s,'sha256':hashlib.sha256(Path(s['path']).read_bytes()).hexdigest()} for s in sources],
273
- isarcasm=dict(repository='https://github.com/iabufarha/iSarcasmEval',revision='dfc708b53bde1bb571abfb5692f63231c2232195',file='train/train.En.csv',split='train'),
274
- protected_sha256={str(p.relative_to(ROOT)):hashlib.sha256(p.read_bytes()).hexdigest() for p in protected+[suite]},
275
- counts=counts,filters=dict(stats),files=hashes,legacy_rows=len(clean_legacy),generator_code_sha256=hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),
276
- limitations=['Official frozen suite unavailable; exclusions cover all 23,113 rebuilt requests and existing held-outs.', 'ESCI uses only the first pinned training shard; official ESCI evaluation uses test.', 'New held-outs are grouped samples of training partitions, not leaderboard evaluation.', 'Glaive labels are public synthetic annotations; added distractors are not exhaustively verified for semantic equivalence.', 'Legacy train_v2 lacks original source IDs; retained legacy provenance is its immutable file hash.'])
277
- (data/'train_v3.provenance.json').write_text(json.dumps(provenance,indent=2))
278
- print(json.dumps(dict(counts=counts,filters=dict(stats),total_train=len(out['train'])),indent=2))
279
-
280
- if __name__=='__main__':main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/decision_index_engine.py DELETED
@@ -1,133 +0,0 @@
1
- """Jet's native MLX readout through the official Decision Index engine API.
2
-
3
- Install with ``uv sync --extra benchmark``. No benchmark identity or gold labels
4
- are accepted by this adapter. The full native prompt is preserved, or rejected.
5
- """
6
- from __future__ import annotations
7
-
8
- import hashlib
9
- import json
10
- import math
11
- from pathlib import Path
12
-
13
- import numpy as np
14
- from decision_index.engines import Engine, Unsupported
15
- from huggingface_hub import snapshot_download
16
- from transformers import AutoTokenizer
17
-
18
- from format import MAX_CHOICE_OPTIONS, Question, build_prompt, label_token_ids
19
-
20
- MODEL_ID = "michaljach/jet"
21
- REVISION = "8a97cfea2df622bb03f5dc9b02567e21abd2551c"
22
- DEFAULT_MAX_TOKENS = 8192
23
-
24
-
25
- def as_text(value):
26
- """Mechanical JSON rendering for structured instructions/descriptions."""
27
- return value if isinstance(value, str) else json.dumps(value, ensure_ascii=False)
28
-
29
-
30
- def prepare_request(tokenizer, state, questions, max_tokens):
31
- prepared = []
32
- for name, original in questions.items():
33
- if original["type"] != "choice":
34
- raise Unsupported(f"Only suite choice questions supported: {original['type']}")
35
- criteria = original["criteria"]
36
- if not 2 <= len(criteria) <= MAX_CHOICE_OPTIONS:
37
- raise Unsupported(f"Option count {len(criteria)} outside 2..{MAX_CHOICE_OPTIONS}")
38
- q = Question.from_dict({
39
- "type": "choice", "instructions": as_text(original["instructions"]),
40
- "criteria": {key: as_text(value) for key, value in criteria.items()},
41
- })
42
- # Do not call inference.encode: its application default truncates states.
43
- ids = tokenizer.encode(build_prompt(tokenizer, state, q), add_special_tokens=False)
44
- if len(ids) > max_tokens:
45
- raise Unsupported(f"Full prompt has {len(ids)} tokens; declared limit {max_tokens}")
46
- prepared.append((name, q, ids, label_token_ids(tokenizer, q)))
47
- return prepared
48
-
49
-
50
- def load_assets(model=MODEL_ID, revision=REVISION):
51
- path = Path(snapshot_download(model, revision=revision, allow_patterns=[
52
- "config.json", "calibration.json", "tokenizer*", "special_tokens_map.json",
53
- "added_tokens.json", "vocab.json", "merges.txt", "chat_template*",
54
- ]))
55
- return path, AutoTokenizer.from_pretrained(path), json.loads((path / "config.json").read_text())
56
-
57
-
58
- class JetEngine(Engine):
59
- name = "jet"
60
- latency = "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
61
-
62
- def __init__(self, model=MODEL_ID, revision=REVISION, max_tokens=DEFAULT_MAX_TOKENS,
63
- max_cached_tokens=32768, adapter=None, **options):
64
- super().__init__(**options)
65
- import mlx.core as mx
66
- from mlx_lm import load
67
-
68
- self.mx = mx
69
- mx.set_cache_limit(1_000_000_000)
70
- path, self.tokenizer, config = load_assets(model, revision)
71
- self.max_tokens = int(max_tokens)
72
- self.max_cached_tokens = int(max_cached_tokens)
73
- if not 1 <= self.max_tokens <= config["max_position_embeddings"]:
74
- raise ValueError("max_tokens must be positive and within the checkpoint context window")
75
- if self.max_cached_tokens < 1:
76
- raise ValueError("max_cached_tokens must be positive")
77
- calibration = Path(adapter) / "calibration.json" if adapter else path / "calibration.json"
78
- self.temperature = float(json.loads(calibration.read_text())["choice"])
79
- if not math.isfinite(self.temperature) or self.temperature <= 0:
80
- raise ValueError("Invalid published choice temperature")
81
- # Pin weights to the SAME resolved snapshot as the tokenizer/config.
82
- snapshot_download(model, revision=path.name, allow_patterns=["*.safetensors", "*.safetensors.index.json"])
83
- self.model, _ = load(str(path), adapter_path=adapter)
84
- self.model.eval()
85
- self.provenance = {
86
- "model": model, "revision": path.name, "backend": "mlx",
87
- "max_tokens": self.max_tokens, "checkpoint_context": config["max_position_embeddings"],
88
- "max_cached_tokens": self.max_cached_tokens, "choice_temperature": self.temperature,
89
- "adapter_sha256": hashlib.sha256(Path(__file__).read_bytes()).hexdigest(),
90
- "format_sha256": hashlib.sha256(Path(__file__).with_name("format.py").read_bytes()).hexdigest(),
91
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
92
- }
93
- if adapter:
94
- self.provenance["lora_adapter"] = str(Path(adapter).resolve())
95
- self.provenance["lora_weights_sha256"] = hashlib.sha256(
96
- (Path(adapter) / "adapters.safetensors").read_bytes()).hexdigest()
97
- self.provenance["calibration_sha256"] = hashlib.sha256(calibration.read_bytes()).hexdigest()
98
-
99
- def __call__(self, state, questions):
100
- from model import shared_prefix_label_logits
101
-
102
- prepared = prepare_request(self.tokenizer, state, questions, self.max_tokens)
103
- if not prepared:
104
- raise ValueError("At least one question is required")
105
- logits = shared_prefix_label_logits(
106
- self.model, [p[2] for p in prepared], [p[3] for p in prepared],
107
- max_cached_tokens=self.max_cached_tokens,
108
- )
109
- answers, raw = {}, {}
110
- for i, (name, q, ids, labels) in enumerate(prepared):
111
- z = logits[i, :len(labels)].astype(np.float64) / self.temperature
112
- p = np.exp(z - z.max())
113
- p /= p.sum()
114
- if not np.isfinite(p).all():
115
- raise ValueError("Non-finite model probabilities")
116
- keys = q.keys
117
- answers[name] = {
118
- "type": "choice", "choice": keys[int(np.argmax(p))],
119
- "probabilities": dict(zip(keys, map(float, p))),
120
- "confidence": float(p.max()),
121
- }
122
- raw[name] = {"label_logits": logits[i, :len(labels)].tolist(), "prompt_tokens": len(ids)}
123
- return {"model": "jet", "answers": answers,
124
- "usage": {"input_tokens": sum(len(p[2]) for p in prepared)}}, raw
125
-
126
- def synchronize(self):
127
- self.mx.synchronize()
128
-
129
- def runtime(self):
130
- import platform
131
- from importlib.metadata import version
132
- return {"platform": platform.platform(), "mlx": version("mlx"),
133
- "mlx_lm": version("mlx-lm"), "device": str(self.mx.default_device())}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/evaluate.py DELETED
@@ -1,190 +0,0 @@
1
- """Evaluate and calibrate a Jet model.
2
-
3
- jet-eval --adapter adapters/jet --data data/test.jsonl
4
- jet-eval --data data/test.jsonl # untrained base model, as a baseline
5
- jet-calibrate --adapter adapters/jet --data data/val.jsonl
6
- """
7
-
8
- from __future__ import annotations
9
-
10
- import argparse
11
- import json
12
- import time
13
- from collections import defaultdict
14
- from pathlib import Path
15
-
16
- import mlx.core as mx
17
- import numpy as np
18
-
19
- from format import Question
20
- from model import DEFAULT_BASE_MODEL, DEFAULT_MAX_STATE_TOKENS, Jet
21
-
22
- TEMPERATURE_GRID = np.exp(np.linspace(np.log(0.25), np.log(8.0), 121))
23
-
24
-
25
- def load_data(path: Path, limit: int | None) -> list[dict]:
26
- rows = [json.loads(line) for line in path.open()]
27
- return rows[:limit] if limit else rows
28
-
29
-
30
- def adapter_base(adapter: str | None, fallback: str) -> str:
31
- if adapter and (cfg := Path(adapter) / "adapter_config.json").exists():
32
- config = json.loads(cfg.read_text())
33
- base = config.get("base_model", fallback)
34
- if config.get("base_revision"):
35
- from huggingface_hub import snapshot_download
36
- return snapshot_download(base, revision=config["base_revision"])
37
- return base
38
- return fallback
39
-
40
-
41
- def collect_logits(jet: Jet, rows: list[dict], batch_size: int) -> tuple[list[np.ndarray], float]:
42
- """Raw label logits for every row, batched by prompt length. Returns (logits, ms per question)."""
43
- # Batch shapes vary, so MLX's freed-buffer cache otherwise grows until CUDA runs out (as in jet-train).
44
- mx.set_cache_limit(1_000_000_000)
45
- items = [(r["state"], Question.from_dict(r["question"])) for r in rows]
46
- order = sorted(range(len(items)), key=lambda i: len(str(items[i][0])))
47
- logits: list[np.ndarray | None] = [None] * len(items)
48
- started = time.perf_counter()
49
- for start in range(0, len(order), batch_size):
50
- idx = order[start : start + batch_size]
51
- out, _ = jet.raw_logits([items[i] for i in idx])
52
- for i, z in zip(idx, out):
53
- logits[i] = z
54
- print(f"\r {min(start + batch_size, len(order))}/{len(order)}", end="", flush=True)
55
- print()
56
- return logits, (time.perf_counter() - started) * 1000 / max(len(items), 1)
57
-
58
-
59
- def softmax(z: np.ndarray, t: float) -> np.ndarray:
60
- z = z / t
61
- e = np.exp(z - z.max())
62
- return e / e.sum()
63
-
64
-
65
- def nll(logits: list[np.ndarray], targets: list[np.ndarray], t: float) -> float:
66
- return float(np.mean([-(tg * np.log(np.clip(softmax(z, t), 1e-12, 1))).sum() for z, tg in zip(logits, targets)]))
67
-
68
-
69
- def metrics(probs: list[np.ndarray], targets: list[np.ndarray], bins: int = 10) -> dict[str, float]:
70
- top = np.array([p.max() for p in probs])
71
- hit = np.array([p.argmax() == t.argmax() for p, t in zip(probs, targets)], dtype=float)
72
- # ECE over the model's top prediction, scored against the (possibly soft) target's argmax.
73
- ece = 0.0
74
- for lo in np.linspace(0, 1, bins, endpoint=False):
75
- sel = (top > lo) & (top <= lo + 1 / bins)
76
- if sel.any():
77
- ece += sel.mean() * abs(top[sel].mean() - hit[sel].mean())
78
- return {
79
- "n": len(probs),
80
- "acc": float(hit.mean()),
81
- "nll": float(np.mean([-(t * np.log(np.clip(p, 1e-12, 1))).sum() for p, t in zip(probs, targets)])),
82
- "brier": float(np.mean([((p - t) ** 2).sum() for p, t in zip(probs, targets)])),
83
- "ece": float(ece),
84
- }
85
-
86
-
87
- def rank(x: np.ndarray) -> np.ndarray:
88
- """Average ranks (ties share their mean rank), for Spearman correlation."""
89
- order = np.argsort(x, kind="stable")
90
- ranks = np.empty(len(x))
91
- ranks[order] = np.arange(len(x))
92
- for v in np.unique(x):
93
- tie = x == v
94
- ranks[tie] = ranks[tie].mean()
95
- return ranks
96
-
97
-
98
- def ordinal_metrics(probs: list[np.ndarray], targets: list[np.ndarray]) -> dict[str, float]:
99
- """Score questions: compare expected levels, normalized to 0-1 so scales of any size mix.
100
-
101
- mae: mean |E[pred] - E[target]| on the 0-1 scale; within1: argmax level within one of the
102
- target's expected level; spearman: rank correlation of expected scores.
103
- """
104
- pred = np.array([np.dot(np.arange(len(p)), p) / (len(p) - 1) for p in probs])
105
- true = np.array([np.dot(np.arange(len(t)), t) / (len(t) - 1) for t in targets])
106
- within = [abs(int(p.argmax()) - np.dot(np.arange(len(t)), t)) <= 1 for p, t in zip(probs, targets)]
107
- spearman = float(np.corrcoef(rank(pred), rank(true))[0, 1]) if len(pred) > 2 and true.std() > 0 else float("nan")
108
- return {"mae": float(np.abs(pred - true).mean()), "within1": float(np.mean(within)), "spearman": spearman}
109
-
110
-
111
- def print_table(title: str, groups: dict[str, dict[str, float]]) -> None:
112
- print(f"\n{title}")
113
- print(f"{'':<42}{'n':>6}{'acc':>8}{'nll':>8}{'brier':>8}{'ece':>8}{'mae':>8}{'±1':>8}{'rho':>8}")
114
- for name, m in sorted(groups.items()):
115
- ordinal = "".join(f"{m[k]:>8.3f}" for k in ("mae", "within1", "spearman") if k in m)
116
- print(f"{name[:41]:<42}{m['n']:>6}{m['acc']:>8.3f}{m['nll']:>8.3f}{m['brier']:>8.3f}{m['ece']:>8.3f}{ordinal}")
117
-
118
-
119
- def main_eval() -> None:
120
- ap = argparse.ArgumentParser(description="Evaluate a Jet model.")
121
- ap.add_argument("--adapter", default=None, help="adapter dir; omit to evaluate the base model")
122
- ap.add_argument("--base-model", default=DEFAULT_BASE_MODEL)
123
- ap.add_argument("--data", type=Path, default=Path("data/test.jsonl"))
124
- ap.add_argument("--limit", type=int, default=None)
125
- ap.add_argument("--batch-size", type=int, default=16)
126
- ap.add_argument("--max-state-tokens", type=int, default=DEFAULT_MAX_STATE_TOKENS)
127
- ap.add_argument("--json", type=Path, default=None, help="also write metrics as JSON")
128
- args = ap.parse_args()
129
-
130
- jet = Jet(adapter_base(args.adapter, args.base_model), args.adapter, args.max_state_tokens)
131
- rows = load_data(args.data, args.limit)
132
- logits, ms = collect_logits(jet, rows, args.batch_size)
133
- probs = [softmax(z, jet.temperatures[r["question"]["type"]]) for z, r in zip(logits, rows)]
134
- targets = [np.array(r["target"]) for r in rows]
135
-
136
- by_source, by_type = defaultdict(list), defaultdict(list)
137
- for i, r in enumerate(rows):
138
- source = "distill (all)" if r["source"].startswith("distill:") else r["source"]
139
- by_source[source].append(i)
140
- by_type[r["question"]["type"]].append(i)
141
-
142
- def group(ix: list[int]) -> dict[str, float]:
143
- m = metrics([probs[i] for i in ix], [targets[i] for i in ix])
144
- scored = [i for i in ix if rows[i]["question"]["type"] == "score"]
145
- if len(scored) == len(ix):
146
- m |= ordinal_metrics([probs[i] for i in scored], [targets[i] for i in scored])
147
- return m
148
-
149
- overall = metrics(probs, targets)
150
- print_table("by source", {k: group(v) for k, v in by_source.items()})
151
- print_table("by type", {k: group(v) for k, v in by_type.items()})
152
- print_table("overall", {"all": overall})
153
- print(f"\n{ms:.1f} ms/question (batched, batch size {args.batch_size}); temperatures {jet.temperatures}")
154
- if args.json:
155
- args.json.write_text(json.dumps({
156
- "overall": overall,
157
- "by_source": {k: group(v) for k, v in by_source.items()},
158
- "by_type": {k: group(v) for k, v in by_type.items()},
159
- "ms_per_question": ms,
160
- "max_state_tokens": args.max_state_tokens,
161
- }, indent=2))
162
-
163
-
164
- def main_calibrate() -> None:
165
- ap = argparse.ArgumentParser(description="Fit per-type softmax temperatures on held-out data.")
166
- ap.add_argument("--adapter", required=True)
167
- ap.add_argument("--base-model", default=DEFAULT_BASE_MODEL)
168
- ap.add_argument("--data", type=Path, default=Path("data/val.jsonl"))
169
- ap.add_argument("--limit", type=int, default=3000)
170
- ap.add_argument("--batch-size", type=int, default=16)
171
- ap.add_argument("--max-state-tokens", type=int, default=DEFAULT_MAX_STATE_TOKENS)
172
- args = ap.parse_args()
173
-
174
- jet = Jet(adapter_base(args.adapter, args.base_model), args.adapter, args.max_state_tokens)
175
- rows = load_data(args.data, args.limit)
176
- logits, _ = collect_logits(jet, rows, args.batch_size)
177
-
178
- temperatures = {}
179
- for qtype in ("choice", "score", "noul"):
180
- ix = [i for i, r in enumerate(rows) if r["question"]["type"] == qtype]
181
- if not ix:
182
- temperatures[qtype] = 1.0
183
- continue
184
- zs, ts = [logits[i] for i in ix], [np.array(rows[i]["target"]) for i in ix]
185
- scores = [nll(zs, ts, t) for t in TEMPERATURE_GRID]
186
- best = float(TEMPERATURE_GRID[int(np.argmin(scores))])
187
- temperatures[qtype] = round(best, 4)
188
- print(f"{qtype:>6}: n={len(ix)} T={best:.3f} nll {nll(zs, ts, 1.0):.4f} -> {min(scores):.4f}")
189
- (Path(args.adapter) / "calibration.json").write_text(json.dumps(temperatures, indent=2))
190
- print(f"wrote {Path(args.adapter) / 'calibration.json'}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/format.py DELETED
@@ -1,143 +0,0 @@
1
- """Prompt format shared by training and inference.
2
-
3
- Every question is reduced to "pick one label token". The model is run once over
4
- the prompt and we read the next-token logits restricted to the label tokens:
5
-
6
- - choice: one label per option (A..Z, then single-token AA, AB, ...), up to 255 options
7
- - score: one digit per level (0..9), 2-10 levels, ordered low -> high
8
- - noul: "no" / "yes"
9
- """
10
-
11
- from __future__ import annotations
12
-
13
- import itertools
14
- import json
15
- import string
16
- from dataclasses import dataclass
17
- from typing import Any, Literal
18
-
19
- QuestionType = Literal["choice", "score", "noul"]
20
-
21
- MAX_CHOICE_OPTIONS = 255
22
- MIN_SCORE_LEVELS, MAX_SCORE_LEVELS = 2, 10
23
-
24
- SYSTEM_PROMPT = (
25
- "You are Jet, a decision model. Read the state and the question, then answer "
26
- "with exactly one label from the allowed labels."
27
- )
28
-
29
-
30
- @dataclass(frozen=True)
31
- class Question:
32
- type: QuestionType
33
- instructions: str
34
- # choice: {key: description}; score: [level descriptions, low -> high]; noul: None
35
- criteria: dict[str, str] | list[str] | None = None
36
-
37
- @property
38
- def keys(self) -> list[str]:
39
- """Answer keys in label order (option keys, level descriptions, or no/yes)."""
40
- if self.type == "choice":
41
- return list(self.criteria)
42
- if self.type == "score":
43
- return list(self.criteria)
44
- return ["no", "yes"]
45
-
46
- @classmethod
47
- def from_dict(cls, d: dict[str, Any]) -> Question:
48
- q = cls(type=d["type"], instructions=d["instructions"], criteria=d.get("criteria"))
49
- q.validate()
50
- return q
51
-
52
- def to_dict(self) -> dict[str, Any]:
53
- d: dict[str, Any] = {"type": self.type, "instructions": self.instructions}
54
- if self.criteria is not None:
55
- d["criteria"] = self.criteria
56
- return d
57
-
58
- def validate(self) -> None:
59
- if self.type not in ("choice", "score", "noul"):
60
- raise ValueError(f"unknown question type {self.type!r}")
61
- if not isinstance(self.instructions, str) or not self.instructions.strip():
62
- raise ValueError("instructions must be a non-empty string")
63
- if self.type == "choice":
64
- if not isinstance(self.criteria, dict) or not 2 <= len(self.criteria) <= MAX_CHOICE_OPTIONS:
65
- raise ValueError(f"choice criteria must be an object with 2-{MAX_CHOICE_OPTIONS} options")
66
- elif self.type == "score":
67
- if not isinstance(self.criteria, list) or not MIN_SCORE_LEVELS <= len(self.criteria) <= MAX_SCORE_LEVELS:
68
- raise ValueError(f"score criteria must be a list of {MIN_SCORE_LEVELS}-{MAX_SCORE_LEVELS} levels")
69
- elif self.criteria is not None:
70
- raise ValueError("noul questions take no criteria")
71
-
72
-
73
- _CHOICE_LABELS: dict[int, list[str]] = {}
74
-
75
-
76
- def choice_labels(tokenizer, n: int) -> list[str]:
77
- """A..Z, then the two-letter labels AA, AB, ... that are single tokens for this tokenizer."""
78
- key = id(tokenizer)
79
- if key not in _CHOICE_LABELS:
80
- letters = string.ascii_uppercase
81
- pairs = ("".join(p) for p in itertools.product(letters, repeat=2))
82
- candidates = list(letters) + [p for p in pairs if len(tokenizer.encode(p, add_special_tokens=False)) == 1]
83
- if len(candidates) < MAX_CHOICE_OPTIONS:
84
- raise ValueError(f"tokenizer only has {len(candidates)} single-token choice labels")
85
- _CHOICE_LABELS[key] = candidates[:MAX_CHOICE_OPTIONS]
86
- return _CHOICE_LABELS[key][:n]
87
-
88
-
89
- def labels_for(tokenizer, q: Question) -> list[str]:
90
- if q.type == "choice":
91
- return choice_labels(tokenizer, len(q.criteria))
92
- if q.type == "score":
93
- return [str(i) for i in range(len(q.criteria))]
94
- return ["no", "yes"]
95
-
96
-
97
- def render_state(state: Any) -> str:
98
- if isinstance(state, str):
99
- return state
100
- if isinstance(state, list) and all(isinstance(s, str) for s in state):
101
- return "\n\n".join(state)
102
- return json.dumps(state, ensure_ascii=False, indent=2)
103
-
104
-
105
- def render_user(state: Any, q: Question, labels: list[str]) -> str:
106
- parts = [f"<state>\n{render_state(state)}\n</state>", ""]
107
- if q.type == "choice":
108
- opts = "\n".join(f"{lab}: {key}: {desc}" for lab, (key, desc) in zip(labels, q.criteria.items()))
109
- parts += [
110
- f"Question: {q.instructions}",
111
- f"Options:\n{opts}",
112
- f"Answer with the label of the best option ({labels[0]}-{labels[-1]}).",
113
- ]
114
- elif q.type == "score":
115
- levels = "\n".join(f"{lab}: {desc}" for lab, desc in zip(labels, q.criteria))
116
- parts += [
117
- f"Question: {q.instructions}",
118
- f"Scale (lowest to highest):\n{levels}",
119
- f"Answer with the level number (0-{len(labels) - 1}).",
120
- ]
121
- else:
122
- parts += [f"Question: {q.instructions}", "Answer yes or no."]
123
- return "\n".join(parts)
124
-
125
-
126
- def build_prompt(tokenizer, state: Any, q: Question) -> str:
127
- return tokenizer.apply_chat_template(
128
- [{"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": render_user(state, q, labels_for(tokenizer, q))}],
129
- add_generation_prompt=True,
130
- tokenize=False,
131
- enable_thinking=False,
132
- )
133
-
134
-
135
- def _label_token_id(tokenizer, label: str) -> int:
136
- ids = tokenizer.encode(label, add_special_tokens=False)
137
- if len(ids) != 1:
138
- raise ValueError(f"label {label!r} is not a single token for this tokenizer")
139
- return ids[0]
140
-
141
-
142
- def label_token_ids(tokenizer, q: Question) -> list[int]:
143
- return [_label_token_id(tokenizer, lab) for lab in labels_for(tokenizer, q)]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/inference.py DELETED
@@ -1,41 +0,0 @@
1
- """Backend-independent Jet prompt encoding and typed answers."""
2
- from __future__ import annotations
3
- import math
4
- from typing import Any
5
- import numpy as np
6
- from format import Question, build_prompt, render_state
7
-
8
- DEFAULT_MAX_STATE_TOKENS = 4096
9
-
10
- def encode(tokenizer, state: Any, q: Question, max_state_tokens: int = DEFAULT_MAX_STATE_TOKENS) -> list[int]:
11
- """Tokenize a prompt, truncating the middle of an over-long state."""
12
- text = render_state(state)
13
- ids = tokenizer.encode(text, add_special_tokens=False)
14
- if len(ids) > max_state_tokens:
15
- half = max_state_tokens // 2
16
- text = tokenizer.decode(ids[:half]) + "\n[...]\n" + tokenizer.decode(ids[-half:])
17
- return tokenizer.encode(build_prompt(tokenizer, text, q), add_special_tokens=False)
18
-
19
- def summarize(q: Question, probs: np.ndarray) -> dict[str, Any]:
20
- """Turn a label distribution into the typed answer for the question."""
21
- probs = probs.astype(np.float64)
22
- k = len(probs)
23
- entropy = -float(np.sum(probs * np.log(np.clip(probs, 1e-12, 1.0))))
24
- confidence = round(1.0 - entropy / math.log(k), 4)
25
- if q.type == "choice":
26
- keys = q.keys
27
- return {
28
- "type": "choice",
29
- "choice": keys[int(np.argmax(probs))],
30
- "probabilities": {key: round(float(p), 4) for key, p in zip(keys, probs)},
31
- "confidence": confidence,
32
- }
33
- if q.type == "score":
34
- return {
35
- "type": "score",
36
- "score": round(float(np.dot(np.arange(k), probs)), 4),
37
- "level": q.criteria[int(np.argmax(probs))],
38
- "probabilities": [round(float(p), 4) for p in probs],
39
- "confidence": confidence,
40
- }
41
- return {"type": "noul", "probability": round(float(probs[1]), 4), "confidence": confidence}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/model.py DELETED
@@ -1,151 +0,0 @@
1
- """Jet inference: one forward pass per batch of questions, no generation."""
2
-
3
- from __future__ import annotations
4
-
5
- import json
6
- import time
7
- from pathlib import Path
8
- from typing import Any
9
-
10
- import mlx.core as mx
11
- import numpy as np
12
- from huggingface_hub import snapshot_download
13
- from mlx_lm import load
14
- from mlx_lm.models.cache import make_prompt_cache
15
-
16
- from format import Question, label_token_ids
17
- from inference import DEFAULT_MAX_STATE_TOKENS, encode, summarize
18
-
19
- DEFAULT_BASE_MODEL = "mlx-community/Qwen3-0.6B-bf16"
20
- NEG_INF = -1e9
21
-
22
-
23
- def label_logits(model, tokens: mx.array, lengths: mx.array, label_ids: mx.array, label_mask: mx.array) -> mx.array:
24
- """Next-token logits after each prompt, restricted to its label tokens.
25
-
26
- tokens: (B, L) right-padded prompts; lengths: (B,) true lengths;
27
- label_ids / label_mask: (B, K) label token ids padded to the widest question.
28
- Returns (B, K) logits with padded labels set to -inf.
29
- """
30
- hidden = model.model(tokens)
31
- last = hidden[mx.arange(tokens.shape[0]), lengths - 1][:, None, :]
32
- logits = head_logits(model, last)[:, 0, :]
33
- picked = mx.take_along_axis(logits, label_ids, axis=-1).astype(mx.float32)
34
- return mx.where(label_mask, picked, NEG_INF)
35
-
36
-
37
- def head_logits(model, hidden: mx.array) -> mx.array:
38
- if getattr(model.args, "tie_word_embeddings", False):
39
- return model.model.embed_tokens.as_linear(hidden)
40
- return model.lm_head(hidden)
41
-
42
-
43
- def shared_prefix_label_logits(
44
- model, seqs: list[list[int]], label_lists: list[list[int]], max_cached_tokens: int = 32_768
45
- ) -> np.ndarray:
46
- """Like label_logits, but encodes the prompts' common prefix (system + state) once.
47
-
48
- The prefix KV cache is replicated across a chunk of question suffixes, so each
49
- question only pays for its own few dozen tokens. Chunks are sized so that
50
- replicated prefix tokens stay under max_cached_tokens.
51
- """
52
- common = min(len(s) for s in seqs) - 1 # every suffix keeps at least one token
53
- for i in range(common):
54
- if any(s[i] != seqs[0][i] for s in seqs):
55
- common = i
56
- break
57
- prefix_cache = make_prompt_cache(model)
58
- if common:
59
- model.model(mx.array(seqs[0][:common])[None], cache=prefix_cache)
60
- prefix_state = [c.state for c in prefix_cache] if common else None
61
- if prefix_state:
62
- mx.eval(prefix_state)
63
-
64
- out = np.full((len(seqs), max(map(len, label_lists))), NEG_INF, dtype=np.float32)
65
- chunk = max(1, max_cached_tokens // max(common, 1))
66
- for start in range(0, len(seqs), chunk):
67
- suffixes = [s[common:] for s in seqs[start : start + chunk]]
68
- b = len(suffixes)
69
- cache = make_prompt_cache(model)
70
- if prefix_state:
71
- for c, (k, v) in zip(cache, prefix_state):
72
- c.state = (mx.repeat(k, b, axis=0), mx.repeat(v, b, axis=0))
73
- tokens, lengths = pad_batch(suffixes)
74
- hidden = model.model(tokens, cache=cache)
75
- last = hidden[mx.arange(b), lengths - 1][:, None, :]
76
- logits = head_logits(model, last)[:, 0, :]
77
- ids, mask = pad_labels(label_lists[start : start + chunk])
78
- picked = mx.where(mask, mx.take_along_axis(logits, ids, axis=-1).astype(mx.float32), NEG_INF)
79
- out[start : start + b, : picked.shape[1]] = np.array(picked)
80
- return out
81
-
82
-
83
- def pad_batch(seqs: list[list[int]], pad: int = 0) -> tuple[mx.array, mx.array]:
84
- width = max(len(s) for s in seqs)
85
- arr = np.full((len(seqs), width), pad, dtype=np.int32)
86
- for i, s in enumerate(seqs):
87
- arr[i, : len(s)] = s
88
- return mx.array(arr), mx.array([len(s) for s in seqs], dtype=mx.int32)
89
-
90
-
91
- def pad_labels(label_lists: list[list[int]]) -> tuple[mx.array, mx.array]:
92
- width = max(len(ls) for ls in label_lists)
93
- ids = np.zeros((len(label_lists), width), dtype=np.int32)
94
- mask = np.zeros((len(label_lists), width), dtype=bool)
95
- for i, ls in enumerate(label_lists):
96
- ids[i, : len(ls)] = ls
97
- mask[i, : len(ls)] = True
98
- return mx.array(ids), mx.array(mask)
99
-
100
-
101
- class Jet:
102
- def __init__(
103
- self,
104
- base_model: str = DEFAULT_BASE_MODEL,
105
- adapter_path: str | None = None,
106
- max_state_tokens: int = DEFAULT_MAX_STATE_TOKENS,
107
- ):
108
- self.model, self.tokenizer = load(base_model, adapter_path=adapter_path)
109
- self.model.eval()
110
- self.max_state_tokens = max_state_tokens
111
- self.temperatures = {"choice": 1.0, "score": 1.0, "noul": 1.0}
112
- # Calibration lives next to the adapter, or inside a fused model dir. A Hub repo id has no dir
113
- # of its own, so look in its local snapshot (fetching calibration.json if the repo has one).
114
- model_dir = Path(base_model) if Path(base_model).exists() else Path(snapshot_download(base_model, allow_patterns=["calibration.json"]))
115
- for directory in (adapter_path, model_dir):
116
- if directory and (calib := Path(directory) / "calibration.json").exists():
117
- self.temperatures.update(json.loads(calib.read_text()))
118
- break
119
-
120
- def raw_logits(self, items: list[tuple[Any, Question]], shared_state: bool = False) -> tuple[list[np.ndarray], int]:
121
- """Uncalibrated label logits for (state, question) pairs, plus the number of
122
- input tokens. With shared_state, the common state prefix is encoded once."""
123
- seqs = [encode(self.tokenizer, s, q, self.max_state_tokens) for s, q in items]
124
- label_lists = [label_token_ids(self.tokenizer, q) for _, q in items]
125
- if shared_state and len(items) > 1:
126
- out = shared_prefix_label_logits(self.model, seqs, label_lists)
127
- else:
128
- tokens, lengths = pad_batch(seqs)
129
- ids, mask = pad_labels(label_lists)
130
- out = np.array(label_logits(self.model, tokens, lengths, ids, mask))
131
- return [out[i, : len(q.keys)] for i, (_, q) in enumerate(items)], sum(map(len, seqs))
132
-
133
- def probabilities(self, items: list[tuple[Any, Question]], shared_state: bool = False) -> tuple[list[np.ndarray], int]:
134
- logits, n_tokens = self.raw_logits(items, shared_state)
135
- result = []
136
- for (_, q), z in zip(items, logits):
137
- z = z / self.temperatures[q.type]
138
- z = np.exp(z - z.max())
139
- result.append(z / z.sum())
140
- return result, n_tokens
141
-
142
- def decide(self, state: Any, questions: dict[str, Question]) -> dict[str, Any]:
143
- """Answer every question about one state together (shared batch)."""
144
- started = time.perf_counter()
145
- items = [(state, q) for q in questions.values()]
146
- probs, input_tokens = self.probabilities(items, shared_state=True)
147
- return {
148
- "answers": {name: summarize(q, p) for (name, q), p in zip(questions.items(), probs)},
149
- "usage": {"input_tokens": input_tokens},
150
- "latency_ms": round((time.perf_counter() - started) * 1000, 1),
151
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/src/train.py DELETED
@@ -1,304 +0,0 @@
1
- """LoRA fine-tuning of a small LM into a Jet decision model (MLX, Apple Silicon).
2
-
3
- The loss is cross-entropy between the soft target and the model's next-token
4
- distribution restricted to the question's label tokens, read at the last prompt
5
- position only - exactly what inference computes. Score questions add a ranked
6
- probability score term, so mass far from the target level costs more than mass
7
- next to it (cross-entropy alone treats the levels as unordered).
8
- """
9
-
10
- from __future__ import annotations
11
-
12
- import argparse
13
- import hashlib
14
- import json
15
- import math
16
- import random
17
- import time
18
- from functools import partial
19
- from pathlib import Path
20
-
21
- import mlx.core as mx
22
- import mlx.nn as nn
23
- import mlx.optimizers as optim
24
- import numpy as np
25
- from mlx.utils import tree_flatten, tree_unflatten
26
- from mlx_lm import load
27
- from huggingface_hub import snapshot_download
28
- from mlx_lm.tuner.trainer import grad_checkpoint
29
- from mlx_lm.tuner.utils import linear_to_lora_layers
30
-
31
- from format import Question, label_token_ids
32
- from model import DEFAULT_BASE_MODEL, encode, label_logits, pad_batch, pad_labels
33
-
34
-
35
- class Example:
36
- __slots__ = ("tokens", "labels", "target", "ordinal", "weight")
37
-
38
- def __init__(self, tokens: list[int], labels: list[int], target: list[float], ordinal: bool, weight: float = 1.0):
39
- self.tokens, self.labels, self.target, self.ordinal = tokens, labels, target, ordinal
40
- self.weight = weight
41
-
42
-
43
- def load_examples(path: Path, tokenizer, max_state_tokens: int, smoothing: float, use_weights: bool = False) -> list[Example]:
44
- out = []
45
- for line in path.open():
46
- ex = json.loads(line)
47
- q = Question.from_dict(ex["question"])
48
- k = len(q.keys)
49
- target = [(1 - smoothing) * t + smoothing / k for t in ex["target"]]
50
- weight = float(ex.get("weight", 1.0)) if use_weights else 1.0
51
- if not math.isfinite(weight) or weight <= 0:
52
- raise ValueError("training weights must be finite and positive")
53
- out.append(Example(encode(tokenizer, ex["state"], q, max_state_tokens), label_token_ids(tokenizer, q), target, q.type == "score", weight))
54
- return out
55
-
56
-
57
- def make_batches(examples: list[Example], max_batch_tokens: int, rng: random.Random | None) -> list[list[Example]]:
58
- """Group similar lengths together; each batch's padded size stays under max_batch_tokens."""
59
- order = sorted(examples, key=lambda e: len(e.tokens))
60
- batches, cur = [], []
61
- for ex in order:
62
- width = max(len(ex.tokens), max((len(e.tokens) for e in cur), default=0))
63
- if cur and width * (len(cur) + 1) > max_batch_tokens:
64
- batches.append(cur)
65
- cur = []
66
- cur.append(ex)
67
- if cur:
68
- batches.append(cur)
69
- if rng:
70
- rng.shuffle(batches)
71
- return batches
72
-
73
-
74
- def to_arrays(batch: list[Example]):
75
- tokens, lengths = pad_batch([e.tokens for e in batch])
76
- ids, mask = pad_labels([e.labels for e in batch])
77
- target = np.zeros(ids.shape, dtype=np.float32)
78
- for i, e in enumerate(batch):
79
- target[i, : len(e.target)] = e.target
80
- ordinal = mx.array([e.ordinal for e in batch])
81
- levels = mx.array([len(e.labels) for e in batch], dtype=mx.float32)
82
- return tokens, lengths, ids, mask, mx.array(target), ordinal, levels, mx.array([e.weight for e in batch])
83
-
84
-
85
- def ranked_probability_score(logp: mx.array, target: mx.array, levels: mx.array) -> mx.array:
86
- """Squared distance between predicted and target CDFs, divided by (levels - 1) so it stays
87
- in 0-1 for any scale size. Padded labels have zero mass in both, so they add nothing."""
88
- cdf_gap = mx.cumsum(mx.exp(logp), axis=-1) - mx.cumsum(target, axis=-1)
89
- return (cdf_gap**2).sum(axis=-1) / (levels - 1)
90
-
91
-
92
- def loss_fn(model, tokens, lengths, ids, mask, target, ordinal, levels, weights, ordinal_weight=0.0):
93
- logits = label_logits(model, tokens, lengths, ids, mask)
94
- logp = logits - mx.logsumexp(logits, axis=-1, keepdims=True)
95
- loss = -(target * logp).sum(axis=-1)
96
- if ordinal_weight:
97
- loss = loss + ordinal_weight * mx.where(ordinal, ranked_probability_score(logp, target, levels), 0.0)
98
- return (loss * weights).mean()
99
-
100
-
101
- def evaluate(model, batches: list[list[Example]]) -> dict[str, float]:
102
- total, nll, correct = 0, 0.0, 0
103
- for batch in batches:
104
- tokens, lengths, ids, mask, target, *_ = to_arrays(batch)
105
- logits = label_logits(model, tokens, lengths, ids, mask)
106
- logp = logits - mx.logsumexp(logits, axis=-1, keepdims=True)
107
- nll += float(-(target * logp).sum())
108
- correct += int((mx.argmax(logits, axis=-1) == mx.argmax(target, axis=-1)).sum())
109
- total += len(batch)
110
- return {"nll": nll / total, "acc": correct / total}
111
-
112
-
113
- def save_adapter(model, out: Path, config: dict, optimizer: optim.Optimizer | None = None) -> None:
114
- out.mkdir(parents=True, exist_ok=True)
115
- mx.save_safetensors(str(out / "adapters.safetensors"), dict(tree_flatten(model.trainable_parameters())))
116
- (out / "adapter_config.json").write_text(json.dumps(config, indent=2))
117
- if optimizer is not None:
118
- # Adam moments + step, so --resume continues exactly instead of restarting cold.
119
- mx.save_safetensors(str(out / "optimizer.safetensors"), dict(tree_flatten(optimizer.state)))
120
-
121
-
122
- def main() -> None:
123
- ap = argparse.ArgumentParser(description="Fine-tune a Jet decision model with LoRA.")
124
- ap.add_argument("--base-model", default=DEFAULT_BASE_MODEL)
125
- ap.add_argument("--base-revision", default=None, help="pin a Hub base model to this commit")
126
- ap.add_argument("--train", type=Path, default=Path("data/train.jsonl"))
127
- ap.add_argument("--val", type=Path, default=Path("data/val.jsonl"))
128
- ap.add_argument("--out", type=Path, default=Path("adapters/jet"))
129
- ap.add_argument("--epochs", type=float, default=2.0)
130
- ap.add_argument("--lr", type=float, default=1e-4)
131
- ap.add_argument("--warmup", type=int, default=100)
132
- ap.add_argument("--rank", type=int, default=16)
133
- ap.add_argument("--lora-scale", type=float, default=10.0)
134
- ap.add_argument("--dropout", type=float, default=0.05)
135
- ap.add_argument("--lora-layers", type=int, default=-1, help="-1 = all layers")
136
- ap.add_argument("--max-batch-tokens", type=int, default=4096)
137
- ap.add_argument("--max-state-tokens", type=int, default=1024)
138
- ap.add_argument("--smoothing", type=float, default=0.02)
139
- ap.add_argument("--use-example-weights", action="store_true",
140
- help="use positive per-row weights for training only; validation remains unweighted")
141
- ap.add_argument("--ordinal-weight", type=float, default=2.0,
142
- help="weight of the ranked probability score term on score questions; 0 = plain cross-entropy")
143
- ap.add_argument("--grad-checkpoint", action=argparse.BooleanOptionalAction, default=True)
144
- ap.add_argument("--eval-every", type=int, default=250)
145
- ap.add_argument("--val-limit", type=int, default=1000)
146
- ap.add_argument("--cache-limit-gb", type=float, default=1.0,
147
- help="cap on MLX's freed-buffer cache; variable batch shapes otherwise grow it toward all of RAM")
148
- ap.add_argument("--resume", type=Path, default=None, help="adapter dir to continue from")
149
- ap.add_argument("--init-adapter", type=Path, default=None,
150
- help="warm-start adapter weights with a fresh optimizer and schedule")
151
- ap.add_argument("--start-step", type=int, default=None,
152
- help="step the resumed adapter was saved at; read from its optimizer state when present")
153
- ap.add_argument("--seed", type=int, default=0)
154
- args = ap.parse_args()
155
- if args.init_adapter and (args.resume or args.start_step is not None):
156
- ap.error("--init-adapter cannot be combined with --resume or --start-step")
157
- if (args.out / "adapters.safetensors").exists():
158
- ap.error("output already contains an adapter; choose a new directory")
159
-
160
- args.out.mkdir(parents=True, exist_ok=True)
161
- run_config = {k: str(v) if isinstance(v, Path) else v for k, v in vars(args).items()}
162
- run_config["data_sha256"] = {
163
- str(p): hashlib.sha256(p.read_bytes()).hexdigest() for p in (args.train, args.val)
164
- }
165
- if args.init_adapter:
166
- source_config = json.loads((args.init_adapter / "adapter_config.json").read_text())
167
- expected = {"rank": args.rank, "scale": args.lora_scale, "dropout": args.dropout}
168
- if source_config.get("lora_parameters") != expected:
169
- ap.error("initial adapter LoRA parameters do not match requested parameters")
170
- if source_config.get("base_model") != args.base_model:
171
- ap.error("initial adapter uses a different base model")
172
- if source_config.get("base_revision") not in (None, args.base_revision):
173
- ap.error("initial adapter uses a different base revision")
174
- run_config["init_adapter_sha256"] = hashlib.sha256(
175
- (args.init_adapter / "adapters.safetensors").read_bytes()).hexdigest()
176
- (args.out / "training_config.json").write_text(json.dumps(run_config, indent=2))
177
-
178
- mx.set_cache_limit(int(args.cache_limit_gb * 1e9))
179
- mx.random.seed(args.seed)
180
- rng = random.Random(args.seed)
181
- model_path = args.base_model
182
- if args.base_revision:
183
- model_path = snapshot_download(args.base_model, revision=args.base_revision)
184
- model, tokenizer = load(model_path)
185
- model.freeze()
186
- num_layers = len(model.layers) if args.lora_layers < 0 else args.lora_layers
187
- lora_parameters = {"rank": args.rank, "scale": args.lora_scale, "dropout": args.dropout}
188
- linear_to_lora_layers(model, num_layers, lora_parameters)
189
- if args.init_adapter:
190
- if source_config.get("num_layers") != num_layers:
191
- ap.error("initial adapter layer count does not match")
192
- weights = mx.load(str(args.init_adapter / "adapters.safetensors"))
193
- expected_weights = dict(tree_flatten(model.trainable_parameters()))
194
- if weights.keys() != expected_weights.keys() or any(
195
- weights[k].shape != expected_weights[k].shape for k in expected_weights
196
- ):
197
- ap.error("initial adapter tensor names or shapes do not match")
198
- model.load_weights(list(weights.items()), strict=False)
199
- print(f"initialized weights from {args.init_adapter}; optimizer starts fresh", flush=True)
200
- if args.resume:
201
- model.load_weights(str(args.resume / "adapters.safetensors"), strict=False)
202
- print(f"resumed weights from {args.resume}")
203
- if args.grad_checkpoint:
204
- grad_checkpoint(model.layers[0])
205
- n_train = sum(v.size for _, v in tree_flatten(model.trainable_parameters()))
206
- print(f"trainable params: {n_train / 1e6:.2f}M")
207
-
208
- train = load_examples(args.train, tokenizer, args.max_state_tokens, args.smoothing, args.use_example_weights)
209
- val = load_examples(args.val, tokenizer, args.max_state_tokens, 0.0)
210
- rng.shuffle(val)
211
- val_batches = make_batches(val[: args.val_limit], args.max_batch_tokens, None)
212
- steps_per_epoch = len(make_batches(train, args.max_batch_tokens, None))
213
- total_steps = math.ceil(steps_per_epoch * args.epochs)
214
- print(f"train {len(train)} examples, {steps_per_epoch} steps/epoch, {total_steps} steps; val {len(val_batches)} batches")
215
- run_config.update(train_examples=len(train), steps_per_epoch=steps_per_epoch, total_steps=total_steps)
216
- (args.out / "training_config.json").write_text(json.dumps(run_config, indent=2))
217
-
218
- warmup = max(1, min(args.warmup, total_steps // 10))
219
- base_schedule = optim.join_schedules(
220
- [optim.linear_schedule(1e-7, args.lr, warmup), optim.cosine_decay(args.lr, total_steps - warmup, args.lr * 0.05)],
221
- [warmup],
222
- )
223
- optimizer_state = args.resume / "optimizer.safetensors" if args.resume else None
224
- if optimizer_state is not None and optimizer_state.exists():
225
- schedule = base_schedule
226
- optimizer = optim.AdamW(learning_rate=schedule, weight_decay=0.01)
227
- optimizer.init(model.trainable_parameters())
228
- optimizer.state = tree_unflatten(list(mx.load(str(optimizer_state)).items()))
229
- start_step = int(optimizer.state["step"].item())
230
- print(f"restored optimizer state at step {start_step}")
231
- else:
232
- start_step = args.start_step or 0
233
- if args.resume:
234
- # Cold Adam moments (MLX AdamW has no bias correction by default) make the first
235
- # updates several times too large; ramp the LR back up to protect the checkpoint.
236
- def schedule(step, start=start_step):
237
- return base_schedule(step) * mx.minimum(1.0, (step - start + 1).astype(mx.float32) / warmup)
238
- print(f"no optimizer state in {args.resume}; re-warming the LR over {warmup} steps")
239
- else:
240
- schedule = base_schedule
241
- optimizer = optim.AdamW(learning_rate=schedule, weight_decay=0.01)
242
- optimizer.state["step"] = mx.array(start_step, mx.uint64)
243
- value_and_grad = nn.value_and_grad(model, partial(loss_fn, ordinal_weight=args.ordinal_weight))
244
-
245
- adapter_config = {
246
- "fine_tune_type": "lora",
247
- "num_layers": num_layers,
248
- "lora_parameters": lora_parameters,
249
- "base_model": args.base_model,
250
- "base_revision": args.base_revision,
251
- }
252
- model.eval()
253
- best = evaluate(model, val_batches)
254
- # Keep the initial checkpoint eligible; a regression must not replace it merely
255
- # because no trained checkpoint improved the validation loss.
256
- save_adapter(model, args.out, adapter_config, optimizer)
257
- (args.out / "metrics.jsonl").write_text(json.dumps({"step": 0, **best,
258
- "improved": False, "initial": True}) + "\n")
259
- print(f"step 0 val nll {best['nll']:.4f} acc {best['acc']:.3f}")
260
- model.train()
261
-
262
- saved = False
263
- step, seen_tokens, started = start_step, 0, time.perf_counter()
264
- losses: list[float] = []
265
- while step < total_steps:
266
- for batch in make_batches(train, args.max_batch_tokens, rng):
267
- if step >= total_steps:
268
- break
269
- arrays = to_arrays(batch)
270
- loss, grads = value_and_grad(model, *arrays)
271
- optimizer.update(model, grads)
272
- mx.eval(model.trainable_parameters(), optimizer.state, loss)
273
- step += 1
274
- losses.append(loss.item())
275
- seen_tokens += int(arrays[1].sum())
276
- if step % 25 == 0:
277
- elapsed = time.perf_counter() - started
278
- print(
279
- f"step {step}/{total_steps} loss {np.mean(losses):.4f} lr {optimizer.learning_rate.item():.2e} "
280
- f"{seen_tokens / elapsed:.0f} tok/s peak mem {mx.get_peak_memory() / 1e9:.1f}GB cache {mx.get_cache_memory() / 1e9:.1f}GB",
281
- flush=True,
282
- )
283
- losses = []
284
- if step % args.eval_every == 0 or step == total_steps:
285
- model.eval()
286
- metrics = evaluate(model, val_batches)
287
- model.train()
288
- improved = metrics["nll"] < best["nll"]
289
- print(f"step {step} val nll {metrics['nll']:.4f} acc {metrics['acc']:.3f}{' *saved*' if improved else ''}", flush=True)
290
- with (args.out / "metrics.jsonl").open("a") as f:
291
- f.write(json.dumps({"step": step, **metrics, "improved": improved,
292
- "peak_memory_gb": mx.get_peak_memory() / 1e9}) + "\n")
293
- save_adapter(model, args.out / "last", adapter_config, optimizer)
294
- if improved:
295
- best = metrics
296
- save_adapter(model, args.out, adapter_config, optimizer)
297
- saved = True
298
- if not saved:
299
- print("validation never improved; retaining initial weights (final weights in last/)")
300
- print(f"best val nll {best['nll']:.4f} acc {best['acc']:.3f}; adapter in {args.out}")
301
-
302
-
303
- if __name__ == "__main__":
304
- main()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/code/train_cuda.sh DELETED
@@ -1,21 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Run jet-train on Linux/CUDA. Extra args go to jet-train.
3
- set -euo pipefail
4
- cd "$(dirname "$0")"
5
- uv sync --extra cuda --inexact --quiet
6
-
7
- # MLX JIT-compiles kernels and wants one CUDA_HOME/include; the pip wheels spread the headers
8
- # over several packages, so link them into a single tree.
9
- export CUDA_HOME=$PWD/.venv/cuda_home
10
- if [ ! -d "$CUDA_HOME/include" ]; then
11
- mkdir -p "$CUDA_HOME/include"
12
- for pkg in .venv/lib/python*/site-packages/nvidia/{cuda_runtime,cuda_cccl,cuda_nvrtc}/include; do
13
- for f in "$PWD/$pkg"/*; do
14
- [ "$(basename "$f")" = __init__.py ] || ln -sfn "$f" "$CUDA_HOME/include/"
15
- done
16
- done
17
- fi
18
- export MLX_USE_CUDA_GRAPHS=0 # batch shapes vary every step, so graphs just thrash
19
- export MLX_CUDA_SDPA_CACHE_SIZE=${MLX_CUDA_SDPA_CACHE_SIZE:-2048} # same reason; the default 256 aborts mid-run
20
- export MLX_PTX_CACHE_DIR=$PWD/.venv/ptx_cache # keep JIT-compiled kernels across runs
21
- exec uv run --extra cuda --no-sync jet-train "$@"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/comparison.json DELETED
The diff for this file is too large to render. See raw diff
 
docs/training/jet-next/completion-audit.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "status": "passed",
3
- "compatibility": {
4
- "ok": 26,
5
- "total": 26
6
- },
7
- "tests": {
8
- "adapter_including_gpu_golden_and_prefix_parity": 8,
9
- "executable_v3_data": 3
10
- },
11
- "selected_optimizer_steps": {
12
- "warm": 2444,
13
- "v4": 3750
14
- },
15
- "original_datasets": "unchanged",
16
- "all_v3_datasets": "unchanged",
17
- "published_weights_and_calibration": "unchanged",
18
- "preexisting_user_changes": "unchanged",
19
- "active_training_or_evaluation_jobs": 0
20
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/cruxeval-full-baseline.json DELETED
@@ -1,148 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "c8b53c17bff3c866e544788378fea6c064221d82cc113dae8d422343394b9c16",
4
- "results_sha256": "d61110ea9c6307f5fffa1a2a56ae634f716187298fa65cf5aaa8e2dfb57a8743",
5
- "planned_requests": 570,
6
- "processed_requests": 570,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "michaljach/jet",
15
- "revision": "8a97cfea2df622bb03f5dc9b02567e21abd2551c"
16
- },
17
- "model_source": {
18
- "model": "michaljach/jet",
19
- "revision": "8a97cfea2df622bb03f5dc9b02567e21abd2551c",
20
- "backend": "mlx",
21
- "max_tokens": 8192,
22
- "checkpoint_context": 40960,
23
- "max_cached_tokens": 8192,
24
- "choice_temperature": 1.0293,
25
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
26
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
27
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts."
28
- },
29
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
30
- "mlx": "0.32.2",
31
- "mlx_lm": "0.31.3",
32
- "device": "Device(gpu, 0)",
33
- "loaded_seconds": 2.082998502999544,
34
- "frozen_corpus_sha256": null,
35
- "rows_path": "artifacts/decision-index/cruxeval-full-diagnostic.jsonl.gz",
36
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
37
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
38
- },
39
- "summary": {
40
- "engine": "jet",
41
- "counts": {
42
- "ok": 570
43
- },
44
- "successful_request_latency_ms": {
45
- "median": 13.089024500004598,
46
- "p95": 46.50721500001964,
47
- "mean": 22.395500426424213
48
- },
49
- "benchmarks": [
50
- {
51
- "catalog_id": 43,
52
- "dataset": "CRUXEval",
53
- "requests": 570,
54
- "answered": 570,
55
- "unsupported": 0,
56
- "errors": 0,
57
- "abstained": 0,
58
- "pending": 0,
59
- "scored_requests": 570,
60
- "metric": "accuracy",
61
- "score": 0.387719298245614,
62
- "reference_same_cases": null,
63
- "median_ms": 13.089024500004598,
64
- "detail": {
65
- "field_accuracy": 0.387719298245614,
66
- "case_exact_accuracy": 0.387719298245614,
67
- "custom_metrics": {}
68
- }
69
- }
70
- ],
71
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
72
- },
73
- "panel_metrics_on_sample": {
74
- "43": {
75
- "catalog_id": 43,
76
- "raw": 0.387719298245614,
77
- "skill": 0.028559562416605518,
78
- "coverage": 1,
79
- "pending": 0,
80
- "tracks": [
81
- {
82
- "track": "all",
83
- "raw": 0.387719298245614,
84
- "random": 0.36971874129768867,
85
- "skill": 0.028559562416605518,
86
- "planned_cases": 570,
87
- "coverage": 1,
88
- "pending": 0,
89
- "label_universe": []
90
- }
91
- ]
92
- },
93
- "7": {
94
- "catalog_id": 7,
95
- "raw": 0.0,
96
- "skill": 0.0,
97
- "coverage": 0.0,
98
- "pending": 1.0,
99
- "status": "unrun; provisional lower bound",
100
- "tracks": []
101
- },
102
- "16": {
103
- "catalog_id": 16,
104
- "raw": 0.0,
105
- "skill": 0.0,
106
- "coverage": 0.0,
107
- "pending": 1.0,
108
- "status": "unrun; provisional lower bound",
109
- "tracks": []
110
- },
111
- "13": {
112
- "catalog_id": 13,
113
- "raw": 0.0,
114
- "skill": 0.0,
115
- "coverage": 0.0,
116
- "pending": 1.0,
117
- "status": "unrun; provisional lower bound",
118
- "tracks": []
119
- },
120
- "15": {
121
- "catalog_id": 15,
122
- "raw": 0.0,
123
- "skill": 0.0,
124
- "coverage": 0.0,
125
- "pending": 1.0,
126
- "status": "unrun; provisional lower bound",
127
- "tracks": []
128
- },
129
- "17": {
130
- "catalog_id": 17,
131
- "raw": 0.0,
132
- "skill": 0.0,
133
- "coverage": 0.0,
134
- "pending": 1.0,
135
- "status": "unrun; provisional lower bound",
136
- "tracks": []
137
- },
138
- "19": {
139
- "catalog_id": 19,
140
- "raw": 0.0,
141
- "skill": 0.0,
142
- "coverage": 0.0,
143
- "pending": 1.0,
144
- "status": "unrun; provisional lower bound",
145
- "tracks": []
146
- }
147
- }
148
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/cruxeval-full-sample.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "requests": 570,
3
- "selection": "All available CRUXEval rows after official exclusions; no label-based selection",
4
- "source_sha256": "8dd94acf6c313c50aec3fc48188c840d994d14f764b3fff9fe7a89e2e41b9211",
5
- "rows_sha256": "c8b53c17bff3c866e544788378fea6c064221d82cc113dae8d422343394b9c16"
6
- }
 
 
 
 
 
 
 
docs/training/jet-next/cruxeval-full-v3.json DELETED
@@ -1,152 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "c8b53c17bff3c866e544788378fea6c064221d82cc113dae8d422343394b9c16",
4
- "results_sha256": "f7748f31af62f0c601fd96d83c2d2b2f57033986547cfa5b4ac7f7c4f90f46b5",
5
- "planned_requests": 570,
6
- "processed_requests": 570,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "mlx-community/Qwen3-0.6B-bf16",
15
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
16
- "adapter": "adapters/jet-v3-decision-20260923"
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 1.0,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v3-decision-20260923",
30
- "lora_weights_sha256": "d17a7f6c998e46348263d76760d9766a2f65e731caa5351e14861c4be43535c5",
31
- "calibration_sha256": "e5130c08d2de1105152ded40fdb6998f4eff21e588370263c0dc51af4386f0c5"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.8621119829986128,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/cruxeval-full-diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 570
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 25.944673499907367,
50
- "p95": 62.15157100086799,
51
- "mean": 35.532386945570785
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 43,
56
- "dataset": "CRUXEval",
57
- "requests": 570,
58
- "answered": 570,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 570,
64
- "metric": "accuracy",
65
- "score": 0.3473684210526316,
66
- "reference_same_cases": null,
67
- "median_ms": 25.944673499907367,
68
- "detail": {
69
- "field_accuracy": 0.3473684210526316,
70
- "case_exact_accuracy": 0.3473684210526316,
71
- "custom_metrics": {}
72
- }
73
- }
74
- ],
75
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
76
- },
77
- "panel_metrics_on_sample": {
78
- "43": {
79
- "catalog_id": 43,
80
- "raw": 0.3473684210526316,
81
- "skill": 0.0,
82
- "coverage": 1,
83
- "pending": 0,
84
- "tracks": [
85
- {
86
- "track": "all",
87
- "raw": 0.3473684210526316,
88
- "random": 0.36971874129768867,
89
- "skill": 0.0,
90
- "planned_cases": 570,
91
- "coverage": 1,
92
- "pending": 0,
93
- "label_universe": []
94
- }
95
- ]
96
- },
97
- "7": {
98
- "catalog_id": 7,
99
- "raw": 0.0,
100
- "skill": 0.0,
101
- "coverage": 0.0,
102
- "pending": 1.0,
103
- "status": "unrun; provisional lower bound",
104
- "tracks": []
105
- },
106
- "16": {
107
- "catalog_id": 16,
108
- "raw": 0.0,
109
- "skill": 0.0,
110
- "coverage": 0.0,
111
- "pending": 1.0,
112
- "status": "unrun; provisional lower bound",
113
- "tracks": []
114
- },
115
- "13": {
116
- "catalog_id": 13,
117
- "raw": 0.0,
118
- "skill": 0.0,
119
- "coverage": 0.0,
120
- "pending": 1.0,
121
- "status": "unrun; provisional lower bound",
122
- "tracks": []
123
- },
124
- "15": {
125
- "catalog_id": 15,
126
- "raw": 0.0,
127
- "skill": 0.0,
128
- "coverage": 0.0,
129
- "pending": 1.0,
130
- "status": "unrun; provisional lower bound",
131
- "tracks": []
132
- },
133
- "17": {
134
- "catalog_id": 17,
135
- "raw": 0.0,
136
- "skill": 0.0,
137
- "coverage": 0.0,
138
- "pending": 1.0,
139
- "status": "unrun; provisional lower bound",
140
- "tracks": []
141
- },
142
- "19": {
143
- "catalog_id": 19,
144
- "raw": 0.0,
145
- "skill": 0.0,
146
- "coverage": 0.0,
147
- "pending": 1.0,
148
- "status": "unrun; provisional lower bound",
149
- "tracks": []
150
- }
151
- }
152
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/cruxeval-full-v4.json DELETED
@@ -1,152 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "c8b53c17bff3c866e544788378fea6c064221d82cc113dae8d422343394b9c16",
4
- "results_sha256": "c2ec7dfde1a861c361c3eaca34133d624726eaf1df28347fae25ac568df65736",
5
- "planned_requests": 570,
6
- "processed_requests": 570,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "mlx-community/Qwen3-0.6B-bf16",
15
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
16
- "adapter": "adapters/jet-v4-transfer-20260924"
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 1.1554,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v4-transfer-20260924",
30
- "lora_weights_sha256": "4937c96fb56d7bd510f17b6aa51d5357b8bf8cc6de0e80eb976ebf47a1ea72ad",
31
- "calibration_sha256": "0aaf5066fcf227488a6df68f9629b3f446631f2bb25ca7594a4721e5899a7384"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.8805886459995236,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/cruxeval-full-diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 570
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 25.62000750185689,
50
- "p95": 61.887538999144454,
51
- "mean": 35.259878875436506
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 43,
56
- "dataset": "CRUXEval",
57
- "requests": 570,
58
- "answered": 570,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 570,
64
- "metric": "accuracy",
65
- "score": 0.34385964912280703,
66
- "reference_same_cases": null,
67
- "median_ms": 25.62000750185689,
68
- "detail": {
69
- "field_accuracy": 0.34385964912280703,
70
- "case_exact_accuracy": 0.34385964912280703,
71
- "custom_metrics": {}
72
- }
73
- }
74
- ],
75
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
76
- },
77
- "panel_metrics_on_sample": {
78
- "43": {
79
- "catalog_id": 43,
80
- "raw": 0.34385964912280703,
81
- "skill": 0.0,
82
- "coverage": 1,
83
- "pending": 0,
84
- "tracks": [
85
- {
86
- "track": "all",
87
- "raw": 0.34385964912280703,
88
- "random": 0.36971874129768867,
89
- "skill": 0.0,
90
- "planned_cases": 570,
91
- "coverage": 1,
92
- "pending": 0,
93
- "label_universe": []
94
- }
95
- ]
96
- },
97
- "7": {
98
- "catalog_id": 7,
99
- "raw": 0.0,
100
- "skill": 0.0,
101
- "coverage": 0.0,
102
- "pending": 1.0,
103
- "status": "unrun; provisional lower bound",
104
- "tracks": []
105
- },
106
- "16": {
107
- "catalog_id": 16,
108
- "raw": 0.0,
109
- "skill": 0.0,
110
- "coverage": 0.0,
111
- "pending": 1.0,
112
- "status": "unrun; provisional lower bound",
113
- "tracks": []
114
- },
115
- "13": {
116
- "catalog_id": 13,
117
- "raw": 0.0,
118
- "skill": 0.0,
119
- "coverage": 0.0,
120
- "pending": 1.0,
121
- "status": "unrun; provisional lower bound",
122
- "tracks": []
123
- },
124
- "15": {
125
- "catalog_id": 15,
126
- "raw": 0.0,
127
- "skill": 0.0,
128
- "coverage": 0.0,
129
- "pending": 1.0,
130
- "status": "unrun; provisional lower bound",
131
- "tracks": []
132
- },
133
- "17": {
134
- "catalog_id": 17,
135
- "raw": 0.0,
136
- "skill": 0.0,
137
- "coverage": 0.0,
138
- "pending": 1.0,
139
- "status": "unrun; provisional lower bound",
140
- "tracks": []
141
- },
142
- "19": {
143
- "catalog_id": 19,
144
- "raw": 0.0,
145
- "skill": 0.0,
146
- "coverage": 0.0,
147
- "pending": 1.0,
148
- "status": "unrun; provisional lower bound",
149
- "tracks": []
150
- }
151
- }
152
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/cruxeval-full-warm.json DELETED
@@ -1,152 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "c8b53c17bff3c866e544788378fea6c064221d82cc113dae8d422343394b9c16",
4
- "results_sha256": "9b65aed86040c13dd85316232fbdae3a77500a0dcfad7c9243c0bda1be44f933",
5
- "planned_requests": 570,
6
- "processed_requests": 570,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "mlx-community/Qwen3-0.6B-bf16",
15
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
16
- "adapter": "adapters/jet-v3-warm-20260924"
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 0.9439,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v3-warm-20260924",
30
- "lora_weights_sha256": "93fd8eeade6eff0d0a8aa06119f71223dc1bee36c49f1a9298d2c37816b609d4",
31
- "calibration_sha256": "6a6dda82f9dacd1839189090ae03bcca5f3b9ca4c2c15e050609f89f2f52c226"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.9001195040000312,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/cruxeval-full-diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 570
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 26.362825999967754,
50
- "p95": 62.52290100019309,
51
- "mean": 36.53820609660327
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 43,
56
- "dataset": "CRUXEval",
57
- "requests": 570,
58
- "answered": 570,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 570,
64
- "metric": "accuracy",
65
- "score": 0.3508771929824561,
66
- "reference_same_cases": null,
67
- "median_ms": 26.362825999967754,
68
- "detail": {
69
- "field_accuracy": 0.3508771929824561,
70
- "case_exact_accuracy": 0.3508771929824561,
71
- "custom_metrics": {}
72
- }
73
- }
74
- ],
75
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
76
- },
77
- "panel_metrics_on_sample": {
78
- "43": {
79
- "catalog_id": 43,
80
- "raw": 0.3508771929824561,
81
- "skill": 0.0,
82
- "coverage": 1,
83
- "pending": 0,
84
- "tracks": [
85
- {
86
- "track": "all",
87
- "raw": 0.3508771929824561,
88
- "random": 0.36971874129768867,
89
- "skill": 0.0,
90
- "planned_cases": 570,
91
- "coverage": 1,
92
- "pending": 0,
93
- "label_universe": []
94
- }
95
- ]
96
- },
97
- "7": {
98
- "catalog_id": 7,
99
- "raw": 0.0,
100
- "skill": 0.0,
101
- "coverage": 0.0,
102
- "pending": 1.0,
103
- "status": "unrun; provisional lower bound",
104
- "tracks": []
105
- },
106
- "16": {
107
- "catalog_id": 16,
108
- "raw": 0.0,
109
- "skill": 0.0,
110
- "coverage": 0.0,
111
- "pending": 1.0,
112
- "status": "unrun; provisional lower bound",
113
- "tracks": []
114
- },
115
- "13": {
116
- "catalog_id": 13,
117
- "raw": 0.0,
118
- "skill": 0.0,
119
- "coverage": 0.0,
120
- "pending": 1.0,
121
- "status": "unrun; provisional lower bound",
122
- "tracks": []
123
- },
124
- "15": {
125
- "catalog_id": 15,
126
- "raw": 0.0,
127
- "skill": 0.0,
128
- "coverage": 0.0,
129
- "pending": 1.0,
130
- "status": "unrun; provisional lower bound",
131
- "tracks": []
132
- },
133
- "17": {
134
- "catalog_id": 17,
135
- "raw": 0.0,
136
- "skill": 0.0,
137
- "coverage": 0.0,
138
- "pending": 1.0,
139
- "status": "unrun; provisional lower bound",
140
- "tracks": []
141
- },
142
- "19": {
143
- "catalog_id": 19,
144
- "raw": 0.0,
145
- "skill": 0.0,
146
- "coverage": 0.0,
147
- "pending": 1.0,
148
- "status": "unrun; provisional lower bound",
149
- "tracks": []
150
- }
151
- }
152
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/diagnostic-v4.json DELETED
@@ -1,515 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "a790c3d5dac6068ecef13de92c7700c4da0a9ed87b998f528701ac1fe219205d",
4
- "results_sha256": "07a78ecfc6f9a4f45c618eee9c3b710d50ea08b9f963fdc43213f01d4374d76e",
5
- "planned_requests": 500,
6
- "processed_requests": 500,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "model": "mlx-community/Qwen3-0.6B-bf16",
13
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
14
- "adapter": "adapters/jet-v4-transfer-20260924",
15
- "max_tokens": 8192,
16
- "max_cached_tokens": 8192
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 1.1554,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v4-transfer-20260924",
30
- "lora_weights_sha256": "4937c96fb56d7bd510f17b6aa51d5357b8bf8cc6de0e80eb976ebf47a1ea72ad",
31
- "calibration_sha256": "0aaf5066fcf227488a6df68f9629b3f446631f2bb25ca7594a4721e5899a7384"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.8496340909987339,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/diagnostic/diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 500
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 60.23746450227918,
50
- "p95": 435.2597789984429,
51
- "mean": 103.62341392398957
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 11,
56
- "dataset": "ContractNLI",
57
- "requests": 56,
58
- "answered": 56,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 56,
64
- "metric": "macro-F1",
65
- "score": 0.6536335738829072,
66
- "reference_same_cases": null,
67
- "median_ms": 410.0216540009569,
68
- "detail": {
69
- "field_accuracy": 0.6691176470588235,
70
- "case_exact_accuracy": 0,
71
- "macro_f1": 0.6536335738829072,
72
- "custom_metrics": {}
73
- }
74
- },
75
- {
76
- "catalog_id": 30,
77
- "dataset": "GSM8K",
78
- "requests": 112,
79
- "answered": 112,
80
- "unsupported": 0,
81
- "errors": 0,
82
- "abstained": 0,
83
- "pending": 0,
84
- "scored_requests": 112,
85
- "metric": "accuracy",
86
- "score": 0.375,
87
- "reference_same_cases": null,
88
- "median_ms": 54.77364450052846,
89
- "tracks": {
90
- "GSM8K-10choice": {
91
- "metric": "accuracy",
92
- "score": 0.2857142857142857,
93
- "scored_requests": 56
94
- },
95
- "GSM8K-4choice": {
96
- "metric": "accuracy",
97
- "score": 0.4642857142857143,
98
- "scored_requests": 56
99
- }
100
- },
101
- "detail": {
102
- "field_accuracy": 0.375,
103
- "case_exact_accuracy": 0.17857142857142858,
104
- "custom_metrics": {}
105
- }
106
- },
107
- {
108
- "catalog_id": 40,
109
- "dataset": "iSarcasmEval",
110
- "requests": 56,
111
- "answered": 56,
112
- "unsupported": 0,
113
- "errors": 0,
114
- "abstained": 0,
115
- "pending": 0,
116
- "scored_requests": 56,
117
- "metric": "see separate subtask tracks",
118
- "score": null,
119
- "reference_same_cases": null,
120
- "median_ms": 61.44454200148175,
121
- "tracks": {
122
- "iSarcasmEval-A-Ar": {
123
- "metric": "see separate subtask tracks",
124
- "score": null,
125
- "scored_requests": 12
126
- },
127
- "iSarcasmEval-A-En": {
128
- "metric": "see separate subtask tracks",
129
- "score": null,
130
- "scored_requests": 19
131
- },
132
- "iSarcasmEval-B-En": {
133
- "metric": "see separate subtask tracks",
134
- "score": null,
135
- "scored_requests": 23
136
- },
137
- "iSarcasmEval-C-Ar": {
138
- "metric": "see separate subtask tracks",
139
- "score": null,
140
- "scored_requests": 1
141
- },
142
- "iSarcasmEval-C-En": {
143
- "metric": "see separate subtask tracks",
144
- "score": null,
145
- "scored_requests": 1
146
- }
147
- },
148
- "detail": {
149
- "field_accuracy": 0.52046783625731,
150
- "case_exact_accuracy": 0.35714285714285715,
151
- "macro_f1": 0.12538452073335796,
152
- "custom_metrics": {},
153
- "positive_f1_by_field": {
154
- "sarcastic": 0.125,
155
- "sarcasm": 0.2222222222222222,
156
- "irony": 0.11764705882352941,
157
- "satire": 0.0,
158
- "understatement": 0.0,
159
- "overstatement": 0.0,
160
- "rhetorical_question": 0.0
161
- },
162
- "category_macro_f1": 0.06640989729225023
163
- }
164
- },
165
- {
166
- "catalog_id": 41,
167
- "dataset": "VAST",
168
- "requests": 56,
169
- "answered": 56,
170
- "unsupported": 0,
171
- "errors": 0,
172
- "abstained": 0,
173
- "pending": 0,
174
- "scored_requests": 56,
175
- "metric": "macro-F1",
176
- "score": 0.4431124431124431,
177
- "reference_same_cases": null,
178
- "median_ms": 28.437076000045636,
179
- "detail": {
180
- "field_accuracy": 0.4642857142857143,
181
- "case_exact_accuracy": 0.4642857142857143,
182
- "macro_f1": 0.4431124431124431,
183
- "custom_metrics": {}
184
- }
185
- },
186
- {
187
- "catalog_id": 42,
188
- "dataset": "NLI4CT",
189
- "requests": 55,
190
- "answered": 55,
191
- "unsupported": 0,
192
- "errors": 0,
193
- "abstained": 0,
194
- "pending": 0,
195
- "scored_requests": 55,
196
- "metric": "macro-F1",
197
- "score": 0.5203488372093024,
198
- "reference_same_cases": null,
199
- "median_ms": 71.75399799962179,
200
- "detail": {
201
- "field_accuracy": 0.6727272727272727,
202
- "case_exact_accuracy": 0.6727272727272727,
203
- "macro_f1": 0.5203488372093024,
204
- "custom_metrics": {}
205
- }
206
- },
207
- {
208
- "catalog_id": 43,
209
- "dataset": "CRUXEval",
210
- "requests": 55,
211
- "answered": 55,
212
- "unsupported": 0,
213
- "errors": 0,
214
- "abstained": 0,
215
- "pending": 0,
216
- "scored_requests": 55,
217
- "metric": "accuracy",
218
- "score": 0.32727272727272727,
219
- "reference_same_cases": null,
220
- "median_ms": 55.303547997027636,
221
- "detail": {
222
- "field_accuracy": 0.32727272727272727,
223
- "case_exact_accuracy": 0.32727272727272727,
224
- "custom_metrics": {}
225
- }
226
- },
227
- {
228
- "catalog_id": 44,
229
- "dataset": "CLadder",
230
- "requests": 55,
231
- "answered": 55,
232
- "unsupported": 0,
233
- "errors": 0,
234
- "abstained": 0,
235
- "pending": 0,
236
- "scored_requests": 55,
237
- "metric": "accuracy",
238
- "score": 0.4727272727272727,
239
- "reference_same_cases": null,
240
- "median_ms": 54.30907100162585,
241
- "detail": {
242
- "field_accuracy": 0.4727272727272727,
243
- "case_exact_accuracy": 0.4727272727272727,
244
- "custom_metrics": {}
245
- }
246
- },
247
- {
248
- "catalog_id": 50,
249
- "dataset": "Habermas Machine",
250
- "requests": 55,
251
- "answered": 55,
252
- "unsupported": 0,
253
- "errors": 0,
254
- "abstained": 0,
255
- "pending": 0,
256
- "scored_requests": 55,
257
- "metric": "accuracy",
258
- "score": 0.32727272727272727,
259
- "reference_same_cases": null,
260
- "median_ms": 80.21276100043906,
261
- "detail": {
262
- "field_accuracy": 0.32727272727272727,
263
- "case_exact_accuracy": 0.32727272727272727,
264
- "custom_metrics": {
265
- "normalized_rank_regret": 0.2815151515151515
266
- }
267
- }
268
- }
269
- ],
270
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
271
- },
272
- "panel_metrics_on_sample": {
273
- "11": {
274
- "catalog_id": 11,
275
- "raw": 0.6536335738829072,
276
- "skill": 0.4990948536692409,
277
- "coverage": 1,
278
- "pending": 0,
279
- "tracks": [
280
- {
281
- "track": "all",
282
- "raw": 0.6536335738829072,
283
- "random": 0.30851893087083776,
284
- "skill": 0.4990948536692409,
285
- "planned_cases": 56,
286
- "coverage": 1,
287
- "pending": 0,
288
- "label_universe": [
289
- "\"The contract contradicts the hypothesis.\"",
290
- "\"The contract entails the hypothesis.\"",
291
- "\"The hypothesis is neither entailed nor contradicted by the contract.\""
292
- ]
293
- }
294
- ]
295
- },
296
- "30": {
297
- "catalog_id": 30,
298
- "raw": 0.375,
299
- "skill": 0.24603174603174605,
300
- "coverage": 1,
301
- "pending": 0,
302
- "tracks": [
303
- {
304
- "track": "GSM8K-4choice",
305
- "raw": 0.4642857142857143,
306
- "random": 0.25,
307
- "skill": 0.28571428571428575,
308
- "planned_cases": 56,
309
- "coverage": 1,
310
- "pending": 0,
311
- "label_universe": []
312
- },
313
- {
314
- "track": "GSM8K-10choice",
315
- "raw": 0.2857142857142857,
316
- "random": 0.1,
317
- "skill": 0.2063492063492063,
318
- "planned_cases": 56,
319
- "coverage": 1,
320
- "pending": 0,
321
- "label_universe": []
322
- }
323
- ]
324
- },
325
- "40": {
326
- "catalog_id": 40,
327
- "raw": 0.0625,
328
- "skill": 0.00878466561850422,
329
- "coverage": 1,
330
- "pending": 0,
331
- "tracks": [
332
- {
333
- "track": "iSarcasmEval-A-En",
334
- "raw": 0.25,
335
- "random": 0.2226862339379383,
336
- "skill": 0.03513866247401688,
337
- "planned_cases": 19,
338
- "coverage": 1,
339
- "pending": 0,
340
- "label_universe": [
341
- "no",
342
- "yes"
343
- ]
344
- },
345
- {
346
- "track": "iSarcasmEval-A-Ar",
347
- "raw": 0.0,
348
- "random": 0.22250656045660705,
349
- "skill": 0.0,
350
- "planned_cases": 12,
351
- "coverage": 1,
352
- "pending": 0,
353
- "label_universe": [
354
- "no",
355
- "yes"
356
- ]
357
- },
358
- {
359
- "track": "iSarcasmEval-C-En",
360
- "raw": 0.0,
361
- "random": 0.5,
362
- "skill": 0.0,
363
- "planned_cases": 1,
364
- "coverage": 1,
365
- "pending": 0,
366
- "label_universe": []
367
- },
368
- {
369
- "track": "iSarcasmEval-C-Ar",
370
- "raw": 0.0,
371
- "random": 0.5,
372
- "skill": 0.0,
373
- "planned_cases": 1,
374
- "coverage": 1,
375
- "pending": 0,
376
- "label_universe": []
377
- }
378
- ]
379
- },
380
- "41": {
381
- "catalog_id": 41,
382
- "raw": 0.4431124431124431,
383
- "skill": 0.16467966294233655,
384
- "coverage": 1,
385
- "pending": 0,
386
- "tracks": [
387
- {
388
- "track": "all",
389
- "raw": 0.4431124431124431,
390
- "random": 0.3333245556439576,
391
- "skill": 0.16467966294233655,
392
- "planned_cases": 56,
393
- "coverage": 1,
394
- "pending": 0,
395
- "label_universe": [
396
- "\"against\"",
397
- "\"favor\"",
398
- "\"neutral\""
399
- ]
400
- }
401
- ]
402
- },
403
- "43": {
404
- "catalog_id": 43,
405
- "raw": 0.32727272727272727,
406
- "skill": 0.0,
407
- "coverage": 1,
408
- "pending": 0,
409
- "tracks": [
410
- {
411
- "track": "all",
412
- "raw": 0.32727272727272727,
413
- "random": 0.34943722943722944,
414
- "skill": 0.0,
415
- "planned_cases": 55,
416
- "coverage": 1,
417
- "pending": 0,
418
- "label_universe": []
419
- }
420
- ]
421
- },
422
- "44": {
423
- "catalog_id": 44,
424
- "raw": 0.4727272727272727,
425
- "skill": 0.0,
426
- "coverage": 1,
427
- "pending": 0,
428
- "tracks": [
429
- {
430
- "track": "all",
431
- "raw": 0.4727272727272727,
432
- "random": 0.5,
433
- "skill": 0.0,
434
- "planned_cases": 55,
435
- "coverage": 1,
436
- "pending": 0,
437
- "label_universe": []
438
- }
439
- ]
440
- },
441
- "50": {
442
- "catalog_id": 50,
443
- "raw": 0.32727272727272727,
444
- "skill": 0.02503293807641634,
445
- "coverage": 1,
446
- "pending": 0,
447
- "tracks": [
448
- {
449
- "track": "all",
450
- "raw": 0.32727272727272727,
451
- "random": 0.31,
452
- "skill": 0.02503293807641634,
453
- "planned_cases": 55,
454
- "coverage": 1,
455
- "pending": 0,
456
- "label_universe": []
457
- }
458
- ]
459
- },
460
- "7": {
461
- "catalog_id": 7,
462
- "raw": 0.0,
463
- "skill": 0.0,
464
- "coverage": 0.0,
465
- "pending": 1.0,
466
- "status": "unrun; provisional lower bound",
467
- "tracks": []
468
- },
469
- "16": {
470
- "catalog_id": 16,
471
- "raw": 0.0,
472
- "skill": 0.0,
473
- "coverage": 0.0,
474
- "pending": 1.0,
475
- "status": "unrun; provisional lower bound",
476
- "tracks": []
477
- },
478
- "13": {
479
- "catalog_id": 13,
480
- "raw": 0.0,
481
- "skill": 0.0,
482
- "coverage": 0.0,
483
- "pending": 1.0,
484
- "status": "unrun; provisional lower bound",
485
- "tracks": []
486
- },
487
- "15": {
488
- "catalog_id": 15,
489
- "raw": 0.0,
490
- "skill": 0.0,
491
- "coverage": 0.0,
492
- "pending": 1.0,
493
- "status": "unrun; provisional lower bound",
494
- "tracks": []
495
- },
496
- "17": {
497
- "catalog_id": 17,
498
- "raw": 0.0,
499
- "skill": 0.0,
500
- "coverage": 0.0,
501
- "pending": 1.0,
502
- "status": "unrun; provisional lower bound",
503
- "tracks": []
504
- },
505
- "19": {
506
- "catalog_id": 19,
507
- "raw": 0.0,
508
- "skill": 0.0,
509
- "coverage": 0.0,
510
- "pending": 1.0,
511
- "status": "unrun; provisional lower bound",
512
- "tracks": []
513
- }
514
- }
515
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/diagnostic-warm.json DELETED
@@ -1,515 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "a790c3d5dac6068ecef13de92c7700c4da0a9ed87b998f528701ac1fe219205d",
4
- "results_sha256": "7ae5d3f7b866c5a4475cdbedbd2482ebec1a635e5b479c9916a3a0f60053ac5f",
5
- "planned_requests": 500,
6
- "processed_requests": 500,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "model": "mlx-community/Qwen3-0.6B-bf16",
13
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
14
- "adapter": "adapters/jet-v3-warm-20260924",
15
- "max_tokens": 8192,
16
- "max_cached_tokens": 8192
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 0.9439,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v3-warm-20260924",
30
- "lora_weights_sha256": "93fd8eeade6eff0d0a8aa06119f71223dc1bee36c49f1a9298d2c37816b609d4",
31
- "calibration_sha256": "6a6dda82f9dacd1839189090ae03bcca5f3b9ca4c2c15e050609f89f2f52c226"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.864510400002473,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/diagnostic/diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 500
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 61.95938749988272,
50
- "p95": 433.2520369971462,
51
- "mean": 104.73630839803081
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 11,
56
- "dataset": "ContractNLI",
57
- "requests": 56,
58
- "answered": 56,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 56,
64
- "metric": "macro-F1",
65
- "score": 0.30832722516635036,
66
- "reference_same_cases": null,
67
- "median_ms": 411.9378854993556,
68
- "detail": {
69
- "field_accuracy": 0.4422268907563025,
70
- "case_exact_accuracy": 0,
71
- "macro_f1": 0.30832722516635036,
72
- "custom_metrics": {}
73
- }
74
- },
75
- {
76
- "catalog_id": 30,
77
- "dataset": "GSM8K",
78
- "requests": 112,
79
- "answered": 112,
80
- "unsupported": 0,
81
- "errors": 0,
82
- "abstained": 0,
83
- "pending": 0,
84
- "scored_requests": 112,
85
- "metric": "accuracy",
86
- "score": 0.39285714285714285,
87
- "reference_same_cases": null,
88
- "median_ms": 56.87792700155114,
89
- "tracks": {
90
- "GSM8K-10choice": {
91
- "metric": "accuracy",
92
- "score": 0.35714285714285715,
93
- "scored_requests": 56
94
- },
95
- "GSM8K-4choice": {
96
- "metric": "accuracy",
97
- "score": 0.42857142857142855,
98
- "scored_requests": 56
99
- }
100
- },
101
- "detail": {
102
- "field_accuracy": 0.39285714285714285,
103
- "case_exact_accuracy": 0.21428571428571427,
104
- "custom_metrics": {}
105
- }
106
- },
107
- {
108
- "catalog_id": 40,
109
- "dataset": "iSarcasmEval",
110
- "requests": 56,
111
- "answered": 56,
112
- "unsupported": 0,
113
- "errors": 0,
114
- "abstained": 0,
115
- "pending": 0,
116
- "scored_requests": 56,
117
- "metric": "see separate subtask tracks",
118
- "score": null,
119
- "reference_same_cases": null,
120
- "median_ms": 63.550472499628086,
121
- "tracks": {
122
- "iSarcasmEval-A-Ar": {
123
- "metric": "see separate subtask tracks",
124
- "score": null,
125
- "scored_requests": 12
126
- },
127
- "iSarcasmEval-A-En": {
128
- "metric": "see separate subtask tracks",
129
- "score": null,
130
- "scored_requests": 19
131
- },
132
- "iSarcasmEval-B-En": {
133
- "metric": "see separate subtask tracks",
134
- "score": null,
135
- "scored_requests": 23
136
- },
137
- "iSarcasmEval-C-Ar": {
138
- "metric": "see separate subtask tracks",
139
- "score": null,
140
- "scored_requests": 1
141
- },
142
- "iSarcasmEval-C-En": {
143
- "metric": "see separate subtask tracks",
144
- "score": null,
145
- "scored_requests": 1
146
- }
147
- },
148
- "detail": {
149
- "field_accuracy": 0.7192982456140351,
150
- "case_exact_accuracy": 0.5892857142857143,
151
- "macro_f1": 0.37563731374902903,
152
- "custom_metrics": {},
153
- "positive_f1_by_field": {
154
- "sarcastic": 0.0,
155
- "sarcasm": 0.0,
156
- "irony": 0.14285714285714285,
157
- "satire": 0.0,
158
- "understatement": 0.0,
159
- "overstatement": 0.0,
160
- "rhetorical_question": 0.0
161
- },
162
- "category_macro_f1": 0.02040816326530612
163
- }
164
- },
165
- {
166
- "catalog_id": 41,
167
- "dataset": "VAST",
168
- "requests": 56,
169
- "answered": 56,
170
- "unsupported": 0,
171
- "errors": 0,
172
- "abstained": 0,
173
- "pending": 0,
174
- "scored_requests": 56,
175
- "metric": "macro-F1",
176
- "score": 0.39442285094459006,
177
- "reference_same_cases": null,
178
- "median_ms": 29.223100502349553,
179
- "detail": {
180
- "field_accuracy": 0.44642857142857145,
181
- "case_exact_accuracy": 0.44642857142857145,
182
- "macro_f1": 0.39442285094459006,
183
- "custom_metrics": {}
184
- }
185
- },
186
- {
187
- "catalog_id": 42,
188
- "dataset": "NLI4CT",
189
- "requests": 55,
190
- "answered": 55,
191
- "unsupported": 0,
192
- "errors": 0,
193
- "abstained": 0,
194
- "pending": 0,
195
- "scored_requests": 55,
196
- "metric": "macro-F1",
197
- "score": 0.5083014048531289,
198
- "reference_same_cases": null,
199
- "median_ms": 71.3829269989219,
200
- "detail": {
201
- "field_accuracy": 0.6181818181818182,
202
- "case_exact_accuracy": 0.6181818181818182,
203
- "macro_f1": 0.5083014048531289,
204
- "custom_metrics": {}
205
- }
206
- },
207
- {
208
- "catalog_id": 43,
209
- "dataset": "CRUXEval",
210
- "requests": 55,
211
- "answered": 55,
212
- "unsupported": 0,
213
- "errors": 0,
214
- "abstained": 0,
215
- "pending": 0,
216
- "scored_requests": 55,
217
- "metric": "accuracy",
218
- "score": 0.4,
219
- "reference_same_cases": null,
220
- "median_ms": 55.5151049993583,
221
- "detail": {
222
- "field_accuracy": 0.4,
223
- "case_exact_accuracy": 0.4,
224
- "custom_metrics": {}
225
- }
226
- },
227
- {
228
- "catalog_id": 44,
229
- "dataset": "CLadder",
230
- "requests": 55,
231
- "answered": 55,
232
- "unsupported": 0,
233
- "errors": 0,
234
- "abstained": 0,
235
- "pending": 0,
236
- "scored_requests": 55,
237
- "metric": "accuracy",
238
- "score": 0.41818181818181815,
239
- "reference_same_cases": null,
240
- "median_ms": 54.88006499945186,
241
- "detail": {
242
- "field_accuracy": 0.41818181818181815,
243
- "case_exact_accuracy": 0.41818181818181815,
244
- "custom_metrics": {}
245
- }
246
- },
247
- {
248
- "catalog_id": 50,
249
- "dataset": "Habermas Machine",
250
- "requests": 55,
251
- "answered": 55,
252
- "unsupported": 0,
253
- "errors": 0,
254
- "abstained": 0,
255
- "pending": 0,
256
- "scored_requests": 55,
257
- "metric": "accuracy",
258
- "score": 0.2545454545454545,
259
- "reference_same_cases": null,
260
- "median_ms": 78.45878399893991,
261
- "detail": {
262
- "field_accuracy": 0.2545454545454545,
263
- "case_exact_accuracy": 0.2545454545454545,
264
- "custom_metrics": {
265
- "normalized_rank_regret": 0.3190909090909091
266
- }
267
- }
268
- }
269
- ],
270
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
271
- },
272
- "panel_metrics_on_sample": {
273
- "11": {
274
- "catalog_id": 11,
275
- "raw": 0.30832722516635036,
276
- "skill": 0.0,
277
- "coverage": 1,
278
- "pending": 0,
279
- "tracks": [
280
- {
281
- "track": "all",
282
- "raw": 0.30832722516635036,
283
- "random": 0.30851893087083776,
284
- "skill": 0.0,
285
- "planned_cases": 56,
286
- "coverage": 1,
287
- "pending": 0,
288
- "label_universe": [
289
- "\"The contract contradicts the hypothesis.\"",
290
- "\"The contract entails the hypothesis.\"",
291
- "\"The hypothesis is neither entailed nor contradicted by the contract.\""
292
- ]
293
- }
294
- ]
295
- },
296
- "30": {
297
- "catalog_id": 30,
298
- "raw": 0.39285714285714285,
299
- "skill": 0.26190476190476186,
300
- "coverage": 1,
301
- "pending": 0,
302
- "tracks": [
303
- {
304
- "track": "GSM8K-4choice",
305
- "raw": 0.42857142857142855,
306
- "random": 0.25,
307
- "skill": 0.23809523809523805,
308
- "planned_cases": 56,
309
- "coverage": 1,
310
- "pending": 0,
311
- "label_universe": []
312
- },
313
- {
314
- "track": "GSM8K-10choice",
315
- "raw": 0.35714285714285715,
316
- "random": 0.1,
317
- "skill": 0.2857142857142857,
318
- "planned_cases": 56,
319
- "coverage": 1,
320
- "pending": 0,
321
- "label_universe": []
322
- }
323
- ]
324
- },
325
- "40": {
326
- "catalog_id": 40,
327
- "raw": 0.25,
328
- "skill": 0.25,
329
- "coverage": 1,
330
- "pending": 0,
331
- "tracks": [
332
- {
333
- "track": "iSarcasmEval-A-En",
334
- "raw": 0.0,
335
- "random": 0.2226862339379383,
336
- "skill": 0.0,
337
- "planned_cases": 19,
338
- "coverage": 1,
339
- "pending": 0,
340
- "label_universe": [
341
- "no",
342
- "yes"
343
- ]
344
- },
345
- {
346
- "track": "iSarcasmEval-A-Ar",
347
- "raw": 0.0,
348
- "random": 0.22250656045660705,
349
- "skill": 0.0,
350
- "planned_cases": 12,
351
- "coverage": 1,
352
- "pending": 0,
353
- "label_universe": [
354
- "no",
355
- "yes"
356
- ]
357
- },
358
- {
359
- "track": "iSarcasmEval-C-En",
360
- "raw": 0.0,
361
- "random": 0.5,
362
- "skill": 0.0,
363
- "planned_cases": 1,
364
- "coverage": 1,
365
- "pending": 0,
366
- "label_universe": []
367
- },
368
- {
369
- "track": "iSarcasmEval-C-Ar",
370
- "raw": 1.0,
371
- "random": 0.5,
372
- "skill": 1.0,
373
- "planned_cases": 1,
374
- "coverage": 1,
375
- "pending": 0,
376
- "label_universe": []
377
- }
378
- ]
379
- },
380
- "41": {
381
- "catalog_id": 41,
382
- "raw": 0.39442285094459006,
383
- "skill": 0.09164623628765685,
384
- "coverage": 1,
385
- "pending": 0,
386
- "tracks": [
387
- {
388
- "track": "all",
389
- "raw": 0.39442285094459006,
390
- "random": 0.3333245556439576,
391
- "skill": 0.09164623628765685,
392
- "planned_cases": 56,
393
- "coverage": 1,
394
- "pending": 0,
395
- "label_universe": [
396
- "\"against\"",
397
- "\"favor\"",
398
- "\"neutral\""
399
- ]
400
- }
401
- ]
402
- },
403
- "43": {
404
- "catalog_id": 43,
405
- "raw": 0.4,
406
- "skill": 0.07772158637210544,
407
- "coverage": 1,
408
- "pending": 0,
409
- "tracks": [
410
- {
411
- "track": "all",
412
- "raw": 0.4,
413
- "random": 0.34943722943722944,
414
- "skill": 0.07772158637210544,
415
- "planned_cases": 55,
416
- "coverage": 1,
417
- "pending": 0,
418
- "label_universe": []
419
- }
420
- ]
421
- },
422
- "44": {
423
- "catalog_id": 44,
424
- "raw": 0.41818181818181815,
425
- "skill": 0.0,
426
- "coverage": 1,
427
- "pending": 0,
428
- "tracks": [
429
- {
430
- "track": "all",
431
- "raw": 0.41818181818181815,
432
- "random": 0.5,
433
- "skill": 0.0,
434
- "planned_cases": 55,
435
- "coverage": 1,
436
- "pending": 0,
437
- "label_universe": []
438
- }
439
- ]
440
- },
441
- "50": {
442
- "catalog_id": 50,
443
- "raw": 0.2545454545454545,
444
- "skill": 0.0,
445
- "coverage": 1,
446
- "pending": 0,
447
- "tracks": [
448
- {
449
- "track": "all",
450
- "raw": 0.2545454545454545,
451
- "random": 0.31,
452
- "skill": 0.0,
453
- "planned_cases": 55,
454
- "coverage": 1,
455
- "pending": 0,
456
- "label_universe": []
457
- }
458
- ]
459
- },
460
- "7": {
461
- "catalog_id": 7,
462
- "raw": 0.0,
463
- "skill": 0.0,
464
- "coverage": 0.0,
465
- "pending": 1.0,
466
- "status": "unrun; provisional lower bound",
467
- "tracks": []
468
- },
469
- "16": {
470
- "catalog_id": 16,
471
- "raw": 0.0,
472
- "skill": 0.0,
473
- "coverage": 0.0,
474
- "pending": 1.0,
475
- "status": "unrun; provisional lower bound",
476
- "tracks": []
477
- },
478
- "13": {
479
- "catalog_id": 13,
480
- "raw": 0.0,
481
- "skill": 0.0,
482
- "coverage": 0.0,
483
- "pending": 1.0,
484
- "status": "unrun; provisional lower bound",
485
- "tracks": []
486
- },
487
- "15": {
488
- "catalog_id": 15,
489
- "raw": 0.0,
490
- "skill": 0.0,
491
- "coverage": 0.0,
492
- "pending": 1.0,
493
- "status": "unrun; provisional lower bound",
494
- "tracks": []
495
- },
496
- "17": {
497
- "catalog_id": 17,
498
- "raw": 0.0,
499
- "skill": 0.0,
500
- "coverage": 0.0,
501
- "pending": 1.0,
502
- "status": "unrun; provisional lower bound",
503
- "tracks": []
504
- },
505
- "19": {
506
- "catalog_id": 19,
507
- "raw": 0.0,
508
- "skill": 0.0,
509
- "coverage": 0.0,
510
- "pending": 1.0,
511
- "status": "unrun; provisional lower bound",
512
- "tracks": []
513
- }
514
- }
515
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/environment-freeze.txt DELETED
@@ -1,82 +0,0 @@
1
- aiohappyeyeballs==2.7.1
2
- aiohttp==3.14.3
3
- aiosignal==1.4.0
4
- annotated-doc==0.0.5
5
- annotated-types==0.8.0
6
- anthropic==1.8.0
7
- anyio==4.15.1
8
- attrs==26.1.0
9
- certifi==2026.7.22
10
- charset-normalizer==3.5.1
11
- chess==1.11.2
12
- click==8.5.0
13
- datasets==5.0.1
14
- decision-index @ git+https://github.com/apolinario/decision-index.git@52a698928a9ae5bdf16b75687c903871db29c6e5
15
- dill==0.4.1
16
- docstring-parser==0.18.0
17
- fastapi==0.141.1
18
- filelock==4.0.1
19
- frozenlist==1.8.0
20
- fsspec==2026.6.0
21
- h11==0.16.0
22
- hf-xet==1.6.0
23
- httpcore==1.0.9
24
- httpcore2==2.13.0
25
- httpx==0.28.1
26
- httpx2==2.13.0
27
- huggingface-hub==1.32.0
28
- idna==3.20
29
- -e file:///home/jach/dev/jet
30
- jinja2==3.1.6
31
- jiter==0.17.0
32
- markdown-it-py==4.2.0
33
- markupsafe==3.0.3
34
- mdurl==0.1.2
35
- mido==1.3.3
36
- mlx==0.32.2
37
- mlx-cuda-12==0.32.2
38
- mlx-lm==0.31.3
39
- multidict==6.9.1
40
- multiprocess==0.70.19
41
- numpy==2.5.3
42
- nvidia-cublas-cu12==12.9.2.10
43
- nvidia-cuda-cccl-cu12==12.9.27
44
- nvidia-cuda-nvrtc-cu12==12.9.86
45
- nvidia-cuda-runtime-cu12==12.9.79
46
- nvidia-cudnn-cu12==9.26.0.51
47
- nvidia-cufft-cu12==11.4.1.4
48
- nvidia-nccl-cu12==2.32.3
49
- nvidia-nvjitlink-cu12==12.9.86
50
- packaging==26.3
51
- pandas==3.0.6
52
- propcache==0.5.4
53
- protobuf==7.36.2
54
- pyarrow==25.0.1
55
- pydantic==2.13.5
56
- pydantic-core==2.46.5
57
- pygments==2.21.0
58
- python-chess==1.999
59
- python-dateutil==2.9.0.post0
60
- pyyaml==6.0.3
61
- regex==2026.9.10
62
- requests==2.34.2
63
- rich==15.0.0
64
- safetensors==0.8.0
65
- scipy==1.18.1
66
- sentencepiece==0.2.2
67
- shellingham==1.5.4
68
- six==1.17.0
69
- sniffio==1.3.1
70
- starlette==1.6.0
71
- tiktoken==0.14.0
72
- tokenizers==0.23.2
73
- tqdm==4.70.1
74
- transformers==5.17.0
75
- truststore==0.10.4
76
- typer==0.27.2
77
- typing-extensions==4.16.0
78
- typing-inspection==0.4.4
79
- urllib3==2.8.0
80
- uvicorn==0.53.0
81
- xxhash==4.0.1
82
- yarl==1.25.1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/esci-baseline.json DELETED
@@ -1,154 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "2b1b766400236412840ab4bbec472464f958ba83cf8388a78fe1863a8eb245ea",
4
- "results_sha256": "1f2b23b88ea5ef287c7d7b3e02d9fa8aa303da49f28529924d4d8d63e57aeb6c",
5
- "planned_requests": 500,
6
- "processed_requests": 500,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "michaljach/jet",
15
- "revision": "8a97cfea2df622bb03f5dc9b02567e21abd2551c"
16
- },
17
- "model_source": {
18
- "model": "michaljach/jet",
19
- "revision": "8a97cfea2df622bb03f5dc9b02567e21abd2551c",
20
- "backend": "mlx",
21
- "max_tokens": 8192,
22
- "checkpoint_context": 40960,
23
- "max_cached_tokens": 8192,
24
- "choice_temperature": 1.0293,
25
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
26
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
27
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts."
28
- },
29
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
30
- "mlx": "0.32.2",
31
- "mlx_lm": "0.31.3",
32
- "device": "Device(gpu, 0)",
33
- "loaded_seconds": 2.5189373569992313,
34
- "frozen_corpus_sha256": null,
35
- "rows_path": "artifacts/decision-index/esci-diagnostic/diagnostic.jsonl.gz",
36
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
37
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
38
- },
39
- "summary": {
40
- "engine": "jet",
41
- "counts": {
42
- "ok": 500
43
- },
44
- "successful_request_latency_ms": {
45
- "median": 47.89422899921192,
46
- "p95": 59.1946660024405,
47
- "mean": 42.08971909406682
48
- },
49
- "benchmarks": [
50
- {
51
- "catalog_id": 37,
52
- "dataset": "Amazon ESCI",
53
- "requests": 500,
54
- "answered": 500,
55
- "unsupported": 0,
56
- "errors": 0,
57
- "abstained": 0,
58
- "pending": 0,
59
- "scored_requests": 500,
60
- "metric": "macro-F1",
61
- "score": 0.19511369134010642,
62
- "reference_same_cases": null,
63
- "median_ms": 47.89422899921192,
64
- "detail": {
65
- "field_accuracy": 0.598,
66
- "case_exact_accuracy": 0.598,
67
- "macro_f1": 0.19511369134010642,
68
- "custom_metrics": {}
69
- }
70
- }
71
- ],
72
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
73
- },
74
- "panel_metrics_on_sample": {
75
- "37": {
76
- "catalog_id": 37,
77
- "raw": 0.19511369134010642,
78
- "skill": 0.0,
79
- "coverage": 1,
80
- "pending": 0,
81
- "tracks": [
82
- {
83
- "track": "all",
84
- "raw": 0.19511369134010642,
85
- "random": 0.20273782411694521,
86
- "skill": 0.0,
87
- "planned_cases": 500,
88
- "coverage": 1,
89
- "pending": 0,
90
- "label_universe": [
91
- "\"Complement: a product that complements the requested product.\"",
92
- "\"Exact: the product satisfies the search query.\"",
93
- "\"Irrelevant: the product does not address the requested product need.\"",
94
- "\"Substitute: a product that could substitute for the requested product.\""
95
- ]
96
- }
97
- ]
98
- },
99
- "7": {
100
- "catalog_id": 7,
101
- "raw": 0.0,
102
- "skill": 0.0,
103
- "coverage": 0.0,
104
- "pending": 1.0,
105
- "status": "unrun; provisional lower bound",
106
- "tracks": []
107
- },
108
- "16": {
109
- "catalog_id": 16,
110
- "raw": 0.0,
111
- "skill": 0.0,
112
- "coverage": 0.0,
113
- "pending": 1.0,
114
- "status": "unrun; provisional lower bound",
115
- "tracks": []
116
- },
117
- "13": {
118
- "catalog_id": 13,
119
- "raw": 0.0,
120
- "skill": 0.0,
121
- "coverage": 0.0,
122
- "pending": 1.0,
123
- "status": "unrun; provisional lower bound",
124
- "tracks": []
125
- },
126
- "15": {
127
- "catalog_id": 15,
128
- "raw": 0.0,
129
- "skill": 0.0,
130
- "coverage": 0.0,
131
- "pending": 1.0,
132
- "status": "unrun; provisional lower bound",
133
- "tracks": []
134
- },
135
- "17": {
136
- "catalog_id": 17,
137
- "raw": 0.0,
138
- "skill": 0.0,
139
- "coverage": 0.0,
140
- "pending": 1.0,
141
- "status": "unrun; provisional lower bound",
142
- "tracks": []
143
- },
144
- "19": {
145
- "catalog_id": 19,
146
- "raw": 0.0,
147
- "skill": 0.0,
148
- "coverage": 0.0,
149
- "pending": 1.0,
150
- "status": "unrun; provisional lower bound",
151
- "tracks": []
152
- }
153
- }
154
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/esci-coverage.json DELETED
@@ -1,49 +0,0 @@
1
- {
2
- "rows_sha256": "2b1b766400236412840ab4bbec472464f958ba83cf8388a78fe1863a8eb245ea",
3
- "rows_uncompressed_sha256": "f2bf36ce7a136f68dbd5d81ca01a1685297da258263511939dfaf8b818fefa9a",
4
- "model_revision": "8a97cfea2df622bb03f5dc9b02567e21abd2551c",
5
- "scope": "Only the supplied rows; token capacity, not measured accuracy or validated long-context quality.",
6
- "limits": [
7
- 4096,
8
- 6144,
9
- 8192,
10
- 16384,
11
- 32768,
12
- 40960
13
- ],
14
- "benchmarks": {
15
- "Amazon ESCI": {
16
- "requests": 500,
17
- "fields": 500,
18
- "options": {
19
- "4": 500
20
- },
21
- "questions_per_request": {
22
- "1": 500
23
- },
24
- "supported_requests": {
25
- "4096": 500,
26
- "6144": 500,
27
- "8192": 500,
28
- "16384": 500,
29
- "32768": 500,
30
- "40960": 500
31
- },
32
- "capacity_failures": {},
33
- "prompt_tokens": {
34
- "p50": 400.0,
35
- "p95": 1007.2499999999998,
36
- "max": 2402.0
37
- },
38
- "source_groups": 500,
39
- "supported_complete_groups": {
40
- "4096": 500,
41
- "6144": 500,
42
- "8192": 500,
43
- "16384": 500,
44
- "32768": 500,
45
- "40960": 500
46
- }
47
- }
48
- }
49
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/esci-training-overlap.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "training_esci_ids": 948,
3
- "evaluation_esci_ids": 5000,
4
- "overlap": 0,
5
- "source": "Original example_id identities, train versus test",
6
- "suite_sha256": "db1d2d3d4dde242dc04262149153bfd596044ad8986e0ae5de8443383973e386"
7
- }
 
 
 
 
 
 
 
 
docs/training/jet-next/esci-v3.json DELETED
@@ -1,158 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "2b1b766400236412840ab4bbec472464f958ba83cf8388a78fe1863a8eb245ea",
4
- "results_sha256": "73fca06d9aa2dfad6a21b3c755aa2684200b67bf081c7d80e1196dc5ec483bed",
5
- "planned_requests": 500,
6
- "processed_requests": 500,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "mlx-community/Qwen3-0.6B-bf16",
15
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
16
- "adapter": "adapters/jet-v3-decision-20260923"
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 1.0,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v3-decision-20260923",
30
- "lora_weights_sha256": "d17a7f6c998e46348263d76760d9766a2f65e731caa5351e14861c4be43535c5",
31
- "calibration_sha256": "e5130c08d2de1105152ded40fdb6998f4eff21e588370263c0dc51af4386f0c5"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.879909809002129,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/esci-diagnostic/diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 500
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 62.32302250100474,
50
- "p95": 78.50551000228734,
51
- "mean": 57.14209690994903
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 37,
56
- "dataset": "Amazon ESCI",
57
- "requests": 500,
58
- "answered": 500,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 500,
64
- "metric": "macro-F1",
65
- "score": 0.413930360808208,
66
- "reference_same_cases": null,
67
- "median_ms": 62.32302250100474,
68
- "detail": {
69
- "field_accuracy": 0.55,
70
- "case_exact_accuracy": 0.55,
71
- "macro_f1": 0.413930360808208,
72
- "custom_metrics": {}
73
- }
74
- }
75
- ],
76
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
77
- },
78
- "panel_metrics_on_sample": {
79
- "37": {
80
- "catalog_id": 37,
81
- "raw": 0.413930360808208,
82
- "skill": 0.26489722337240446,
83
- "coverage": 1,
84
- "pending": 0,
85
- "tracks": [
86
- {
87
- "track": "all",
88
- "raw": 0.413930360808208,
89
- "random": 0.20273782411694521,
90
- "skill": 0.26489722337240446,
91
- "planned_cases": 500,
92
- "coverage": 1,
93
- "pending": 0,
94
- "label_universe": [
95
- "\"Complement: a product that complements the requested product.\"",
96
- "\"Exact: the product satisfies the search query.\"",
97
- "\"Irrelevant: the product does not address the requested product need.\"",
98
- "\"Substitute: a product that could substitute for the requested product.\""
99
- ]
100
- }
101
- ]
102
- },
103
- "7": {
104
- "catalog_id": 7,
105
- "raw": 0.0,
106
- "skill": 0.0,
107
- "coverage": 0.0,
108
- "pending": 1.0,
109
- "status": "unrun; provisional lower bound",
110
- "tracks": []
111
- },
112
- "16": {
113
- "catalog_id": 16,
114
- "raw": 0.0,
115
- "skill": 0.0,
116
- "coverage": 0.0,
117
- "pending": 1.0,
118
- "status": "unrun; provisional lower bound",
119
- "tracks": []
120
- },
121
- "13": {
122
- "catalog_id": 13,
123
- "raw": 0.0,
124
- "skill": 0.0,
125
- "coverage": 0.0,
126
- "pending": 1.0,
127
- "status": "unrun; provisional lower bound",
128
- "tracks": []
129
- },
130
- "15": {
131
- "catalog_id": 15,
132
- "raw": 0.0,
133
- "skill": 0.0,
134
- "coverage": 0.0,
135
- "pending": 1.0,
136
- "status": "unrun; provisional lower bound",
137
- "tracks": []
138
- },
139
- "17": {
140
- "catalog_id": 17,
141
- "raw": 0.0,
142
- "skill": 0.0,
143
- "coverage": 0.0,
144
- "pending": 1.0,
145
- "status": "unrun; provisional lower bound",
146
- "tracks": []
147
- },
148
- "19": {
149
- "catalog_id": 19,
150
- "raw": 0.0,
151
- "skill": 0.0,
152
- "coverage": 0.0,
153
- "pending": 1.0,
154
- "status": "unrun; provisional lower bound",
155
- "tracks": []
156
- }
157
- }
158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/esci-v4.json DELETED
@@ -1,158 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "2b1b766400236412840ab4bbec472464f958ba83cf8388a78fe1863a8eb245ea",
4
- "results_sha256": "d6118b06389f9283e3bb081ffd69474bb7633415c7143926971e4fa5121cbb0a",
5
- "planned_requests": 500,
6
- "processed_requests": 500,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "mlx-community/Qwen3-0.6B-bf16",
15
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
16
- "adapter": "adapters/jet-v4-transfer-20260924"
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 1.1554,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v4-transfer-20260924",
30
- "lora_weights_sha256": "4937c96fb56d7bd510f17b6aa51d5357b8bf8cc6de0e80eb976ebf47a1ea72ad",
31
- "calibration_sha256": "0aaf5066fcf227488a6df68f9629b3f446631f2bb25ca7594a4721e5899a7384"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.8783724759996403,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/esci-diagnostic/diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 500
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 63.90887149973423,
50
- "p95": 79.99267199920723,
51
- "mean": 58.1968331539465
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 37,
56
- "dataset": "Amazon ESCI",
57
- "requests": 500,
58
- "answered": 500,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 500,
64
- "metric": "macro-F1",
65
- "score": 0.4134568939832098,
66
- "reference_same_cases": null,
67
- "median_ms": 63.90887149973423,
68
- "detail": {
69
- "field_accuracy": 0.532,
70
- "case_exact_accuracy": 0.532,
71
- "macro_f1": 0.4134568939832098,
72
- "custom_metrics": {}
73
- }
74
- }
75
- ],
76
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
77
- },
78
- "panel_metrics_on_sample": {
79
- "37": {
80
- "catalog_id": 37,
81
- "raw": 0.4134568939832098,
82
- "skill": 0.26430335746565453,
83
- "coverage": 1,
84
- "pending": 0,
85
- "tracks": [
86
- {
87
- "track": "all",
88
- "raw": 0.4134568939832098,
89
- "random": 0.20273782411694521,
90
- "skill": 0.26430335746565453,
91
- "planned_cases": 500,
92
- "coverage": 1,
93
- "pending": 0,
94
- "label_universe": [
95
- "\"Complement: a product that complements the requested product.\"",
96
- "\"Exact: the product satisfies the search query.\"",
97
- "\"Irrelevant: the product does not address the requested product need.\"",
98
- "\"Substitute: a product that could substitute for the requested product.\""
99
- ]
100
- }
101
- ]
102
- },
103
- "7": {
104
- "catalog_id": 7,
105
- "raw": 0.0,
106
- "skill": 0.0,
107
- "coverage": 0.0,
108
- "pending": 1.0,
109
- "status": "unrun; provisional lower bound",
110
- "tracks": []
111
- },
112
- "16": {
113
- "catalog_id": 16,
114
- "raw": 0.0,
115
- "skill": 0.0,
116
- "coverage": 0.0,
117
- "pending": 1.0,
118
- "status": "unrun; provisional lower bound",
119
- "tracks": []
120
- },
121
- "13": {
122
- "catalog_id": 13,
123
- "raw": 0.0,
124
- "skill": 0.0,
125
- "coverage": 0.0,
126
- "pending": 1.0,
127
- "status": "unrun; provisional lower bound",
128
- "tracks": []
129
- },
130
- "15": {
131
- "catalog_id": 15,
132
- "raw": 0.0,
133
- "skill": 0.0,
134
- "coverage": 0.0,
135
- "pending": 1.0,
136
- "status": "unrun; provisional lower bound",
137
- "tracks": []
138
- },
139
- "17": {
140
- "catalog_id": 17,
141
- "raw": 0.0,
142
- "skill": 0.0,
143
- "coverage": 0.0,
144
- "pending": 1.0,
145
- "status": "unrun; provisional lower bound",
146
- "tracks": []
147
- },
148
- "19": {
149
- "catalog_id": 19,
150
- "raw": 0.0,
151
- "skill": 0.0,
152
- "coverage": 0.0,
153
- "pending": 1.0,
154
- "status": "unrun; provisional lower bound",
155
- "tracks": []
156
- }
157
- }
158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/esci-warm.json DELETED
@@ -1,158 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "2b1b766400236412840ab4bbec472464f958ba83cf8388a78fe1863a8eb245ea",
4
- "results_sha256": "360a9c1c12feb61d36783462013d09cc093b0d5d83c633ba416c2180db28997c",
5
- "planned_requests": 500,
6
- "processed_requests": 500,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "mlx-community/Qwen3-0.6B-bf16",
15
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
16
- "adapter": "adapters/jet-v3-warm-20260924"
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 0.9439,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v3-warm-20260924",
30
- "lora_weights_sha256": "93fd8eeade6eff0d0a8aa06119f71223dc1bee36c49f1a9298d2c37816b609d4",
31
- "calibration_sha256": "6a6dda82f9dacd1839189090ae03bcca5f3b9ca4c2c15e050609f89f2f52c226"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.8837185640004463,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/esci-diagnostic/diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 500
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 62.575644500611816,
50
- "p95": 80.28408699829015,
51
- "mean": 57.501974687904294
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 37,
56
- "dataset": "Amazon ESCI",
57
- "requests": 500,
58
- "answered": 500,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 500,
64
- "metric": "macro-F1",
65
- "score": 0.4147424168042725,
66
- "reference_same_cases": null,
67
- "median_ms": 62.575644500611816,
68
- "detail": {
69
- "field_accuracy": 0.56,
70
- "case_exact_accuracy": 0.56,
71
- "macro_f1": 0.4147424168042725,
72
- "custom_metrics": {}
73
- }
74
- }
75
- ],
76
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
77
- },
78
- "panel_metrics_on_sample": {
79
- "37": {
80
- "catalog_id": 37,
81
- "raw": 0.4147424168042725,
82
- "skill": 0.2659157791507029,
83
- "coverage": 1,
84
- "pending": 0,
85
- "tracks": [
86
- {
87
- "track": "all",
88
- "raw": 0.4147424168042725,
89
- "random": 0.20273782411694521,
90
- "skill": 0.2659157791507029,
91
- "planned_cases": 500,
92
- "coverage": 1,
93
- "pending": 0,
94
- "label_universe": [
95
- "\"Complement: a product that complements the requested product.\"",
96
- "\"Exact: the product satisfies the search query.\"",
97
- "\"Irrelevant: the product does not address the requested product need.\"",
98
- "\"Substitute: a product that could substitute for the requested product.\""
99
- ]
100
- }
101
- ]
102
- },
103
- "7": {
104
- "catalog_id": 7,
105
- "raw": 0.0,
106
- "skill": 0.0,
107
- "coverage": 0.0,
108
- "pending": 1.0,
109
- "status": "unrun; provisional lower bound",
110
- "tracks": []
111
- },
112
- "16": {
113
- "catalog_id": 16,
114
- "raw": 0.0,
115
- "skill": 0.0,
116
- "coverage": 0.0,
117
- "pending": 1.0,
118
- "status": "unrun; provisional lower bound",
119
- "tracks": []
120
- },
121
- "13": {
122
- "catalog_id": 13,
123
- "raw": 0.0,
124
- "skill": 0.0,
125
- "coverage": 0.0,
126
- "pending": 1.0,
127
- "status": "unrun; provisional lower bound",
128
- "tracks": []
129
- },
130
- "15": {
131
- "catalog_id": 15,
132
- "raw": 0.0,
133
- "skill": 0.0,
134
- "coverage": 0.0,
135
- "pending": 1.0,
136
- "status": "unrun; provisional lower bound",
137
- "tracks": []
138
- },
139
- "17": {
140
- "catalog_id": 17,
141
- "raw": 0.0,
142
- "skill": 0.0,
143
- "coverage": 0.0,
144
- "pending": 1.0,
145
- "status": "unrun; provisional lower bound",
146
- "tracks": []
147
- },
148
- "19": {
149
- "catalog_id": 19,
150
- "raw": 0.0,
151
- "skill": 0.0,
152
- "coverage": 0.0,
153
- "pending": 1.0,
154
- "status": "unrun; provisional lower bound",
155
- "tracks": []
156
- }
157
- }
158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/isarcasm-en-baseline.json DELETED
@@ -1,156 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "43bf45a8b0407fe8ee64809c94c17d721892ae1e146bdc7831c33fc596e5665d",
4
- "results_sha256": "fce07a83cfbc84cab673c9a0218e6d2bd3e32bbb08bfdce2ca586e68a322e9b5",
5
- "planned_requests": 1400,
6
- "processed_requests": 1400,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "michaljach/jet",
15
- "revision": "8a97cfea2df622bb03f5dc9b02567e21abd2551c"
16
- },
17
- "model_source": {
18
- "model": "michaljach/jet",
19
- "revision": "8a97cfea2df622bb03f5dc9b02567e21abd2551c",
20
- "backend": "mlx",
21
- "max_tokens": 8192,
22
- "checkpoint_context": 40960,
23
- "max_cached_tokens": 8192,
24
- "choice_temperature": 1.0293,
25
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
26
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
27
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts."
28
- },
29
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
30
- "mlx": "0.32.2",
31
- "mlx_lm": "0.31.3",
32
- "device": "Device(gpu, 0)",
33
- "loaded_seconds": 2.120845952998934,
34
- "frozen_corpus_sha256": null,
35
- "rows_path": "artifacts/decision-index/isarcasm-english-diagnostic.jsonl.gz",
36
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
37
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
38
- },
39
- "summary": {
40
- "engine": "jet",
41
- "counts": {
42
- "ok": 1400
43
- },
44
- "successful_request_latency_ms": {
45
- "median": 11.024953000742244,
46
- "p95": 40.01360600159387,
47
- "mean": 12.74496764784739
48
- },
49
- "benchmarks": [
50
- {
51
- "catalog_id": 40,
52
- "dataset": "iSarcasmEval",
53
- "requests": 1400,
54
- "answered": 1400,
55
- "unsupported": 0,
56
- "errors": 0,
57
- "abstained": 0,
58
- "pending": 0,
59
- "scored_requests": 1400,
60
- "metric": "see separate subtask tracks",
61
- "score": null,
62
- "reference_same_cases": null,
63
- "median_ms": 11.024953000742244,
64
- "detail": {
65
- "field_accuracy": 0.6535714285714286,
66
- "case_exact_accuracy": 0.6535714285714286,
67
- "macro_f1": 0.4811847326191155,
68
- "custom_metrics": {},
69
- "positive_f1_by_field": {
70
- "sarcastic": 0.1821247892074199
71
- },
72
- "category_macro_f1": 0.1821247892074199
73
- }
74
- }
75
- ],
76
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
77
- },
78
- "panel_metrics_on_sample": {
79
- "40": {
80
- "catalog_id": 40,
81
- "raw": 0.1821247892074199,
82
- "skill": 0.0,
83
- "coverage": 1,
84
- "pending": 0,
85
- "tracks": [
86
- {
87
- "track": "iSarcasmEval-A-En",
88
- "raw": 0.1821247892074199,
89
- "random": 0.2226862339379383,
90
- "skill": 0.0,
91
- "planned_cases": 1400,
92
- "coverage": 1,
93
- "pending": 0,
94
- "label_universe": [
95
- "no",
96
- "yes"
97
- ]
98
- }
99
- ]
100
- },
101
- "7": {
102
- "catalog_id": 7,
103
- "raw": 0.0,
104
- "skill": 0.0,
105
- "coverage": 0.0,
106
- "pending": 1.0,
107
- "status": "unrun; provisional lower bound",
108
- "tracks": []
109
- },
110
- "16": {
111
- "catalog_id": 16,
112
- "raw": 0.0,
113
- "skill": 0.0,
114
- "coverage": 0.0,
115
- "pending": 1.0,
116
- "status": "unrun; provisional lower bound",
117
- "tracks": []
118
- },
119
- "13": {
120
- "catalog_id": 13,
121
- "raw": 0.0,
122
- "skill": 0.0,
123
- "coverage": 0.0,
124
- "pending": 1.0,
125
- "status": "unrun; provisional lower bound",
126
- "tracks": []
127
- },
128
- "15": {
129
- "catalog_id": 15,
130
- "raw": 0.0,
131
- "skill": 0.0,
132
- "coverage": 0.0,
133
- "pending": 1.0,
134
- "status": "unrun; provisional lower bound",
135
- "tracks": []
136
- },
137
- "17": {
138
- "catalog_id": 17,
139
- "raw": 0.0,
140
- "skill": 0.0,
141
- "coverage": 0.0,
142
- "pending": 1.0,
143
- "status": "unrun; provisional lower bound",
144
- "tracks": []
145
- },
146
- "19": {
147
- "catalog_id": 19,
148
- "raw": 0.0,
149
- "skill": 0.0,
150
- "coverage": 0.0,
151
- "pending": 1.0,
152
- "status": "unrun; provisional lower bound",
153
- "tracks": []
154
- }
155
- }
156
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
docs/training/jet-next/isarcasm-en-v3.json DELETED
@@ -1,160 +0,0 @@
1
- {
2
- "scope": "Diagnostic subset only. Not an official Decision Index or full-suite estimate.",
3
- "rows_sha256": "43bf45a8b0407fe8ee64809c94c17d721892ae1e146bdc7831c33fc596e5665d",
4
- "results_sha256": "f9aae1d9e7c2e7fbeb3751e8fb4b798572f22ac82b345a4377f21bdd29655571",
5
- "planned_requests": 1400,
6
- "processed_requests": 1400,
7
- "pending_requests": 0,
8
- "complete_for_supplied_rows": true,
9
- "environment": {
10
- "engine": "decision_index_engine:JetEngine",
11
- "engine_options": {
12
- "max_tokens": 8192,
13
- "max_cached_tokens": 8192,
14
- "model": "mlx-community/Qwen3-0.6B-bf16",
15
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
16
- "adapter": "adapters/jet-v3-decision-20260923"
17
- },
18
- "model_source": {
19
- "model": "mlx-community/Qwen3-0.6B-bf16",
20
- "revision": "42096995f6402fde107068cf530136fe64b604f8",
21
- "backend": "mlx",
22
- "max_tokens": 8192,
23
- "checkpoint_context": 40960,
24
- "max_cached_tokens": 8192,
25
- "choice_temperature": 1.0,
26
- "adapter_sha256": "f4b03bb95fc34afd0debf8ec5210a68965fb69bd510284ba8f26f8f2f75179ba",
27
- "format_sha256": "f9b86dd757dbebc1fa48effbf48b7ba6861dcd6def5a025cfa937866eed02828",
28
- "policy": "Native Jet prompt and label-token readout; complete input or unsupported; no truncation, option pruning, or benchmark-specific prompts.",
29
- "lora_adapter": "/home/jach/dev/jet/adapters/jet-v3-decision-20260923",
30
- "lora_weights_sha256": "d17a7f6c998e46348263d76760d9766a2f65e731caa5351e14861c4be43535c5",
31
- "calibration_sha256": "e5130c08d2de1105152ded40fdb6998f4eff21e588370263c0dc51af4386f0c5"
32
- },
33
- "platform": "Linux-7.2.6-arch2-1-x86_64-with-glibc2.44",
34
- "mlx": "0.32.2",
35
- "mlx_lm": "0.31.3",
36
- "device": "Device(gpu, 0)",
37
- "loaded_seconds": 1.878869845000736,
38
- "frozen_corpus_sha256": null,
39
- "rows_path": "artifacts/decision-index/isarcasm-english-diagnostic.jsonl.gz",
40
- "runner_sha256": "fac268fc460a2a3470f52ee9e785fd81b37864cace132ac9e6284ede806258b8",
41
- "latency": "Synchronized local MLX request wall time, including full prompt construction and shared-prefix inference; excludes model loading."
42
- },
43
- "summary": {
44
- "engine": "jet",
45
- "counts": {
46
- "ok": 1400
47
- },
48
- "successful_request_latency_ms": {
49
- "median": 25.58769000097527,
50
- "p95": 54.116885003168136,
51
- "mean": 26.95643487361719
52
- },
53
- "benchmarks": [
54
- {
55
- "catalog_id": 40,
56
- "dataset": "iSarcasmEval",
57
- "requests": 1400,
58
- "answered": 1400,
59
- "unsupported": 0,
60
- "errors": 0,
61
- "abstained": 0,
62
- "pending": 0,
63
- "scored_requests": 1400,
64
- "metric": "see separate subtask tracks",
65
- "score": null,
66
- "reference_same_cases": null,
67
- "median_ms": 25.58769000097527,
68
- "detail": {
69
- "field_accuracy": 0.7371428571428571,
70
- "case_exact_accuracy": 0.7371428571428571,
71
- "macro_f1": 0.5162822838386456,
72
- "custom_metrics": {},
73
- "positive_f1_by_field": {
74
- "sarcastic": 0.1894273127753304
75
- },
76
- "category_macro_f1": 0.1894273127753304
77
- }
78
- }
79
- ],
80
- "note": "Native benchmark metrics on complete supported case groups. Unsupported cases excluded from accuracy but retained in coverage."
81
- },
82
- "panel_metrics_on_sample": {
83
- "40": {
84
- "catalog_id": 40,
85
- "raw": 0.1894273127753304,
86
- "skill": 0.0,
87
- "coverage": 1,
88
- "pending": 0,
89
- "tracks": [
90
- {
91
- "track": "iSarcasmEval-A-En",
92
- "raw": 0.1894273127753304,
93
- "random": 0.2226862339379383,
94
- "skill": 0.0,
95
- "planned_cases": 1400,
96
- "coverage": 1,
97
- "pending": 0,
98
- "label_universe": [
99
- "no",
100
- "yes"
101
- ]
102
- }
103
- ]
104
- },
105
- "7": {
106
- "catalog_id": 7,
107
- "raw": 0.0,
108
- "skill": 0.0,
109
- "coverage": 0.0,
110
- "pending": 1.0,
111
- "status": "unrun; provisional lower bound",
112
- "tracks": []
113
- },
114
- "16": {
115
- "catalog_id": 16,
116
- "raw": 0.0,
117
- "skill": 0.0,
118
- "coverage": 0.0,
119
- "pending": 1.0,
120
- "status": "unrun; provisional lower bound",
121
- "tracks": []
122
- },
123
- "13": {
124
- "catalog_id": 13,
125
- "raw": 0.0,
126
- "skill": 0.0,
127
- "coverage": 0.0,
128
- "pending": 1.0,
129
- "status": "unrun; provisional lower bound",
130
- "tracks": []
131
- },
132
- "15": {
133
- "catalog_id": 15,
134
- "raw": 0.0,
135
- "skill": 0.0,
136
- "coverage": 0.0,
137
- "pending": 1.0,
138
- "status": "unrun; provisional lower bound",
139
- "tracks": []
140
- },
141
- "17": {
142
- "catalog_id": 17,
143
- "raw": 0.0,
144
- "skill": 0.0,
145
- "coverage": 0.0,
146
- "pending": 1.0,
147
- "status": "unrun; provisional lower bound",
148
- "tracks": []
149
- },
150
- "19": {
151
- "catalog_id": 19,
152
- "raw": 0.0,
153
- "skill": 0.0,
154
- "coverage": 0.0,
155
- "pending": 1.0,
156
- "status": "unrun; provisional lower bound",
157
- "tracks": []
158
- }
159
- }
160
- }