Cukinator commited on
Commit
9a3b939
·
verified ·
1 Parent(s): 6595128

Rebuild model card from reproducible CPU audit; include evidence and limitations

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 +300 -83
  2. evaluation/CORPUS_LICENSE.txt +7 -0
  3. evaluation/corpus.json +41 -0
  4. evaluation/dataset_inventory.json +0 -0
  5. evaluation/environment.json +20 -0
  6. evaluation/implementation_diagnostics.json +17 -0
  7. evaluation/inventory.json +0 -0
  8. evaluation/loading_examples.json +70 -0
  9. evaluation/run_01.json +179 -0
  10. evaluation/run_01_v3.json +136 -0
  11. evaluation/run_02.json +213 -0
  12. evaluation/run_02_v3.json +137 -0
  13. evaluation/run_02a_byte_only_heads.json +213 -0
  14. evaluation/run_02a_byte_only_heads_v3.json +137 -0
  15. evaluation/run_03.json +211 -0
  16. evaluation/run_03_v3.json +205 -0
  17. evaluation/run_04.json +210 -0
  18. evaluation/run_04_r2.json +199 -0
  19. evaluation/run_04_v3.json +204 -0
  20. evaluation/run_05.json +210 -0
  21. evaluation/run_05_v3.json +204 -0
  22. evaluation/run_05b_kernel_strict.json +214 -0
  23. evaluation/run_05b_kernel_strict_v3.json +208 -0
  24. evaluation/run_06.json +210 -0
  25. evaluation/run_06_v3.json +204 -0
  26. evaluation/run_07.json +215 -0
  27. evaluation/run_07_r2.json +201 -0
  28. evaluation/run_08.json +213 -0
  29. evaluation/run_08_v3.json +134 -0
  30. evaluation/run_09.json +214 -0
  31. evaluation/run_10.json +216 -0
  32. evaluation/run_13.json +178 -0
  33. evaluation/run_13_r2.json +173 -0
  34. evaluation/run_13_v3.json +172 -0
  35. evaluation/run_14.json +214 -0
  36. evaluation/run_14_r2.json +208 -0
  37. evaluation/run_14_v3.json +208 -0
  38. evaluation/run_15.json +213 -0
  39. evaluation/run_15_r2.json +207 -0
  40. evaluation/run_15_v3.json +207 -0
  41. evaluation/run_16.json +213 -0
  42. evaluation/run_16_r2.json +207 -0
  43. evaluation/source/audit_model_cards.py +309 -0
  44. evaluation/source/audit_primitives.py +35 -0
  45. evaluation/source/audit_readmes.py +274 -0
  46. evaluation/source/eval_ablations.py +768 -0
  47. evaluation/source/eval_correctness.py +239 -0
  48. evaluation/source/eval_quality.py +173 -0
  49. evaluation/source/helpers.py +81 -0
  50. evaluation/source/test_readme_audit.py +62 -0
README.md CHANGED
@@ -1,88 +1,305 @@
1
  ---
2
- language:
3
- - en
4
  license: apache-2.0
 
 
5
  tags:
6
- - pytorch
7
- - text-generation
8
- - 1.58bit
9
- - ternary
10
- - byte-level
11
- - mlgru
12
- - ablation
13
- library_name: pytorch
14
- pipeline_tag: text-generation
15
- model_type: custom
16
  ---
17
 
18
- # CPU-1 Ablation Study — Ready-to-use Checkpoints (fp32 unpacked)
19
-
20
- Repo: `Cukinator/cpu1-ablations-final`
21
- Source: [`Cukinator/cpu1-ablation-checkpoints`](https://huggingface.co/Cukinator/cpu1-ablation-checkpoints)
22
- Code: [github.com/Cukinator/1.58bits](https://github.com/Cukinator/1.58bits)
23
-
24
- > **Tablas recalculadas 2026-06-13** — criterio homogéneo:
25
- > `perplexity = exp(val_loss)` para todos los runs sin excepción.
26
- > `BPB = val_loss / ln(2)` — solo byte-level.
27
- > Referencia uniforme byte: **ln(256) = 5.545 nats → PPL=256 → BPB=8.000**
28
- > BPE runs (run\_01, run\_13, \*\_r2): PPL es **token-level**.
29
-
30
- ## Ablation chain — 50M runs (round 1, 2 tok/param)
31
-
32
- | Run | Arquitectura | Params M | RAM fp32 MB | Val Loss | PPL | BPB | Δ uniform | P/s | Bytes/s | Nivel |
33
- |-----|-------------|--------:|------------:|---------:|----:|----:|----------:|----:|--------:|-------|
34
- | run_01 | Transformer + BPE 16K + FP16 | 54.7 | 218.9 | 4.6648 | 106.14 | — | — | 78.0 | 78 | token |
35
- | run_02a_byte_only_heads | Transformer + Byte + 4 heads (no LBD) | 38.5 | 154.0 | 2.3079 | 10.05 | 3.3295 | -3.2373 | 85.9 | 344 | byte |
36
- | run_02 | Transformer + Byte + LocalByteDecoder | 38.8 | 155.3 | 1.7154 | 5.56 | 2.4748 | -3.8298 | 86.1 | 344 | byte |
37
- | run_03 | MLGRU + Byte + FP16 | 38.8 | 155.3 | 1.8697 | 6.49 | 2.6974 | -3.6755 | 59.9 | 240 | byte |
38
- | run_04 | MLGRU + Byte + Ternary | 38.9 | 155.4 | 5.5671 | 261.68 | 8.0317 | 0.0220 | 8.0 | 32 | byte |
39
- | run_05 | + FPResidual | 39.0 | 156.0 | 5.5516 | 257.65 | 8.0093 | 0.0064 | 7.6 | 30 | byte |
40
- | run_05b_kernel_strict | MLGRU kernel-strict (no W_o) | 35.8 | 143.4 | 5.5940 | 268.82 | 8.0705 | 0.0489 | 8.7 | 35 | byte |
41
- | run_06 | + Bolmo patch embedding | 39.0 | 156.0 | 5.5561 | 258.81 | 8.0157 | 0.0109 | 7.8 | 31 | byte |
42
- | run_07 | + DeleteGate (CPU-1 completo) ⭐ | 39.0 | 156.1 | 5.5561 | 258.81 | 8.0157 | 0.0109 | 7.8 | 31 | byte |
43
- | run_08 | Folded Transformer + Byte + Ternary | 38.9 | 155.4 | 5.5621 | 260.37 | 8.0244 | 0.0169 | 8.0 | 32 | byte |
44
- | run_09 | + PFNet | 39.4 | 157.7 | 5.5330 | 252.91 | 7.9825 | -0.0122 | 7.3 | 29 | byte |
45
- | run_10 | + decay per-canal aprendido | 39.4 | 157.7 | 5.5337 | 253.08 | 7.9835 | -0.0115 | 7.1 | 28 | byte |
46
-
47
- ## Small runs — 10M (round 1, 2 tok/param)
48
-
49
- | Run | Arquitectura | Params M | RAM fp32 MB | Val Loss | PPL | BPB | Nivel |
50
- |-----|-------------|--------:|------------:|---------:|----:|----:|-------|
51
- | run_13 | Small CPU-1 + BPE 4K | 12.5 | 50.2 | 30.5375 | 18293109063475.55 | — | token |
52
- | run_14 | Small CPU-1 byte (Qwen distill.) | 10.7 | 42.8 | 5.5755 | 263.88 | 8.0437 | byte |
53
- | run_15 | Small CPU-1 byte + hidden distill. | 10.7 | 42.9 | 5.5755 | 263.88 | 8.0437 | byte |
54
- | run_16 | Small CPU-1 raw bytes, no teacher | 10.7 | 42.8 | 5.5754 | 263.85 | 8.0436 | byte |
55
-
56
- ## Round 2 — re-runs a 15 tok/param (y r3 budget extendido)
57
-
58
- | Run | Arquitectura | Params M | Loss r1 | PPL r1 | Loss r2 | PPL r2 | Δ loss | BPB r2 | Nivel |
59
- |-----|-------------|--------:|--------:|-------:|--------:|-------:|-------:|-------:|-------|
60
- | run_04_r2 | run_04 @ 15 tok/param | 38.9 | 5.5671 | 261.68 | 5.5894 | 267.57 | +0.02226 | 8.0638 | byte |
61
- | run_07_r2 | run_07 @ 15 tok/param | 39.0 | 5.5561 | 258.81 | 5.5434 | 255.54 | -0.01271 | 7.9974 | byte |
62
- | run_13_r2 | run_13 @ 15 tok/param | 12.5 | 30.5375 | 18293109063475.55 | 25.4264 | 110288596599.28 | -5.11118 | — | token |
63
- | run_14_r2 | run_14 @ 15 tok/param | 10.7 | 5.5755 | 263.88 | 5.5755 | 263.88 | -0.00000 | 8.0437 | byte |
64
- | run_15_r2 | run_15 @ 15 tok/param | 10.7 | 5.5755 | 263.88 | 5.5755 | 263.88 | -0.00000 | 8.0437 | byte |
65
- | run_16_r2 | run_16 @ 15 tok/param | 10.7 | 5.5754 | 263.85 | 5.5754 | 263.85 | +0.00000 | 8.0436 | byte |
66
-
67
- ## Round 3 — v3 runs (bf16 AMP + lr×2 + 50 tok/p)
68
-
69
- | Run | Arquitectura | Params M | Val Loss | PPL | BPB | Step | P/s | Bytes/s | Nivel |
70
- |-----|-------------|--------:|--------:|----:|----:|-----:|----:|--------:|-------|
71
- | run_01_v3 | run_01 v3 | 54.7 | nan | nan | — | 12173 | 196.0 | 196 | token |
72
- | run_02_v3 | run_02 v3 | 38.8 | nan | nan | nan | 10963 | 91.4 | 366 | byte |
73
- | run_02a_byte_only_heads_v3 | run_02a v3 | 38.5 | nan | nan | nan | 16327 | 96.0 | 384 | byte |
74
- | run_03_v3 | run_03 v3 | 38.8 | 3.7841 | 43.99 | 5.4592 | 6187 | 65.5 | 262 | byte |
75
- | run_04_v3 | run_04 v3 | 38.9 | 2.5988 | 13.45 | 3.7493 | 6074 | 9.5 | 38 | byte |
76
- | run_05_v3 | run_05 v3 | 39.0 | 2.7034 | 14.93 | 3.9002 | 4390 | 7.0 | 28 | byte |
77
- | run_05b_kernel_strict_v3 | run_05b v3 | 35.8 | 3.2144 | 24.89 | 4.6374 | 2573 | 8.3 | 33 | byte |
78
- | run_06_v3 | run_06 v3 | 39.0 | 2.1493 | 8.58 | 3.1008 | 4237 | 7.0 | 28 | byte |
79
- | run_08_v3 | run_08 v3 | 38.9 | nan | nan | nan | 3858 | 7.5 | 30 | byte |
80
- | run_13_v3 | run_13 v3 | 12.5 | 5.4113 | 223.92 | — | 9290 | 19.6 | 20 | token |
81
- | run_14_v3 | run_14 v3 | 10.7 | 2.2977 | 9.95 | 3.3149 | 9775 | 19.2 | 77 | byte |
82
- | run_15_v3 | run_15 v3 | 10.7 | 2.8020 | 16.48 | 4.0424 | 2350 | 18.2 | 73 | byte |
83
-
84
- **Hallazgo clave de V3:** El cuello de botella de los modelos ternarios en *cold-start* fue resuelto en la **v3** (usando bf16 AMP y `lr_scale=2.0` en BitLinear). Esto permitió romper el plateau de entropía uniforme (~5.55 nats) en el que caían las versiones anteriores, logrando convergencia estable y permitiendo que generen texto imprimible (`PASS` en los tests de generación).
85
-
86
- ## Licencia
87
-
88
- Apache-2.0. Same as the source code at [github.com/Cukinator/1.58bits](https://github.com/Cukinator/1.58bits).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
 
2
  license: apache-2.0
3
+ language:
4
+ - en
5
  tags:
6
+ - cpu-1
7
+ - ablation
8
+ - ternary
9
+ - research
 
 
 
 
 
 
10
  ---
11
 
12
+ # CPU-1 ablations: FP32 checkpoint exports
13
+
14
+ 34 custom PyTorch model exports, 4.178 GB of checkpoint files (decimal units). This is a research ablation collection, not an instruction-tuned assistant. It includes Transformer and MLGRU variants with byte patches or truncated BPE vocabularies, and floating-point or simulated ternary projections.
15
+
16
+ Source: [Cukinator/1.58bits](https://github.com/Cukinator/1.58bits). Training archive: [Cukinator/cpu1-ablation-checkpoints](https://huggingface.co/Cukinator/cpu1-ablation-checkpoints). Training dataset companion: [Cukinator/cpu1-ablation-dataset](https://huggingface.co/datasets/Cukinator/cpu1-ablation-dataset).
17
+
18
+ ## Payload format
19
+
20
+ `<run>/model.pt` contains `format="fp32"`, `state_dict`, `config`, `step`, `run_name`, `metrics`, and source metadata. The exported parameters occupy four bytes each. “1.58-bit” describes the ternary value alphabet; these files are not stored as 1.58-bit tensors and this PyTorch path does not use packed-weight inference.
21
+
22
+ Historical `metrics` may be empty or come from different training validation protocols. They are preserved as metadata, not relabeled as freshly measured test results.
23
+
24
+ ## Load one checkpoint
25
+
26
+ Clone the [source repository](https://github.com/Cukinator/1.58bits) and run this from its root. These are custom PyTorch checkpoints; `AutoModelForCausalLM.from_pretrained()` does not load them. The examples use a trusted checkpoint source and strict state loading.
27
+
28
+ ```python
29
+ import os
30
+ os.environ["HF_HOME"] = "D:/cpu1/hf"
31
+ os.environ["HF_HUB_DISABLE_XET"] = "1"
32
+ import torch
33
+ from huggingface_hub import hf_hub_download
34
+ torch.set_num_threads(1)
35
+ path = hf_hub_download("Cukinator/cpu1-ablations-final", "run_04/model.pt",
36
+ revision="65951289352c1a036b12ba6d888af037e7c90b13", local_dir="D:/cpu1/active", cache_dir="D:/cpu1/hf/hub")
37
+ from train_ablation import build_ablation_model
38
+ payload = torch.load(path, map_location="cpu", weights_only=False)
39
+ config, state = payload["config"], payload["state_dict"]
40
+ config["use_gradient_checkpointing"] = False
41
+ model = build_ablation_model(config)
42
+ model.load_state_dict(state, strict=True)
43
+ model.eval()
44
+ x = torch.tensor(list(b"The history of AI. ")).reshape(1, -1, 4)
45
+ with torch.inference_mode():
46
+ logits, states, extra = model(x, training_phase=1, target_elimination=0.0)
47
+ print([tuple(head.shape) for head in logits])
48
+ ```
49
+
50
+ This forward uses zero target bytes in the local decoder; it is a shape smoke test. For scored likelihood, pass `byte_targets` as shown in the audit. For byte generation with retained Transformer context and one recurrent prefill, use `generation()` in `eval/audit_readmes.py`. Generation remains experimental; inspect the saved examples before choosing a checkpoint.
51
+
52
+ ## Evaluation protocol
53
+
54
+ This card was rebuilt from a fresh CPU audit on **2026-10-06**. All 34 published FP32 exports were attempted; 34 loaded with zero missing or unexpected state keys. Numerical and loading errors remain visible. Raw JSON, the exact text sample, and the repository inventories are included in [`evaluation/`](https://huggingface.co/Cukinator/cpu1-ablations-final/tree/main/evaluation). Previous `resultados/ablation_*.json` reports are historical and were not mixed into these tables.
55
+
56
+ - Hardware: Intel Core i7-8750H (6 cores / 12 logical processors), Windows 11; CPU execution with **1 PyTorch thread**, batch size 1, FP32 parameters. PyTorch 2.6.0+cu124. No custom C/C++ kernels were used.
57
+ - Test text: [`Salesforce/wikitext`, `wikitext-2-raw-v1`, test split](https://huggingface.co/datasets/Salesforce/wikitext). First 32 non-heading paragraphs with at least 260 UTF-8 bytes, each truncated to 260 bytes without an incomplete trailing character. This is a small diagnostic sample, not the complete benchmark. No exhaustive training-overlap audit was performed.
58
+ - Corpus attribution: WikiText by its dataset authors, based on English Wikipedia contributions. The dataset metadata lists CC-BY-SA-3.0 and GFDL; the included corpus excerpt retains those upstream terms, separately from the model repository license. See `evaluation/CORPUS_LICENSE.txt`.
59
+ - Dataset revision: `b08601e04326c79dfdd32d625aee71d232d685c3`; exact file: `wikitext-2-raw-v1/test-00000-of-00001.parquet`; parquet SHA-256: `5f1bea067869d04849c0f975a2b29c4ff47d867f484f5010ea5e861eab246d91`.
60
+ - Shared sample JSON SHA-256: `11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798`.
61
+ - Byte targets are the next patch; incomplete final patches are discarded. The first patch is context only. LocalByteDecoder receives ground-truth target bytes and shifts them internally for causal teacher forcing within a patch. Cross-entropy is summed over all targets and divided by their total count.
62
+ - Byte loss is nats/byte; `BPB = NLL / ln(2)` and byte PPL is `exp(NLL)`. A uniform byte predictor gives BPB=8 and PPL=256. BPE loss uses Qwen2.5-3B token IDs with IDs outside the configured vocabulary mapped to 0, matching the dataset adapter. Its PPL is over that lossy mapped token stream and cannot be compared with byte PPL or interpreted as the likelihood of the original text.
63
+ - All BPE models shared one resolved Qwen tokenizer in this run. Its resolved revision is recorded in `run_01.json` and `environment.json`; reuse that tokenizer revision/cache for strict reproduction. The current evaluator resolves the tokenizer Hub name at runtime rather than hard-coding that revision.
64
+ - Causality: change the last 16 of 32 input steps and compare all prefix logits, tolerance `1e-5`. Recurrent chunk equivalence: compare a 128-step forward against four 32-step chunks across all output heads, tolerance `1e-4`. Failed checks remain visible.
65
+ - DeleteGate is disabled consistently: phase 1, elimination rate 0. The audit does not measure token elimination, phase-2 quality, or the benefit of DeleteGate.
66
+ - Forward timing: 10 warm-up steps, then 100 measured single-input forwards. `steps/s = 100 / total measured seconds`; p50 and p95 are per-step latency. One byte-model step consumes a patch of 4 bytes; one BPE step consumes one token. Local decoder inputs are zeros in this microbenchmark. Transformer timing has one input step and no persistent attention context. This is not a context-scaling test or a generation benchmark.
67
+ - Byte generation: three prompts, 128 new bytes per prompt, seeds 42/43/44, temperature 1.0, top-k 40, top-p 0.9. Recurrent models carry state; Transformers reprocess the growing context. Generated bytes/s includes prompt prefill and local sampling. UTF-8 validity is tested on the complete continuation. Samples are retained as hex and decoded text. BPE generation is N/A because vocabulary truncation prevents an equivalent byte-output comparison.
68
+ - Printable ASCII fraction, UTF-8 validity, and repetition are diagnostics; they do not measure factual accuracy, instruction following, or useful language quality. RAM columns report parameter storage, not a measured peak process footprint. Ternary models still hold FP32 parameters and simulate quantization in PyTorch.
69
+
70
+ Export repository revision audited: `65951289352c1a036b12ba6d888af037e7c90b13`. Archive inventory revision: `fb402d025e843ed00fb990966bf2430c32eb958c`. Each result records its checkpoint SHA-256, actual parameter count, saved step, configuration, thread count, time, sample hash, and evaluator hash.
71
+
72
+ ### Reproduce
73
+
74
+ From the source checkout, install PyTorch plus `huggingface_hub`, `transformers`, `tokenizers`, `pyarrow`, `psutil`, `numpy`, and `datasets`. Pin the versions from `evaluation/environment.json` when reproducing this run.
75
+
76
+ The audit additions are bundled in `evaluation/source/`. Copy those Python files into the checkout’s `eval/` directory when using a source revision that predates this audit. The base Git commit is recorded in `evaluation/environment.json`.
77
+
78
+ ```powershell
79
+ python eval/audit_readmes.py --storage D:/cpu1-readme-audit --threads 1
80
+ python eval/audit_readmes.py --storage D:/cpu1-readme-audit --cards
81
+ ```
82
+
83
+ Model downloads, tokenizer files, Hugging Face caches, and temporary files go to D:. Only one model checkpoint is kept in the task storage at a time; it is removed after its result is saved. Interrupted runs resume from matching evaluator hashes. Raw reports remain in `resultados/readme_audit/`.
84
+
85
+ ## Fresh diagnostic results
86
+
87
+ **Do not rank models across tokenizations or treat a failed-causality loss as autoregressive language-model perplexity.** Saved training metrics are retained separately in the JSONs; the numbers below are recomputed on the shared test sample.
88
+
89
+ ### Byte models
90
+
91
+ | Run | Params M | Saved step | File MB | NLL | BPB | PPL | Causal | State chunks |
92
+ |---|---:|---:|---:|---:|---:|---:|---|---|
93
+ | [`run_02`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_02.json) | 38.830 | 647 | 155.35 | 1.9702 | 2.8424 | 7.172 | PASS | N/A |
94
+ | [`run_02_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_02_v3.json) | 38.830 | 10963 | 155.35 | ERROR | — | — | ERROR | N/A |
95
+ | [`run_02a_byte_only_heads`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_02a_byte_only_heads.json) | 38.501 | 641 | 154.04 | 2.4755 | 3.5714 | 11.888 | PASS | N/A |
96
+ | [`run_02a_byte_only_heads_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_02a_byte_only_heads_v3.json) | 38.501 | 16327 | 154.03 | ERROR | — | — | ERROR | N/A |
97
+ | [`run_03`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_03.json) | 38.830 | 647 | 155.38 | 2.1622 | 3.1194 | 8.690 | PASS | FAIL |
98
+ | [`run_03_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_03_v3.json) | 38.830 | 6187 | 155.38 | 1.7640 | 2.5449 | 5.836 | PASS | FAIL |
99
+ | [`run_04`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_04.json) | 38.854 | 647 | 155.49 | 5.5551 | 8.0144 | 258.565 | PASS | FAIL |
100
+ | [`run_04_r2`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_04_r2.json) | 38.854 | 4840 | 155.49 | 5.5676 | 8.0323 | 261.803 | PASS | FAIL |
101
+ | [`run_04_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_04_v3.json) | 38.854 | 6074 | 155.49 | 1.5515 | 2.2384 | 4.719 | PASS | FAIL |
102
+ | [`run_05`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_05.json) | 38.994 | 649 | 156.06 | 5.5485 | 8.0048 | 256.854 | PASS | FAIL |
103
+ | [`run_05_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_05_v3.json) | 38.994 | 4390 | 156.06 | 1.5921 | 2.2969 | 4.914 | PASS | FAIL |
104
+ | [`run_05b_kernel_strict`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_05b_kernel_strict.json) | 35.842 | 600 | 143.44 | 5.5789 | 8.0486 | 264.778 | PASS | FAIL |
105
+ | [`run_05b_kernel_strict_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_05b_kernel_strict_v3.json) | 35.842 | 2573 | 143.44 | 1.8552 | 2.6764 | 6.393 | PASS | FAIL |
106
+ | [`run_06`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_06.json) | 38.994 | 649 | 156.06 | 5.5535 | 8.0120 | 258.144 | FAIL | FAIL |
107
+ | [`run_06_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_06_v3.json) | 38.994 | 4237 | 156.06 | 1.0572 | 1.5253 | 2.878 | FAIL | FAIL |
108
+ | [`run_07`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_07.json) | 39.029 | 650 | 156.20 | 5.5535 | 8.0120 | 258.144 | FAIL | FAIL |
109
+ | [`run_07_r2`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_07_r2.json) | 39.029 | 4860 | 156.20 | 5.5569 | 8.0169 | 259.010 | FAIL | FAIL |
110
+ | [`run_08`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_08.json) | 38.854 | 647 | 155.46 | 5.5535 | 8.0121 | 258.150 | PASS | N/A |
111
+ | [`run_08_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_08_v3.json) | 38.854 | 3858 | 155.46 | ERROR | — | — | ERROR | N/A |
112
+ | [`run_09`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_09.json) | 39.428 | 657 | 157.81 | 5.5334 | 7.9830 | 253.007 | FAIL | FAIL |
113
+ | [`run_10`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_10.json) | 39.434 | 657 | 157.83 | 5.5337 | 7.9834 | 253.068 | FAIL | FAIL |
114
+ | [`run_14`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_14.json) | 10.691 | 600 | 42.82 | 5.5700 | 8.0358 | 262.432 | FAIL | FAIL |
115
+ | [`run_14_r2`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_14_r2.json) | 10.691 | 1336 | 42.82 | 5.5700 | 8.0358 | 262.432 | FAIL | FAIL |
116
+ | [`run_14_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_14_v3.json) | 10.691 | 9775 | 42.82 | 0.8811 | 1.2712 | 2.414 | FAIL | FAIL |
117
+ | [`run_15`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_15.json) | 10.732 | 600 | 42.99 | 5.5700 | 8.0358 | 262.432 | FAIL | FAIL |
118
+ | [`run_15_r2`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_15_r2.json) | 10.732 | 1341 | 42.99 | 5.5700 | 8.0358 | 262.432 | FAIL | FAIL |
119
+ | [`run_15_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_15_v3.json) | 10.732 | 2350 | 42.99 | 1.3248 | 1.9113 | 3.761 | FAIL | FAIL |
120
+ | [`run_16`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_16.json) | 10.691 | 600 | 42.82 | 5.5700 | 8.0358 | 262.432 | FAIL | FAIL |
121
+ | [`run_16_r2`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_16_r2.json) | 10.691 | 1336 | 42.82 | 5.5700 | 8.0358 | 262.432 | FAIL | FAIL |
122
+
123
+ ### BPE models (mapped Qwen token stream)
124
+
125
+ | Run | Params M | Saved step | File MB | NLL | BPB | PPL | Causal | State chunks |
126
+ |---|---:|---:|---:|---:|---:|---:|---|---|
127
+ | [`run_01`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_01.json) | 54.735 | 912 | 218.97 | 5.3742 | — | 215.773 | PASS | N/A |
128
+ | [`run_01_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_01_v3.json) | 54.735 | 12173 | 218.97 | ERROR | — | — | ERROR | N/A |
129
+ | [`run_13`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_13.json) | 12.548 | 600 | 50.24 | 6.3429 | — | 568.445 | PASS | FAIL |
130
+ | [`run_13_r2`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_13_r2.json) | 12.548 | 1568 | 50.24 | 6.4205 | — | 614.313 | PASS | FAIL |
131
+ | [`run_13_v3`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/run_13_v3.json) | 12.548 | 9290 | 50.24 | 6.7925 | — | 891.155 | PASS | FAIL |
132
+
133
+ | BPE run | IDs mapped to 0 | Vocabulary cap |
134
+ |---|---:|---:|
135
+ | `run_01` | 14.26% | 16,384 |
136
+ | `run_13` | 31.77% | 4,096 |
137
+ | `run_13_r2` | 31.77% | 4,096 |
138
+ | `run_13_v3` | 31.77% | 4,096 |
139
+
140
+ ### CPU timing and byte generation
141
+
142
+ | Run | Param MB (FP32) | Forward steps/s | p50 ms | p95 ms | Generated bytes/s | Valid UTF-8 samples |
143
+ |---|---:|---:|---:|---:|---:|---:|
144
+ | `run_01` | 218.94 | 54.64 | 18.21 | 20.63 | N/A | N/A |
145
+ | `run_01_v3` | 218.94 | ERROR | — | — | N/A | N/A |
146
+ | `run_02` | 155.32 | 54.58 | 16.69 | 30.12 | 88.75 | 3/3 |
147
+ | `run_02_v3` | 155.32 | ERROR | — | — | N/A | N/A |
148
+ | `run_02a_byte_only_heads` | 154.00 | 67.85 | 14.24 | 18.56 | 99.13 | 2/3 |
149
+ | `run_02a_byte_only_heads_v3` | 154.00 | ERROR | — | — | N/A | N/A |
150
+ | `run_03` | 155.32 | 52.42 | 17.68 | 30.45 | 154.92 | 3/3 |
151
+ | `run_03_v3` | 155.32 | 51.10 | 18.68 | 27.36 | 173.00 | 3/3 |
152
+ | `run_04` | 155.42 | 6.66 | 146.44 | 189.02 | 22.32 | 0/3 |
153
+ | `run_04_r2` | 155.42 | 5.92 | 164.12 | 231.57 | 18.60 | 0/3 |
154
+ | `run_04_v3` | 155.42 | 3.49 | 294.80 | 378.66 | 23.96 | 3/3 |
155
+ | `run_05` | 155.98 | 6.11 | 156.23 | 224.46 | 17.37 | 0/3 |
156
+ | `run_05_v3` | 155.98 | 5.71 | 157.44 | 225.37 | 20.31 | 3/3 |
157
+ | `run_05b_kernel_strict` | 143.37 | 5.41 | 171.47 | 288.26 | 18.87 | 0/3 |
158
+ | `run_05b_kernel_strict_v3` | 143.37 | 6.69 | 148.31 | 181.31 | 20.92 | 3/3 |
159
+ | `run_06` | 155.98 | 6.19 | 158.21 | 206.27 | 23.91 | 0/3 |
160
+ | `run_06_v3` | 155.98 | 6.73 | 135.85 | 223.51 | 20.98 | 2/3 |
161
+ | `run_07` | 156.11 | 6.78 | 140.98 | 193.73 | 19.25 | 0/3 |
162
+ | `run_07_r2` | 156.11 | 6.24 | 151.17 | 223.57 | 21.20 | 0/3 |
163
+ | `run_08` | 155.42 | 7.65 | 124.09 | 175.60 | 23.24 | 0/3 |
164
+ | `run_08_v3` | 155.42 | ERROR | — | — | N/A | N/A |
165
+ | `run_09` | 157.71 | 6.39 | 144.30 | 208.93 | 19.73 | 0/3 |
166
+ | `run_10` | 157.74 | 7.14 | 135.05 | 166.90 | 23.57 | 0/3 |
167
+ | `run_13` | 50.19 | 23.66 | 41.46 | 47.41 | N/A | N/A |
168
+ | `run_13_r2` | 50.19 | 24.46 | 40.26 | 44.37 | N/A | N/A |
169
+ | `run_13_v3` | 50.19 | 21.69 | 43.21 | 61.74 | N/A | N/A |
170
+ | `run_14` | 42.77 | 28.00 | 35.19 | 38.19 | 80.37 | 0/3 |
171
+ | `run_14_r2` | 42.77 | 25.51 | 37.39 | 49.82 | 73.29 | 0/3 |
172
+ | `run_14_v3` | 42.77 | 24.80 | 37.64 | 57.30 | 76.37 | 3/3 |
173
+ | `run_15` | 42.93 | 28.36 | 35.05 | 36.72 | 81.61 | 0/3 |
174
+ | `run_15_r2` | 42.93 | 27.10 | 36.58 | 38.68 | 73.25 | 0/3 |
175
+ | `run_15_v3` | 42.93 | 14.17 | 60.10 | 124.86 | 53.99 | 3/3 |
176
+ | `run_16` | 42.77 | 20.26 | 44.73 | 73.85 | 71.64 | 0/3 |
177
+ | `run_16_r2` | 42.77 | 21.75 | 43.29 | 59.96 | 55.22 | 0/3 |
178
+
179
+ ### Example continuations
180
+
181
+ The following fixed examples use the first audit prompt, `The history of artificial intelligence`, seed 42, and the sampling settings above. They illustrate why low diagnostic loss or valid UTF-8 alone does not establish useful text generation. Escapes preserve the recorded characters; complete byte sequences and all three prompts are in the JSON reports.
182
+
183
+ `run_04_v3`:
184
+
185
+ ```text
186
+ "atite white waterfalper diangiets opespucica continues apoliomin for natinal envical grapable tha rust of pria a treating papora"
187
+ ```
188
+
189
+ `run_14_v3`:
190
+
191
+ ```text
192
+ "al C APLEOSTrorog's NC. Overness I Co eforgram.\nAt 2odromist - Careforrs, Milz Drology in M Ontooyoum , one volume late from obs"
193
+ ```
194
+
195
+
196
+ ### Correctness checks
197
+
198
+ | Run | Shapes | Probabilities | Determinism | State chunks | Ternary projection | State size | Causality |
199
+ |---|---|---|---|---|---|---|---|
200
+ | `run_01` | PASS | PASS | PASS | N/A | N/A | N/A | PASS |
201
+ | `run_01_v3` | FAIL | FAIL | FAIL | N/A | N/A | N/A | ERROR |
202
+ | `run_02` | PASS | PASS | PASS | N/A | N/A | N/A | PASS |
203
+ | `run_02_v3` | FAIL | FAIL | FAIL | N/A | N/A | N/A | ERROR |
204
+ | `run_02a_byte_only_heads` | PASS | PASS | PASS | N/A | N/A | N/A | PASS |
205
+ | `run_02a_byte_only_heads_v3` | FAIL | FAIL | FAIL | N/A | N/A | N/A | ERROR |
206
+ | `run_03` | PASS | PASS | PASS | FAIL | N/A | PASS | PASS |
207
+ | `run_03_v3` | PASS | PASS | PASS | FAIL | N/A | PASS | PASS |
208
+ | `run_04` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
209
+ | `run_04_r2` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
210
+ | `run_04_v3` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
211
+ | `run_05` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
212
+ | `run_05_v3` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
213
+ | `run_05b_kernel_strict` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
214
+ | `run_05b_kernel_strict_v3` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
215
+ | `run_06` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
216
+ | `run_06_v3` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
217
+ | `run_07` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
218
+ | `run_07_r2` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
219
+ | `run_08` | PASS | PASS | PASS | N/A | PASS | N/A | PASS |
220
+ | `run_08_v3` | FAIL | FAIL | FAIL | N/A | FAIL | N/A | ERROR |
221
+ | `run_09` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
222
+ | `run_10` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
223
+ | `run_13` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
224
+ | `run_13_r2` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
225
+ | `run_13_v3` | PASS | PASS | PASS | FAIL | PASS | PASS | PASS |
226
+ | `run_14` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
227
+ | `run_14_r2` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
228
+ | `run_14_v3` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
229
+ | `run_15` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
230
+ | `run_15_r2` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
231
+ | `run_15_v3` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
232
+ | `run_16` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
233
+ | `run_16_r2` | PASS | PASS | PASS | FAIL | PASS | PASS | FAIL |
234
+
235
+ **Causality failures: 14/34.** `run_06`, `run_06_v3`, `run_07`, `run_07_r2`, `run_09`, `run_10`, `run_14`, `run_14_r2`, `run_14_v3`, `run_15`, `run_15_r2`, `run_15_v3`, `run_16`, `run_16_r2`
236
+
237
+ Changing future inputs changed prefix logits in these models. Some saved configurations enable noncausal Bolmo cross-patch operations; the test detects the effect without isolating its individual source. Their full-sequence losses are descriptive reconstruction scores and cannot establish causal prediction quality.
238
+
239
+ **State chunk failures: 26.** `run_03`, `run_03_v3`, `run_04`, `run_04_r2`, `run_04_v3`, `run_05`, `run_05_v3`, `run_05b_kernel_strict`, `run_05b_kernel_strict_v3`, `run_06`, `run_06_v3`, `run_07`, `run_07_r2`, `run_09`, `run_10`, `run_13`, `run_13_r2`, `run_13_v3`, `run_14`, `run_14_r2`, `run_14_v3`, `run_15`, `run_15_r2`, `run_15_v3`, `run_16`, `run_16_r2`
240
+
241
+ These configurations did not reproduce a full-sequence forward when carrying state between chunks at the stated tolerance. An O(1) state tensor alone does not establish correct streaming equivalence. No fix to the trained architectures or weights was made for this audit.
242
+
243
+ ### Recurrent implementation diagnostic
244
+
245
+ The source’s `AblationMLGRU._parallel_scan` was tested independently against its defining serial recurrence with random candidate/forget tensors, seed 19, shape `[1,32,8]`, FP32. The maximum difference was **19.100506**; splitting the same scan into two 16-step chunks differed by **11.471270** (tolerance `1e-4`). See [`implementation_diagnostics.json`](https://huggingface.co/Cukinator/cpu1-ablations-final/blob/main/evaluation/implementation_diagnostics.json) and the bundled `audit_primitives.py`.
246
+
247
+ The implementation replaces log-cumulative-sum-exp with a cumulative-maximum normalization followed by a cumulative sum; accumulated terms are not rescaled when that maximum changes. The observed outputs therefore do not satisfy the intended recurrence. This is a source implementation defect; disabling or repairing the scan would create a different inference protocol and was not silently applied to these results. The trained-checkpoint audit uses the source as supplied.
248
+
249
+ ### Evaluation errors
250
+
251
+ Scores and speed are unavailable when model loading or numerical evaluation fails. Nonfinite values are represented as JSON null; they are never substituted with valid-looking numbers.
252
+
253
+ | Run | Error |
254
+ |---|---|
255
+ | `run_01_v3` | ValueError: nonfinite loss |
256
+ | `run_02_v3` | ValueError: nonfinite loss |
257
+ | `run_02a_byte_only_heads_v3` | ValueError: nonfinite loss |
258
+ | `run_08_v3` | ValueError: nonfinite loss |
259
+
260
+ ## Architecture recorded in each checkpoint
261
+
262
+ Run names identify experiments; dimensions and features below come from the saved configuration. FP16 is the training quantization label, while this audit executes the loaded tensors in FP32. “50M” and “10M” in older cards were design families, not exact model sizes.
263
+
264
+ | Run | Mixer | Tokens | Quant. label | Width / layers / FFN | Local decoder | FP residual | Bolmo | DeleteGate | PFNet hidden | Channel decay |
265
+ |---|---|---|---|---|---|---|---|---|---:|---|
266
+ | `run_01` | transformer | bpe | fp16 | 512 / 12 / 1376 | N/A | no | no | no | 0 | no |
267
+ | `run_01_v3` | transformer | bpe | fp16 | 512 / 12 / 1376 | N/A | no | no | no | 0 | no |
268
+ | `run_02` | transformer | byte | fp16 | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
269
+ | `run_02_v3` | transformer | byte | fp16 | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
270
+ | `run_02a_byte_only_heads` | transformer | byte | fp16 | 512 / 12 / 1376 | no | no | no | no | 0 | no |
271
+ | `run_02a_byte_only_heads_v3` | transformer | byte | fp16 | 512 / 12 / 1376 | no | no | no | no | 0 | no |
272
+ | `run_03` | mlgru | byte | fp16 | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
273
+ | `run_03_v3` | mlgru | byte | fp16 | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
274
+ | `run_04` | mlgru | byte | ternary | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
275
+ | `run_04_r2` | mlgru | byte_dynamic | ternary | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
276
+ | `run_04_v3` | mlgru | byte | ternary | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
277
+ | `run_05` | mlgru | byte | ternary | 512 / 12 / 1376 | yes | yes | no | no | 0 | no |
278
+ | `run_05_v3` | mlgru | byte | ternary | 512 / 12 / 1376 | yes | yes | no | no | 0 | no |
279
+ | `run_05b_kernel_strict` | mlgru | byte | ternary | 512 / 12 / 1376 | yes | yes | no | no | 0 | no |
280
+ | `run_05b_kernel_strict_v3` | mlgru | byte | ternary | 512 / 12 / 1376 | yes | yes | no | no | 0 | no |
281
+ | `run_06` | mlgru | byte_dynamic | ternary | 512 / 12 / 1376 | yes | yes | yes | no | 0 | no |
282
+ | `run_06_v3` | mlgru | byte_dynamic | ternary | 512 / 12 / 1376 | yes | yes | yes | no | 0 | no |
283
+ | `run_07` | mlgru | byte_dynamic | ternary | 512 / 12 / 1376 | yes | yes | yes | yes | 0 | no |
284
+ | `run_07_r2` | mlgru | byte_dynamic | ternary | 512 / 12 / 1376 | yes | yes | yes | yes | 0 | no |
285
+ | `run_08` | transformer | byte | ternary | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
286
+ | `run_08_v3` | transformer | byte | ternary | 512 / 12 / 1376 | yes | no | no | no | 0 | no |
287
+ | `run_09` | mlgru | byte_dynamic | ternary | 512 / 12 / 1376 | yes | yes | yes | yes | 32 | no |
288
+ | `run_10` | mlgru | byte_dynamic | ternary | 512 / 12 / 1376 | yes | yes | yes | yes | 32 | yes |
289
+ | `run_13` | mlgru | bpe | ternary | 320 / 8 / 853 | N/A | yes | no | yes | 0 | no |
290
+ | `run_13_r2` | mlgru | bpe | ternary | 320 / 8 / 853 | N/A | yes | no | yes | 0 | no |
291
+ | `run_13_v3` | mlgru | bpe | ternary | 320 / 8 / 853 | N/A | yes | no | yes | 0 | no |
292
+ | `run_14` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
293
+ | `run_14_r2` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
294
+ | `run_14_v3` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
295
+ | `run_15` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
296
+ | `run_15_r2` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
297
+ | `run_15_v3` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
298
+ | `run_16` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
299
+ | `run_16_r2` | mlgru | byte_dynamic | ternary | 320 / 8 / 853 | yes | yes | yes | yes | 0 | no |
300
+
301
+ These experiments change parameter counts, representations, training signal, budgets, saved steps, and sometimes multiple architectural settings. The audit is not a controlled causal estimate of the benefit of an individual component. `chinchilla_tokens_per_param` is a configured budget; it does not prove that a run completed that budget. Actual saved steps are reported separately.
302
+
303
+ ## License
304
+
305
+ The Hub metadata declares Apache-2.0 for the model repository. The source checkout does not include a standalone LICENSE file. Upstream datasets and tokenizer assets retain their own licenses.
evaluation/CORPUS_LICENSE.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ The text excerpts in corpus.json originate from WikiText (Salesforce/wikitext), based on English Wikipedia.
2
+ Dataset authors and contributors: see https://huggingface.co/datasets/Salesforce/wikitext .
3
+ Upstream dataset metadata declares CC-BY-SA-3.0 and GFDL.
4
+ CC-BY-SA-3.0: https://creativecommons.org/licenses/by-sa/3.0/
5
+ GFDL: https://www.gnu.org/licenses/fdl-1.3.html
6
+ Changes: selection of 32 test paragraphs and truncation to 260 UTF-8 bytes.
7
+ The corpus remains under its upstream terms; the model repository Apache-2.0 metadata does not relicense these excerpts.
evaluation/corpus.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": "Salesforce/wikitext",
3
+ "revision": "b08601e04326c79dfdd32d625aee71d232d685c3",
4
+ "file": "wikitext-2-raw-v1/test-00000-of-00001.parquet",
5
+ "parquet_sha256": "5f1bea067869d04849c0f975a2b29c4ff47d867f484f5010ea5e861eab246d91",
6
+ "selection": "first 32 non-heading paragraphs >=260 UTF-8 bytes; truncate to 260 bytes, discard incomplete trailing UTF-8",
7
+ "texts": [
8
+ " Robert Boulter is an English film , television and theatre actor . He had a guest @-@ starring role on the television series The Bill in 2000 . This was followed by a starring role in the play Herons written by Simon Stephens , which was performed in 2001 at ",
9
+ " In 2006 , Boulter starred alongside Whishaw in the play Citizenship written by Mark Ravenhill . He appeared on a 2006 episode of the television series , Doctors , followed by a role in the 2007 theatre production of How to Curse directed by Josie Rourke . How",
10
+ " In 2000 Boulter had a guest @-@ starring role on the television series The Bill ; he portrayed \" Scott Parry \" in the episode , \" In Safe Hands \" . Boulter starred as \" Scott \" in the play Herons written by Simon Stephens , which was performed in 2001 at the ",
11
+ " He had a recurring role in 2003 on two episodes of The Bill , as character \" Connor Price \" . In 2004 Boulter landed a role as \" Craig \" in the episode \" Teddy 's Story \" of the television series The Long Firm ; he starred alongside actors Mark Strong and Der",
12
+ " In 2006 Boulter starred in the play Citizenship written by Mark Ravenhill . The play was part of a series which featured different playwrights , titled Burn / Chatroom / Citizenship . In a 2006 interview , fellow actor Ben Whishaw identified Boulter as one of",
13
+ " Boulter starred in two films in 2008 , Daylight Robbery by filmmaker Paris Leonti , and Donkey Punch directed by Olly Blackburn . Boulter portrayed a character named \" Sean \" in Donkey Punch , who tags along with character \" Josh \" as the \" quiet brother ... ",
14
+ " Du Fu ( Wade – Giles : Tu Fu ; Chinese : 杜甫 ; 712 – 770 ) was a prominent Chinese poet of the Tang dynasty . Along with Li Bai ( Li Po ) , he is frequently called the greatest of the Chinese poets . His greatest ambition was to serve his country as a ",
15
+ " Although initially he was little @-@ known to other writers , his works came to be hugely influential in both Chinese and Japanese literary culture . Of his poetic writing , nearly fifteen hundred poems have been preserved over the ages . He has been called t",
16
+ " Traditional Chinese literary criticism emphasized the life of the author when interpreting a work , a practice which Burton Watson attributes to \" the close links that traditional Chinese thought posits between art and morality \" . Since many of Du Fu 's poem",
17
+ " Most of what is known of Du Fu 's life comes from his poems . His paternal grandfather was Du Shenyan , a noted politician and poet during the reign of Empress Wu . Du Fu was born in 712 ; the exact birthplace is unknown , except that it was near Luoyang , He",
18
+ " Du Fu 's mother died shortly after he was born , and he was partially raised by his aunt . He had an elder brother , who died young . He also had three half brothers and one half sister , to whom he frequently refers in his poems , although he never mentions ",
19
+ " The son of a minor scholar @-@ official , his youth was spent on the standard education of a future civil servant : study and memorisation of the Confucian classics of philosophy , history and poetry . He later claimed to have produced creditable poems by his",
20
+ " In the early 730s , he travelled in the Jiangsu / Zhejiang area ; his earliest surviving poem , describing a poetry contest , is thought to date from the end of this period , around 735 . In that year , he took the civil service exam , likely in Chang 'an . H",
21
+ " His father died around 740 . Du Fu would have been allowed to enter the civil service because of his father 's rank , but he is thought to have given up the privilege in favour of one of his half brothers . He spent the next four years living in the Luoyang a",
22
+ " In the autumn of 744 , he met Li Bai ( Li Po ) for the first time , and the two poets formed a friendship . David Young describes this as \" the most significant formative element in Du Fu 's artistic development \" because it gave him a living example of the r",
23
+ " In 746 , he moved to the capital in an attempt to resurrect his official career . He took the civil service exam a second time during the following year , but all the candidates were failed by the prime minister ( apparently in order to prevent the emergence ",
24
+ " In 755 , he received an appointment as Registrar of the Right Commandant 's office of the Crown Prince 's Palace . Although this was a minor post , in normal times it would have been at least the start of an official career . Even before he had begun work , h",
25
+ " The An Lushan Rebellion began in December 755 , and was not completely suppressed for almost eight years . It caused enormous disruption to Chinese society : the census of 754 recorded 52 @.@ 9 million people , but ten years later , the census counted just 16",
26
+ " In 756 , Emperor Xuanzong was forced to flee the capital and abdicate . Du Fu , who had been away from the city , took his family to a place of safety and attempted to join the court of the new emperor ( Suzong ) , but he was captured by the rebels and taken ",
27
+ " He escaped from Chang 'an the following year , and was appointed Reminder when he rejoined the court in May 757 . This post gave access to the emperor but was largely ceremonial . Du Fu 's conscientiousness compelled him to try to make use of it : he caused t",
28
+ " He moved on in the summer of 759 ; this has traditionally been ascribed to famine , but Hung believes that frustration is a more likely reason . He next spent around six weeks in Qinzhou ( now Tianshui , Gansu province ) , where he wrote more than sixty poems",
29
+ " In December 759 , he briefly stayed in Tonggu ( modern Gansu ) . He departed on December 24 for Chengdu ( Sichuan province ) , where he was hosted by local Prefect and fellow poet Pei Di . Du subsequently based himself in Sichuan for most of the next five yea",
30
+ " Luoyang , the region of his birthplace , was recovered by government forces in the winter of 762 , and in the spring of 765 Du Fu and his family sailed down the Yangtze , apparently with the intention of making their way there . They traveled slowly , held up",
31
+ " In March 768 , he began his journey again and got as far as Hunan province , where he died in Tanzhou ( now Changsha ) in November or December 770 , in his 58th year . He was survived by his wife and two sons , who remained in the area for some years at least",
32
+ " Below is an example of one of Du Fu 's later works , To My Retired Friend Wei ( Chinese : 贈衛八處士 ) . Like many other poems in the Tang it featured the theme of a long parting between friends , which was often due to officials being frequently transfe",
33
+ " Since the Song dynasty , critics have called Du Fu the \" poet historian \" ( 詩史 shī shǐ ) . The most directly historical of his poems are those commenting on military tactics or the successes and failures of the government , or the poems of advice which ",
34
+ " Du Fu 's political comments are based on emotion rather than calculation : his prescriptions have been paraphrased as , \" Let us all be less selfish , let us all do what we are supposed to do \" . Since his views were impossible to disagree with , his forceful",
35
+ " A second favourite epithet of Chinese critics is that of \" poet sage \" ( 詩聖 shī shèng ) , a counterpart to the philosophical sage , Confucius . One of the earliest surviving works , The Song of the Wagons ( from around 750 ) , gives voice to the sufferi",
36
+ " Although Du Fu 's frequent references to his own difficulties can give the impression of an all @-@ consuming solipsism , Hawkes argues that his \" famous compassion in fact includes himself , viewed quite objectively and almost as an afterthought \" . He there",
37
+ " Du Fu 's compassion , for himself and for others , was part of his general broadening of the scope of poetry : he devoted many works to topics which had previously been considered unsuitable for poetic treatment . Zhang Jie wrote that for Du Fu , \" everything",
38
+ " Du Fu 's work is notable above all for its range . Chinese critics traditionally used the term 集大成 ( jídàchéng- \" complete symphony \" ) , a reference to Mencius ' description of Confucius . Yuan Zhen was the first to note the breadth of Du Fu 's achi",
39
+ " The tenor of his work changed as he developed his style and adapted to his surroundings ( \" chameleon @-@ like \" according to Watson ) : his earliest works are in a relatively derivative , courtly style , but he came into his own in the years of the rebellion"
40
+ ]
41
+ }
evaluation/dataset_inventory.json ADDED
The diff for this file is too large to render. See raw diff
 
evaluation/environment.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "python": "3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]",
3
+ "packages": {
4
+ "torch": "2.6.0+cu124",
5
+ "transformers": "5.3.0",
6
+ "tokenizers": "0.22.2",
7
+ "huggingface_hub": "1.19.0",
8
+ "datasets": "4.8.3",
9
+ "numpy": "2.3.5",
10
+ "pyarrow": "23.0.1",
11
+ "psutil": "7.2.2"
12
+ },
13
+ "hardware": "Intel Core i7-8750H, 6 cores/12 logical processors",
14
+ "platform": "Windows-11-10.0.26200-SP0",
15
+ "threads": 1,
16
+ "source_commit": "18826ec2827a09950797463633c1f5187af29a5b",
17
+ "source_changes": "audit evaluator and correctness/quality fixes in this checkout",
18
+ "audit_script_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
19
+ "qwen_tokenizer_resolved_revision": null
20
+ }
evaluation/implementation_diagnostics.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "seed": 19,
3
+ "shape": [
4
+ 1,
5
+ 32,
6
+ 8
7
+ ],
8
+ "torch": "2.6.0+cu124",
9
+ "dtype": "float32",
10
+ "reference": "h[t] = f[t] * h[t-1] + (1-f[t]) * c[t]",
11
+ "serial_max_diff": 19.100505828857422,
12
+ "chunks_max_diff": 11.471269607543945,
13
+ "tolerance": 0.0001,
14
+ "status": "FAIL",
15
+ "utilities_sha256": "f061f9308b7b6b438199b9847d1f851cd615685c7971b4ff93db33dea3fd4516",
16
+ "script_sha256": "a5ebf25bc89f3b64caf9cb0ed238d19a56463e0a23f7e709862f9fad1d75c704"
17
+ }
evaluation/inventory.json ADDED
The diff for this file is too large to render. See raw diff
 
evaluation/loading_examples.json ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "examples": [
3
+ {
4
+ "repo": "Cukinator/cpu1-ablation-checkpoints",
5
+ "revision": "fb402d025e843ed00fb990966bf2430c32eb958c",
6
+ "file": "run_04/checkpoint_run_04_final.pt",
7
+ "format": "compact_2bit",
8
+ "sha256": "1b953c3bfcf43ba2ce0634f0b1adca53de7af46a2f037b7d1a2ac95fdd4dfa31",
9
+ "state_sha256": "cb55c3b0a15da2b9e1ae1a8d2adbcd00a4541777397579487a666a875806f03c",
10
+ "strict_load": true,
11
+ "finite_logits": true,
12
+ "shapes": [
13
+ [
14
+ 1,
15
+ 5,
16
+ 256
17
+ ],
18
+ [
19
+ 1,
20
+ 5,
21
+ 256
22
+ ],
23
+ [
24
+ 1,
25
+ 5,
26
+ 256
27
+ ],
28
+ [
29
+ 1,
30
+ 5,
31
+ 256
32
+ ]
33
+ ]
34
+ },
35
+ {
36
+ "repo": "Cukinator/cpu1-ablations-final",
37
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
38
+ "file": "run_04/model.pt",
39
+ "format": "fp32",
40
+ "sha256": "3af6570f55ecdf604adacce6f67a319aaa7823b7177a4023143401d7fe145f5e",
41
+ "state_sha256": "cb55c3b0a15da2b9e1ae1a8d2adbcd00a4541777397579487a666a875806f03c",
42
+ "strict_load": true,
43
+ "finite_logits": true,
44
+ "shapes": [
45
+ [
46
+ 1,
47
+ 5,
48
+ 256
49
+ ],
50
+ [
51
+ 1,
52
+ 5,
53
+ 256
54
+ ],
55
+ [
56
+ 1,
57
+ 5,
58
+ 256
59
+ ],
60
+ [
61
+ 1,
62
+ 5,
63
+ 256
64
+ ]
65
+ ]
66
+ }
67
+ ],
68
+ "run_04_state_dicts_identical": true,
69
+ "scope": "only the run_04 pair; does not establish parity across other models or intermediate steps"
70
+ }
evaluation/run_01.json ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_01",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_01/model.pt",
5
+ "sha256": "afd881decfab7c40f06e675f727561f9ad81ec3c82fd39eaaf33bf2cbf09fb28",
6
+ "file_bytes": 218970862,
7
+ "date_utc": "2026-10-06T22:17:58.642046+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 912,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 45,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": false,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "transformer_bpe_fp16",
72
+ "token_mixer": "transformer",
73
+ "tokenization": "bpe",
74
+ "quantization": "fp16",
75
+ "fp_residual": false,
76
+ "bpe_vocab_size": 16384,
77
+ "description": "Absolute baseline — FP16 Transformer, BPE tokens (16K vocab), CE-only.",
78
+ "cites": [],
79
+ "_current_phase": 1,
80
+ "use_gradient_checkpointing": false
81
+ },
82
+ "step": 912,
83
+ "stored_training_metrics": {
84
+ "run_name": "transformer_bpe_fp16",
85
+ "perplexity": 106.14184182035534,
86
+ "tokens_per_sec_cpu": 44.017941230408915,
87
+ "ram_mb": 218.94144,
88
+ "val_loss": 4.6647763299942016,
89
+ "n_params_M": 54.73536
90
+ },
91
+ "parameters": 54735360,
92
+ "parameter_bytes": 218941440,
93
+ "format": "fp32",
94
+ "strict_load": true,
95
+ "correctness": {
96
+ "forward_shapes": {
97
+ "status": "PASS",
98
+ "time_s": 1.37,
99
+ "result": {
100
+ "configs_tested": 6,
101
+ "heads": 1
102
+ }
103
+ },
104
+ "probs": {
105
+ "status": "PASS",
106
+ "time_s": 0.15,
107
+ "result": {
108
+ "max_error": 7.987022399902344e-06
109
+ }
110
+ },
111
+ "determinism": {
112
+ "status": "PASS",
113
+ "time_s": 0.18,
114
+ "result": {
115
+ "deterministic": true
116
+ }
117
+ },
118
+ "state_prop": {
119
+ "status": "N/A",
120
+ "time_s": 0.0,
121
+ "result": {
122
+ "skipped": true,
123
+ "reason": "modelo no recurrente (Transformer)"
124
+ }
125
+ },
126
+ "ternary_weights": {
127
+ "status": "N/A",
128
+ "time_s": 0.0,
129
+ "result": {
130
+ "skipped": true,
131
+ "reason": "modelo FP16 (sin BitLinear)"
132
+ }
133
+ },
134
+ "state_size": {
135
+ "status": "N/A",
136
+ "time_s": 0.0,
137
+ "result": {
138
+ "skipped": true,
139
+ "reason": "modelo no recurrente (Transformer)"
140
+ }
141
+ },
142
+ "causality": {
143
+ "status": "PASS",
144
+ "max_prefix_logit_diff": 0.0,
145
+ "tolerance": 1e-05,
146
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
147
+ }
148
+ },
149
+ "tokenizer_revision": null,
150
+ "loss": {
151
+ "mean_nll": 5.374225732294053,
152
+ "targets": 1910,
153
+ "unit": "mapped_qwen_token",
154
+ "perplexity": 215.7727417513045,
155
+ "bits_per_byte": null,
156
+ "mapped_ids_fraction": 0.14263645726055613,
157
+ "source": "shared_wikitext_test_sample",
158
+ "teacher_forcing": true,
159
+ "delete_gate": "disabled (phase 1, elimination 0)"
160
+ },
161
+ "benchmark": {
162
+ "forward_steps_per_second": 54.63665205890159,
163
+ "p50_ms": 18.20715000576456,
164
+ "p95_ms": 20.63129999442026,
165
+ "jitter_cv": 0.07065127264243017,
166
+ "warmup_steps": 10,
167
+ "measured_steps": 100,
168
+ "context_steps": 1,
169
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
170
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
171
+ },
172
+ "generation": {
173
+ "status": "N/A",
174
+ "reason": "truncated Qwen vocabulary; token mapping is lossy, no comparable byte generation test"
175
+ },
176
+ "process_rss_bytes": 1068601344,
177
+ "total_seconds": 18.87568380000448,
178
+ "evaluation_complete": true
179
+ }
evaluation/run_01_v3.json ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_01_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_01_v3/model.pt",
5
+ "sha256": "dc8f256255308d36217f51d6c91c0f99a569315efc040bb4a8a6fcdb51049e36",
6
+ "file_bytes": 218970734,
7
+ "date_utc": "2026-10-06T22:18:18.078744+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 3420,
29
+ "total_steps": 68419,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 3420,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": false,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "transformer_bpe_fp16",
73
+ "token_mixer": "transformer",
74
+ "tokenization": "bpe",
75
+ "quantization": "fp16",
76
+ "fp_residual": false,
77
+ "bpe_vocab_size": 16384,
78
+ "description": "Absolute baseline — FP16 Transformer, BPE tokens (16K vocab), CE-only.",
79
+ "cites": [],
80
+ "_current_phase": 1,
81
+ "use_gradient_checkpointing": false
82
+ },
83
+ "step": 12173,
84
+ "stored_training_metrics": {},
85
+ "parameters": 54735360,
86
+ "parameter_bytes": 218941440,
87
+ "format": "fp32",
88
+ "strict_load": true,
89
+ "correctness": {
90
+ "forward_shapes": {
91
+ "status": "FAIL",
92
+ "error": "NaN en logits batch=1 seq=1 head=0\nNaN en logits batch=1 seq=64 head=0\nNaN en logits batch=1 seq=256 head=0\nNaN en logits batch=2 seq=1 head=0\nNaN en logits batch=2 seq=64 head=0\nNaN en logits batch=2 seq=256 head=0"
93
+ },
94
+ "probs": {
95
+ "status": "FAIL",
96
+ "error": "Head 0: suma de probs error=nan"
97
+ },
98
+ "determinism": {
99
+ "status": "FAIL",
100
+ "error": "Head 0: output no deterministico, diff=nan"
101
+ },
102
+ "state_prop": {
103
+ "status": "N/A",
104
+ "time_s": 0.0,
105
+ "result": {
106
+ "skipped": true,
107
+ "reason": "modelo no recurrente (Transformer)"
108
+ }
109
+ },
110
+ "ternary_weights": {
111
+ "status": "N/A",
112
+ "time_s": 0.0,
113
+ "result": {
114
+ "skipped": true,
115
+ "reason": "modelo FP16 (sin BitLinear)"
116
+ }
117
+ },
118
+ "state_size": {
119
+ "status": "N/A",
120
+ "time_s": 0.0,
121
+ "result": {
122
+ "skipped": true,
123
+ "reason": "modelo no recurrente (Transformer)"
124
+ }
125
+ },
126
+ "causality": {
127
+ "status": "ERROR",
128
+ "max_prefix_logit_diff": null,
129
+ "tolerance": 1e-05,
130
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
131
+ }
132
+ },
133
+ "error": "ValueError: nonfinite loss",
134
+ "total_seconds": 12.522569900000235,
135
+ "evaluation_complete": true
136
+ }
evaluation/run_02.json ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_02",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_02/model.pt",
5
+ "sha256": "9da358889c0d72fa04b155b720dc726b3dca050574e9e5a40564a24d38d3eb5e",
6
+ "file_bytes": 155353426,
7
+ "date_utc": "2026-10-06T22:18:29.428466+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 647,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": false,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "transformer_byte_fp16",
72
+ "token_mixer": "transformer",
73
+ "tokenization": "byte",
74
+ "quantization": "fp16",
75
+ "fp_residual": false,
76
+ "description": "+Byte patches + LocalByteDecoder — adds MegaByte intra-patch autoregression on top of run_02a.",
77
+ "cites": [
78
+ "MegaByte (Yu et al., 2023)"
79
+ ],
80
+ "_current_phase": 1,
81
+ "use_gradient_checkpointing": false
82
+ },
83
+ "step": 647,
84
+ "stored_training_metrics": {
85
+ "run_name": "transformer_byte_fp16",
86
+ "perplexity": 5.558867797606619,
87
+ "tokens_per_sec_cpu": 52.51341627068272,
88
+ "ram_mb": 155.318276,
89
+ "val_loss": 1.7153944540023804,
90
+ "n_params_M": 38.829569
91
+ },
92
+ "parameters": 38829569,
93
+ "parameter_bytes": 155318276,
94
+ "format": "fp32",
95
+ "strict_load": true,
96
+ "correctness": {
97
+ "forward_shapes": {
98
+ "status": "PASS",
99
+ "time_s": 1.83,
100
+ "result": {
101
+ "configs_tested": 6,
102
+ "heads": 4
103
+ }
104
+ },
105
+ "probs": {
106
+ "status": "PASS",
107
+ "time_s": 0.27,
108
+ "result": {
109
+ "max_error": 4.76837158203125e-07
110
+ }
111
+ },
112
+ "determinism": {
113
+ "status": "PASS",
114
+ "time_s": 0.25,
115
+ "result": {
116
+ "deterministic": true
117
+ }
118
+ },
119
+ "state_prop": {
120
+ "status": "N/A",
121
+ "time_s": 0.0,
122
+ "result": {
123
+ "skipped": true,
124
+ "reason": "modelo no recurrente (Transformer)"
125
+ }
126
+ },
127
+ "ternary_weights": {
128
+ "status": "N/A",
129
+ "time_s": 0.0,
130
+ "result": {
131
+ "skipped": true,
132
+ "reason": "modelo FP16 (sin BitLinear)"
133
+ }
134
+ },
135
+ "state_size": {
136
+ "status": "N/A",
137
+ "time_s": 0.0,
138
+ "result": {
139
+ "skipped": true,
140
+ "reason": "modelo no recurrente (Transformer)"
141
+ }
142
+ },
143
+ "causality": {
144
+ "status": "PASS",
145
+ "max_prefix_logit_diff": 0.0,
146
+ "tolerance": 1e-05,
147
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
148
+ }
149
+ },
150
+ "loss": {
151
+ "mean_nll": 1.9702263250946999,
152
+ "targets": 8192,
153
+ "unit": "byte",
154
+ "perplexity": 7.172299576047711,
155
+ "bits_per_byte": 2.8424357486430103,
156
+ "mapped_ids_fraction": null,
157
+ "source": "shared_wikitext_test_sample",
158
+ "teacher_forcing": true,
159
+ "delete_gate": "disabled (phase 1, elimination 0)"
160
+ },
161
+ "benchmark": {
162
+ "forward_steps_per_second": 54.57564678548811,
163
+ "p50_ms": 16.68574999712291,
164
+ "p95_ms": 30.121800002234522,
165
+ "jitter_cv": 0.29671530302840915,
166
+ "warmup_steps": 10,
167
+ "measured_steps": 100,
168
+ "context_steps": 1,
169
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
170
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
171
+ },
172
+ "generation": [
173
+ {
174
+ "prompt": "The history of artificial intelligence",
175
+ "seed": 42,
176
+ "hex": "6963616469616e207669726d6d65727265642d20646173746f7420426c61797320696e636c7564696e67207465617420676f6d616d206672616e67696e6720612064657369676e207468617420707265746972656c79206f72206272616e6769626c652e2054686520636861742070617474206279206120726f756e64696e67",
177
+ "text_replacement_decode": "icadian virmmerred- dastot Blays including teat gomam franging a design that pretirely or brangible. The chat patt by a rounding",
178
+ "bytes": 128,
179
+ "utf8_valid": true,
180
+ "ascii_printable_fraction": 1.0,
181
+ "repeated_8byte_fraction": 0.0,
182
+ "seconds": 1.4053070999943884,
183
+ "generated_bytes_per_second": 91.08329417855437
184
+ },
185
+ {
186
+ "prompt": "Once upon a time",
187
+ "seed": 43,
188
+ "hex": "20746f2062757420686520626f6964676574732c20746f207374617274696e67207761792c206f75747320696e636c6f736564207375726d20646566696e6520616e642074686520666f726c656e7320616e64206c6f74696f6e207468652067726173747275637465642061742061726520636173686f6c652c206865207468",
189
+ "text_replacement_decode": " to but he boidgets, to starting way, outs inclosed surm define and the forlens and lotion the grastructed at are cashole, he th",
190
+ "bytes": 128,
191
+ "utf8_valid": true,
192
+ "ascii_printable_fraction": 1.0,
193
+ "repeated_8byte_fraction": 0.0,
194
+ "seconds": 1.4281692000004114,
195
+ "generated_bytes_per_second": 89.62523488110732
196
+ },
197
+ {
198
+ "prompt": "The purpose of science is",
199
+ "seed": 44,
200
+ "hex": "6f616d61746f2e0a41646f6f6d626c6573736874656e207769726b696c73204d61726f6e69612043756e637573746f6c696e61204365617374656c2050616b652044657369676e6174652e20496e207468652070726f676f206f6e6520746f20626f6c6c20746f6d61746561756d616e204d6172746f204d6172616b20416461",
201
+ "text_replacement_decode": "oamato.\nAdoomblesshten wirkils Maronia Cuncustolina Ceastel Pake Designate. In the progo one to boll tomateauman Marto Marak Ada",
202
+ "bytes": 128,
203
+ "utf8_valid": true,
204
+ "ascii_printable_fraction": 1.0,
205
+ "repeated_8byte_fraction": 0.0,
206
+ "seconds": 1.493068100004166,
207
+ "generated_bytes_per_second": 85.72951227050049
208
+ }
209
+ ],
210
+ "process_rss_bytes": 931725312,
211
+ "total_seconds": 20.957195200004207,
212
+ "evaluation_complete": true
213
+ }
evaluation/run_02_v3.json ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_02_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_02_v3/model.pt",
5
+ "sha256": "bc635a9fe2730240543705bda2f0bfbc6dd5d9d2759f7d1369ecb464e021c46a",
6
+ "file_bytes": 155353298,
7
+ "date_utc": "2026-10-06T22:18:50.217215+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2426,
29
+ "total_steps": 48536,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2426,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": false,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "transformer_byte_fp16",
73
+ "token_mixer": "transformer",
74
+ "tokenization": "byte",
75
+ "quantization": "fp16",
76
+ "fp_residual": false,
77
+ "description": "+Byte patches + LocalByteDecoder — adds MegaByte intra-patch autoregression on top of run_02a.",
78
+ "cites": [
79
+ "MegaByte (Yu et al., 2023)"
80
+ ],
81
+ "_current_phase": 1,
82
+ "use_gradient_checkpointing": false
83
+ },
84
+ "step": 10963,
85
+ "stored_training_metrics": {},
86
+ "parameters": 38829569,
87
+ "parameter_bytes": 155318276,
88
+ "format": "fp32",
89
+ "strict_load": true,
90
+ "correctness": {
91
+ "forward_shapes": {
92
+ "status": "FAIL",
93
+ "error": "NaN en logits batch=1 seq=1 head=0\nNaN en logits batch=1 seq=1 head=1\nNaN en logits batch=1 seq=1 head=2\nNaN en logits batch=1 seq=1 head=3\nNaN en logits batch=1 seq=64 head=0\nNaN en logits batch=1 seq=64 head=1\nNaN en logits batch=1 seq=64 head=2\nNaN en logits batch=1 seq=64 head=3\nNaN en logits batch=1 seq=256 head=0\nNaN en logits batch=1 seq=256 head=1\nNaN en logits batch=1 seq=256 head=2\nNaN en logits batch=1 seq=256 head=3\nNaN en logits batch=2 seq=1 head=0\nNaN en logits batch=2 seq=1 head=1\nNaN en logits batch=2 seq=1 head=2\nNaN en logits batch=2 seq=1 head=3\nNaN en logits batch=2 seq=64 head=0\nNaN en logits batch=2 seq=64 head=1\nNaN en logits batch=2 seq=64 head=2\nNaN en logits batch=2 seq=64 head=3\nNaN en logits batch=2 seq=256 head=0\nNaN en logits batch=2 seq=256 head=1\nNaN en logits batch=2 seq=256 head=2\nNaN en logits batch=2 seq=256 head=3"
94
+ },
95
+ "probs": {
96
+ "status": "FAIL",
97
+ "error": "Head 0: suma de probs error=nan"
98
+ },
99
+ "determinism": {
100
+ "status": "FAIL",
101
+ "error": "Head 0: output no deterministico, diff=nan"
102
+ },
103
+ "state_prop": {
104
+ "status": "N/A",
105
+ "time_s": 0.0,
106
+ "result": {
107
+ "skipped": true,
108
+ "reason": "modelo no recurrente (Transformer)"
109
+ }
110
+ },
111
+ "ternary_weights": {
112
+ "status": "N/A",
113
+ "time_s": 0.0,
114
+ "result": {
115
+ "skipped": true,
116
+ "reason": "modelo FP16 (sin BitLinear)"
117
+ }
118
+ },
119
+ "state_size": {
120
+ "status": "N/A",
121
+ "time_s": 0.0,
122
+ "result": {
123
+ "skipped": true,
124
+ "reason": "modelo no recurrente (Transformer)"
125
+ }
126
+ },
127
+ "causality": {
128
+ "status": "ERROR",
129
+ "max_prefix_logit_diff": null,
130
+ "tolerance": 1e-05,
131
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
132
+ }
133
+ },
134
+ "error": "ValueError: nonfinite loss",
135
+ "total_seconds": 10.691299699996307,
136
+ "evaluation_complete": true
137
+ }
evaluation/run_02a_byte_only_heads.json ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_02a_byte_only_heads",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_02a_byte_only_heads/model.pt",
5
+ "sha256": "a97ca68d1d8882da2f288309aee1d10c9b623ef84694d3d4ed0e0988c6cf242a",
6
+ "file_bytes": 154035022,
7
+ "date_utc": "2026-10-06T22:18:58.567523+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 641,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": false,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": false,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "transformer_byte_fp16_no_lbd",
72
+ "token_mixer": "transformer",
73
+ "tokenization": "byte",
74
+ "quantization": "fp16",
75
+ "fp_residual": false,
76
+ "description": "+Byte patches (no LocalByteDecoder) — FP16 Transformer + 4 independent byte heads. Pure tokenization isolation.",
77
+ "cites": [
78
+ "MegaByte (Yu et al., 2023)"
79
+ ],
80
+ "_current_phase": 1,
81
+ "use_gradient_checkpointing": false
82
+ },
83
+ "step": 641,
84
+ "stored_training_metrics": {
85
+ "run_name": "transformer_byte_fp16_no_lbd",
86
+ "perplexity": 10.0529589775004,
87
+ "tokens_per_sec_cpu": 57.56486049706294,
88
+ "ram_mb": 154.003472,
89
+ "val_loss": 2.307867016792297,
90
+ "n_params_M": 38.500868
91
+ },
92
+ "parameters": 38500868,
93
+ "parameter_bytes": 154003472,
94
+ "format": "fp32",
95
+ "strict_load": true,
96
+ "correctness": {
97
+ "forward_shapes": {
98
+ "status": "PASS",
99
+ "time_s": 1.03,
100
+ "result": {
101
+ "configs_tested": 6,
102
+ "heads": 4
103
+ }
104
+ },
105
+ "probs": {
106
+ "status": "PASS",
107
+ "time_s": 0.14,
108
+ "result": {
109
+ "max_error": 2.384185791015625e-07
110
+ }
111
+ },
112
+ "determinism": {
113
+ "status": "PASS",
114
+ "time_s": 0.15,
115
+ "result": {
116
+ "deterministic": true
117
+ }
118
+ },
119
+ "state_prop": {
120
+ "status": "N/A",
121
+ "time_s": 0.0,
122
+ "result": {
123
+ "skipped": true,
124
+ "reason": "modelo no recurrente (Transformer)"
125
+ }
126
+ },
127
+ "ternary_weights": {
128
+ "status": "N/A",
129
+ "time_s": 0.0,
130
+ "result": {
131
+ "skipped": true,
132
+ "reason": "modelo FP16 (sin BitLinear)"
133
+ }
134
+ },
135
+ "state_size": {
136
+ "status": "N/A",
137
+ "time_s": 0.0,
138
+ "result": {
139
+ "skipped": true,
140
+ "reason": "modelo no recurrente (Transformer)"
141
+ }
142
+ },
143
+ "causality": {
144
+ "status": "PASS",
145
+ "max_prefix_logit_diff": 0.0,
146
+ "tolerance": 1e-05,
147
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
148
+ }
149
+ },
150
+ "loss": {
151
+ "mean_nll": 2.475537531077862,
152
+ "targets": 8192,
153
+ "unit": "byte",
154
+ "perplexity": 11.888095616786552,
155
+ "bits_per_byte": 3.5714457196205394,
156
+ "mapped_ids_fraction": null,
157
+ "source": "shared_wikitext_test_sample",
158
+ "teacher_forcing": true,
159
+ "delete_gate": "disabled (phase 1, elimination 0)"
160
+ },
161
+ "benchmark": {
162
+ "forward_steps_per_second": 67.85234569602521,
163
+ "p50_ms": 14.244200003304286,
164
+ "p95_ms": 18.560699994850438,
165
+ "jitter_cv": 0.15295383723239742,
166
+ "warmup_steps": 10,
167
+ "measured_steps": 100,
168
+ "context_steps": 1,
169
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
170
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
171
+ },
172
+ "generation": [
173
+ {
174
+ "prompt": "The history of artificial intelligence",
175
+ "seed": 42,
176
+ "hex": "692067e280a673776f736d6f6e696177616f9968656e652c20776873206577696c652c726961726f692072207372656861757274796573206f6f636c65202020336520206161612069726c6f676d200a456e652074682073656f7373206d7265736e6e74206669656c646520737565206f68206d616e7920726961676573616e",
177
+ "text_replacement_decode": "i g…swosmoniawao�hene, whs ewile,riaroi r srehaurtyes oocle 3e aaa irlogm \nEne th seoss mresnnt fielde sue oh many riagesan",
178
+ "bytes": 128,
179
+ "utf8_valid": false,
180
+ "ascii_printable_fraction": 0.96875,
181
+ "repeated_8byte_fraction": 0.0,
182
+ "seconds": 1.4066953000001376,
183
+ "generated_bytes_per_second": 90.99340845170057
184
+ },
185
+ {
186
+ "prompt": "Once upon a time",
187
+ "seed": 43,
188
+ "hex": "20206661766d7279206866640a7474696c206574686e206d692070206868667320656e64696f7374616e2020696520646f6520676569727374616e20706f72206161752061662020626174616e65737420742c2053616430312049206d656f20706920746870202e0a4961303a6b202e2c2e7c772f6c732073617220736e6568",
189
+ "text_replacement_decode": " favmry hfd\nttil ethn mi p hhfs endiostan ie doe geirstan por aau af batanest t, Sad01 I meo pi thp .\nIa0:k .,.|w/ls sar sneh",
190
+ "bytes": 128,
191
+ "utf8_valid": true,
192
+ "ascii_printable_fraction": 1.0,
193
+ "repeated_8byte_fraction": 0.0,
194
+ "seconds": 1.1733098999975482,
195
+ "generated_bytes_per_second": 109.09308785365867
196
+ },
197
+ {
198
+ "prompt": "The purpose of science is",
199
+ "seed": 44,
200
+ "hex": "656e207369696c696179206861646520662073616c6c2020676565722069686820682074656965676f74656e74206174206320646966746e6573732063687320706e6d636b202073616973206569746c656e746e657472646163730a536f65732020656f6e6720726f6761696e207420772069206d6f76726f206f7220736869",
201
+ "text_replacement_decode": "en siiliay hade f sall geer ihh h teiegotent at c diftness chs pnmck sais eitlentnetrdacs\nSoes eong rogain t w i movro or shi",
202
+ "bytes": 128,
203
+ "utf8_valid": true,
204
+ "ascii_printable_fraction": 1.0,
205
+ "repeated_8byte_fraction": 0.0,
206
+ "seconds": 1.2938432000009925,
207
+ "generated_bytes_per_second": 98.93007127904046
208
+ }
209
+ ],
210
+ "process_rss_bytes": 930578432,
211
+ "total_seconds": 15.841506400000071,
212
+ "evaluation_complete": true
213
+ }
evaluation/run_02a_byte_only_heads_v3.json ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_02a_byte_only_heads_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_02a_byte_only_heads_v3/model.pt",
5
+ "sha256": "77e31f9ff202162d745b020eb9cfe8d5a748dd614ba114f712acca2c1507d5e3",
6
+ "file_bytes": 154034894,
7
+ "date_utc": "2026-10-06T22:19:16.150975+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2406,
29
+ "total_steps": 48126,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": false,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2406,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": false,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "transformer_byte_fp16_no_lbd",
73
+ "token_mixer": "transformer",
74
+ "tokenization": "byte",
75
+ "quantization": "fp16",
76
+ "fp_residual": false,
77
+ "description": "+Byte patches (no LocalByteDecoder) — FP16 Transformer + 4 independent byte heads. Pure tokenization isolation.",
78
+ "cites": [
79
+ "MegaByte (Yu et al., 2023)"
80
+ ],
81
+ "_current_phase": 1,
82
+ "use_gradient_checkpointing": false
83
+ },
84
+ "step": 16327,
85
+ "stored_training_metrics": {},
86
+ "parameters": 38500868,
87
+ "parameter_bytes": 154003472,
88
+ "format": "fp32",
89
+ "strict_load": true,
90
+ "correctness": {
91
+ "forward_shapes": {
92
+ "status": "FAIL",
93
+ "error": "NaN en logits batch=1 seq=1 head=0\nNaN en logits batch=1 seq=1 head=1\nNaN en logits batch=1 seq=1 head=2\nNaN en logits batch=1 seq=1 head=3\nNaN en logits batch=1 seq=64 head=0\nNaN en logits batch=1 seq=64 head=1\nNaN en logits batch=1 seq=64 head=2\nNaN en logits batch=1 seq=64 head=3\nNaN en logits batch=1 seq=256 head=0\nNaN en logits batch=1 seq=256 head=1\nNaN en logits batch=1 seq=256 head=2\nNaN en logits batch=1 seq=256 head=3\nNaN en logits batch=2 seq=1 head=0\nNaN en logits batch=2 seq=1 head=1\nNaN en logits batch=2 seq=1 head=2\nNaN en logits batch=2 seq=1 head=3\nNaN en logits batch=2 seq=64 head=0\nNaN en logits batch=2 seq=64 head=1\nNaN en logits batch=2 seq=64 head=2\nNaN en logits batch=2 seq=64 head=3\nNaN en logits batch=2 seq=256 head=0\nNaN en logits batch=2 seq=256 head=1\nNaN en logits batch=2 seq=256 head=2\nNaN en logits batch=2 seq=256 head=3"
94
+ },
95
+ "probs": {
96
+ "status": "FAIL",
97
+ "error": "Head 0: suma de probs error=nan"
98
+ },
99
+ "determinism": {
100
+ "status": "FAIL",
101
+ "error": "Head 0: output no deterministico, diff=nan"
102
+ },
103
+ "state_prop": {
104
+ "status": "N/A",
105
+ "time_s": 0.0,
106
+ "result": {
107
+ "skipped": true,
108
+ "reason": "modelo no recurrente (Transformer)"
109
+ }
110
+ },
111
+ "ternary_weights": {
112
+ "status": "N/A",
113
+ "time_s": 0.0,
114
+ "result": {
115
+ "skipped": true,
116
+ "reason": "modelo FP16 (sin BitLinear)"
117
+ }
118
+ },
119
+ "state_size": {
120
+ "status": "N/A",
121
+ "time_s": 0.0,
122
+ "result": {
123
+ "skipped": true,
124
+ "reason": "modelo no recurrente (Transformer)"
125
+ }
126
+ },
127
+ "causality": {
128
+ "status": "ERROR",
129
+ "max_prefix_logit_diff": null,
130
+ "tolerance": 1e-05,
131
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
132
+ }
133
+ },
134
+ "error": "ValueError: nonfinite loss",
135
+ "total_seconds": 10.355457599995134,
136
+ "evaluation_complete": true
137
+ }
evaluation/run_03.json ADDED
@@ -0,0 +1,211 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_03",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_03/model.pt",
5
+ "sha256": "9ceb9c3aa2d98d45cf102f1a7f39c596dd4c5fcba698eb581fdf5a890fb72498",
6
+ "file_bytes": 155380898,
7
+ "date_utc": "2026-10-06T22:19:25.886844+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 647,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": false,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "mlgru_byte_fp16",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte",
74
+ "quantization": "fp16",
75
+ "fp_residual": false,
76
+ "description": "MLGRU + byte patches, FP16. Combined mixer+tokenization.",
77
+ "cites": [
78
+ "MatMul-free LM",
79
+ "MegaByte (Yu et al., 2023)"
80
+ ],
81
+ "_current_phase": 1,
82
+ "use_gradient_checkpointing": false
83
+ },
84
+ "step": 647,
85
+ "stored_training_metrics": {
86
+ "run_name": "mlgru_byte_fp16",
87
+ "perplexity": 6.486142795409505,
88
+ "tokens_per_sec_cpu": 43.82163519967315,
89
+ "ram_mb": 155.318276,
90
+ "val_loss": 1.8696680235862733,
91
+ "n_params_M": 38.829569
92
+ },
93
+ "parameters": 38829569,
94
+ "parameter_bytes": 155318276,
95
+ "format": "fp32",
96
+ "strict_load": true,
97
+ "correctness": {
98
+ "forward_shapes": {
99
+ "status": "PASS",
100
+ "time_s": 2.18,
101
+ "result": {
102
+ "configs_tested": 6,
103
+ "heads": 4
104
+ }
105
+ },
106
+ "probs": {
107
+ "status": "PASS",
108
+ "time_s": 0.26,
109
+ "result": {
110
+ "max_error": 4.76837158203125e-07
111
+ }
112
+ },
113
+ "determinism": {
114
+ "status": "PASS",
115
+ "time_s": 0.37,
116
+ "result": {
117
+ "deterministic": true
118
+ }
119
+ },
120
+ "state_prop": {
121
+ "status": "FAIL",
122
+ "error": "State propagation error: 13.313538"
123
+ },
124
+ "ternary_weights": {
125
+ "status": "N/A",
126
+ "time_s": 0.0,
127
+ "result": {
128
+ "skipped": true,
129
+ "reason": "modelo FP16 (sin BitLinear)"
130
+ }
131
+ },
132
+ "state_size": {
133
+ "status": "PASS",
134
+ "time_s": 0.02,
135
+ "result": {
136
+ "state_kb": 24.0,
137
+ "batch_size": 1,
138
+ "dtype": "float32"
139
+ }
140
+ },
141
+ "causality": {
142
+ "status": "PASS",
143
+ "max_prefix_logit_diff": 0.0,
144
+ "tolerance": 1e-05,
145
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
146
+ }
147
+ },
148
+ "loss": {
149
+ "mean_nll": 2.162172853946686,
150
+ "targets": 8192,
151
+ "unit": "byte",
152
+ "perplexity": 8.689999258476988,
153
+ "bits_per_byte": 3.1193560539336205,
154
+ "mapped_ids_fraction": null,
155
+ "source": "shared_wikitext_test_sample",
156
+ "teacher_forcing": true,
157
+ "delete_gate": "disabled (phase 1, elimination 0)"
158
+ },
159
+ "benchmark": {
160
+ "forward_steps_per_second": 52.42490067342912,
161
+ "p50_ms": 17.67774999825633,
162
+ "p95_ms": 30.450500002189074,
163
+ "jitter_cv": 0.2135459848136035,
164
+ "warmup_steps": 10,
165
+ "measured_steps": 100,
166
+ "context_steps": 1,
167
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
168
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
169
+ },
170
+ "generation": [
171
+ {
172
+ "prompt": "The history of artificial intelligence",
173
+ "seed": 42,
174
+ "hex": "617920656e61626f656e2053656e73706973746f74616c206f6e205065726173206f756e206d6167617420696e20776974682072656361726520686f6c617465727920746f206c65737320746f2074686f726b20696e207468652077616e6b656374207769746820746f207465617220746f2062616e6420726f6f6d20492074",
175
+ "text_replacement_decode": "ay enaboen Senspistotal on Peras oun magat in with recare holatery to less to thork in the wankect with to tear to band room I t",
176
+ "bytes": 128,
177
+ "utf8_valid": true,
178
+ "ascii_printable_fraction": 1.0,
179
+ "repeated_8byte_fraction": 0.0,
180
+ "seconds": 0.7251586999991559,
181
+ "generated_bytes_per_second": 176.51308603226988
182
+ },
183
+ {
184
+ "prompt": "Once upon a time",
185
+ "seed": 43,
186
+ "hex": "207465636b696e6e20776963686f706964617479207365742e2050726c792068616d62796573730a61742063656d70657273656e2062656e7320616e206120746f20686f72652061707072616964696f6e206d6174792e20496e207468616b20617265204d7920626f736f756c65206f75722068696768204d696c6c65732072",
187
+ "text_replacement_decode": " teckinn wichopidaty set. Prly hambyess\nat cempersen bens an a to hore appraidion maty. In thak are My bosoule our high Milles r",
188
+ "bytes": 128,
189
+ "utf8_valid": true,
190
+ "ascii_printable_fraction": 1.0,
191
+ "repeated_8byte_fraction": 0.0,
192
+ "seconds": 0.8815219000025536,
193
+ "generated_bytes_per_second": 145.20342602904046
194
+ },
195
+ {
196
+ "prompt": "The purpose of science is",
197
+ "seed": 44,
198
+ "hex": "65616c732e0a4f7320285468495468742d73636b2068616e20736865656420796f75722069732073696e656c6963656e7320696e20736967696c617920496d70686f72636820617265776e616e697465206c6f77656c2c206f6e206576696e672073656420707265736f6e6f6e2c20616e642074686520666972672042696674",
199
+ "text_replacement_decode": "eals.\nOs (ThITht-sck han sheed your is sinelicens in sigilay Imphorch arewnanite lowel, on eving sed presonon, and the firg Bift",
200
+ "bytes": 128,
201
+ "utf8_valid": true,
202
+ "ascii_printable_fraction": 1.0,
203
+ "repeated_8byte_fraction": 0.0,
204
+ "seconds": 0.8720823000039672,
205
+ "generated_bytes_per_second": 146.77513807976348
206
+ }
207
+ ],
208
+ "process_rss_bytes": 931266560,
209
+ "total_seconds": 20.091274799997336,
210
+ "evaluation_complete": true
211
+ }
evaluation/run_03_v3.json ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_03_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_03_v3/model.pt",
5
+ "sha256": "ea871efa66b8a301883e743f045ed8dc4e52949ed35c37809d41d7461626c044",
6
+ "file_bytes": 155380770,
7
+ "date_utc": "2026-10-06T22:19:47.292594+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2426,
29
+ "total_steps": 48536,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2426,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": false,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "mlgru_byte_fp16",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "byte",
75
+ "quantization": "fp16",
76
+ "fp_residual": false,
77
+ "description": "MLGRU + byte patches, FP16. Combined mixer+tokenization.",
78
+ "cites": [
79
+ "MatMul-free LM",
80
+ "MegaByte (Yu et al., 2023)"
81
+ ],
82
+ "_current_phase": 1,
83
+ "use_gradient_checkpointing": false
84
+ },
85
+ "step": 6187,
86
+ "stored_training_metrics": {},
87
+ "parameters": 38829569,
88
+ "parameter_bytes": 155318276,
89
+ "format": "fp32",
90
+ "strict_load": true,
91
+ "correctness": {
92
+ "forward_shapes": {
93
+ "status": "PASS",
94
+ "time_s": 2.15,
95
+ "result": {
96
+ "configs_tested": 6,
97
+ "heads": 4
98
+ }
99
+ },
100
+ "probs": {
101
+ "status": "PASS",
102
+ "time_s": 0.39,
103
+ "result": {
104
+ "max_error": 3.5762786865234375e-07
105
+ }
106
+ },
107
+ "determinism": {
108
+ "status": "PASS",
109
+ "time_s": 0.43,
110
+ "result": {
111
+ "deterministic": true
112
+ }
113
+ },
114
+ "state_prop": {
115
+ "status": "FAIL",
116
+ "error": "State propagation error: 12.495746"
117
+ },
118
+ "ternary_weights": {
119
+ "status": "N/A",
120
+ "time_s": 0.0,
121
+ "result": {
122
+ "skipped": true,
123
+ "reason": "modelo FP16 (sin BitLinear)"
124
+ }
125
+ },
126
+ "state_size": {
127
+ "status": "PASS",
128
+ "time_s": 0.02,
129
+ "result": {
130
+ "state_kb": 24.0,
131
+ "batch_size": 1,
132
+ "dtype": "float32"
133
+ }
134
+ },
135
+ "causality": {
136
+ "status": "PASS",
137
+ "max_prefix_logit_diff": 0.0,
138
+ "tolerance": 1e-05,
139
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
140
+ }
141
+ },
142
+ "loss": {
143
+ "mean_nll": 1.7639982588589191,
144
+ "targets": 8192,
145
+ "unit": "byte",
146
+ "perplexity": 5.83572354471389,
147
+ "bits_per_byte": 2.544911540192529,
148
+ "mapped_ids_fraction": null,
149
+ "source": "shared_wikitext_test_sample",
150
+ "teacher_forcing": true,
151
+ "delete_gate": "disabled (phase 1, elimination 0)"
152
+ },
153
+ "benchmark": {
154
+ "forward_steps_per_second": 51.104495916160985,
155
+ "p50_ms": 18.68119999926421,
156
+ "p95_ms": 27.360000000044238,
157
+ "jitter_cv": 0.17600483784060866,
158
+ "warmup_steps": 10,
159
+ "measured_steps": 100,
160
+ "context_steps": 1,
161
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
162
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
163
+ },
164
+ "generation": [
165
+ {
166
+ "prompt": "The history of artificial intelligence",
167
+ "seed": 42,
168
+ "hex": "657920687269736520746f20676574206275736974652074686520506172746976696576206973206f6e206173207765207765726520666f722075736c207468616e207468617420616e64206d65617374616c20736565206f662073696e63657269747920666f7220617265636f6d657320746f205361746572732c206f6e20",
169
+ "text_replacement_decode": "ey hrise to get busite the Partiviev is on as we were for usl than that and meastal see of sincerity for arecomes to Saters, on ",
170
+ "bytes": 128,
171
+ "utf8_valid": true,
172
+ "ascii_printable_fraction": 1.0,
173
+ "repeated_8byte_fraction": 0.0,
174
+ "seconds": 0.7433824999970966,
175
+ "generated_bytes_per_second": 172.18592043867042
176
+ },
177
+ {
178
+ "prompt": "Once upon a time",
179
+ "seed": 43,
180
+ "hex": "20746f206d656ee280997420776974686f20746f20616e6f65636f6e6e74696e65642066656520737472656520616e64206e6567696e6720697420696e20612074686520746865207072656469616c6f72e28099732077696c6c20626520636f6e6365706974696e6720796f6f6c756774206f6e20796f752063616e20547769",
181
+ "text_replacement_decode": " to men’t witho to anoeconntined fee stree and neging it in a the the predialor’s will be concepiting yoolugt on you can Twi",
182
+ "bytes": 128,
183
+ "utf8_valid": true,
184
+ "ascii_printable_fraction": 0.953125,
185
+ "repeated_8byte_fraction": 0.0,
186
+ "seconds": 0.72248910000053,
187
+ "generated_bytes_per_second": 177.16530256291216
188
+ },
189
+ {
190
+ "prompt": "The purpose of science is",
191
+ "seed": 44,
192
+ "hex": "20646f65636f74696120646f7320696e7374616c6520616e64206174206f757420746869726d20746f676574206f662075732e2049207370617320746865207363686f6f207468696e67746f727365206f6620616e64206368696c6420616e64203135207468652074616b65207768657220796f75206e656564656420776869",
193
+ "text_replacement_decode": " doecotia dos instale and at out thirm toget of us. I spas the schoo thingtorse of and child and 15 the take wher you needed whi",
194
+ "bytes": 128,
195
+ "utf8_valid": true,
196
+ "ascii_printable_fraction": 1.0,
197
+ "repeated_8byte_fraction": 0.0,
198
+ "seconds": 0.7538083999970695,
199
+ "generated_bytes_per_second": 169.80442245071507
200
+ }
201
+ ],
202
+ "process_rss_bytes": 931282944,
203
+ "total_seconds": 20.56015290000505,
204
+ "evaluation_complete": true
205
+ }
evaluation/run_04.json ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_04",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_04/model.pt",
5
+ "sha256": "3af6570f55ecdf604adacce6f67a319aaa7823b7177a4023143401d7fe145f5e",
6
+ "file_bytes": 155486694,
7
+ "date_utc": "2026-10-06T22:20:07.298326+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 647,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "mlgru_byte_ternary",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte",
74
+ "quantization": "ternary",
75
+ "fp_residual": false,
76
+ "description": "+Ternary — 1.58-bit weights on MLGRU+byte. Isolates quantization cost.",
77
+ "cites": [
78
+ "BitNet b1.58 (Wang et al., 2024)",
79
+ "MatMul-free LM"
80
+ ],
81
+ "_current_phase": 1,
82
+ "use_gradient_checkpointing": false
83
+ },
84
+ "step": 647,
85
+ "stored_training_metrics": {
86
+ "run_name": "mlgru_byte_ternary",
87
+ "perplexity": 261.68325047713523,
88
+ "tokens_per_sec_cpu": 9.599159648710128,
89
+ "ram_mb": 155.41658,
90
+ "val_loss": 5.567134804725647,
91
+ "n_params_M": 38.854145
92
+ },
93
+ "parameters": 38854145,
94
+ "parameter_bytes": 155416580,
95
+ "format": "fp32",
96
+ "strict_load": true,
97
+ "correctness": {
98
+ "forward_shapes": {
99
+ "status": "PASS",
100
+ "time_s": 2.82,
101
+ "result": {
102
+ "configs_tested": 6,
103
+ "heads": 4
104
+ }
105
+ },
106
+ "probs": {
107
+ "status": "PASS",
108
+ "time_s": 0.37,
109
+ "result": {
110
+ "max_error": 2.384185791015625e-07
111
+ }
112
+ },
113
+ "determinism": {
114
+ "status": "PASS",
115
+ "time_s": 0.51,
116
+ "result": {
117
+ "deterministic": true
118
+ }
119
+ },
120
+ "state_prop": {
121
+ "status": "FAIL",
122
+ "error": "State propagation error: 0.141195"
123
+ },
124
+ "ternary_weights": {
125
+ "status": "PASS",
126
+ "time_s": 1.26,
127
+ "result": {
128
+ "modules_checked": 101
129
+ }
130
+ },
131
+ "state_size": {
132
+ "status": "PASS",
133
+ "time_s": 0.15,
134
+ "result": {
135
+ "state_kb": 24.0,
136
+ "batch_size": 1,
137
+ "dtype": "float32"
138
+ }
139
+ },
140
+ "causality": {
141
+ "status": "PASS",
142
+ "max_prefix_logit_diff": 0.0,
143
+ "tolerance": 1e-05,
144
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
145
+ }
146
+ },
147
+ "loss": {
148
+ "mean_nll": 5.555148288607597,
149
+ "targets": 8192,
150
+ "unit": "byte",
151
+ "perplexity": 258.5653039667502,
152
+ "bits_per_byte": 8.014384887376993,
153
+ "mapped_ids_fraction": null,
154
+ "source": "shared_wikitext_test_sample",
155
+ "teacher_forcing": true,
156
+ "delete_gate": "disabled (phase 1, elimination 0)"
157
+ },
158
+ "benchmark": {
159
+ "forward_steps_per_second": 6.656295049603412,
160
+ "p50_ms": 146.44150000458467,
161
+ "p95_ms": 189.0248000054271,
162
+ "jitter_cv": 0.13302761547533243,
163
+ "warmup_steps": 10,
164
+ "measured_steps": 100,
165
+ "context_steps": 1,
166
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
167
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
168
+ },
169
+ "generation": [
170
+ {
171
+ "prompt": "The history of artificial intelligence",
172
+ "seed": 42,
173
+ "hex": "4736424badd631a709194afdea3d2f2dc9a22e650ac9ef625f27b8bee45bd25397fac097b875c8a4bc982e68f3e0ef629788820035b32614dac2b7c3d984a24099bc7ddde12f1227d9650b34ea7e1401dd2234fc8662b794970f54f118c471d94077f90a3b3b02bde18166cf5b05ac2fa9cd5fe8aff017b8edf5094b8de6cba1",
174
+ "text_replacement_decode": "G6BK��1�\t\u0019J��=/-ɢ.e\n��b_'���[�S�����uȤ��.h���b���\u00005�&\u0014�·�ل�@��}��/\u0012'�e\u000b4�~\u0014\u0001�\"4��b���\u000fT�\u0018�q�@w�\n;;\u0002��f�[\u0005�/��_��\u0017���\tK��ˡ",
175
+ "bytes": 128,
176
+ "utf8_valid": false,
177
+ "ascii_printable_fraction": 0.3671875,
178
+ "repeated_8byte_fraction": 0.0,
179
+ "seconds": 5.925267499995243,
180
+ "generated_bytes_per_second": 21.60240022920531
181
+ },
182
+ {
183
+ "prompt": "Once upon a time",
184
+ "seed": 43,
185
+ "hex": "e5c0d673bcd580f7f3a89930789febb0c85b0558d9c5b1f3e4809fde5ffa358e614f204ba91d39c4f3aaf256edd6134ba9efc2357c30dda535368cba38ebb07d168da9f93b0d8856c8a441658dfddc0325ab734faf8f0d8cc0afa03aaf50e46ee1f48049bb42027eaf5e6b93854ce82911556383a9ee46ee119ee6cb5faaa453",
186
+ "text_replacement_decode": "���s�Հ��0x���[\u0005X�ű�䀟�_�5�aO K�\u001d9���V��\u0013K���5|0ݥ56��8�}\u0016���;\r�VȤAe���\u0003%�sO��\r����:�P�n��I�B\u0002~�^k��L�)\u0011Uc���F�\u0011���_��S",
187
+ "bytes": 128,
188
+ "utf8_valid": false,
189
+ "ascii_printable_fraction": 0.3515625,
190
+ "repeated_8byte_fraction": 0.0,
191
+ "seconds": 5.368090399999346,
192
+ "generated_bytes_per_second": 23.84460589561152
193
+ },
194
+ {
195
+ "prompt": "The purpose of science is",
196
+ "seed": 44,
197
+ "hex": "854c9f2aed57460fc8eb70e20a8e93b222ec382cf13fb47ac95fd2aec9ce68140a0f2287e4d86fa45b261a1d88c8141be50300d9a963bb53c83909db0aa1f3c5110481226f81416fd96ab9e7d1acbf08bc93c97600e4207dbc37144a5b8d7ed618dd2ff316c61a46bad02047d9082d79ba8dcbe49e6e0b9d0aa7389e40fbcd08",
198
+ "text_replacement_decode": "�L�*�WF\u000f��p�\n���\"�8,�?�z�_Ү��h\u0014\n\u000f\"���o�[&\u001a\u001d��\u0014\u001b�\u0003\u0000٩c�S�9\t�\n���\u0011\u0004�\"o�Ao�j��Ѭ�\b���v\u0000� }�7\u0014J[�~�\u0018�/�\u0016�\u001aF�� G�\b-y����n\u000b�\n�8�@��\b",
199
+ "bytes": 128,
200
+ "utf8_valid": false,
201
+ "ascii_printable_fraction": 0.3515625,
202
+ "repeated_8byte_fraction": 0.0,
203
+ "seconds": 5.911002499997267,
204
+ "generated_bytes_per_second": 21.654533220051793
205
+ }
206
+ ],
207
+ "process_rss_bytes": 1028198400,
208
+ "total_seconds": 56.63475399999879,
209
+ "evaluation_complete": true
210
+ }
evaluation/run_04_r2.json ADDED
@@ -0,0 +1,199 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_04_r2",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_04_r2/model.pt",
5
+ "sha256": "6e8f1fff076f0482c4970f01c7aa944315d06bae748dad9552345ea36285bf26",
6
+ "file_bytes": 155486438,
7
+ "date_utc": "2026-10-06T22:21:08.061029+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 242,
29
+ "total_steps": 4856,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 242,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 15,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "mlgru_byte_ternary_15t",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": false,
76
+ "description": "run_04 at 15 tok/param — ternary baseline with real budget.",
77
+ "_current_phase": 1,
78
+ "use_gradient_checkpointing": false
79
+ },
80
+ "step": 4840,
81
+ "stored_training_metrics": {},
82
+ "parameters": 38854145,
83
+ "parameter_bytes": 155416580,
84
+ "format": "fp32",
85
+ "strict_load": true,
86
+ "correctness": {
87
+ "forward_shapes": {
88
+ "status": "PASS",
89
+ "time_s": 2.72,
90
+ "result": {
91
+ "configs_tested": 6,
92
+ "heads": 4
93
+ }
94
+ },
95
+ "probs": {
96
+ "status": "PASS",
97
+ "time_s": 0.43,
98
+ "result": {
99
+ "max_error": 2.384185791015625e-07
100
+ }
101
+ },
102
+ "determinism": {
103
+ "status": "PASS",
104
+ "time_s": 0.55,
105
+ "result": {
106
+ "deterministic": true
107
+ }
108
+ },
109
+ "state_prop": {
110
+ "status": "FAIL",
111
+ "error": "State propagation error: 0.291452"
112
+ },
113
+ "ternary_weights": {
114
+ "status": "PASS",
115
+ "time_s": 1.84,
116
+ "result": {
117
+ "modules_checked": 101
118
+ }
119
+ },
120
+ "state_size": {
121
+ "status": "PASS",
122
+ "time_s": 0.15,
123
+ "result": {
124
+ "state_kb": 24.0,
125
+ "batch_size": 1,
126
+ "dtype": "float32"
127
+ }
128
+ },
129
+ "causality": {
130
+ "status": "PASS",
131
+ "max_prefix_logit_diff": 0.0,
132
+ "tolerance": 1e-05,
133
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
134
+ }
135
+ },
136
+ "loss": {
137
+ "mean_nll": 5.5675940066576,
138
+ "targets": 8192,
139
+ "unit": "byte",
140
+ "perplexity": 261.8034435256421,
141
+ "bits_per_byte": 8.032340263088035,
142
+ "mapped_ids_fraction": null,
143
+ "source": "shared_wikitext_test_sample",
144
+ "teacher_forcing": true,
145
+ "delete_gate": "disabled (phase 1, elimination 0)"
146
+ },
147
+ "benchmark": {
148
+ "forward_steps_per_second": 5.920739077796324,
149
+ "p50_ms": 164.11609999704524,
150
+ "p95_ms": 231.56849999941187,
151
+ "jitter_cv": 0.2246321343563939,
152
+ "warmup_steps": 10,
153
+ "measured_steps": 100,
154
+ "context_steps": 1,
155
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
156
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
157
+ },
158
+ "generation": [
159
+ {
160
+ "prompt": "The history of artificial intelligence",
161
+ "seed": 42,
162
+ "hex": "c042036abab591ec12314c30edd6a8ffbab9e71f97229c4c36e115b1e45bcb78a2487f09c672c0dadaf5c36fdd900f386fbe18ba969bdd650acec530ea85f821443f5a2699584bda0a04a2e0420279d5124b6478d30afaaec91c9e80117ba347e307bf393b585570a696e2a4d32383335f79027e2243f9e016ab136685aef24b",
163
+ "text_replacement_decode": "�B\u0003j����\u00121L0�֨����\u001f�\"�L6�\u0015��[�x�H\t�r�����oݐ\u000f8o�\u0018����e\n��0��!D?Z&�XK�\n\u0004��B\u0002y�\u0012Kdx�\n���\u001c��\u0011{�G�\u0007�9;XUp����#�3_y\u0002~\"C��\u0016�\u0013f���K",
164
+ "bytes": 128,
165
+ "utf8_valid": false,
166
+ "ascii_printable_fraction": 0.3828125,
167
+ "repeated_8byte_fraction": 0.0,
168
+ "seconds": 5.860566700001073,
169
+ "generated_bytes_per_second": 21.840891257150368
170
+ },
171
+ {
172
+ "prompt": "Once upon a time",
173
+ "seed": 43,
174
+ "hex": "85ccba30863eb5cbc94e1d74dafe19f1ea8d89205751c391e426a302966b1b0535c37aed0920de26e5f6e0cfa85ab236c8f53f7bafd02d6aa9ef3ed6218c1ee399803b023b03f3f922a361372291497f447431919756c8a4ed04dd22ea85ac6e866190fe12341e66cf7d6c4b4257cbf642b8741b368eb3efa672192c1121046b",
175
+ "text_replacement_decode": "�̺0�>���N\u001dt��\u0019�ꍉ WQÑ�&�\u0002�k\u001b\u00055�z�\t �&���ϨZ�6��?{��-j��>�!�\u001e㙀;\u0002;\u0003��\"�a7\"�IDt1��VȤ�\u0004�\"ꅬn�a��\u00124\u001ef�}lKBW��B�t\u001b6���r\u0019,\u0011!\u0004k",
176
+ "bytes": 128,
177
+ "utf8_valid": false,
178
+ "ascii_printable_fraction": 0.390625,
179
+ "repeated_8byte_fraction": 0.0,
180
+ "seconds": 6.235910199997306,
181
+ "generated_bytes_per_second": 20.52627377476592
182
+ },
183
+ {
184
+ "prompt": "The purpose of science is",
185
+ "seed": 44,
186
+ "hex": "cc845e8b09e41a83eac4e195c99a0d7d0a3ee6b32250857b129b755de2896b87b6b4b25ceae593eb6f213d4cbbc022d8424b7046e46e0132dac21b526ad29b635f13f3dae1c3b106ea9566b4c88116b4f193ec09e322d81d5b14dd9c85cf8d01ba11daa9d9c53b7d220847e0c0f904b761df2e8bc8c53992c8f56833a654f134",
187
+ "text_replacement_decode": "̄^�\t�\u001a����ɚ\r}\n>�\"P�{\u0012�u]�k����\\���o!=L��\"�BKpF�n\u00012��\u001bRjқc_\u0013���ñ\u0006�f�ȁ\u0016���\t�\"�\u001d[\u0014ݜ�ύ\u0001�\u0011ک��;}\"\bG���\u0004�a�.���9���h3�T�4",
188
+ "bytes": 128,
189
+ "utf8_valid": false,
190
+ "ascii_printable_fraction": 0.3359375,
191
+ "repeated_8byte_fraction": 0.0,
192
+ "seconds": 8.548860800001421,
193
+ "generated_bytes_per_second": 14.972755200316131
194
+ }
195
+ ],
196
+ "process_rss_bytes": 1028222976,
197
+ "total_seconds": 71.73146789999737,
198
+ "evaluation_complete": true
199
+ }
evaluation/run_04_v3.json ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_04_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_04_v3/model.pt",
5
+ "sha256": "32c79b76fa76eca39c8d733c08c6e8acd16d23fefe9dd6f0684a53a018042c09",
6
+ "file_bytes": 155486566,
7
+ "date_utc": "2026-10-06T22:22:17.374657+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2428,
29
+ "total_steps": 48567,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2428,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "mlgru_byte_ternary",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "byte",
75
+ "quantization": "ternary",
76
+ "fp_residual": false,
77
+ "description": "+Ternary — 1.58-bit weights on MLGRU+byte. Isolates quantization cost.",
78
+ "cites": [
79
+ "BitNet b1.58 (Wang et al., 2024)",
80
+ "MatMul-free LM"
81
+ ],
82
+ "_current_phase": 1,
83
+ "use_gradient_checkpointing": false
84
+ },
85
+ "step": 6074,
86
+ "stored_training_metrics": {},
87
+ "parameters": 38854145,
88
+ "parameter_bytes": 155416580,
89
+ "format": "fp32",
90
+ "strict_load": true,
91
+ "correctness": {
92
+ "forward_shapes": {
93
+ "status": "PASS",
94
+ "time_s": 3.34,
95
+ "result": {
96
+ "configs_tested": 6,
97
+ "heads": 4
98
+ }
99
+ },
100
+ "probs": {
101
+ "status": "PASS",
102
+ "time_s": 0.4,
103
+ "result": {
104
+ "max_error": 3.5762786865234375e-07
105
+ }
106
+ },
107
+ "determinism": {
108
+ "status": "PASS",
109
+ "time_s": 0.49,
110
+ "result": {
111
+ "deterministic": true
112
+ }
113
+ },
114
+ "state_prop": {
115
+ "status": "FAIL",
116
+ "error": "State propagation error: 10.246908"
117
+ },
118
+ "ternary_weights": {
119
+ "status": "PASS",
120
+ "time_s": 1.29,
121
+ "result": {
122
+ "modules_checked": 101
123
+ }
124
+ },
125
+ "state_size": {
126
+ "status": "PASS",
127
+ "time_s": 0.13,
128
+ "result": {
129
+ "state_kb": 24.0,
130
+ "batch_size": 1,
131
+ "dtype": "float32"
132
+ }
133
+ },
134
+ "causality": {
135
+ "status": "PASS",
136
+ "max_prefix_logit_diff": 0.0,
137
+ "tolerance": 1e-05,
138
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
139
+ }
140
+ },
141
+ "loss": {
142
+ "mean_nll": 1.5515229441225529,
143
+ "targets": 8192,
144
+ "unit": "byte",
145
+ "perplexity": 4.718650954983557,
146
+ "bits_per_byte": 2.2383744573110516,
147
+ "mapped_ids_fraction": null,
148
+ "source": "shared_wikitext_test_sample",
149
+ "teacher_forcing": true,
150
+ "delete_gate": "disabled (phase 1, elimination 0)"
151
+ },
152
+ "benchmark": {
153
+ "forward_steps_per_second": 3.488347581294391,
154
+ "p50_ms": 294.80395000064163,
155
+ "p95_ms": 378.6608000009437,
156
+ "jitter_cv": 0.22090130644138287,
157
+ "warmup_steps": 10,
158
+ "measured_steps": 100,
159
+ "context_steps": 1,
160
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
161
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
162
+ },
163
+ "generation": [
164
+ {
165
+ "prompt": "The history of artificial intelligence",
166
+ "seed": 42,
167
+ "hex": "617469746520776869746520776174657266616c706572206469616e6769657473206f70657370756369636120636f6e74696e7565732061706f6c696f6d696e20666f72206e6174696e616c20656e766963616c206772617061626c65207468612072757374206f6620707269612061207472656174696e67207061706f7261",
168
+ "text_replacement_decode": "atite white waterfalper diangiets opespucica continues apoliomin for natinal envical grapable tha rust of pria a treating papora",
169
+ "bytes": 128,
170
+ "utf8_valid": true,
171
+ "ascii_printable_fraction": 1.0,
172
+ "repeated_8byte_fraction": 0.0,
173
+ "seconds": 4.9410941999958595,
174
+ "generated_bytes_per_second": 25.90519322625083
175
+ },
176
+ {
177
+ "prompt": "Once upon a time",
178
+ "seed": 43,
179
+ "hex": "206f6620626561742e0a4f746865722066656465726174696f6e7320706179696e67206f7665726c6f6f6b656420616e2061707065616c7320646574657272696e6720746865205075626c696320506c616e6e696e67204c6177732052657669657720696e20746865204d61796f7220417374696e65204c6561726e696e6720",
180
+ "text_replacement_decode": " of beat.\nOther federations paying overlooked an appeals deterring the Public Planning Laws Review in the Mayor Astine Learning ",
181
+ "bytes": 128,
182
+ "utf8_valid": true,
183
+ "ascii_printable_fraction": 1.0,
184
+ "repeated_8byte_fraction": 0.0,
185
+ "seconds": 5.195572600001469,
186
+ "generated_bytes_per_second": 24.63636058130798
187
+ },
188
+ {
189
+ "prompt": "The purpose of science is",
190
+ "seed": 44,
191
+ "hex": "732e0a2d696e6369746f6b6120636f6d6920636c616b6520617373617265737461746920746572206d6f646f6c69666f73206d6172612074696320427269656e6165782d5361746170686f7320656d706174652072756964612070617274696d6f7269632066696369206369746f6d6167696e2073616820756e6368616c6f20",
192
+ "text_replacement_decode": "s.\n-incitoka comi clake assarestati ter modolifos mara tic Brienaex-Sataphos empate ruida partimoric fici citomagin sah unchalo ",
193
+ "bytes": 128,
194
+ "utf8_valid": true,
195
+ "ascii_printable_fraction": 1.0,
196
+ "repeated_8byte_fraction": 0.0,
197
+ "seconds": 5.887388100003591,
198
+ "generated_bytes_per_second": 21.74138987030971
199
+ }
200
+ ],
201
+ "process_rss_bytes": 1028407296,
202
+ "total_seconds": 74.45456939999713,
203
+ "evaluation_complete": true
204
+ }
evaluation/run_05.json ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_05",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_05/model.pt",
5
+ "sha256": "38009430f02aa997948340acb7e9ea80956fc777c0fcb61ab878dd7bd346ced2",
6
+ "file_bytes": 156057958,
7
+ "date_utc": "2026-10-06T22:23:31.376238+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 649,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "mlgru_byte_ternary_fpres",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "description": "+FPResidual — low-rank FP16 correction alongside ternary weights. CPU-1 core architecture.",
77
+ "cites": [
78
+ "Slender-Mamba (Yu et al., 2025)",
79
+ "BitNet b1.58"
80
+ ],
81
+ "_current_phase": 1,
82
+ "use_gradient_checkpointing": false
83
+ },
84
+ "step": 649,
85
+ "stored_training_metrics": {
86
+ "run_name": "mlgru_byte_ternary_fpres",
87
+ "perplexity": 257.65401201355445,
88
+ "tokens_per_sec_cpu": 10.266378626809718,
89
+ "ram_mb": 155.975684,
90
+ "val_loss": 5.5516176462173465,
91
+ "n_params_M": 38.993921
92
+ },
93
+ "parameters": 38993921,
94
+ "parameter_bytes": 155975684,
95
+ "format": "fp32",
96
+ "strict_load": true,
97
+ "correctness": {
98
+ "forward_shapes": {
99
+ "status": "PASS",
100
+ "time_s": 4.38,
101
+ "result": {
102
+ "configs_tested": 6,
103
+ "heads": 4
104
+ }
105
+ },
106
+ "probs": {
107
+ "status": "PASS",
108
+ "time_s": 0.59,
109
+ "result": {
110
+ "max_error": 2.384185791015625e-07
111
+ }
112
+ },
113
+ "determinism": {
114
+ "status": "PASS",
115
+ "time_s": 0.69,
116
+ "result": {
117
+ "deterministic": true
118
+ }
119
+ },
120
+ "state_prop": {
121
+ "status": "FAIL",
122
+ "error": "State propagation error: 0.104971"
123
+ },
124
+ "ternary_weights": {
125
+ "status": "PASS",
126
+ "time_s": 2.27,
127
+ "result": {
128
+ "modules_checked": 101
129
+ }
130
+ },
131
+ "state_size": {
132
+ "status": "PASS",
133
+ "time_s": 0.19,
134
+ "result": {
135
+ "state_kb": 24.0,
136
+ "batch_size": 1,
137
+ "dtype": "float32"
138
+ }
139
+ },
140
+ "causality": {
141
+ "status": "PASS",
142
+ "max_prefix_logit_diff": 0.0,
143
+ "tolerance": 1e-05,
144
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
145
+ }
146
+ },
147
+ "loss": {
148
+ "mean_nll": 5.548507809638977,
149
+ "targets": 8192,
150
+ "unit": "byte",
151
+ "perplexity": 256.8539947486606,
152
+ "bits_per_byte": 8.004804701299838,
153
+ "mapped_ids_fraction": null,
154
+ "source": "shared_wikitext_test_sample",
155
+ "teacher_forcing": true,
156
+ "delete_gate": "disabled (phase 1, elimination 0)"
157
+ },
158
+ "benchmark": {
159
+ "forward_steps_per_second": 6.105868456405801,
160
+ "p50_ms": 156.2332499997865,
161
+ "p95_ms": 224.46140000101877,
162
+ "jitter_cv": 0.2136362302695608,
163
+ "warmup_steps": 10,
164
+ "measured_steps": 100,
165
+ "context_steps": 1,
166
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
167
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
168
+ },
169
+ "generation": [
170
+ {
171
+ "prompt": "The history of artificial intelligence",
172
+ "seed": 42,
173
+ "hex": "6da833d3949e36eb06bcd0819d6d73cb865d1a486876770f94f7824275c3d6d48dcb65c70d84ea7760d0e66873ef3279688a98ceb54d5756bf99025ab54c68004670bb7289654b3519a127c64e9c6e8adc65d8febbf259b004ffa7378ae9af891142772576c258ebe174aad6e126546075620af8d7298ff1d0a2599468ced3a4",
174
+ "text_replacement_decode": "m�3Ӕ�6�\u0006�Ё�msˆ]\u001aHhvw\u000f���Bu��ԍ�e�\r��w`��hs�2yh��εMWV��\u0002Z�Lh\u0000Fp�r�eK5\u0019�'�N�n��e����Y�\u0004��7�鯉\u0011Bw%v�X��t���&T`ub\n��)��ТY�h�Ӥ",
175
+ "bytes": 128,
176
+ "utf8_valid": false,
177
+ "ascii_printable_fraction": 0.421875,
178
+ "repeated_8byte_fraction": 0.0,
179
+ "seconds": 6.52301720000105,
180
+ "generated_bytes_per_second": 19.622821169317078
181
+ },
182
+ {
183
+ "prompt": "Once upon a time",
184
+ "seed": 43,
185
+ "hex": "076a7083eeeaabcdb112ca83d0e614169d144f3689a46ad375ec81f52836ab9568196f914e1be2132d8f2039b73be72716c7ce07118c5970b551b4c789ad9dd18db7cfb976a59d8e6007e018d0ca034de7c5593f19b6aae68a3a6473190a1e67c7a5d91dd7bc24720dda77119d54b31ddc66411fb5ee111a5b9d99c81925e4bb",
186
+ "text_replacement_decode": "\u0007jp���ͱ\u0012ʃ��\u0014\u0016�\u0014O6��j�u��(6��h\u0019o�N\u001b�\u0013-� 9�;�'\u0016��\u0007\u0011�Yp�Q�lj��э�Ϲv���`\u0007�\u0018��\u0003M��Y?\u0019���:ds\u0019\n\u001egǥ�\u001d׼$r\r�w\u0011�T�\u001d�fA\u001f��\u0011\u001a[���\u0019%�",
187
+ "bytes": 128,
188
+ "utf8_valid": false,
189
+ "ascii_printable_fraction": 0.296875,
190
+ "repeated_8byte_fraction": 0.0,
191
+ "seconds": 7.636591199996474,
192
+ "generated_bytes_per_second": 16.761405272035397
193
+ },
194
+ {
195
+ "prompt": "The purpose of science is",
196
+ "seed": 44,
197
+ "hex": "6d8831f5196a0c78b787ab598d08ed2960bb26f0b504340d11a78d7ddc90ee33686ae4f3b539d85b5b4b3fcaf3d466adc792a65a8353358d75309d7a166171d40d43e51ee2258a329dd163118d148b00afd9d0e0acf9a6cec74432afb30a0b1fe1cb21d911d1377ab189d6637f4da85f064e1c736a0a4c9deea268cae11cd252",
198
+ "text_replacement_decode": "m�1�\u0019j\fx���Y�\b�)`�&�\u00044\r\u0011��}ܐ�3hj��9�[[K?���f�ǒ�Z�S5�u0�z\u0016aq�\rC�\u001e�%�2��c\u0011�\u0014�\u0000��������D2��\n\u000b\u001f��!�\u0011�7z���cM�_\u0006N\u001csj\nL��h��\u001c�R",
199
+ "bytes": 128,
200
+ "utf8_valid": false,
201
+ "ascii_printable_fraction": 0.3828125,
202
+ "repeated_8byte_fraction": 0.0,
203
+ "seconds": 7.942104800000379,
204
+ "generated_bytes_per_second": 16.11663447200972
205
+ }
206
+ ],
207
+ "process_rss_bytes": 1044160512,
208
+ "total_seconds": 74.16187000000355,
209
+ "evaluation_complete": true
210
+ }
evaluation/run_05_v3.json ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_05_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_05_v3/model.pt",
5
+ "sha256": "bca43e31e0822c8ae008d5b930113b5cb9346a4623e896093375c4c0b5113296",
6
+ "file_bytes": 156057830,
7
+ "date_utc": "2026-10-06T22:24:45.774565+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2437,
29
+ "total_steps": 48742,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2437,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "mlgru_byte_ternary_fpres",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "byte",
75
+ "quantization": "ternary",
76
+ "fp_residual": true,
77
+ "description": "+FPResidual — low-rank FP16 correction alongside ternary weights. CPU-1 core architecture.",
78
+ "cites": [
79
+ "Slender-Mamba (Yu et al., 2025)",
80
+ "BitNet b1.58"
81
+ ],
82
+ "_current_phase": 1,
83
+ "use_gradient_checkpointing": false
84
+ },
85
+ "step": 4390,
86
+ "stored_training_metrics": {},
87
+ "parameters": 38993921,
88
+ "parameter_bytes": 155975684,
89
+ "format": "fp32",
90
+ "strict_load": true,
91
+ "correctness": {
92
+ "forward_shapes": {
93
+ "status": "PASS",
94
+ "time_s": 2.9,
95
+ "result": {
96
+ "configs_tested": 6,
97
+ "heads": 4
98
+ }
99
+ },
100
+ "probs": {
101
+ "status": "PASS",
102
+ "time_s": 0.37,
103
+ "result": {
104
+ "max_error": 2.980232238769531e-07
105
+ }
106
+ },
107
+ "determinism": {
108
+ "status": "PASS",
109
+ "time_s": 0.59,
110
+ "result": {
111
+ "deterministic": true
112
+ }
113
+ },
114
+ "state_prop": {
115
+ "status": "FAIL",
116
+ "error": "State propagation error: 8.532216"
117
+ },
118
+ "ternary_weights": {
119
+ "status": "PASS",
120
+ "time_s": 1.45,
121
+ "result": {
122
+ "modules_checked": 101
123
+ }
124
+ },
125
+ "state_size": {
126
+ "status": "PASS",
127
+ "time_s": 0.18,
128
+ "result": {
129
+ "state_kb": 24.0,
130
+ "batch_size": 1,
131
+ "dtype": "float32"
132
+ }
133
+ },
134
+ "causality": {
135
+ "status": "PASS",
136
+ "max_prefix_logit_diff": 0.0,
137
+ "tolerance": 1e-05,
138
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
139
+ }
140
+ },
141
+ "loss": {
142
+ "mean_nll": 1.592079747468233,
143
+ "targets": 8192,
144
+ "unit": "byte",
145
+ "perplexity": 4.913958100315106,
146
+ "bits_per_byte": 2.2968855563721733,
147
+ "mapped_ids_fraction": null,
148
+ "source": "shared_wikitext_test_sample",
149
+ "teacher_forcing": true,
150
+ "delete_gate": "disabled (phase 1, elimination 0)"
151
+ },
152
+ "benchmark": {
153
+ "forward_steps_per_second": 5.713096737245071,
154
+ "p50_ms": 157.4427499945159,
155
+ "p95_ms": 225.36910000053467,
156
+ "jitter_cv": 0.19663092206191368,
157
+ "warmup_steps": 10,
158
+ "measured_steps": 100,
159
+ "context_steps": 1,
160
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
161
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
162
+ },
163
+ "generation": [
164
+ {
165
+ "prompt": "The history of artificial intelligence",
166
+ "seed": 42,
167
+ "hex": "7320616e6420657863656c6c656e6365732c2072656c6174696e6720746f206d697363686973696e672073656e73696f6e206f6620617373697374616e74206173736573736d656e74206f6620696e766573746d656e74207375626469766973696f6e20616e6420746865206d61726b65742066756e64656420696e20706172",
168
+ "text_replacement_decode": "s and excellences, relating to mischising sension of assistant assessment of investment subdivision and the market funded in par",
169
+ "bytes": 128,
170
+ "utf8_valid": true,
171
+ "ascii_printable_fraction": 1.0,
172
+ "repeated_8byte_fraction": 0.0,
173
+ "seconds": 6.225892300004489,
174
+ "generated_bytes_per_second": 20.55930199754784
175
+ },
176
+ {
177
+ "prompt": "Once upon a time",
178
+ "seed": 43,
179
+ "hex": "206f6620666f75722074696d6520726964696e6720696e20612077616c6c20616e64207768656e20746865207468726f772061637475616c6c79206d65616e73207468617420746865206d6f7669652077617320776861742074686520707572636520746f207472696564206f66206120706f6c7973696e6720616e6420666f",
180
+ "text_replacement_decode": " of four time riding in a wall and when the throw actually means that the movie was what the purce to tried of a polysing and fo",
181
+ "bytes": 128,
182
+ "utf8_valid": true,
183
+ "ascii_printable_fraction": 1.0,
184
+ "repeated_8byte_fraction": 0.0,
185
+ "seconds": 6.073884400000679,
186
+ "generated_bytes_per_second": 21.073828800558946
187
+ },
188
+ {
189
+ "prompt": "The purpose of science is",
190
+ "seed": 44,
191
+ "hex": "7320666f7220626f7468206265696e67206368616e676520696e746f206d616e7920646174696e672063616d7073206f72206120626f7468616c6c7920627573696e65737320616c6c6965732e0a496e73746561642073616665207468696e677320666f722074686973207468696e672c206973207468617420612064656e61",
192
+ "text_replacement_decode": "s for both being change into many dating camps or a bothally business allies.\nInstead safe things for this thing, is that a dena",
193
+ "bytes": 128,
194
+ "utf8_valid": true,
195
+ "ascii_printable_fraction": 1.0,
196
+ "repeated_8byte_fraction": 0.0,
197
+ "seconds": 6.602519899999606,
198
+ "generated_bytes_per_second": 19.38653755515491
199
+ }
200
+ ],
201
+ "process_rss_bytes": 1044373504,
202
+ "total_seconds": 66.73382870000205,
203
+ "evaluation_complete": true
204
+ }
evaluation/run_05b_kernel_strict.json ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_05b_kernel_strict",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_05b_kernel_strict/model.pt",
5
+ "sha256": "68619093de4f4a914c7ddc50ca4aaf0774b82ec21b98dae892491489b0bddaf0",
6
+ "file_bytes": 143444806,
7
+ "date_utc": "2026-10-06T22:25:52.544691+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 600,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 30,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": false,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "mlgru_kernel_strict",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "mlgru_per_channel_decay": false,
77
+ "state_reset_period": 0,
78
+ "mlgru_parallel_scan": true,
79
+ "description": "Kernel-strict MLGRU — run_05 minus W_o, matching the layout the production C++ kernel can run. Measures the cost of dropping the paper's 4th matrix to fit OMP scheduling.",
80
+ "cites": [
81
+ "MatMul-free LM (Zhu et al., 2024)",
82
+ "BitNet b1.58 (Wang et al., 2024)",
83
+ "Slender-Mamba (Yu et al., 2025)"
84
+ ],
85
+ "_current_phase": 1,
86
+ "use_gradient_checkpointing": false
87
+ },
88
+ "step": 600,
89
+ "stored_training_metrics": {
90
+ "run_name": "mlgru_kernel_strict",
91
+ "perplexity": 268.81922696518103,
92
+ "tokens_per_sec_cpu": 10.896894811984042,
93
+ "ram_mb": 143.368196,
94
+ "val_loss": 5.594039134979248,
95
+ "n_params_M": 35.842049
96
+ },
97
+ "parameters": 35842049,
98
+ "parameter_bytes": 143368196,
99
+ "format": "fp32",
100
+ "strict_load": true,
101
+ "correctness": {
102
+ "forward_shapes": {
103
+ "status": "PASS",
104
+ "time_s": 2.76,
105
+ "result": {
106
+ "configs_tested": 6,
107
+ "heads": 4
108
+ }
109
+ },
110
+ "probs": {
111
+ "status": "PASS",
112
+ "time_s": 0.36,
113
+ "result": {
114
+ "max_error": 2.384185791015625e-07
115
+ }
116
+ },
117
+ "determinism": {
118
+ "status": "PASS",
119
+ "time_s": 0.54,
120
+ "result": {
121
+ "deterministic": true
122
+ }
123
+ },
124
+ "state_prop": {
125
+ "status": "FAIL",
126
+ "error": "State propagation error: 0.150810"
127
+ },
128
+ "ternary_weights": {
129
+ "status": "PASS",
130
+ "time_s": 1.26,
131
+ "result": {
132
+ "modules_checked": 89
133
+ }
134
+ },
135
+ "state_size": {
136
+ "status": "PASS",
137
+ "time_s": 0.14,
138
+ "result": {
139
+ "state_kb": 24.0,
140
+ "batch_size": 1,
141
+ "dtype": "float32"
142
+ }
143
+ },
144
+ "causality": {
145
+ "status": "PASS",
146
+ "max_prefix_logit_diff": 0.0,
147
+ "tolerance": 1e-05,
148
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
149
+ }
150
+ },
151
+ "loss": {
152
+ "mean_nll": 5.578891307115555,
153
+ "targets": 8192,
154
+ "unit": "byte",
155
+ "perplexity": 264.77788563583033,
156
+ "bits_per_byte": 8.048638822434159,
157
+ "mapped_ids_fraction": null,
158
+ "source": "shared_wikitext_test_sample",
159
+ "teacher_forcing": true,
160
+ "delete_gate": "disabled (phase 1, elimination 0)"
161
+ },
162
+ "benchmark": {
163
+ "forward_steps_per_second": 5.413327356450744,
164
+ "p50_ms": 171.4743999982602,
165
+ "p95_ms": 288.25859999778913,
166
+ "jitter_cv": 0.2628137428827391,
167
+ "warmup_steps": 10,
168
+ "measured_steps": 100,
169
+ "context_steps": 1,
170
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
171
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
172
+ },
173
+ "generation": [
174
+ {
175
+ "prompt": "The history of artificial intelligence",
176
+ "seed": 42,
177
+ "hex": "99030bf16c1a84ad6c1057b4889327be48313a5b4c6ea6cf4c50a89a21d9c1edc60e1390edf5527d0a248de2b9970b61ccf956d521c31a1fc6c3944c293d3ed0e03614864c9a956dcb73cad3f9685b93cb5ae9590485dac6c593685f298bfca833b4cbf11db599ac884ec813675bcc8998b75ccbe8dce565292c7056c6ed06e9",
178
+ "text_replacement_decode": "�\u0003\u000b�l\u001a��l\u0010W���'�H1:[Ln��LP��!����\u000e\u0013���R}\n$�⹗\u000ba��V�!�\u001a\u001f�ÔL)=>��6\u0014�L��m�s���h[��Z�Y\u0004���œh_)���3���\u001d����N�\u0013g[̉��\\����e),pV��\u0006�",
179
+ "bytes": 128,
180
+ "utf8_valid": false,
181
+ "ascii_printable_fraction": 0.3515625,
182
+ "repeated_8byte_fraction": 0.0,
183
+ "seconds": 7.325058499998704,
184
+ "generated_bytes_per_second": 17.474263174829613
185
+ },
186
+ {
187
+ "prompt": "Once upon a time",
188
+ "seed": 43,
189
+ "hex": "d2a1fbfcccf139e7e23ad65f9b636f1be192eee6cb74ca730ef6b634ab48dce805dcd050e8dd15d5c5e6f2212142da6be8a01a8a4ca34e875a3187fb05ee9b57b2fc2345a077caa00e9a1999323bd77a36cfe44b9029852329d8e84d3371cd02ed86c93933712966cbaa2af60a74d1ac88c0982721e3264db2142f11cccea60a",
190
+ "text_replacement_decode": "ҡ����9��:�_�co\u001b����t�s\u000e��4�H��\u0005��P��\u0015����!!B�k�\u001a�L�N�Z1��\u0005�W��#E�wʠ\u000e�\u0019�2;�z6��K�)�#)��M3q�\u0002��93q)f˪*�\ntѬ���'!�&M�\u0014/\u0011�Φ\n",
191
+ "bytes": 128,
192
+ "utf8_valid": false,
193
+ "ascii_printable_fraction": 0.3671875,
194
+ "repeated_8byte_fraction": 0.0,
195
+ "seconds": 7.690095500001917,
196
+ "generated_bytes_per_second": 16.644786791005142
197
+ },
198
+ {
199
+ "prompt": "The purpose of science is",
200
+ "seed": 44,
201
+ "hex": "f458c9d3057889c1a0eda499f9ef453221f0caa7ff96fede31825117cc39fa8433eaa26a21d2029729eef5b925a6a7de317adae098c5be72b2c7af5bc695df76e8d073329e77d5f64c161e6eed1273af9e373141b5a83b809b96998be1381db4cbb9a79d4ba0161e33863411e0c405a5eeb76bb2908073948884539aed86eb20",
202
+ "text_replacement_decode": "�X��\u0005x��������E2!�ʧ����1�Q\u0017�9��3�j!�\u0002�)���%���1z���žr�ǯ[ƕ�v��s2�w��L\u0016\u001en�\u0012s��71A��;������8\u001d�˹��K�\u0016\u001e3�4\u0011��\u0005��k���s���S��� ",
203
+ "bytes": 128,
204
+ "utf8_valid": false,
205
+ "ascii_printable_fraction": 0.28125,
206
+ "repeated_8byte_fraction": 0.0,
207
+ "seconds": 5.33010479999939,
208
+ "generated_bytes_per_second": 24.014537200096825
209
+ }
210
+ ],
211
+ "process_rss_bytes": 1073291264,
212
+ "total_seconds": 66.65431920000265,
213
+ "evaluation_complete": true
214
+ }
evaluation/run_05b_kernel_strict_v3.json ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_05b_kernel_strict_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_05b_kernel_strict_v3/model.pt",
5
+ "sha256": "7330a3759f2bcbe03952132b56e11110a2d754c0ccbca896deef7cdaaf729f2f",
6
+ "file_bytes": 143444678,
7
+ "date_utc": "2026-10-06T22:27:00.786106+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2240,
29
+ "total_steps": 44802,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2240,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": false,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "mlgru_kernel_strict",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "byte",
75
+ "quantization": "ternary",
76
+ "fp_residual": true,
77
+ "mlgru_per_channel_decay": false,
78
+ "state_reset_period": 0,
79
+ "mlgru_parallel_scan": true,
80
+ "description": "Kernel-strict MLGRU — run_05 minus W_o, matching the layout the production C++ kernel can run. Measures the cost of dropping the paper's 4th matrix to fit OMP scheduling.",
81
+ "cites": [
82
+ "MatMul-free LM (Zhu et al., 2024)",
83
+ "BitNet b1.58 (Wang et al., 2024)",
84
+ "Slender-Mamba (Yu et al., 2025)"
85
+ ],
86
+ "_current_phase": 1,
87
+ "use_gradient_checkpointing": false
88
+ },
89
+ "step": 2573,
90
+ "stored_training_metrics": {},
91
+ "parameters": 35842049,
92
+ "parameter_bytes": 143368196,
93
+ "format": "fp32",
94
+ "strict_load": true,
95
+ "correctness": {
96
+ "forward_shapes": {
97
+ "status": "PASS",
98
+ "time_s": 2.79,
99
+ "result": {
100
+ "configs_tested": 6,
101
+ "heads": 4
102
+ }
103
+ },
104
+ "probs": {
105
+ "status": "PASS",
106
+ "time_s": 0.36,
107
+ "result": {
108
+ "max_error": 3.5762786865234375e-07
109
+ }
110
+ },
111
+ "determinism": {
112
+ "status": "PASS",
113
+ "time_s": 0.58,
114
+ "result": {
115
+ "deterministic": true
116
+ }
117
+ },
118
+ "state_prop": {
119
+ "status": "FAIL",
120
+ "error": "State propagation error: 7.758214"
121
+ },
122
+ "ternary_weights": {
123
+ "status": "PASS",
124
+ "time_s": 1.16,
125
+ "result": {
126
+ "modules_checked": 89
127
+ }
128
+ },
129
+ "state_size": {
130
+ "status": "PASS",
131
+ "time_s": 0.13,
132
+ "result": {
133
+ "state_kb": 24.0,
134
+ "batch_size": 1,
135
+ "dtype": "float32"
136
+ }
137
+ },
138
+ "causality": {
139
+ "status": "PASS",
140
+ "max_prefix_logit_diff": 0.0,
141
+ "tolerance": 1e-05,
142
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
143
+ }
144
+ },
145
+ "loss": {
146
+ "mean_nll": 1.8551640063524246,
147
+ "targets": 8192,
148
+ "unit": "byte",
149
+ "perplexity": 6.392746615703699,
150
+ "bits_per_byte": 2.6764359120003447,
151
+ "mapped_ids_fraction": null,
152
+ "source": "shared_wikitext_test_sample",
153
+ "teacher_forcing": true,
154
+ "delete_gate": "disabled (phase 1, elimination 0)"
155
+ },
156
+ "benchmark": {
157
+ "forward_steps_per_second": 6.694002204799995,
158
+ "p50_ms": 148.30744999926537,
159
+ "p95_ms": 181.311000000278,
160
+ "jitter_cv": 0.14931564411780338,
161
+ "warmup_steps": 10,
162
+ "measured_steps": 100,
163
+ "context_steps": 1,
164
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
165
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
166
+ },
167
+ "generation": [
168
+ {
169
+ "prompt": "The history of artificial intelligence",
170
+ "seed": 42,
171
+ "hex": "2050617069647261746963206465616c2c20796f752772656520616c6f6e67736f6d6964207370696c6c2073616c6573206973206361736573206c69636520746f20746865697220617474656e6465647320616e64206865616c7468616c696e67206372656174656420696e2043616e20426163636820616e64206f72696769",
172
+ "text_replacement_decode": " Papidratic deal, you'ree alongsomid spill sales is cases lice to their attendeds and healthaling created in Can Bacch and origi",
173
+ "bytes": 128,
174
+ "utf8_valid": true,
175
+ "ascii_printable_fraction": 1.0,
176
+ "repeated_8byte_fraction": 0.0,
177
+ "seconds": 6.290430599998217,
178
+ "generated_bytes_per_second": 20.34836852027845
179
+ },
180
+ {
181
+ "prompt": "Once upon a time",
182
+ "seed": 43,
183
+ "hex": "2e20427275676874206f6620476f757273686d20467261647920776974682061206261726420697320737461676520726573706563742066696c6c6520617420746865207363726576696e696e672c20616e6420447265656e2028496e646572207374726967676c6920636f6c6f727320616e64206d75736963616c2050686f",
184
+ "text_replacement_decode": ". Brught of Gourshm Frady with a bard is stage respect fille at the screvining, and Dreen (Inder striggli colors and musical Pho",
185
+ "bytes": 128,
186
+ "utf8_valid": true,
187
+ "ascii_printable_fraction": 1.0,
188
+ "repeated_8byte_fraction": 0.0,
189
+ "seconds": 7.162682700000005,
190
+ "generated_bytes_per_second": 17.87039931281612
191
+ },
192
+ {
193
+ "prompt": "The purpose of science is",
194
+ "seed": 44,
195
+ "hex": "656d616e616c206761766520476974636f7572656374696f6e2e0a46657374696e6720636c6f737572647320746f206272696e6765642073616e636520426c61737420666f7220736166657420706c6163652e0a5468652053756d6d6c7920416c69746174696f6e732074686520636f6d70616e792068617320746865207261",
196
+ "text_replacement_decode": "emanal gave Gitcourection.\nFesting closurds to bringed sance Blast for safet place.\nThe Summly Alitations the company has the ra",
197
+ "bytes": 128,
198
+ "utf8_valid": true,
199
+ "ascii_printable_fraction": 1.0,
200
+ "repeated_8byte_fraction": 0.0,
201
+ "seconds": 4.904600299996673,
202
+ "generated_bytes_per_second": 26.09794726801424
203
+ }
204
+ ],
205
+ "process_rss_bytes": 1079599104,
206
+ "total_seconds": 60.25293729999976,
207
+ "evaluation_complete": true
208
+ }
evaluation/run_06.json ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_06",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_06/model.pt",
5
+ "sha256": "08359c613616f9a6aad28c3c192d362902e7a6b9f966cad78da3c029315c6e27",
6
+ "file_bytes": 156060430,
7
+ "date_utc": "2026-10-06T22:28:00.191708+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 649,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "mlgru_byte_ternary_fpres_bolmo",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "+Bolmo — boundary-aware patch embedding via cross-attention (BolmoPatchEmbedding). CPU-1 core + integrated boundary signal.",
78
+ "cites": [
79
+ "BLT (Pagnoni et al., 2024)"
80
+ ],
81
+ "_current_phase": 1,
82
+ "use_gradient_checkpointing": false
83
+ },
84
+ "step": 649,
85
+ "stored_training_metrics": {
86
+ "run_name": "mlgru_byte_ternary_fpres_bolmo",
87
+ "perplexity": 258.80840956767634,
88
+ "tokens_per_sec_cpu": 10.330432583297496,
89
+ "ram_mb": 155.976584,
90
+ "val_loss": 5.556088056564331,
91
+ "n_params_M": 38.994146
92
+ },
93
+ "parameters": 38994146,
94
+ "parameter_bytes": 155976584,
95
+ "format": "fp32",
96
+ "strict_load": true,
97
+ "correctness": {
98
+ "forward_shapes": {
99
+ "status": "PASS",
100
+ "time_s": 2.73,
101
+ "result": {
102
+ "configs_tested": 6,
103
+ "heads": 4
104
+ }
105
+ },
106
+ "probs": {
107
+ "status": "PASS",
108
+ "time_s": 0.38,
109
+ "result": {
110
+ "max_error": 2.384185791015625e-07
111
+ }
112
+ },
113
+ "determinism": {
114
+ "status": "PASS",
115
+ "time_s": 0.51,
116
+ "result": {
117
+ "deterministic": true
118
+ }
119
+ },
120
+ "state_prop": {
121
+ "status": "FAIL",
122
+ "error": "State propagation error: 0.114327"
123
+ },
124
+ "ternary_weights": {
125
+ "status": "PASS",
126
+ "time_s": 1.22,
127
+ "result": {
128
+ "modules_checked": 101
129
+ }
130
+ },
131
+ "state_size": {
132
+ "status": "PASS",
133
+ "time_s": 0.13,
134
+ "result": {
135
+ "state_kb": 24.0,
136
+ "batch_size": 1,
137
+ "dtype": "float32"
138
+ }
139
+ },
140
+ "causality": {
141
+ "status": "FAIL",
142
+ "max_prefix_logit_diff": 0.01288464292883873,
143
+ "tolerance": 1e-05,
144
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
145
+ }
146
+ },
147
+ "loss": {
148
+ "mean_nll": 5.5535193383693695,
149
+ "targets": 8192,
150
+ "unit": "byte",
151
+ "perplexity": 258.14445681584857,
152
+ "bits_per_byte": 8.012034808946447,
153
+ "mapped_ids_fraction": null,
154
+ "source": "shared_wikitext_test_sample",
155
+ "teacher_forcing": true,
156
+ "delete_gate": "disabled (phase 1, elimination 0)"
157
+ },
158
+ "benchmark": {
159
+ "forward_steps_per_second": 6.189035026521647,
160
+ "p50_ms": 158.20564999739872,
161
+ "p95_ms": 206.27160000003641,
162
+ "jitter_cv": 0.1523106636870616,
163
+ "warmup_steps": 10,
164
+ "measured_steps": 100,
165
+ "context_steps": 1,
166
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
167
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
168
+ },
169
+ "generation": [
170
+ {
171
+ "prompt": "The history of artificial intelligence",
172
+ "seed": 42,
173
+ "hex": "59ed909851f9a49174700e3f9d57dd6fbe0bdc6090f9febe566cb59809787b44937f266fb0019e17704ec31182b898dbe4d07c6d39d4f8fe90fcbe62547672ce823c3d2d7ef56156025bd2c47abf9775599bce6e4c058056bee58b527d1d9c7543fd76be264f866fc69ff29bda2596b675683a70e04f7e237eaa4aba7413da59",
174
+ "text_replacement_decode": "Y퐘Q���tp\u000e?�W�o�\u000b�`����Vl��\tx{D�&o�\u0001�\u0017pN�\u0011������|m9������bTvr΂<=-~�aV\u0002[��z��uY��nL\u0005�V��R}\u001d�uC�v�&O�oƟ��%��uh:p�O~#~�J�t\u0013�Y",
175
+ "bytes": 128,
176
+ "utf8_valid": false,
177
+ "ascii_printable_fraction": 0.453125,
178
+ "repeated_8byte_fraction": 0.0,
179
+ "seconds": 5.263351899993722,
180
+ "generated_bytes_per_second": 24.319103573552184
181
+ },
182
+ {
183
+ "prompt": "Once upon a time",
184
+ "seed": 43,
185
+ "hex": "08355476e66ef940e45d3fc910569b1d9d0a86ac9d81cadc75ed353b39416b092b2ec2292b2ad01ae4ad9eb63bb6b0115645a12b4a85e1593b408aace4634f168e09328d755de065e89014b38533a3cf2c3e893885a05036915ba304931206a646c43feb59fce152e69f59429038c5d87e2bd03a1039597a394aadc57ee83715",
186
+ "text_replacement_decode": "\b5Tv�n�@�]?�\u0010V�\u001d�\n������u�5;9Ak\t+.�)+*�\u001a䭞�;��\u0011VE�+J��Y;@���cO\u0016�\t2�u]�e�\u0014��3��,>�8��P6�[�\u0004�\u0012\u0006�F�?�Y��R�YB�8��~+�:\u00109Yz9J��~�7\u0015",
187
+ "bytes": 128,
188
+ "utf8_valid": false,
189
+ "ascii_printable_fraction": 0.46875,
190
+ "repeated_8byte_fraction": 0.0,
191
+ "seconds": 5.410929799996666,
192
+ "generated_bytes_per_second": 23.655823440932256
193
+ },
194
+ {
195
+ "prompt": "The purpose of science is",
196
+ "seed": 44,
197
+ "hex": "4cbfc13a086dbb153b5625ab80d6084454add99c858fa5fd43b8a02c7629fcd7beb2e8853b844b9b70e758b16822e2ca8a4dab193bad1f0626004f1e8582d7ab9d8f039290366f6090571d7bc8cf4f8485a0b6d99dbffb4abe16bf46e41766abf59aa47a70ad0c44850242a91d0405116c1317e27a5292f47dfe76d8b0df7fb2",
198
+ "text_replacement_decode": "L��:\bm�\u0015;V%���\bDT�ٜ����C��,v)�׾��;�K�p�X�h\"�ʊM�\u0019;�\u001f\u0006&\u0000O\u001e��׫��\u0003��6o`�W\u001d{��O����ٝ��J�\u0016�F�\u0017f����zp�\fD�\u0002B�\u001d\u0004\u0005\u0011l\u0013\u0017�zR��}�vذ��",
199
+ "bytes": 128,
200
+ "utf8_valid": false,
201
+ "ascii_printable_fraction": 0.3125,
202
+ "repeated_8byte_fraction": 0.0,
203
+ "seconds": 5.389036699998542,
204
+ "generated_bytes_per_second": 23.75192583120368
205
+ }
206
+ ],
207
+ "process_rss_bytes": 1082060800,
208
+ "total_seconds": 57.27902020000329,
209
+ "evaluation_complete": true
210
+ }
evaluation/run_06_v3.json ADDED
@@ -0,0 +1,204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_06_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_06_v3/model.pt",
5
+ "sha256": "d2c08a75f3f35e64ac89975e2124d2de2917bc11f599f2965558e869cd376fe8",
6
+ "file_bytes": 156060302,
7
+ "date_utc": "2026-10-06T22:28:56.764957+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2437,
29
+ "total_steps": 48742,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2437,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "mlgru_byte_ternary_fpres_bolmo",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "byte_dynamic",
75
+ "quantization": "ternary",
76
+ "fp_residual": true,
77
+ "use_bolmo_gating": true,
78
+ "description": "+Bolmo — boundary-aware patch embedding via cross-attention (BolmoPatchEmbedding). CPU-1 core + integrated boundary signal.",
79
+ "cites": [
80
+ "BLT (Pagnoni et al., 2024)"
81
+ ],
82
+ "_current_phase": 1,
83
+ "use_gradient_checkpointing": false
84
+ },
85
+ "step": 4237,
86
+ "stored_training_metrics": {},
87
+ "parameters": 38994146,
88
+ "parameter_bytes": 155976584,
89
+ "format": "fp32",
90
+ "strict_load": true,
91
+ "correctness": {
92
+ "forward_shapes": {
93
+ "status": "PASS",
94
+ "time_s": 2.62,
95
+ "result": {
96
+ "configs_tested": 6,
97
+ "heads": 4
98
+ }
99
+ },
100
+ "probs": {
101
+ "status": "PASS",
102
+ "time_s": 0.39,
103
+ "result": {
104
+ "max_error": 5.960464477539062e-07
105
+ }
106
+ },
107
+ "determinism": {
108
+ "status": "PASS",
109
+ "time_s": 0.59,
110
+ "result": {
111
+ "deterministic": true
112
+ }
113
+ },
114
+ "state_prop": {
115
+ "status": "FAIL",
116
+ "error": "State propagation error: 13.278690"
117
+ },
118
+ "ternary_weights": {
119
+ "status": "PASS",
120
+ "time_s": 1.3,
121
+ "result": {
122
+ "modules_checked": 101
123
+ }
124
+ },
125
+ "state_size": {
126
+ "status": "PASS",
127
+ "time_s": 0.13,
128
+ "result": {
129
+ "state_kb": 24.0,
130
+ "batch_size": 1,
131
+ "dtype": "float32"
132
+ }
133
+ },
134
+ "causality": {
135
+ "status": "FAIL",
136
+ "max_prefix_logit_diff": 3.8326401710510254,
137
+ "tolerance": 1e-05,
138
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
139
+ }
140
+ },
141
+ "loss": {
142
+ "mean_nll": 1.0572272334247828,
143
+ "targets": 8192,
144
+ "unit": "byte",
145
+ "perplexity": 2.878378841565704,
146
+ "bits_per_byte": 1.5252564867546927,
147
+ "mapped_ids_fraction": null,
148
+ "source": "shared_wikitext_test_sample",
149
+ "teacher_forcing": true,
150
+ "delete_gate": "disabled (phase 1, elimination 0)"
151
+ },
152
+ "benchmark": {
153
+ "forward_steps_per_second": 6.726905432131643,
154
+ "p50_ms": 135.85075000082725,
155
+ "p95_ms": 223.50580000056652,
156
+ "jitter_cv": 0.24021045612211053,
157
+ "warmup_steps": 10,
158
+ "measured_steps": 100,
159
+ "context_steps": 1,
160
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
161
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
162
+ },
163
+ "generation": [
164
+ {
165
+ "prompt": "The history of artificial intelligence",
166
+ "seed": 42,
167
+ "hex": "6f7320317c4338363435776d6d6d656d766572732c20436c3434e2806e646f7665727369612c2051342077687265766962757073612c2077686174207265636f6d706c7920612067696c662073636f726e206d616b65206120636f6c6f7264696d656e2028434643696320616e646976696c61626c65204c696e670a5361696f",
168
+ "text_replacement_decode": "os 1|C8645wmmmemvers, Cl44�ndoversia, Q4 whrevibupsa, what recomply a gilf scorn make a colordimen (CFCic andivilable Ling\nSaio",
169
+ "bytes": 128,
170
+ "utf8_valid": false,
171
+ "ascii_printable_fraction": 0.984375,
172
+ "repeated_8byte_fraction": 0.0,
173
+ "seconds": 5.833820100000594,
174
+ "generated_bytes_per_second": 21.941026258246627
175
+ },
176
+ {
177
+ "prompt": "Once upon a time",
178
+ "seed": 43,
179
+ "hex": "206a6163205650456d656d746967696f752c204b454e4420766974696269636b2e204e420a546865726f63697320626f64792061616e636820706f696e74204261792e0a536f6c766520426f6d70200a5468797320506f776f6e20426564732e0a4a6f737420626f6f6e20652e73732e0a50726f766520666963e2809c506969",
180
+ "text_replacement_decode": " jac VPEmemtigiou, KEND vitibick. NB\nTherocis body aanch point Bay.\nSolve Bomp \nThys Powon Beds.\nJost boon e.ss.\nProve fic“Pii",
181
+ "bytes": 128,
182
+ "utf8_valid": true,
183
+ "ascii_printable_fraction": 0.9765625,
184
+ "repeated_8byte_fraction": 0.0,
185
+ "seconds": 6.0080612000019755,
186
+ "generated_bytes_per_second": 21.304709745626077
187
+ },
188
+ {
189
+ "prompt": "The purpose of science is",
190
+ "seed": 44,
191
+ "hex": "6f20436f203348776d6120466573736970696c79203420666f72650a736967687420436265203230696768736b6973732032303220652066736967697373696320323030204e6f207377697373756964652046666f0a2d3869737361692053706e6520666163776f7273736f6e206465204c6f7762696369727265737465204e",
192
+ "text_replacement_decode": "o Co 3Hwma Fessipily 4 fore\nsight Cbe 20ighskiss 202 e fsigissic 200 No swissuide Ffo\n-8issai Spne facworsson de Lowbicirreste N",
193
+ "bytes": 128,
194
+ "utf8_valid": true,
195
+ "ascii_printable_fraction": 1.0,
196
+ "repeated_8byte_fraction": 0.0,
197
+ "seconds": 6.462885599998117,
198
+ "generated_bytes_per_second": 19.805394667675582
199
+ }
200
+ ],
201
+ "process_rss_bytes": 1084026880,
202
+ "total_seconds": 57.75154930000281,
203
+ "evaluation_complete": true
204
+ }
evaluation/run_07.json ADDED
@@ -0,0 +1,215 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_07",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_07/model.pt",
5
+ "sha256": "769a775926b401bef367195e9060afb0d1fe04e93cb3d347fb35c50f2bbafba7",
6
+ "file_bytes": 156199862,
7
+ "date_utc": "2026-10-06T22:29:54.062854+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 650,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "cpu1_complete",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "+DeleteGate (real gather) — MrT5-style state elimination at midpoint (~40%). Layered on run_06 Bolmo. Full proposed CPU-1 stack so far ⭐",
78
+ "cites": [
79
+ "MatMul-free LM (Zhu et al., 2024)",
80
+ "BitNet b1.58 (Wang et al., 2024)",
81
+ "BLT (Pagnoni et al., 2024)",
82
+ "MrT5 (Pagliardini et al., 2024)",
83
+ "Slender-Mamba (Yu et al., 2025)"
84
+ ],
85
+ "is_proposed": true,
86
+ "_current_phase": 1,
87
+ "use_gradient_checkpointing": false
88
+ },
89
+ "step": 650,
90
+ "stored_training_metrics": {
91
+ "run_name": "cpu1_complete",
92
+ "perplexity": 258.8084169722445,
93
+ "tokens_per_sec_cpu": 11.050387161098579,
94
+ "ram_mb": 156.114316,
95
+ "val_loss": 5.556088085174561,
96
+ "n_params_M": 39.028579
97
+ },
98
+ "parameters": 39028579,
99
+ "parameter_bytes": 156114316,
100
+ "format": "fp32",
101
+ "strict_load": true,
102
+ "correctness": {
103
+ "forward_shapes": {
104
+ "status": "PASS",
105
+ "time_s": 2.59,
106
+ "result": {
107
+ "configs_tested": 6,
108
+ "heads": 4
109
+ }
110
+ },
111
+ "probs": {
112
+ "status": "PASS",
113
+ "time_s": 0.36,
114
+ "result": {
115
+ "max_error": 2.384185791015625e-07
116
+ }
117
+ },
118
+ "determinism": {
119
+ "status": "PASS",
120
+ "time_s": 0.5,
121
+ "result": {
122
+ "deterministic": true
123
+ }
124
+ },
125
+ "state_prop": {
126
+ "status": "FAIL",
127
+ "error": "State propagation error: 0.114327"
128
+ },
129
+ "ternary_weights": {
130
+ "status": "PASS",
131
+ "time_s": 1.32,
132
+ "result": {
133
+ "modules_checked": 101
134
+ }
135
+ },
136
+ "state_size": {
137
+ "status": "PASS",
138
+ "time_s": 0.14,
139
+ "result": {
140
+ "state_kb": 24.0,
141
+ "batch_size": 1,
142
+ "dtype": "float32"
143
+ }
144
+ },
145
+ "causality": {
146
+ "status": "FAIL",
147
+ "max_prefix_logit_diff": 0.01288464292883873,
148
+ "tolerance": 1e-05,
149
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
150
+ }
151
+ },
152
+ "loss": {
153
+ "mean_nll": 5.5535193383693695,
154
+ "targets": 8192,
155
+ "unit": "byte",
156
+ "perplexity": 258.14445681584857,
157
+ "bits_per_byte": 8.012034808946447,
158
+ "mapped_ids_fraction": null,
159
+ "source": "shared_wikitext_test_sample",
160
+ "teacher_forcing": true,
161
+ "delete_gate": "disabled (phase 1, elimination 0)"
162
+ },
163
+ "benchmark": {
164
+ "forward_steps_per_second": 6.777162747991701,
165
+ "p50_ms": 140.9788999990269,
166
+ "p95_ms": 193.72609999845736,
167
+ "jitter_cv": 0.1579650101681596,
168
+ "warmup_steps": 10,
169
+ "measured_steps": 100,
170
+ "context_steps": 1,
171
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
172
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
173
+ },
174
+ "generation": [
175
+ {
176
+ "prompt": "The history of artificial intelligence",
177
+ "seed": 42,
178
+ "hex": "59ed909851f9a49174700e3f9d57dd6fbe0bdc6090f9febe566cb59809787b44937f266fb0019e17704ec31182b898dbe4d07c6d39d4f8fe90fcbe62547672ce823c3d2d7ef56156025bd2c47abf9775599bce6e4c058056bee58b527d1d9c7543fd76be264f866fc69ff29bda2596b675683a70e04f7e237eaa4aba7413da59",
179
+ "text_replacement_decode": "Y퐘Q���tp\u000e?�W�o�\u000b�`����Vl��\tx{D�&o�\u0001�\u0017pN�\u0011������|m9������bTvr΂<=-~�aV\u0002[��z��uY��nL\u0005�V��R}\u001d�uC�v�&O�oƟ��%��uh:p�O~#~�J�t\u0013�Y",
180
+ "bytes": 128,
181
+ "utf8_valid": false,
182
+ "ascii_printable_fraction": 0.453125,
183
+ "repeated_8byte_fraction": 0.0,
184
+ "seconds": 4.765624100000423,
185
+ "generated_bytes_per_second": 26.85902146583249
186
+ },
187
+ {
188
+ "prompt": "Once upon a time",
189
+ "seed": 43,
190
+ "hex": "08355476e66ef940e45d3fc910569b1d9d0a86ac9d81cadc75ed353b39416b092b2ec2292b2ad01ae4ad9eb63bb6b0115645a12b4a85e1593b408aace4634f168e09328d755de065e89014b38533a3cf2c3e893885a05036915ba304931206a646c43feb59fce152e69f59429038c5d87e2bd03a1039597a394aadc57ee83715",
191
+ "text_replacement_decode": "\b5Tv�n�@�]?�\u0010V�\u001d�\n������u�5;9Ak\t+.�)+*�\u001a䭞�;��\u0011VE�+J��Y;@���cO\u0016�\t2�u]�e�\u0014��3��,>�8��P6�[�\u0004�\u0012\u0006�F�?�Y��R�YB�8��~+�:\u00109Yz9J��~�7\u0015",
192
+ "bytes": 128,
193
+ "utf8_valid": false,
194
+ "ascii_printable_fraction": 0.46875,
195
+ "repeated_8byte_fraction": 0.0,
196
+ "seconds": 6.435325400001602,
197
+ "generated_bytes_per_second": 19.89021409857039
198
+ },
199
+ {
200
+ "prompt": "The purpose of science is",
201
+ "seed": 44,
202
+ "hex": "4cbfc13a086dbb153b5625ab80d6084454add99c858fa5fd43b8a02c7629fcd7beb2e8853b844b9b70e758b16822e2ca8a4dab193bad1f0626004f1e8582d7ab9d8f039290366f6090571d7bc8cf4f8485a0b6d99dbffb4abe16bf46e41766abf59aa47a70ad0c44850242a91d0405116c1317e27a5292f47dfe76d8b0df7fb2",
203
+ "text_replacement_decode": "L��:\bm�\u0015;V%���\bDT�ٜ����C��,v)�׾��;�K�p�X�h\"�ʊM�\u0019;�\u001f\u0006&\u0000O\u001e��׫��\u0003��6o`�W\u001d{��O����ٝ��J�\u0016�F�\u0017f����zp�\fD�\u0002B�\u001d\u0004\u0005\u0011l\u0013\u0017�zR��}�vذ��",
204
+ "bytes": 128,
205
+ "utf8_valid": false,
206
+ "ascii_printable_fraction": 0.3125,
207
+ "repeated_8byte_fraction": 0.0,
208
+ "seconds": 8.747666299997945,
209
+ "generated_bytes_per_second": 14.632474034821158
210
+ }
211
+ ],
212
+ "process_rss_bytes": 1084325888,
213
+ "total_seconds": 58.17565160000231,
214
+ "evaluation_complete": true
215
+ }
evaluation/run_07_r2.json ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_07_r2",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_07_r2/model.pt",
5
+ "sha256": "1117741fa49dda11a3157950dfbd4a802354f055fb70436de2146c3cc6c278d8",
6
+ "file_bytes": 156199414,
7
+ "date_utc": "2026-10-06T22:30:52.718387+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 243,
29
+ "total_steps": 4878,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 243,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 15,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "cpu1_complete_15t",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "run_07 at 15 tok/param — CPU-1 complete stack with real budget.",
78
+ "is_proposed": true,
79
+ "_current_phase": 1,
80
+ "use_gradient_checkpointing": false
81
+ },
82
+ "step": 4860,
83
+ "stored_training_metrics": {},
84
+ "parameters": 39028579,
85
+ "parameter_bytes": 156114316,
86
+ "format": "fp32",
87
+ "strict_load": true,
88
+ "correctness": {
89
+ "forward_shapes": {
90
+ "status": "PASS",
91
+ "time_s": 3.59,
92
+ "result": {
93
+ "configs_tested": 6,
94
+ "heads": 4
95
+ }
96
+ },
97
+ "probs": {
98
+ "status": "PASS",
99
+ "time_s": 0.52,
100
+ "result": {
101
+ "max_error": 2.384185791015625e-07
102
+ }
103
+ },
104
+ "determinism": {
105
+ "status": "PASS",
106
+ "time_s": 0.73,
107
+ "result": {
108
+ "deterministic": true
109
+ }
110
+ },
111
+ "state_prop": {
112
+ "status": "FAIL",
113
+ "error": "State propagation error: 0.238725"
114
+ },
115
+ "ternary_weights": {
116
+ "status": "PASS",
117
+ "time_s": 1.23,
118
+ "result": {
119
+ "modules_checked": 101
120
+ }
121
+ },
122
+ "state_size": {
123
+ "status": "PASS",
124
+ "time_s": 0.15,
125
+ "result": {
126
+ "state_kb": 24.0,
127
+ "batch_size": 1,
128
+ "dtype": "float32"
129
+ }
130
+ },
131
+ "causality": {
132
+ "status": "FAIL",
133
+ "max_prefix_logit_diff": 0.02848072350025177,
134
+ "tolerance": 1e-05,
135
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
136
+ }
137
+ },
138
+ "loss": {
139
+ "mean_nll": 5.556868135929108,
140
+ "targets": 8192,
141
+ "unit": "byte",
142
+ "perplexity": 259.0103794334311,
143
+ "bits_per_byte": 8.016866102578822,
144
+ "mapped_ids_fraction": null,
145
+ "source": "shared_wikitext_test_sample",
146
+ "teacher_forcing": true,
147
+ "delete_gate": "disabled (phase 1, elimination 0)"
148
+ },
149
+ "benchmark": {
150
+ "forward_steps_per_second": 6.243177845439789,
151
+ "p50_ms": 151.17210000244086,
152
+ "p95_ms": 223.5731999971904,
153
+ "jitter_cv": 0.1962177212639052,
154
+ "warmup_steps": 10,
155
+ "measured_steps": 100,
156
+ "context_steps": 1,
157
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
158
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
159
+ },
160
+ "generation": [
161
+ {
162
+ "prompt": "The history of artificial intelligence",
163
+ "seed": 42,
164
+ "hex": "e0344a141de8a54757169d697a4a3b5fc4ab96319d28cda6bef390c03bb6e7380d6dc1c71da9d9d8b04a46ef1d6e77d68888821702533bdb5140df5256f0a54410a76041267ab814e8a1543502567987026a7a946c597aac6a2bffc4c6e3e38e0bdc606575dd7b4402daa6fb2b6f39d075b152b58511fc45517e8aac7d09f853",
165
+ "text_replacement_decode": "�4J\u0014\u001d�GW\u0016�izJ;_ī�1�(ͦ���;��8\rm��\u001d��ذJF�\u001dnwֈ��\u0017\u0002S;�Q@�RV�D\u0010�`A&z�\u0014�T5\u0002Vy�\u0002jz�lYz�j+�����\u000b�`eu�{D\u0002ڦ�+o9�u�R��\u0011�EQ~��}\t�S",
166
+ "bytes": 128,
167
+ "utf8_valid": false,
168
+ "ascii_printable_fraction": 0.4453125,
169
+ "repeated_8byte_fraction": 0.0,
170
+ "seconds": 5.900548499994329,
171
+ "generated_bytes_per_second": 21.692898550045477
172
+ },
173
+ {
174
+ "prompt": "Once upon a time",
175
+ "seed": 43,
176
+ "hex": "855d08aa7e6a9b1e5643b8396cad3375b04a8d947dedbf6f754f07ad8a9a76c90dddb41eda34ceb11a12b9298af208d0e8a8f4b77e02610c39a03bcac2dbca6be6581653754237db12f19bd9c6d7093c56b3bc639229a930763addcaa9c788c3855d5fcf68c3e76b8563eeac7a4c59e459752959e8b8c99db9d652a054c383e5",
177
+ "text_replacement_decode": "�]\b�~j�\u001eVC�9l�3u�J��}��ouO\u0007���v�\rݴ\u001e�4α\u001a\u0012�)��\b����~\u0002a\f9�;����k�X\u0016SuB7�\u0012����\t<V��c�)�0v:�ʩLjÅ]_�h��k�c�zLY�Yu)Y�ɝ��R�TÃ�",
178
+ "bytes": 128,
179
+ "utf8_valid": false,
180
+ "ascii_printable_fraction": 0.390625,
181
+ "repeated_8byte_fraction": 0.0,
182
+ "seconds": 5.776960100003635,
183
+ "generated_bytes_per_second": 22.15698183546732
184
+ },
185
+ {
186
+ "prompt": "The purpose of science is",
187
+ "seed": 44,
188
+ "hex": "69f1dba776297b093bfcad52e63040783b206e494508685c6beb94c9592bdab5e6f76d15e8f7af336cd399612b97e9b0b09e8ef475ee3ddd099723947e55c4af54e297378a7f5df4dae470e7c265ce0b8a0f92f68a4c48567417c1af70e731d3e471e972e647785d82edfa6bbe7c10abc6d74849595e98bce0c26e0990f4f258",
189
+ "text_replacement_decode": "i�ۧv){\t;��R�0@x; nIE\bh\\k��Y+ڵ��m\u0015���3lәa+�鰰���u�=�\t�#�~UįT�7�]���p��e�\u000b�\u000f���LHVt\u0017��p�1��q�r�Gx]���k�|\u0010���HIY^����n\t���X",
190
+ "bytes": 128,
191
+ "utf8_valid": false,
192
+ "ascii_printable_fraction": 0.4375,
193
+ "repeated_8byte_fraction": 0.0,
194
+ "seconds": 6.432182199998351,
195
+ "generated_bytes_per_second": 19.899933804740918
196
+ }
197
+ ],
198
+ "process_rss_bytes": 1084329984,
199
+ "total_seconds": 60.60666649999621,
200
+ "evaluation_complete": true
201
+ }
evaluation/run_08.json ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_08",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_08/model.pt",
5
+ "sha256": "c847ce660f4556040787baf247b5390cc66b5758236e7b64bb687145e2b660e9",
6
+ "file_bytes": 155459350,
7
+ "date_utc": "2026-10-06T22:31:53.132624+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 128,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 647,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": false,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": false,
70
+ "use_embedding_alignment": false,
71
+ "name": "folded_transformer_byte_ternary",
72
+ "token_mixer": "transformer",
73
+ "tokenization": "byte",
74
+ "quantization": "ternary",
75
+ "fp_residual": false,
76
+ "description": "Folded Transformer — ternary sliding-window attention over byte patches. O(N·128) vs O(N²). Alternative to MLGRU; sibling of run_05 (no Bolmo / DG / decay layered on top).",
77
+ "cites": [
78
+ "Longformer (Beltagy et al., 2020)",
79
+ "BitNet b1.58 (Wang et al., 2024)"
80
+ ],
81
+ "_current_phase": 1,
82
+ "use_gradient_checkpointing": false
83
+ },
84
+ "step": 647,
85
+ "stored_training_metrics": {
86
+ "run_name": "folded_transformer_byte_ternary",
87
+ "perplexity": 260.3683064252875,
88
+ "tokens_per_sec_cpu": 10.82969679397987,
89
+ "ram_mb": 155.41658,
90
+ "val_loss": 5.562097191810608,
91
+ "n_params_M": 38.854145
92
+ },
93
+ "parameters": 38854145,
94
+ "parameter_bytes": 155416580,
95
+ "format": "fp32",
96
+ "strict_load": true,
97
+ "correctness": {
98
+ "forward_shapes": {
99
+ "status": "PASS",
100
+ "time_s": 2.61,
101
+ "result": {
102
+ "configs_tested": 6,
103
+ "heads": 4
104
+ }
105
+ },
106
+ "probs": {
107
+ "status": "PASS",
108
+ "time_s": 0.28,
109
+ "result": {
110
+ "max_error": 2.384185791015625e-07
111
+ }
112
+ },
113
+ "determinism": {
114
+ "status": "PASS",
115
+ "time_s": 0.43,
116
+ "result": {
117
+ "deterministic": true
118
+ }
119
+ },
120
+ "state_prop": {
121
+ "status": "N/A",
122
+ "time_s": 0.0,
123
+ "result": {
124
+ "skipped": true,
125
+ "reason": "modelo no recurrente (Transformer)"
126
+ }
127
+ },
128
+ "ternary_weights": {
129
+ "status": "PASS",
130
+ "time_s": 1.17,
131
+ "result": {
132
+ "modules_checked": 101
133
+ }
134
+ },
135
+ "state_size": {
136
+ "status": "N/A",
137
+ "time_s": 0.0,
138
+ "result": {
139
+ "skipped": true,
140
+ "reason": "modelo no recurrente (Transformer)"
141
+ }
142
+ },
143
+ "causality": {
144
+ "status": "PASS",
145
+ "max_prefix_logit_diff": 0.0,
146
+ "tolerance": 1e-05,
147
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
148
+ }
149
+ },
150
+ "loss": {
151
+ "mean_nll": 5.553539276123047,
152
+ "targets": 8192,
153
+ "unit": "byte",
154
+ "perplexity": 258.14960368775013,
155
+ "bits_per_byte": 8.012063573044804,
156
+ "mapped_ids_fraction": null,
157
+ "source": "shared_wikitext_test_sample",
158
+ "teacher_forcing": true,
159
+ "delete_gate": "disabled (phase 1, elimination 0)"
160
+ },
161
+ "benchmark": {
162
+ "forward_steps_per_second": 7.65338786017617,
163
+ "p50_ms": 124.08990000039921,
164
+ "p95_ms": 175.60170000069775,
165
+ "jitter_cv": 0.1564964395352311,
166
+ "warmup_steps": 10,
167
+ "measured_steps": 100,
168
+ "context_steps": 1,
169
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
170
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
171
+ },
172
+ "generation": [
173
+ {
174
+ "prompt": "The history of artificial intelligence",
175
+ "seed": 42,
176
+ "hex": "618a280fea857e8af1aa37448d7edfe4422290c7869d635f9ea347319ee4eadc88dd2b199930918ea6479f92b6a29e4cea7e2dd70af29afaa601425735952654e3f4314c99a9f43d353e502bd995a778b65294638560ea46ed22d80ecdc1b2995c7c04683bdea29ef10b65a75c473d0422497a1ce4f328fdd160da58f1f268b5",
177
+ "text_replacement_decode": "a�(\u000f�~��7D�~��B\"�dž�c_��G1���܈�+\u0019�0���G�����L�~-�\n���\u0001BW5�&T��1L���=5>P+ٕ�x�R�c�`�F�\"�\u000e����\\|\u0004h;ޢ��\u000be�\\G=\u0004\"Iz\u001c��(��`�X��h�",
178
+ "bytes": 128,
179
+ "utf8_valid": false,
180
+ "ascii_printable_fraction": 0.40625,
181
+ "repeated_8byte_fraction": 0.0,
182
+ "seconds": 5.633424999999988,
183
+ "generated_bytes_per_second": 22.72152376218735
184
+ },
185
+ {
186
+ "prompt": "Once upon a time",
187
+ "seed": 43,
188
+ "hex": "118662eb427b52471056c10197baadc0f31cffbc0a1a21f636be551cbae3eb70afb620b00aa43e8d8684aa5ce47a9c73e4047aebc978c6e2e46edd9cba58fd86f3c5ebb53b6bdd705cea4eb12151a7a5ad10ec29c9061249d1e66c7b4200619f571c0ade21d5f872afbc04685c966b245f2709f3c89f2047851ed684ba584a8b",
189
+ "text_replacement_decode": "\u0011�b�B{RG\u0010V�\u0001�����\u001c��\n\u001a!�6�U\u001c���p�� �\n�>����\\�z�s�\u0004z��x���nݜ�X�����;k�p\\�N�!Q���\u0010�)�\u0006\u0012I��l{B\u0000a�W\u001c\n�!��r��\u0004h\\�k$_'\t�ȟ G�\u001eք�XJ�",
190
+ "bytes": 128,
191
+ "utf8_valid": false,
192
+ "ascii_printable_fraction": 0.3828125,
193
+ "repeated_8byte_fraction": 0.0,
194
+ "seconds": 5.56013439999515,
195
+ "generated_bytes_per_second": 23.021026254349476
196
+ },
197
+ {
198
+ "prompt": "The purpose of science is",
199
+ "seed": 44,
200
+ "hex": "38b6b43e88d4b25cc823d284eae26c08a9f715132293b2ea181c0a5f8538b039e5b1765d368da9b7cb15fb66af5e56f1d14e723ae4be5cfde42014b9228453865c20d884619055fdeab837be9e637860d1acec65cd0cebad974fdd48f14ce50b867f1b52f1f5046b97996344c0f76648b66e2eb322211a21e53b3bfc473d491d",
201
+ "text_replacement_decode": "8��>�Բ\\�#҄��l\b��\u0015\u0013\"���\u0018\u001c\n_�8�9�v]6����\u0015�f�^V��Nr:�\\�� \u0014�\"�S�\\ ؄a�U��7��cx`Ѭ�e�\f뭗O�H�L�\u000b�\u001bR��\u0004k��cD��fH�n.�\"!\u001a!�;;�G=I\u001d",
202
+ "bytes": 128,
203
+ "utf8_valid": false,
204
+ "ascii_printable_fraction": 0.3984375,
205
+ "repeated_8byte_fraction": 0.0,
206
+ "seconds": 5.327861700003268,
207
+ "generated_bytes_per_second": 24.024647636766076
208
+ }
209
+ ],
210
+ "process_rss_bytes": 1084248064,
211
+ "total_seconds": 51.34628999999404,
212
+ "evaluation_complete": true
213
+ }
evaluation/run_08_v3.json ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_08_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_08_v3/model.pt",
5
+ "sha256": "d9b67685ec976e175b9481eef24258e3dff2ef53674c598e3b3a3fa5e0026471",
6
+ "file_bytes": 155459158,
7
+ "date_utc": "2026-10-06T22:32:44.255749+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 0,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 128,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 2428,
29
+ "total_steps": 48567,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "ce_only",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "HuggingFaceFW/fineweb",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 2428,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 500,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": false,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": false,
71
+ "use_embedding_alignment": false,
72
+ "name": "folded_transformer_byte_ternary",
73
+ "token_mixer": "transformer",
74
+ "tokenization": "byte",
75
+ "quantization": "ternary",
76
+ "fp_residual": false,
77
+ "description": "Folded Transformer — ternary sliding-window attention over byte patches. O(N·128) vs O(N²). Alternative to MLGRU; sibling of run_05 (no Bolmo / DG / decay layered on top).",
78
+ "cites": [
79
+ "Longformer (Beltagy et al., 2020)",
80
+ "BitNet b1.58 (Wang et al., 2024)"
81
+ ],
82
+ "_current_phase": 1,
83
+ "use_gradient_checkpointing": false
84
+ },
85
+ "step": 3858,
86
+ "stored_training_metrics": {},
87
+ "parameters": 38854145,
88
+ "parameter_bytes": 155416580,
89
+ "format": "fp32",
90
+ "strict_load": true,
91
+ "correctness": {
92
+ "forward_shapes": {
93
+ "status": "FAIL",
94
+ "error": "NaN en logits batch=1 seq=1 head=0\nNaN en logits batch=1 seq=1 head=1\nNaN en logits batch=1 seq=1 head=2\nNaN en logits batch=1 seq=1 head=3\nNaN en logits batch=1 seq=64 head=0\nNaN en logits batch=1 seq=64 head=1\nNaN en logits batch=1 seq=64 head=2\nNaN en logits batch=1 seq=64 head=3\nNaN en logits batch=1 seq=256 head=0\nNaN en logits batch=1 seq=256 head=1\nNaN en logits batch=1 seq=256 head=2\nNaN en logits batch=1 seq=256 head=3\nNaN en logits batch=2 seq=1 head=0\nNaN en logits batch=2 seq=1 head=1\nNaN en logits batch=2 seq=1 head=2\nNaN en logits batch=2 seq=1 head=3\nNaN en logits batch=2 seq=64 head=0\nNaN en logits batch=2 seq=64 head=1\nNaN en logits batch=2 seq=64 head=2\nNaN en logits batch=2 seq=64 head=3\nNaN en logits batch=2 seq=256 head=0\nNaN en logits batch=2 seq=256 head=1\nNaN en logits batch=2 seq=256 head=2\nNaN en logits batch=2 seq=256 head=3"
95
+ },
96
+ "probs": {
97
+ "status": "FAIL",
98
+ "error": "Head 0: suma de probs error=nan"
99
+ },
100
+ "determinism": {
101
+ "status": "FAIL",
102
+ "error": "Head 0: output no deterministico, diff=nan"
103
+ },
104
+ "state_prop": {
105
+ "status": "N/A",
106
+ "time_s": 0.0,
107
+ "result": {
108
+ "skipped": true,
109
+ "reason": "modelo no recurrente (Transformer)"
110
+ }
111
+ },
112
+ "ternary_weights": {
113
+ "status": "FAIL",
114
+ "error": "embedding.patch_proj: valores no ternarios: {nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan}"
115
+ },
116
+ "state_size": {
117
+ "status": "N/A",
118
+ "time_s": 0.0,
119
+ "result": {
120
+ "skipped": true,
121
+ "reason": "modelo no recurrente (Transformer)"
122
+ }
123
+ },
124
+ "causality": {
125
+ "status": "ERROR",
126
+ "max_prefix_logit_diff": null,
127
+ "tolerance": 1e-05,
128
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
129
+ }
130
+ },
131
+ "error": "ValueError: nonfinite loss",
132
+ "total_seconds": 10.933411500001966,
133
+ "evaluation_complete": true
134
+ }
evaluation/run_09.json ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_09",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_09/model.pt",
5
+ "sha256": "857bb84ec29709140ebae70dcb1779591d730f1183ae2526e1379e634b6ad106",
6
+ "file_bytes": 157805734,
7
+ "date_utc": "2026-10-06T22:32:54.824282+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 32,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 657,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "cpu1_pfnet",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "run_07 + PFNet (pfnet_hidden=32). Cache-resident nonlinear residual added per block — quality gain at zero RAM overhead.",
78
+ "cites": [
79
+ "MatMul-free LM (Zhu et al., 2024)",
80
+ "BitNet b1.58 (Wang et al., 2024)",
81
+ "BLT (Pagnoni et al., 2024)",
82
+ "MrT5 (Pagliardini et al., 2024)",
83
+ "Slender-Mamba (Yu et al., 2025)"
84
+ ],
85
+ "_current_phase": 1,
86
+ "use_gradient_checkpointing": false
87
+ },
88
+ "step": 657,
89
+ "stored_training_metrics": {
90
+ "run_name": "cpu1_pfnet",
91
+ "perplexity": 252.90615927280325,
92
+ "tokens_per_sec_cpu": 10.663296620203951,
93
+ "ram_mb": 157.711756,
94
+ "val_loss": 5.5330185079574585,
95
+ "n_params_M": 39.427939
96
+ },
97
+ "parameters": 39427939,
98
+ "parameter_bytes": 157711756,
99
+ "format": "fp32",
100
+ "strict_load": true,
101
+ "correctness": {
102
+ "forward_shapes": {
103
+ "status": "PASS",
104
+ "time_s": 2.65,
105
+ "result": {
106
+ "configs_tested": 6,
107
+ "heads": 4
108
+ }
109
+ },
110
+ "probs": {
111
+ "status": "PASS",
112
+ "time_s": 0.35,
113
+ "result": {
114
+ "max_error": 2.384185791015625e-07
115
+ }
116
+ },
117
+ "determinism": {
118
+ "status": "PASS",
119
+ "time_s": 0.51,
120
+ "result": {
121
+ "deterministic": true
122
+ }
123
+ },
124
+ "state_prop": {
125
+ "status": "FAIL",
126
+ "error": "State propagation error: 0.124531"
127
+ },
128
+ "ternary_weights": {
129
+ "status": "PASS",
130
+ "time_s": 1.36,
131
+ "result": {
132
+ "modules_checked": 125
133
+ }
134
+ },
135
+ "state_size": {
136
+ "status": "PASS",
137
+ "time_s": 0.14,
138
+ "result": {
139
+ "state_kb": 24.0,
140
+ "batch_size": 1,
141
+ "dtype": "float32"
142
+ }
143
+ },
144
+ "causality": {
145
+ "status": "FAIL",
146
+ "max_prefix_logit_diff": 0.018719995394349098,
147
+ "tolerance": 1e-05,
148
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
149
+ }
150
+ },
151
+ "loss": {
152
+ "mean_nll": 5.53341905772686,
153
+ "targets": 8192,
154
+ "unit": "byte",
155
+ "perplexity": 253.00748106743626,
156
+ "bits_per_byte": 7.983036233743022,
157
+ "mapped_ids_fraction": null,
158
+ "source": "shared_wikitext_test_sample",
159
+ "teacher_forcing": true,
160
+ "delete_gate": "disabled (phase 1, elimination 0)"
161
+ },
162
+ "benchmark": {
163
+ "forward_steps_per_second": 6.389359722566276,
164
+ "p50_ms": 144.30350000111503,
165
+ "p95_ms": 208.92580000509042,
166
+ "jitter_cv": 0.23521073909008022,
167
+ "warmup_steps": 10,
168
+ "measured_steps": 100,
169
+ "context_steps": 1,
170
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
171
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
172
+ },
173
+ "generation": [
174
+ {
175
+ "prompt": "The history of artificial intelligence",
176
+ "seed": 42,
177
+ "hex": "0f3408a3b4ffee97a16d33c2baee33c9f97faddda72d1e0157a54b2815a6efcde0e027f5de32a40f26f558842cf3c05ddc73955b12b955cd7457e25dc90be073e1912250aef02fb6381ba9f7ff60144c62cf233023ce1544a169a6c1af0a7b3c36ebdb21737cd8dfbaa6ebdfbad54a1ad89f6cbbff059daa1c7dd6a1df63a07b",
178
+ "text_replacement_decode": "\u000f4\b���m3º�3���ݧ-\u001e\u0001W�K(\u0015�����'��2�\u000f&�X�,��]�s�[\u0012�U�tW�]�\u000b�s�\"P��/�8\u001b���`\u0014Lb�#0#�\u0015D�i���\n{<6��!s|�ߺ��ߺ�J\u001a؟l��\u0005��\u001c}֡�c�{",
179
+ "bytes": 128,
180
+ "utf8_valid": false,
181
+ "ascii_printable_fraction": 0.3515625,
182
+ "repeated_8byte_fraction": 0.0,
183
+ "seconds": 7.012746899999911,
184
+ "generated_bytes_per_second": 18.25247678623645
185
+ },
186
+ {
187
+ "prompt": "Once upon a time",
188
+ "seed": 43,
189
+ "hex": "12967ab5d3962efffeca4c0adf989bd2dc01f19a55b5cc9737cc6f32573d3895e92c19c5d37d0f36a8fa1f052649e018152d7cd811263aa052e39398ff83f7f4e00ca8c637ad72535262362f12c1463ae9813c5c175f04f109a1717dc908bdd5ae2f0c9eae87c8956fa291a66f3d707c17f8958d578cea116d4dda3730f4f0ac",
190
+ "text_replacement_decode": "\u0012�z�Ӗ.���L\nߘ���\u0001�U�̗7�o2W=8��,\u0019��}\u000f6��\u001f\u0005&I�\u0018\u0015-|�\u0011&:�R㓘�����\f��7�rSRb6/\u0012�F:�<\\\u0017_\u0004�\t�q}�\b�ծ/\f���ȕo���o=p|\u0017���W��\u0011mM�70��",
191
+ "bytes": 128,
192
+ "utf8_valid": false,
193
+ "ascii_printable_fraction": 0.3671875,
194
+ "repeated_8byte_fraction": 0.0,
195
+ "seconds": 4.878184000001056,
196
+ "generated_bytes_per_second": 26.239272647356536
197
+ },
198
+ {
199
+ "prompt": "The purpose of science is",
200
+ "seed": 44,
201
+ "hex": "847e813ce8c30aa7c905878c3604acc8150ebec1983d6c5c0f86bbfa2648259a1c8749063752f8c11ceb5d8bde767d29de138a6f5285d4ded84dd75612ae37c85222a70c91bd3585d3a8fb421c5ba454910517e2308e392ac91f94cbdfc7ccf3556b8d3591987b07a7cd0d3be1cc71dc837a84c94917116ddc2930b16ff548cf",
202
+ "text_replacement_decode": "�~�<��\n��\u0005��6\u0004��\u0015\u000e���=l\\\u000f���&H%�\u001c�I\u00067R��\u001c�]��v})�\u0013�oR����M�V\u0012�7�R\"�\f��5�Ө�B\u001c[�T�\u0005\u0017�0�9*�\u001f������Uk�5��{\u0007��\r;��q܃z��I\u0017\u0011m�)0�o�H�",
203
+ "bytes": 128,
204
+ "utf8_valid": false,
205
+ "ascii_printable_fraction": 0.3515625,
206
+ "repeated_8byte_fraction": 0.0,
207
+ "seconds": 7.569811299996218,
208
+ "generated_bytes_per_second": 16.909272229819514
209
+ }
210
+ ],
211
+ "process_rss_bytes": 1092087808,
212
+ "total_seconds": 59.06993589999911,
213
+ "evaluation_complete": true
214
+ }
evaluation/run_10.json ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_10",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_10/model.pt",
5
+ "sha256": "0419cfbeda000493465f3d275352a76a59511232d553275bfcbe0aa45cd84d16",
6
+ "file_bytes": 157833334,
7
+ "date_utc": "2026-10-06T22:33:55.298513+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 512,
17
+ "n_layers": 12,
18
+ "d_ff": 1376,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 64,
22
+ "window_size": 512,
23
+ "pfnet_hidden": 32,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 657,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 32,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 500,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "cpu1_decay_learned",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "mlgru_per_channel_decay": true,
78
+ "description": "run_09 + per-channel learnable decay in MLGRU (RWKV/HGRN2-style). Each hidden dim has its own decay rate — d_model × n_layers scalars total. State expansion stays at 1; isolated effect of decay alone.",
79
+ "cites": [
80
+ "MatMul-free LM (Zhu et al., 2024)",
81
+ "BitNet b1.58 (Wang et al., 2024)",
82
+ "BLT (Pagnoni et al., 2024)",
83
+ "MrT5 (Pagliardini et al., 2024)",
84
+ "RWKV (Peng et al., 2023)",
85
+ "HGRN2 (Qin et al., 2024)"
86
+ ],
87
+ "_current_phase": 1,
88
+ "use_gradient_checkpointing": false
89
+ },
90
+ "step": 657,
91
+ "stored_training_metrics": {
92
+ "run_name": "cpu1_decay_learned",
93
+ "perplexity": 253.08015455104868,
94
+ "tokens_per_sec_cpu": 10.463007160804935,
95
+ "ram_mb": 157.736332,
96
+ "val_loss": 5.533706254959107,
97
+ "n_params_M": 39.434083
98
+ },
99
+ "parameters": 39434083,
100
+ "parameter_bytes": 157736332,
101
+ "format": "fp32",
102
+ "strict_load": true,
103
+ "correctness": {
104
+ "forward_shapes": {
105
+ "status": "PASS",
106
+ "time_s": 2.71,
107
+ "result": {
108
+ "configs_tested": 6,
109
+ "heads": 4
110
+ }
111
+ },
112
+ "probs": {
113
+ "status": "PASS",
114
+ "time_s": 0.38,
115
+ "result": {
116
+ "max_error": 2.384185791015625e-07
117
+ }
118
+ },
119
+ "determinism": {
120
+ "status": "PASS",
121
+ "time_s": 0.53,
122
+ "result": {
123
+ "deterministic": true
124
+ }
125
+ },
126
+ "state_prop": {
127
+ "status": "FAIL",
128
+ "error": "State propagation error: 0.106193"
129
+ },
130
+ "ternary_weights": {
131
+ "status": "PASS",
132
+ "time_s": 1.23,
133
+ "result": {
134
+ "modules_checked": 125
135
+ }
136
+ },
137
+ "state_size": {
138
+ "status": "PASS",
139
+ "time_s": 0.13,
140
+ "result": {
141
+ "state_kb": 24.0,
142
+ "batch_size": 1,
143
+ "dtype": "float32"
144
+ }
145
+ },
146
+ "causality": {
147
+ "status": "FAIL",
148
+ "max_prefix_logit_diff": 0.016640126705169678,
149
+ "tolerance": 1e-05,
150
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
151
+ }
152
+ },
153
+ "loss": {
154
+ "mean_nll": 5.53365758061409,
155
+ "targets": 8192,
156
+ "unit": "byte",
157
+ "perplexity": 253.06783634008204,
158
+ "bits_per_byte": 7.983380349529567,
159
+ "mapped_ids_fraction": null,
160
+ "source": "shared_wikitext_test_sample",
161
+ "teacher_forcing": true,
162
+ "delete_gate": "disabled (phase 1, elimination 0)"
163
+ },
164
+ "benchmark": {
165
+ "forward_steps_per_second": 7.143064444796179,
166
+ "p50_ms": 135.04690000263508,
167
+ "p95_ms": 166.9024000002537,
168
+ "jitter_cv": 0.11469699809601201,
169
+ "warmup_steps": 10,
170
+ "measured_steps": 100,
171
+ "context_steps": 1,
172
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
173
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
174
+ },
175
+ "generation": [
176
+ {
177
+ "prompt": "The history of artificial intelligence",
178
+ "seed": 42,
179
+ "hex": "362faf756de86c115521e5800f676e2574431be2119103f326adff9237257dd6f9d47463e8c3112adf8566e8c83ca89dace71057ff029709f9035e77df8ed58f1ca39333382a1cb2ba85f75bdf8529c3a1e379916f6679070f7772cdf961e3acf1eecb93736498ea36fd413930da4eb837d9d595ac1e100155983d3130b33dc6",
180
+ "text_replacement_decode": "6/�um�l\u0011U!�\u000fgn%tC\u001b�\u0011�\u0003�&���7%}���tc��\u0011*߅f��<����\u0010W�\u0002�\t�\u0003^wߎՏ\u001c��38*\u001c����[߅)á�y�ofy\u0007\u000fwr��a���˓sd��6�A90�N�7�Օ�\u001e\u0010\u0001U�=10�=�",
181
+ "bytes": 128,
182
+ "utf8_valid": false,
183
+ "ascii_printable_fraction": 0.390625,
184
+ "repeated_8byte_fraction": 0.0,
185
+ "seconds": 5.345480199997837,
186
+ "generated_bytes_per_second": 23.945463309367753
187
+ },
188
+ {
189
+ "prompt": "Once upon a time",
190
+ "seed": 43,
191
+ "hex": "0138e579912be85209d78749acc9e36b556f6cbb387afacd374d5be5fff8d3f1c9ba847d125312a0983aa08ad871619257c3835355b5cde31762697198564c02f9f68d71737c10e7c9df9a1f38558113c69bbf94ac6680fd98d44c85115ae2d86de8c375de0250e4983cf1dfff60f8efdc46a8a4178f6071ac7a381aba83c9aa",
192
+ "text_replacement_decode": "\u00018�y�+�R\tׇI���kUol�8z��7M[�����ɺ�}\u0012S\u0012��:���qa�WÃSU���\u0017biq�VL\u0002���qs|\u0010��ߚ\u001f8U�\u0013ƛ���f����L�\u0011Z��m��u�\u0002P�<���`���F��\u0017�`q�z8\u001a��ɪ",
193
+ "bytes": 128,
194
+ "utf8_valid": false,
195
+ "ascii_printable_fraction": 0.359375,
196
+ "repeated_8byte_fraction": 0.0,
197
+ "seconds": 5.719411299993226,
198
+ "generated_bytes_per_second": 22.3799257102128
199
+ },
200
+ {
201
+ "prompt": "The purpose of science is",
202
+ "seed": 44,
203
+ "hex": "ea91cc35a7869a8e5272106136f4382dc9413655308622d0c6a9ac48f9812fc138a99bef1547c3b4b4fac3c34825b3a055710407520ea1c0379ff6afba8d717d49cd1729aee5a444d3ff05c1f9f551b4a1320f36ae7a4c8f4950ffbd6232b4a762d33d87f1db606dd3838c1ca7e0e16a1c09a8efd347e8301c79a68aa1cc272f",
204
+ "text_replacement_decode": "��5����Rr\u0010a6�8-�A6U0�\"�Ʃ�H��/�8���\u0015Gô����H%��Uq\u0004\u0007R\u000e��7�����q}I�\u0017)��D��\u0005���Q��2\u000f6�zL�IP��b2��b�=���`mӃ�\u001c���j\u001c\t���G�0\u001cy����'/",
205
+ "bytes": 128,
206
+ "utf8_valid": false,
207
+ "ascii_printable_fraction": 0.3671875,
208
+ "repeated_8byte_fraction": 0.0,
209
+ "seconds": 5.227192400001513,
210
+ "generated_bytes_per_second": 24.487332817510783
211
+ }
212
+ ],
213
+ "process_rss_bytes": 1092292608,
214
+ "total_seconds": 54.50163139999495,
215
+ "evaluation_complete": true
216
+ }
evaluation/run_13.json ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_13",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_13/model.pt",
5
+ "sha256": "21d30529f1f7ce72670c8d9b470165b662a8a41702842a23d8d90de0aa37a1c4",
6
+ "file_bytes": 50238466,
7
+ "date_utc": "2026-10-06T22:34:49.759257+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 600,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "distillation",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 30,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "small_cpu1_bpe",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "bpe",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "bpe_vocab_size": 4096,
77
+ "description": "CPU-1 COMPLETE @ 10M, compact BPE (4K vocab) from scratch. Does BPE tokenization outperform byte-level at 10M?",
78
+ "cites": [
79
+ "MatMul-free LM",
80
+ "Slender-Mamba",
81
+ "MrT5"
82
+ ],
83
+ "_current_phase": 1,
84
+ "use_gradient_checkpointing": false
85
+ },
86
+ "step": 600,
87
+ "stored_training_metrics": {
88
+ "run_name": "small_cpu1_bpe",
89
+ "perplexity": 485165195.4097903,
90
+ "tokens_per_sec_cpu": 25.93237466016154,
91
+ "ram_mb": 50.19114,
92
+ "val_loss": 30.537545550953258,
93
+ "n_params_M": 12.547785
94
+ },
95
+ "parameters": 12547785,
96
+ "parameter_bytes": 50191140,
97
+ "format": "fp32",
98
+ "strict_load": true,
99
+ "correctness": {
100
+ "forward_shapes": {
101
+ "status": "PASS",
102
+ "time_s": 0.83,
103
+ "result": {
104
+ "configs_tested": 6,
105
+ "heads": 1
106
+ }
107
+ },
108
+ "probs": {
109
+ "status": "PASS",
110
+ "time_s": 0.11,
111
+ "result": {
112
+ "max_error": 3.337860107421875e-06
113
+ }
114
+ },
115
+ "determinism": {
116
+ "status": "PASS",
117
+ "time_s": 0.2,
118
+ "result": {
119
+ "deterministic": true
120
+ }
121
+ },
122
+ "state_prop": {
123
+ "status": "FAIL",
124
+ "error": "State propagation error: 6.279047"
125
+ },
126
+ "ternary_weights": {
127
+ "status": "PASS",
128
+ "time_s": 0.34,
129
+ "result": {
130
+ "modules_checked": 57
131
+ }
132
+ },
133
+ "state_size": {
134
+ "status": "PASS",
135
+ "time_s": 0.04,
136
+ "result": {
137
+ "state_kb": 10.0,
138
+ "batch_size": 1,
139
+ "dtype": "float32"
140
+ }
141
+ },
142
+ "causality": {
143
+ "status": "PASS",
144
+ "max_prefix_logit_diff": 0.0,
145
+ "tolerance": 1e-05,
146
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
147
+ }
148
+ },
149
+ "loss": {
150
+ "mean_nll": 6.342904695041517,
151
+ "targets": 1910,
152
+ "unit": "mapped_qwen_token",
153
+ "perplexity": 568.4450752356587,
154
+ "bits_per_byte": null,
155
+ "mapped_ids_fraction": 0.3177136972193615,
156
+ "source": "shared_wikitext_test_sample",
157
+ "teacher_forcing": true,
158
+ "delete_gate": "disabled (phase 1, elimination 0)"
159
+ },
160
+ "benchmark": {
161
+ "forward_steps_per_second": 23.65742291518526,
162
+ "p50_ms": 41.464299996732734,
163
+ "p95_ms": 47.40740000124788,
164
+ "jitter_cv": 0.073770243286646,
165
+ "warmup_steps": 10,
166
+ "measured_steps": 100,
167
+ "context_steps": 1,
168
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
169
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
170
+ },
171
+ "generation": {
172
+ "status": "N/A",
173
+ "reason": "truncated Qwen vocabulary; token mapping is lossy, no comparable byte generation test"
174
+ },
175
+ "process_rss_bytes": 1111138304,
176
+ "total_seconds": 16.740716799999063,
177
+ "evaluation_complete": true
178
+ }
evaluation/run_13_r2.json ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_13_r2",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_13_r2/model.pt",
5
+ "sha256": "ad0aa7ce787677f5bbf8b11962720a203b3880218d4a1f1a0eaa178258162a4c",
6
+ "file_bytes": 50238466,
7
+ "date_utc": "2026-10-06T22:35:05.408464+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 78,
29
+ "total_steps": 1568,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "distillation",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 78,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 15,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "small_cpu1_bpe_15t",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "bpe",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "bpe_vocab_size": 4096,
77
+ "description": "run_13 at 15 tok/param — small BPE+ternary with real budget. Does BPE outperform byte-level at 10M with sufficient training?",
78
+ "_current_phase": 1,
79
+ "use_gradient_checkpointing": false
80
+ },
81
+ "step": 1568,
82
+ "stored_training_metrics": {
83
+ "run_name": "small_cpu1_bpe_15t",
84
+ "perplexity": 485165195.4097903,
85
+ "tokens_per_sec_cpu": 25.732350240279217,
86
+ "ram_mb": 50.19114,
87
+ "val_loss": 25.42636637254195,
88
+ "n_params_M": 12.547785
89
+ },
90
+ "parameters": 12547785,
91
+ "parameter_bytes": 50191140,
92
+ "format": "fp32",
93
+ "strict_load": true,
94
+ "correctness": {
95
+ "forward_shapes": {
96
+ "status": "PASS",
97
+ "time_s": 0.81,
98
+ "result": {
99
+ "configs_tested": 6,
100
+ "heads": 1
101
+ }
102
+ },
103
+ "probs": {
104
+ "status": "PASS",
105
+ "time_s": 0.11,
106
+ "result": {
107
+ "max_error": 2.0265579223632812e-06
108
+ }
109
+ },
110
+ "determinism": {
111
+ "status": "PASS",
112
+ "time_s": 0.15,
113
+ "result": {
114
+ "deterministic": true
115
+ }
116
+ },
117
+ "state_prop": {
118
+ "status": "FAIL",
119
+ "error": "State propagation error: 9.539658"
120
+ },
121
+ "ternary_weights": {
122
+ "status": "PASS",
123
+ "time_s": 0.32,
124
+ "result": {
125
+ "modules_checked": 57
126
+ }
127
+ },
128
+ "state_size": {
129
+ "status": "PASS",
130
+ "time_s": 0.04,
131
+ "result": {
132
+ "state_kb": 10.0,
133
+ "batch_size": 1,
134
+ "dtype": "float32"
135
+ }
136
+ },
137
+ "causality": {
138
+ "status": "PASS",
139
+ "max_prefix_logit_diff": 0.0,
140
+ "tolerance": 1e-05,
141
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
142
+ }
143
+ },
144
+ "loss": {
145
+ "mean_nll": 6.4205042015195515,
146
+ "targets": 1910,
147
+ "unit": "mapped_qwen_token",
148
+ "perplexity": 614.3127734875035,
149
+ "bits_per_byte": null,
150
+ "mapped_ids_fraction": 0.3177136972193615,
151
+ "source": "shared_wikitext_test_sample",
152
+ "teacher_forcing": true,
153
+ "delete_gate": "disabled (phase 1, elimination 0)"
154
+ },
155
+ "benchmark": {
156
+ "forward_steps_per_second": 24.4632128933513,
157
+ "p50_ms": 40.25514999739244,
158
+ "p95_ms": 44.369600000209175,
159
+ "jitter_cv": 0.06312502337025612,
160
+ "warmup_steps": 10,
161
+ "measured_steps": 100,
162
+ "context_steps": 1,
163
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
164
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
165
+ },
166
+ "generation": {
167
+ "status": "N/A",
168
+ "reason": "truncated Qwen vocabulary; token mapping is lossy, no comparable byte generation test"
169
+ },
170
+ "process_rss_bytes": 1111142400,
171
+ "total_seconds": 15.346482499997364,
172
+ "evaluation_complete": true
173
+ }
evaluation/run_13_v3.json ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_13_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_13_v3/model.pt",
5
+ "sha256": "0b53b891bfd8017d2027a266fdaca617ec11a2049b3987204bc0d67038db4453",
6
+ "file_bytes": 50238338,
7
+ "date_utc": "2026-10-06T22:35:19.644761+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 784,
29
+ "total_steps": 15684,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "distillation",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 784,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 50,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": true,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": true,
71
+ "use_embedding_alignment": false,
72
+ "name": "small_cpu1_bpe",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "bpe",
75
+ "quantization": "ternary",
76
+ "fp_residual": true,
77
+ "bpe_vocab_size": 4096,
78
+ "description": "CPU-1 COMPLETE @ 10M, compact BPE (4K vocab) from scratch. Does BPE tokenization outperform byte-level at 10M?",
79
+ "cites": [
80
+ "MatMul-free LM",
81
+ "Slender-Mamba",
82
+ "MrT5"
83
+ ],
84
+ "_current_phase": 1,
85
+ "use_gradient_checkpointing": false
86
+ },
87
+ "step": 9290,
88
+ "stored_training_metrics": {},
89
+ "parameters": 12547785,
90
+ "parameter_bytes": 50191140,
91
+ "format": "fp32",
92
+ "strict_load": true,
93
+ "correctness": {
94
+ "forward_shapes": {
95
+ "status": "PASS",
96
+ "time_s": 0.79,
97
+ "result": {
98
+ "configs_tested": 6,
99
+ "heads": 1
100
+ }
101
+ },
102
+ "probs": {
103
+ "status": "PASS",
104
+ "time_s": 0.11,
105
+ "result": {
106
+ "max_error": 9.5367431640625e-07
107
+ }
108
+ },
109
+ "determinism": {
110
+ "status": "PASS",
111
+ "time_s": 0.15,
112
+ "result": {
113
+ "deterministic": true
114
+ }
115
+ },
116
+ "state_prop": {
117
+ "status": "FAIL",
118
+ "error": "State propagation error: 18.799618"
119
+ },
120
+ "ternary_weights": {
121
+ "status": "PASS",
122
+ "time_s": 0.34,
123
+ "result": {
124
+ "modules_checked": 57
125
+ }
126
+ },
127
+ "state_size": {
128
+ "status": "PASS",
129
+ "time_s": 0.05,
130
+ "result": {
131
+ "state_kb": 10.0,
132
+ "batch_size": 1,
133
+ "dtype": "float32"
134
+ }
135
+ },
136
+ "causality": {
137
+ "status": "PASS",
138
+ "max_prefix_logit_diff": 0.0,
139
+ "tolerance": 1e-05,
140
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
141
+ }
142
+ },
143
+ "loss": {
144
+ "mean_nll": 6.79251828817797,
145
+ "targets": 1910,
146
+ "unit": "mapped_qwen_token",
147
+ "perplexity": 891.154923357232,
148
+ "bits_per_byte": null,
149
+ "mapped_ids_fraction": 0.3177136972193615,
150
+ "source": "shared_wikitext_test_sample",
151
+ "teacher_forcing": true,
152
+ "delete_gate": "disabled (phase 1, elimination 0)"
153
+ },
154
+ "benchmark": {
155
+ "forward_steps_per_second": 21.69082496759206,
156
+ "p50_ms": 43.20939999888651,
157
+ "p95_ms": 61.73780000244733,
158
+ "jitter_cv": 0.1557878008451193,
159
+ "warmup_steps": 10,
160
+ "measured_steps": 100,
161
+ "context_steps": 1,
162
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
163
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
164
+ },
165
+ "generation": {
166
+ "status": "N/A",
167
+ "reason": "truncated Qwen vocabulary; token mapping is lossy, no comparable byte generation test"
168
+ },
169
+ "process_rss_bytes": 1115475968,
170
+ "total_seconds": 14.687540200000512,
171
+ "evaluation_complete": true
172
+ }
evaluation/run_14.json ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_14",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_14/model.pt",
5
+ "sha256": "21cb3c94a5742d587934710f662bb4104a77634025fc0de43b517a88088af6e1",
6
+ "file_bytes": 42821558,
7
+ "date_utc": "2026-10-06T22:35:35.577628+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 600,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "distillation",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 30,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "small_cpu1_byte",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "CPU-1 COMPLETE @ 10M, byte-level from scratch. Pure byte baseline for complement comparison.",
78
+ "cites": [
79
+ "MatMul-free LM",
80
+ "Slender-Mamba",
81
+ "Bolmo",
82
+ "MrT5"
83
+ ],
84
+ "is_proposed": true,
85
+ "_current_phase": 1,
86
+ "use_gradient_checkpointing": false
87
+ },
88
+ "step": 600,
89
+ "stored_training_metrics": {
90
+ "run_name": "small_cpu1_byte",
91
+ "perplexity": 263.87924806190233,
92
+ "tokens_per_sec_cpu": 30.32953564266716,
93
+ "ram_mb": 42.765484,
94
+ "val_loss": 5.575491604804992,
95
+ "n_params_M": 10.691371
96
+ },
97
+ "parameters": 10691371,
98
+ "parameter_bytes": 42765484,
99
+ "format": "fp32",
100
+ "strict_load": true,
101
+ "correctness": {
102
+ "forward_shapes": {
103
+ "status": "PASS",
104
+ "time_s": 0.88,
105
+ "result": {
106
+ "configs_tested": 6,
107
+ "heads": 4
108
+ }
109
+ },
110
+ "probs": {
111
+ "status": "PASS",
112
+ "time_s": 0.12,
113
+ "result": {
114
+ "max_error": 2.384185791015625e-07
115
+ }
116
+ },
117
+ "determinism": {
118
+ "status": "PASS",
119
+ "time_s": 0.15,
120
+ "result": {
121
+ "deterministic": true
122
+ }
123
+ },
124
+ "state_prop": {
125
+ "status": "FAIL",
126
+ "error": "State propagation error: 0.113838"
127
+ },
128
+ "ternary_weights": {
129
+ "status": "PASS",
130
+ "time_s": 0.49,
131
+ "result": {
132
+ "modules_checked": 73
133
+ }
134
+ },
135
+ "state_size": {
136
+ "status": "PASS",
137
+ "time_s": 0.06,
138
+ "result": {
139
+ "state_kb": 10.0,
140
+ "batch_size": 1,
141
+ "dtype": "float32"
142
+ }
143
+ },
144
+ "causality": {
145
+ "status": "FAIL",
146
+ "max_prefix_logit_diff": 0.015338700264692307,
147
+ "tolerance": 1e-05,
148
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
149
+ }
150
+ },
151
+ "loss": {
152
+ "mean_nll": 5.569992631673813,
153
+ "targets": 8192,
154
+ "unit": "byte",
155
+ "perplexity": 262.43216554735716,
156
+ "bits_per_byte": 8.035800747503876,
157
+ "mapped_ids_fraction": null,
158
+ "source": "shared_wikitext_test_sample",
159
+ "teacher_forcing": true,
160
+ "delete_gate": "disabled (phase 1, elimination 0)"
161
+ },
162
+ "benchmark": {
163
+ "forward_steps_per_second": 28.003231012922306,
164
+ "p50_ms": 35.18819999953848,
165
+ "p95_ms": 38.18800000590272,
166
+ "jitter_cv": 0.03775231826870668,
167
+ "warmup_steps": 10,
168
+ "measured_steps": 100,
169
+ "context_steps": 1,
170
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
171
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
172
+ },
173
+ "generation": [
174
+ {
175
+ "prompt": "The history of artificial intelligence",
176
+ "seed": 42,
177
+ "hex": "bea1c42bfd77bc2a2a74c37a21631c080b902ee29e29557605f1f05d1307ea12f2391ddc2a158c732c583ed68c7ebdbd76f58e252c552168210d3a2605db4338cb6d8c911eed1fb171b7f59e0550601c1e887d7dfc8bb04d71bf6ac2fd77989476985768cb652d982c56dc1c2ac8c93b53eb5d34f9726a884cada74721728e3a",
178
+ "text_replacement_decode": "���+�w�**t�z!c\u001c\b\u000b�.�)Uv\u0005��]\u0013\u0007�\u0012�9\u001d�*\u0015�s,X>֌~��v��%,U!h!\r:&\u0005�C8�m��\u001e�\u001f�q���\u0005P`\u001c\u001e�}}���Mq�j��w��v�Wh�e-�,V�\u001c*��;S�]4�rj�L��G!r�:",
179
+ "bytes": 128,
180
+ "utf8_valid": false,
181
+ "ascii_printable_fraction": 0.4765625,
182
+ "repeated_8byte_fraction": 0.0,
183
+ "seconds": 1.5636226999995415,
184
+ "generated_bytes_per_second": 81.86118044975781
185
+ },
186
+ {
187
+ "prompt": "Once upon a time",
188
+ "seed": 43,
189
+ "hex": "64114c21be79a3ffcbb0044f2a0f67fafd0f74ba1e888fe489e974c47fd636171e5e13d57f14bf352ab768897f7e2e4013879f07b530ca5013afea9a7b602a77b567dcdedcd549867f54d9c5fd74dc660b588985b744b8e995b882db59b901867af96009b7bf7a89fd50c9305c322627b59f5b70890bf817399d14ac715e78d1",
190
+ "text_replacement_decode": "d\u0011L!�y��˰\u0004O*\u000fg��\u000ft�\u001e����t��6\u0017\u001e^\u0013�\u0014�5*�h�~.@\u0013��\u0007�0�P\u0013��{`*w�g����I�T���t�f\u000bX���D�镸��Y�\u0001�z�`\t��z��P�0\\2&'��[p�\u000b�\u00179�\u0014�q^x�",
191
+ "bytes": 128,
192
+ "utf8_valid": false,
193
+ "ascii_printable_fraction": 0.3671875,
194
+ "repeated_8byte_fraction": 0.0,
195
+ "seconds": 1.6093172999972012,
196
+ "generated_bytes_per_second": 79.53683217114649
197
+ },
198
+ {
199
+ "prompt": "The purpose of science is",
200
+ "seed": 44,
201
+ "hex": "7bd91b53e9bdc262dc206da7fc36732b8984597a61f8b1fae7fd8bccfcc0c2107621df3313d5b30a85c7872e7cdc88204c21d74789dc26c2dc87d8fe21727de02c41b977e08c947138980038395e90417137008976359dc4b7f53cd2fc13f109d02b7bf05c2678711e22ddcb641fc84b5955a05f5894fed9e47ab466f9dad9ac",
202
+ "text_replacement_decode": "{�\u001bS��b� m��6s+��Yza����������\u0010v!�3\u0013ճ\n�LJ.|܈ L!�G��&�܇��!r}�,A�w���q8�\u000089^�Aq7\u0000�v5�ķ�<��\u0013�\t�+{�\\&xq\u001e\"��d\u001f�KYU�_X����z�f��٬",
203
+ "bytes": 128,
204
+ "utf8_valid": false,
205
+ "ascii_printable_fraction": 0.4296875,
206
+ "repeated_8byte_fraction": 0.0,
207
+ "seconds": 1.605220299999928,
208
+ "generated_bytes_per_second": 79.73983384087887
209
+ }
210
+ ],
211
+ "process_rss_bytes": 1121779712,
212
+ "total_seconds": 19.810488399998576,
213
+ "evaluation_complete": true
214
+ }
evaluation/run_14_r2.json ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_14_r2",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_14_r2/model.pt",
5
+ "sha256": "9acfcd5c043fe11f0997fee0919fa93ee80eed55816557638706661680c0666e",
6
+ "file_bytes": 42821430,
7
+ "date_utc": "2026-10-06T22:35:55.106166+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 66,
29
+ "total_steps": 1336,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "distillation",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 66,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 15,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "small_cpu1_byte_15t",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "run_14 at 15 tok/param — small byte baseline with real budget.",
78
+ "is_proposed": true,
79
+ "_current_phase": 1,
80
+ "use_gradient_checkpointing": false
81
+ },
82
+ "step": 1336,
83
+ "stored_training_metrics": {
84
+ "run_name": "small_cpu1_byte_15t",
85
+ "perplexity": 263.87854846231494,
86
+ "tokens_per_sec_cpu": 25.499432457859598,
87
+ "ram_mb": 42.765484,
88
+ "val_loss": 5.575488953590393,
89
+ "n_params_M": 10.691371
90
+ },
91
+ "parameters": 10691371,
92
+ "parameter_bytes": 42765484,
93
+ "format": "fp32",
94
+ "strict_load": true,
95
+ "correctness": {
96
+ "forward_shapes": {
97
+ "status": "PASS",
98
+ "time_s": 0.85,
99
+ "result": {
100
+ "configs_tested": 6,
101
+ "heads": 4
102
+ }
103
+ },
104
+ "probs": {
105
+ "status": "PASS",
106
+ "time_s": 0.12,
107
+ "result": {
108
+ "max_error": 2.384185791015625e-07
109
+ }
110
+ },
111
+ "determinism": {
112
+ "status": "PASS",
113
+ "time_s": 0.15,
114
+ "result": {
115
+ "deterministic": true
116
+ }
117
+ },
118
+ "state_prop": {
119
+ "status": "FAIL",
120
+ "error": "State propagation error: 0.113838"
121
+ },
122
+ "ternary_weights": {
123
+ "status": "PASS",
124
+ "time_s": 0.3,
125
+ "result": {
126
+ "modules_checked": 73
127
+ }
128
+ },
129
+ "state_size": {
130
+ "status": "PASS",
131
+ "time_s": 0.04,
132
+ "result": {
133
+ "state_kb": 10.0,
134
+ "batch_size": 1,
135
+ "dtype": "float32"
136
+ }
137
+ },
138
+ "causality": {
139
+ "status": "FAIL",
140
+ "max_prefix_logit_diff": 0.015338700264692307,
141
+ "tolerance": 1e-05,
142
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
143
+ }
144
+ },
145
+ "loss": {
146
+ "mean_nll": 5.569992631673813,
147
+ "targets": 8192,
148
+ "unit": "byte",
149
+ "perplexity": 262.43216554735716,
150
+ "bits_per_byte": 8.035800747503876,
151
+ "mapped_ids_fraction": null,
152
+ "source": "shared_wikitext_test_sample",
153
+ "teacher_forcing": true,
154
+ "delete_gate": "disabled (phase 1, elimination 0)"
155
+ },
156
+ "benchmark": {
157
+ "forward_steps_per_second": 25.51489634902093,
158
+ "p50_ms": 37.39115000280435,
159
+ "p95_ms": 49.818200001027435,
160
+ "jitter_cv": 0.1295940412061917,
161
+ "warmup_steps": 10,
162
+ "measured_steps": 100,
163
+ "context_steps": 1,
164
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
165
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
166
+ },
167
+ "generation": [
168
+ {
169
+ "prompt": "The history of artificial intelligence",
170
+ "seed": 42,
171
+ "hex": "bea1c42bfd77bc2a2a74c37a21631c080b902ee29e29557605f1f05d1307ea12f2391ddc2a158c732c583ed68c7ebdbd76f58e252c552168210d3a2605db4338cb6d8c911eed1fb171b7f59e0550601c1e887d7dfc8bb04d71bf6ac2fd77989476985768cb652d982c56dc1c2ac8c93b53eb5d34f9726a884cada74721728e3a",
172
+ "text_replacement_decode": "���+�w�**t�z!c\u001c\b\u000b�.�)Uv\u0005��]\u0013\u0007�\u0012�9\u001d�*\u0015�s,X>֌~��v��%,U!h!\r:&\u0005�C8�m��\u001e�\u001f�q���\u0005P`\u001c\u001e�}}���Mq�j��w��v�Wh�e-�,V�\u001c*��;S�]4�rj�L��G!r�:",
173
+ "bytes": 128,
174
+ "utf8_valid": false,
175
+ "ascii_printable_fraction": 0.4765625,
176
+ "repeated_8byte_fraction": 0.0,
177
+ "seconds": 1.774018399999477,
178
+ "generated_bytes_per_second": 72.15257744792147
179
+ },
180
+ {
181
+ "prompt": "Once upon a time",
182
+ "seed": 43,
183
+ "hex": "64114c21be79a3ffcbb0044f2a0f67fafd0f74ba1e888fe489e974c47fd636171e5e13d57f14bf352ab768897f7e2e4013879f07b530ca5013afea9a7b602a77b567dcdedcd549867f54d9c5fd74dc660b588985b744b8e995b882db59b901867af96009b7bf7a89fd50c9305c322627b59f5b70890bf817399d14ac715e78d1",
184
+ "text_replacement_decode": "d\u0011L!�y��˰\u0004O*\u000fg��\u000ft�\u001e����t��6\u0017\u001e^\u0013�\u0014�5*�h�~.@\u0013��\u0007�0�P\u0013��{`*w�g����I�T���t�f\u000bX���D�镸��Y�\u0001�z�`\t��z��P�0\\2&'��[p�\u000b�\u00179�\u0014�q^x�",
185
+ "bytes": 128,
186
+ "utf8_valid": false,
187
+ "ascii_printable_fraction": 0.3671875,
188
+ "repeated_8byte_fraction": 0.0,
189
+ "seconds": 1.7814484999980778,
190
+ "generated_bytes_per_second": 71.85164207673594
191
+ },
192
+ {
193
+ "prompt": "The purpose of science is",
194
+ "seed": 44,
195
+ "hex": "7bd91b53e9bdc262dc206da7fc36732b8984597a61f8b1fae7fd8bccfcc0c2107621df3313d5b30a85c7872e7cdc88204c21d74789dc26c2dc87d8fe21727de02c41b977e08c947138980038395e90417137008976359dc4b7f53cd2fc13f109d02b7bf05c2678711e22ddcb641fc84b5955a05f5894fed9e47ab466f9dad9ac",
196
+ "text_replacement_decode": "{�\u001bS��b� m��6s+��Yza����������\u0010v!�3\u0013ճ\n�LJ.|܈ L!�G��&�܇��!r}�,A�w���q8�\u000089^�Aq7\u0000�v5�ķ�<��\u0013�\t�+{�\\&xq\u001e\"��d\u001f�KYU�_X����z�f��٬",
197
+ "bytes": 128,
198
+ "utf8_valid": false,
199
+ "ascii_printable_fraction": 0.4296875,
200
+ "repeated_8byte_fraction": 0.0,
201
+ "seconds": 1.6840223999970476,
202
+ "generated_bytes_per_second": 76.00849014848282
203
+ }
204
+ ],
205
+ "process_rss_bytes": 1121816576,
206
+ "total_seconds": 19.833103899996786,
207
+ "evaluation_complete": true
208
+ }
evaluation/run_14_v3.json ADDED
@@ -0,0 +1,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_14_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_14_v3/model.pt",
5
+ "sha256": "553f07ea4e4857e6099b224cf7ba099135450e78a94f6adb9ad894b199d1c3c4",
6
+ "file_bytes": 42821430,
7
+ "date_utc": "2026-10-06T22:36:13.544686+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 668,
29
+ "total_steps": 13364,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "distillation",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 668,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 50,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": true,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": true,
71
+ "use_embedding_alignment": false,
72
+ "name": "small_cpu1_byte",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "byte_dynamic",
75
+ "quantization": "ternary",
76
+ "fp_residual": true,
77
+ "use_bolmo_gating": true,
78
+ "description": "CPU-1 COMPLETE @ 10M, byte-level from scratch. Pure byte baseline for complement comparison.",
79
+ "cites": [
80
+ "MatMul-free LM",
81
+ "Slender-Mamba",
82
+ "Bolmo",
83
+ "MrT5"
84
+ ],
85
+ "is_proposed": true,
86
+ "_current_phase": 1,
87
+ "use_gradient_checkpointing": false
88
+ },
89
+ "step": 9775,
90
+ "stored_training_metrics": {},
91
+ "parameters": 10691371,
92
+ "parameter_bytes": 42765484,
93
+ "format": "fp32",
94
+ "strict_load": true,
95
+ "correctness": {
96
+ "forward_shapes": {
97
+ "status": "PASS",
98
+ "time_s": 0.89,
99
+ "result": {
100
+ "configs_tested": 6,
101
+ "heads": 4
102
+ }
103
+ },
104
+ "probs": {
105
+ "status": "PASS",
106
+ "time_s": 0.12,
107
+ "result": {
108
+ "max_error": 4.76837158203125e-07
109
+ }
110
+ },
111
+ "determinism": {
112
+ "status": "PASS",
113
+ "time_s": 0.17,
114
+ "result": {
115
+ "deterministic": true
116
+ }
117
+ },
118
+ "state_prop": {
119
+ "status": "FAIL",
120
+ "error": "State propagation error: 9.401281"
121
+ },
122
+ "ternary_weights": {
123
+ "status": "PASS",
124
+ "time_s": 0.31,
125
+ "result": {
126
+ "modules_checked": 73
127
+ }
128
+ },
129
+ "state_size": {
130
+ "status": "PASS",
131
+ "time_s": 0.04,
132
+ "result": {
133
+ "state_kb": 10.0,
134
+ "batch_size": 1,
135
+ "dtype": "float32"
136
+ }
137
+ },
138
+ "causality": {
139
+ "status": "FAIL",
140
+ "max_prefix_logit_diff": 5.065197944641113,
141
+ "tolerance": 1e-05,
142
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
143
+ }
144
+ },
145
+ "loss": {
146
+ "mean_nll": 0.8811068125069141,
147
+ "targets": 8192,
148
+ "unit": "byte",
149
+ "perplexity": 2.4135695976271205,
150
+ "bits_per_byte": 1.2711684288972067,
151
+ "mapped_ids_fraction": null,
152
+ "source": "shared_wikitext_test_sample",
153
+ "teacher_forcing": true,
154
+ "delete_gate": "disabled (phase 1, elimination 0)"
155
+ },
156
+ "benchmark": {
157
+ "forward_steps_per_second": 24.797052860281568,
158
+ "p50_ms": 37.63585000342573,
159
+ "p95_ms": 57.30349999794271,
160
+ "jitter_cv": 0.2172931177462806,
161
+ "warmup_steps": 10,
162
+ "measured_steps": 100,
163
+ "context_steps": 1,
164
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
165
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
166
+ },
167
+ "generation": [
168
+ {
169
+ "prompt": "The history of artificial intelligence",
170
+ "seed": 42,
171
+ "hex": "616c20432041504c454f5354726f726f672773204e432e204f7665726e657373204920436f2065666f726772616d2e0a417420326f64726f6d697374202d2043617265666f7272732c204d696c7a2044726f6c6f677920696e204d204f6e746f6f796f756d202c206f6e6520766f6c756d65206c6174652066726f6d206f6273",
172
+ "text_replacement_decode": "al C APLEOSTrorog's NC. Overness I Co eforgram.\nAt 2odromist - Careforrs, Milz Drology in M Ontooyoum , one volume late from obs",
173
+ "bytes": 128,
174
+ "utf8_valid": true,
175
+ "ascii_printable_fraction": 1.0,
176
+ "repeated_8byte_fraction": 0.0,
177
+ "seconds": 1.6099735000025248,
178
+ "generated_bytes_per_second": 79.50441420296625
179
+ },
180
+ {
181
+ "prompt": "Once upon a time",
182
+ "seed": 43,
183
+ "hex": "73206f662066616c6b2065646973746520636f66666f726f2064656d652e20776f756c64696e672c2069742077696c6c676f6f67672c206974202263686f6c61676f2c67650a2d204c6f2727667261696765206475746320627574746572732e204d65616c206f636f726b292064656d6f6e2077696c6c6f2064656d61746520",
184
+ "text_replacement_decode": "s of falk ediste cofforo deme. woulding, it willgoogg, it \"cholago,ge\n- Lo''fraige dutc butters. Meal ocork) demon willo demate ",
185
+ "bytes": 128,
186
+ "utf8_valid": true,
187
+ "ascii_printable_fraction": 1.0,
188
+ "repeated_8byte_fraction": 0.0,
189
+ "seconds": 1.8191082999983337,
190
+ "generated_bytes_per_second": 70.36414489457128
191
+ },
192
+ {
193
+ "prompt": "The purpose of science is",
194
+ "seed": 44,
195
+ "hex": "7570737443415a43454c2c207272726573747363612f43414e522044726f74656375736c652050416474206573746f636b204a6f6465642072656c6c6f77732e204d65706f20656c6c6c757265642070696e6520747275636b206e756564206465636f726b0a6c6164642050726f677261e2809920382050726f7065726f2773",
196
+ "text_replacement_decode": "upstCAZCEL, rrrestsca/CANR Drotecusle PAdt estock Joded rellows. Mepo elllured pine truck nued decork\nladd Progra’ 8 Propero's",
197
+ "bytes": 128,
198
+ "utf8_valid": true,
199
+ "ascii_printable_fraction": 0.9765625,
200
+ "repeated_8byte_fraction": 0.0,
201
+ "seconds": 1.5991556000008131,
202
+ "generated_bytes_per_second": 80.04224229332962
203
+ }
204
+ ],
205
+ "process_rss_bytes": 1122447360,
206
+ "total_seconds": 18.460807499999646,
207
+ "evaluation_complete": true
208
+ }
evaluation/run_15.json ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_15",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_15/model.pt",
5
+ "sha256": "9a78524371ab688b9801f2b754afa9a44cbd2db06a0f5cf5e9bb366a80497158",
6
+ "file_bytes": 42985714,
7
+ "date_utc": "2026-10-06T22:36:34.192350+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 600,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "distillation",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 30,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": true,
71
+ "name": "small_cpu1_byte_hidden",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "CPU-1 COMPLETE @ 10M, byte-level. Same as run_14 but WITH hidden states distillation (EmbeddingAligner). Does embedding alignment actually help over just logprobs?",
78
+ "cites": [
79
+ "MatMul-free LM",
80
+ "Slender-Mamba",
81
+ "Bolmo",
82
+ "MrT5"
83
+ ],
84
+ "_current_phase": 1,
85
+ "use_gradient_checkpointing": false
86
+ },
87
+ "step": 600,
88
+ "stored_training_metrics": {
89
+ "run_name": "small_cpu1_byte_hidden",
90
+ "perplexity": 263.8788164741678,
91
+ "tokens_per_sec_cpu": 24.456358912946797,
92
+ "ram_mb": 42.929324,
93
+ "val_loss": 5.57548996925354,
94
+ "n_params_M": 10.732331
95
+ },
96
+ "parameters": 10732331,
97
+ "parameter_bytes": 42929324,
98
+ "format": "fp32",
99
+ "strict_load": true,
100
+ "correctness": {
101
+ "forward_shapes": {
102
+ "status": "PASS",
103
+ "time_s": 0.82,
104
+ "result": {
105
+ "configs_tested": 6,
106
+ "heads": 4
107
+ }
108
+ },
109
+ "probs": {
110
+ "status": "PASS",
111
+ "time_s": 0.14,
112
+ "result": {
113
+ "max_error": 2.384185791015625e-07
114
+ }
115
+ },
116
+ "determinism": {
117
+ "status": "PASS",
118
+ "time_s": 0.16,
119
+ "result": {
120
+ "deterministic": true
121
+ }
122
+ },
123
+ "state_prop": {
124
+ "status": "FAIL",
125
+ "error": "State propagation error: 0.113838"
126
+ },
127
+ "ternary_weights": {
128
+ "status": "PASS",
129
+ "time_s": 0.33,
130
+ "result": {
131
+ "modules_checked": 73
132
+ }
133
+ },
134
+ "state_size": {
135
+ "status": "PASS",
136
+ "time_s": 0.04,
137
+ "result": {
138
+ "state_kb": 10.0,
139
+ "batch_size": 1,
140
+ "dtype": "float32"
141
+ }
142
+ },
143
+ "causality": {
144
+ "status": "FAIL",
145
+ "max_prefix_logit_diff": 0.015338700264692307,
146
+ "tolerance": 1e-05,
147
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
148
+ }
149
+ },
150
+ "loss": {
151
+ "mean_nll": 5.569992631673813,
152
+ "targets": 8192,
153
+ "unit": "byte",
154
+ "perplexity": 262.43216554735716,
155
+ "bits_per_byte": 8.035800747503876,
156
+ "mapped_ids_fraction": null,
157
+ "source": "shared_wikitext_test_sample",
158
+ "teacher_forcing": true,
159
+ "delete_gate": "disabled (phase 1, elimination 0)"
160
+ },
161
+ "benchmark": {
162
+ "forward_steps_per_second": 28.36435419812449,
163
+ "p50_ms": 35.05014999973355,
164
+ "p95_ms": 36.72079999523703,
165
+ "jitter_cv": 0.022401293019854072,
166
+ "warmup_steps": 10,
167
+ "measured_steps": 100,
168
+ "context_steps": 1,
169
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
170
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
171
+ },
172
+ "generation": [
173
+ {
174
+ "prompt": "The history of artificial intelligence",
175
+ "seed": 42,
176
+ "hex": "bea1c42bfd77bc2a2a74c37a21631c080b902ee29e29557605f1f05d1307ea12f2391ddc2a158c732c583ed68c7ebdbd76f58e252c552168210d3a2605db4338cb6d8c911eed1fb171b7f59e0550601c1e887d7dfc8bb04d71bf6ac2fd77989476985768cb652d982c56dc1c2ac8c93b53eb5d34f9726a884cada74721728e3a",
177
+ "text_replacement_decode": "���+�w�**t�z!c\u001c\b\u000b�.�)Uv\u0005��]\u0013\u0007�\u0012�9\u001d�*\u0015�s,X>֌~��v��%,U!h!\r:&\u0005�C8�m��\u001e�\u001f�q���\u0005P`\u001c\u001e�}}���Mq�j��w��v�Wh�e-�,V�\u001c*��;S�]4�rj�L��G!r�:",
178
+ "bytes": 128,
179
+ "utf8_valid": false,
180
+ "ascii_printable_fraction": 0.4765625,
181
+ "repeated_8byte_fraction": 0.0,
182
+ "seconds": 1.557773200001975,
183
+ "generated_bytes_per_second": 82.16857242109295
184
+ },
185
+ {
186
+ "prompt": "Once upon a time",
187
+ "seed": 43,
188
+ "hex": "64114c21be79a3ffcbb0044f2a0f67fafd0f74ba1e888fe489e974c47fd636171e5e13d57f14bf352ab768897f7e2e4013879f07b530ca5013afea9a7b602a77b567dcdedcd549867f54d9c5fd74dc660b588985b744b8e995b882db59b901867af96009b7bf7a89fd50c9305c322627b59f5b70890bf817399d14ac715e78d1",
189
+ "text_replacement_decode": "d\u0011L!�y��˰\u0004O*\u000fg��\u000ft�\u001e����t��6\u0017\u001e^\u0013�\u0014�5*�h�~.@\u0013��\u0007�0�P\u0013��{`*w�g����I�T���t�f\u000bX���D�镸��Y�\u0001�z�`\t��z��P�0\\2&'��[p�\u000b�\u00179�\u0014�q^x�",
190
+ "bytes": 128,
191
+ "utf8_valid": false,
192
+ "ascii_printable_fraction": 0.3671875,
193
+ "repeated_8byte_fraction": 0.0,
194
+ "seconds": 1.603526500002772,
195
+ "generated_bytes_per_second": 79.82406277649838
196
+ },
197
+ {
198
+ "prompt": "The purpose of science is",
199
+ "seed": 44,
200
+ "hex": "7bd91b53e9bdc262dc206da7fc36732b8984597a61f8b1fae7fd8bccfcc0c2107621df3313d5b30a85c7872e7cdc88204c21d74789dc26c2dc87d8fe21727de02c41b977e08c947138980038395e90417137008976359dc4b7f53cd2fc13f109d02b7bf05c2678711e22ddcb641fc84b5955a05f5894fed9e47ab466f9dad9ac",
201
+ "text_replacement_decode": "{�\u001bS��b� m��6s+��Yza����������\u0010v!�3\u0013ճ\n�LJ.|܈ L!�G��&�܇��!r}�,A�w���q8�\u000089^�Aq7\u0000�v5�ķ�<��\u0013�\t�+{�\\&xq\u001e\"��d\u001f�KYU�_X����z�f��٬",
202
+ "bytes": 128,
203
+ "utf8_valid": false,
204
+ "ascii_printable_fraction": 0.4296875,
205
+ "repeated_8byte_fraction": 0.0,
206
+ "seconds": 1.5438796999951592,
207
+ "generated_bytes_per_second": 82.90801414151721
208
+ }
209
+ ],
210
+ "process_rss_bytes": 1124716544,
211
+ "total_seconds": 20.14680000000226,
212
+ "evaluation_complete": true
213
+ }
evaluation/run_15_r2.json ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_15_r2",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_15_r2/model.pt",
5
+ "sha256": "5acf8861484fe31c49b59b50d816f0e7fee896da030773d8fab4428e06c19d7d",
6
+ "file_bytes": 42985522,
7
+ "date_utc": "2026-10-06T22:36:51.845825+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 67,
29
+ "total_steps": 1341,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "distillation",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 67,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 15,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": true,
71
+ "name": "small_cpu1_byte_hidden_15t",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "run_15 at 15 tok/param — small byte + hidden distillation with real budget.",
78
+ "_current_phase": 1,
79
+ "use_gradient_checkpointing": false
80
+ },
81
+ "step": 1341,
82
+ "stored_training_metrics": {
83
+ "run_name": "small_cpu1_byte_hidden_15t",
84
+ "perplexity": 263.8786541570977,
85
+ "tokens_per_sec_cpu": 29.607050555987094,
86
+ "ram_mb": 42.929324,
87
+ "val_loss": 5.575489354133606,
88
+ "n_params_M": 10.732331
89
+ },
90
+ "parameters": 10732331,
91
+ "parameter_bytes": 42929324,
92
+ "format": "fp32",
93
+ "strict_load": true,
94
+ "correctness": {
95
+ "forward_shapes": {
96
+ "status": "PASS",
97
+ "time_s": 0.86,
98
+ "result": {
99
+ "configs_tested": 6,
100
+ "heads": 4
101
+ }
102
+ },
103
+ "probs": {
104
+ "status": "PASS",
105
+ "time_s": 0.12,
106
+ "result": {
107
+ "max_error": 2.384185791015625e-07
108
+ }
109
+ },
110
+ "determinism": {
111
+ "status": "PASS",
112
+ "time_s": 0.16,
113
+ "result": {
114
+ "deterministic": true
115
+ }
116
+ },
117
+ "state_prop": {
118
+ "status": "FAIL",
119
+ "error": "State propagation error: 0.113838"
120
+ },
121
+ "ternary_weights": {
122
+ "status": "PASS",
123
+ "time_s": 0.3,
124
+ "result": {
125
+ "modules_checked": 73
126
+ }
127
+ },
128
+ "state_size": {
129
+ "status": "PASS",
130
+ "time_s": 0.04,
131
+ "result": {
132
+ "state_kb": 10.0,
133
+ "batch_size": 1,
134
+ "dtype": "float32"
135
+ }
136
+ },
137
+ "causality": {
138
+ "status": "FAIL",
139
+ "max_prefix_logit_diff": 0.015338700264692307,
140
+ "tolerance": 1e-05,
141
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
142
+ }
143
+ },
144
+ "loss": {
145
+ "mean_nll": 5.569992631673813,
146
+ "targets": 8192,
147
+ "unit": "byte",
148
+ "perplexity": 262.43216554735716,
149
+ "bits_per_byte": 8.035800747503876,
150
+ "mapped_ids_fraction": null,
151
+ "source": "shared_wikitext_test_sample",
152
+ "teacher_forcing": true,
153
+ "delete_gate": "disabled (phase 1, elimination 0)"
154
+ },
155
+ "benchmark": {
156
+ "forward_steps_per_second": 27.10355501337783,
157
+ "p50_ms": 36.5842999999586,
158
+ "p95_ms": 38.67999999783933,
159
+ "jitter_cv": 0.029223224141162765,
160
+ "warmup_steps": 10,
161
+ "measured_steps": 100,
162
+ "context_steps": 1,
163
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
164
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
165
+ },
166
+ "generation": [
167
+ {
168
+ "prompt": "The history of artificial intelligence",
169
+ "seed": 42,
170
+ "hex": "bea1c42bfd77bc2a2a74c37a21631c080b902ee29e29557605f1f05d1307ea12f2391ddc2a158c732c583ed68c7ebdbd76f58e252c552168210d3a2605db4338cb6d8c911eed1fb171b7f59e0550601c1e887d7dfc8bb04d71bf6ac2fd77989476985768cb652d982c56dc1c2ac8c93b53eb5d34f9726a884cada74721728e3a",
171
+ "text_replacement_decode": "���+�w�**t�z!c\u001c\b\u000b�.�)Uv\u0005��]\u0013\u0007�\u0012�9\u001d�*\u0015�s,X>֌~��v��%,U!h!\r:&\u0005�C8�m��\u001e�\u001f�q���\u0005P`\u001c\u001e�}}���Mq�j��w��v�Wh�e-�,V�\u001c*��;S�]4�rj�L��G!r�:",
172
+ "bytes": 128,
173
+ "utf8_valid": false,
174
+ "ascii_printable_fraction": 0.4765625,
175
+ "repeated_8byte_fraction": 0.0,
176
+ "seconds": 1.6320758999936515,
177
+ "generated_bytes_per_second": 78.42772508343386
178
+ },
179
+ {
180
+ "prompt": "Once upon a time",
181
+ "seed": 43,
182
+ "hex": "64114c21be79a3ffcbb0044f2a0f67fafd0f74ba1e888fe489e974c47fd636171e5e13d57f14bf352ab768897f7e2e4013879f07b530ca5013afea9a7b602a77b567dcdedcd549867f54d9c5fd74dc660b588985b744b8e995b882db59b901867af96009b7bf7a89fd50c9305c322627b59f5b70890bf817399d14ac715e78d1",
183
+ "text_replacement_decode": "d\u0011L!�y��˰\u0004O*\u000fg��\u000ft�\u001e����t��6\u0017\u001e^\u0013�\u0014�5*�h�~.@\u0013��\u0007�0�P\u0013��{`*w�g����I�T���t�f\u000bX���D�镸��Y�\u0001�z�`\t��z��P�0\\2&'��[p�\u000b�\u00179�\u0014�q^x�",
184
+ "bytes": 128,
185
+ "utf8_valid": false,
186
+ "ascii_printable_fraction": 0.3671875,
187
+ "repeated_8byte_fraction": 0.0,
188
+ "seconds": 1.6569901999973808,
189
+ "generated_bytes_per_second": 77.24849549514676
190
+ },
191
+ {
192
+ "prompt": "The purpose of science is",
193
+ "seed": 44,
194
+ "hex": "7bd91b53e9bdc262dc206da7fc36732b8984597a61f8b1fae7fd8bccfcc0c2107621df3313d5b30a85c7872e7cdc88204c21d74789dc26c2dc87d8fe21727de02c41b977e08c947138980038395e90417137008976359dc4b7f53cd2fc13f109d02b7bf05c2678711e22ddcb641fc84b5955a05f5894fed9e47ab466f9dad9ac",
195
+ "text_replacement_decode": "{�\u001bS��b� m��6s+��Yza����������\u0010v!�3\u0013ճ\n�LJ.|܈ L!�G��&�܇��!r}�,A�w���q8�\u000089^�Aq7\u0000�v5�ķ�<��\u0013�\t�+{�\\&xq\u001e\"��d\u001f�KYU�_X����z�f��٬",
196
+ "bytes": 128,
197
+ "utf8_valid": false,
198
+ "ascii_printable_fraction": 0.4296875,
199
+ "repeated_8byte_fraction": 0.0,
200
+ "seconds": 1.9535904000003939,
201
+ "generated_bytes_per_second": 65.5203874875584
202
+ }
203
+ ],
204
+ "process_rss_bytes": 1124716544,
205
+ "total_seconds": 17.659233999998833,
206
+ "evaluation_complete": true
207
+ }
evaluation/run_15_v3.json ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_15_v3",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_15_v3/model.pt",
5
+ "sha256": "4d192808ecde2c4d097448869e40641044477f7661bacc500971af8e4008682c",
6
+ "file_bytes": 42985522,
7
+ "date_utc": "2026-10-06T22:37:09.912902+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 670,
29
+ "total_steps": 13415,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "bitlinear_lr_scale": 2.0,
34
+ "grad_clip": 1.0,
35
+ "seed": 42,
36
+ "training_signal": "distillation",
37
+ "temperature": 4.0,
38
+ "alpha_kl": 0.9,
39
+ "alpha_ce": 0.1,
40
+ "dataset_repo": "Cukinator/cpu1-ablation-dataset",
41
+ "seq_len": 5000,
42
+ "patch_size": 4,
43
+ "use_local_decoder": true,
44
+ "local_decoder_dim": 128,
45
+ "local_decoder_heads": 4,
46
+ "local_decoder_ff_ratio": 4.0,
47
+ "local_decoder_fp16": false,
48
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints-v3",
49
+ "save_every_steps": 670,
50
+ "checkpoint_fraction": 0.05,
51
+ "log_every_steps": 50,
52
+ "chinchilla": true,
53
+ "chinchilla_tokens_per_param": 150,
54
+ "warmup_ratio": 0.05,
55
+ "target_elimination": 0.4,
56
+ "mlgru_use_wo": true,
57
+ "mlgru_state_expansion": 1,
58
+ "delete_gate_hard": true,
59
+ "delete_gate_gumbel": true,
60
+ "delete_gate_merge": true,
61
+ "delete_gate_bimodal_lambda": 0.05,
62
+ "bolmo_cross_attn_heads": 2,
63
+ "bolmo_cross_patch_window": 3,
64
+ "bolmo_causal_boundary": false,
65
+ "bolmo_causal_cross_patch": false,
66
+ "use_real_gather": true,
67
+ "phase2_budget_fraction": 0.5,
68
+ "use_ternary": true,
69
+ "use_boundary_predictor": false,
70
+ "use_delete_gate": true,
71
+ "use_embedding_alignment": true,
72
+ "name": "small_cpu1_byte_hidden",
73
+ "token_mixer": "mlgru",
74
+ "tokenization": "byte_dynamic",
75
+ "quantization": "ternary",
76
+ "fp_residual": true,
77
+ "use_bolmo_gating": true,
78
+ "description": "CPU-1 COMPLETE @ 10M, byte-level. Same as run_14 but WITH hidden states distillation (EmbeddingAligner). Does embedding alignment actually help over just logprobs?",
79
+ "cites": [
80
+ "MatMul-free LM",
81
+ "Slender-Mamba",
82
+ "Bolmo",
83
+ "MrT5"
84
+ ],
85
+ "_current_phase": 1,
86
+ "use_gradient_checkpointing": false
87
+ },
88
+ "step": 2350,
89
+ "stored_training_metrics": {},
90
+ "parameters": 10732331,
91
+ "parameter_bytes": 42929324,
92
+ "format": "fp32",
93
+ "strict_load": true,
94
+ "correctness": {
95
+ "forward_shapes": {
96
+ "status": "PASS",
97
+ "time_s": 0.95,
98
+ "result": {
99
+ "configs_tested": 6,
100
+ "heads": 4
101
+ }
102
+ },
103
+ "probs": {
104
+ "status": "PASS",
105
+ "time_s": 0.17,
106
+ "result": {
107
+ "max_error": 4.76837158203125e-07
108
+ }
109
+ },
110
+ "determinism": {
111
+ "status": "PASS",
112
+ "time_s": 0.28,
113
+ "result": {
114
+ "deterministic": true
115
+ }
116
+ },
117
+ "state_prop": {
118
+ "status": "FAIL",
119
+ "error": "State propagation error: 10.593928"
120
+ },
121
+ "ternary_weights": {
122
+ "status": "PASS",
123
+ "time_s": 0.71,
124
+ "result": {
125
+ "modules_checked": 73
126
+ }
127
+ },
128
+ "state_size": {
129
+ "status": "PASS",
130
+ "time_s": 0.05,
131
+ "result": {
132
+ "state_kb": 10.0,
133
+ "batch_size": 1,
134
+ "dtype": "float32"
135
+ }
136
+ },
137
+ "causality": {
138
+ "status": "FAIL",
139
+ "max_prefix_logit_diff": 4.2931718826293945,
140
+ "tolerance": 1e-05,
141
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
142
+ }
143
+ },
144
+ "loss": {
145
+ "mean_nll": 1.3248122613877058,
146
+ "targets": 8192,
147
+ "unit": "byte",
148
+ "perplexity": 3.7614791138386114,
149
+ "bits_per_byte": 1.9113000796129365,
150
+ "mapped_ids_fraction": null,
151
+ "source": "shared_wikitext_test_sample",
152
+ "teacher_forcing": true,
153
+ "delete_gate": "disabled (phase 1, elimination 0)"
154
+ },
155
+ "benchmark": {
156
+ "forward_steps_per_second": 14.168369019805501,
157
+ "p50_ms": 60.09875000017928,
158
+ "p95_ms": 124.85539999761386,
159
+ "jitter_cv": 0.5809716396771653,
160
+ "warmup_steps": 10,
161
+ "measured_steps": 100,
162
+ "context_steps": 1,
163
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
164
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
165
+ },
166
+ "generation": [
167
+ {
168
+ "prompt": "The history of artificial intelligence",
169
+ "seed": 42,
170
+ "hex": "6174206320636163636f756e657266727420726561637420636f6e6f722d626574742e20417661696c6162652e0a5468652041756e6f7261746f722e0a576520416772616c666f7220322e352063616d62756e747465727320746f206368616e636572732e205468617420666f6c6c6f7420737065637420636f6e7673746f70",
171
+ "text_replacement_decode": "at c caccounerfrt react conor-bett. Availabe.\nThe Aunorator.\nWe Agralfor 2.5 cambuntters to chancers. That follot spect convstop",
172
+ "bytes": 128,
173
+ "utf8_valid": true,
174
+ "ascii_printable_fraction": 1.0,
175
+ "repeated_8byte_fraction": 0.0,
176
+ "seconds": 2.516290300001856,
177
+ "generated_bytes_per_second": 50.86853452477466
178
+ },
179
+ {
180
+ "prompt": "Once upon a time",
181
+ "seed": 43,
182
+ "hex": "207468617420416c6c6f6f6b2e65736f2c2063616e20636c65666673746572732e2041206261636b64726f75732c20706174682066756c6c657273742062652063616e20736f66742073657265206368616c6c65726661746976652074686520666c61766f7572616520262053636f726f6c6c61746564207468652066617374",
183
+ "text_replacement_decode": " that Allook.eso, can cleffsters. A backdrous, path fullerst be can soft sere challerfative the flavourae & Scorollated the fast",
184
+ "bytes": 128,
185
+ "utf8_valid": true,
186
+ "ascii_printable_fraction": 1.0,
187
+ "repeated_8byte_fraction": 0.0,
188
+ "seconds": 2.610393400005705,
189
+ "generated_bytes_per_second": 49.0347546847614
190
+ },
191
+ {
192
+ "prompt": "The purpose of science is",
193
+ "seed": 44,
194
+ "hex": "652041432043616363756c6c6572666c2d70726563616d206368616c6c657273206279206368616e746f72732c207468616e2074616c6b7061726b6574204920617474656e74696f6e65742049277665737561746520677265656e206c6173746375616c2074797365206e65616c6f7463617475732c20746865206566666563",
195
+ "text_replacement_decode": "e AC Caccullerfl-precam challers by chantors, than talkparket I attentionet I'vesuate green lastcual tyse nealotcatus, the effec",
196
+ "bytes": 128,
197
+ "utf8_valid": true,
198
+ "ascii_printable_fraction": 1.0,
199
+ "repeated_8byte_fraction": 0.0,
200
+ "seconds": 1.9862601999993785,
201
+ "generated_bytes_per_second": 64.44271500785247
202
+ }
203
+ ],
204
+ "process_rss_bytes": 1124724736,
205
+ "total_seconds": 26.2917701999977,
206
+ "evaluation_complete": true
207
+ }
evaluation/run_16.json ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_16",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_16/model.pt",
5
+ "sha256": "b5d819e4f8a8f311b4f828461ab3d3f4888e6083ef8e41ddba775136a1217462",
6
+ "file_bytes": 42821558,
7
+ "date_utc": "2026-10-06T22:37:36.058274+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 50,
29
+ "total_steps": 600,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 30,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 2,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "small_cpu1_raw_bytes",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "CPU-1 COMPLETE @ 10M, raw bytes from scratch, zero teacher. Do Qwen logprobs in run_14 actually help vs pure CE?",
78
+ "cites": [
79
+ "MatMul-free LM",
80
+ "Slender-Mamba",
81
+ "Bolmo",
82
+ "MrT5"
83
+ ],
84
+ "_current_phase": 1,
85
+ "use_gradient_checkpointing": false
86
+ },
87
+ "step": 600,
88
+ "stored_training_metrics": {
89
+ "run_name": "small_cpu1_raw_bytes",
90
+ "perplexity": 263.85261048110783,
91
+ "tokens_per_sec_cpu": 24.947116603282986,
92
+ "ram_mb": 42.765484,
93
+ "val_loss": 5.57539065361023,
94
+ "n_params_M": 10.691371
95
+ },
96
+ "parameters": 10691371,
97
+ "parameter_bytes": 42765484,
98
+ "format": "fp32",
99
+ "strict_load": true,
100
+ "correctness": {
101
+ "forward_shapes": {
102
+ "status": "PASS",
103
+ "time_s": 1.03,
104
+ "result": {
105
+ "configs_tested": 6,
106
+ "heads": 4
107
+ }
108
+ },
109
+ "probs": {
110
+ "status": "PASS",
111
+ "time_s": 0.16,
112
+ "result": {
113
+ "max_error": 2.384185791015625e-07
114
+ }
115
+ },
116
+ "determinism": {
117
+ "status": "PASS",
118
+ "time_s": 0.15,
119
+ "result": {
120
+ "deterministic": true
121
+ }
122
+ },
123
+ "state_prop": {
124
+ "status": "FAIL",
125
+ "error": "State propagation error: 0.113838"
126
+ },
127
+ "ternary_weights": {
128
+ "status": "PASS",
129
+ "time_s": 0.38,
130
+ "result": {
131
+ "modules_checked": 73
132
+ }
133
+ },
134
+ "state_size": {
135
+ "status": "PASS",
136
+ "time_s": 0.05,
137
+ "result": {
138
+ "state_kb": 10.0,
139
+ "batch_size": 1,
140
+ "dtype": "float32"
141
+ }
142
+ },
143
+ "causality": {
144
+ "status": "FAIL",
145
+ "max_prefix_logit_diff": 0.015338700264692307,
146
+ "tolerance": 1e-05,
147
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
148
+ }
149
+ },
150
+ "loss": {
151
+ "mean_nll": 5.569992631673813,
152
+ "targets": 8192,
153
+ "unit": "byte",
154
+ "perplexity": 262.43216554735716,
155
+ "bits_per_byte": 8.035800747503876,
156
+ "mapped_ids_fraction": null,
157
+ "source": "shared_wikitext_test_sample",
158
+ "teacher_forcing": true,
159
+ "delete_gate": "disabled (phase 1, elimination 0)"
160
+ },
161
+ "benchmark": {
162
+ "forward_steps_per_second": 20.261313811418617,
163
+ "p50_ms": 44.72705000080168,
164
+ "p95_ms": 73.84989999991376,
165
+ "jitter_cv": 0.24129946884818665,
166
+ "warmup_steps": 10,
167
+ "measured_steps": 100,
168
+ "context_steps": 1,
169
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
170
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
171
+ },
172
+ "generation": [
173
+ {
174
+ "prompt": "The history of artificial intelligence",
175
+ "seed": 42,
176
+ "hex": "bea1c42bfd77bc2a2a74c37a21631c080b902ee29e29557605f1f05d1307ea12f2391ddc2a158c732c583ed68c7ebdbd76f58e252c552168210d3a2605db4338cb6d8c911eed1fb171b7f59e0550601c1e887d7dfc8bb04d71bf6ac2fd77989476985768cb652d982c56dc1c2ac8c93b53eb5d34f9726a884cada74721728e3a",
177
+ "text_replacement_decode": "���+�w�**t�z!c\u001c\b\u000b�.�)Uv\u0005��]\u0013\u0007�\u0012�9\u001d�*\u0015�s,X>֌~��v��%,U!h!\r:&\u0005�C8�m��\u001e�\u001f�q���\u0005P`\u001c\u001e�}}���Mq�j��w��v�Wh�e-�,V�\u001c*��;S�]4�rj�L��G!r�:",
178
+ "bytes": 128,
179
+ "utf8_valid": false,
180
+ "ascii_printable_fraction": 0.4765625,
181
+ "repeated_8byte_fraction": 0.0,
182
+ "seconds": 1.7613822999992408,
183
+ "generated_bytes_per_second": 72.67019771917498
184
+ },
185
+ {
186
+ "prompt": "Once upon a time",
187
+ "seed": 43,
188
+ "hex": "64114c21be79a3ffcbb0044f2a0f67fafd0f74ba1e888fe489e974c47fd636171e5e13d57f14bf352ab768897f7e2e4013879f07b530ca5013afea9a7b602a77b567dcdedcd549867f54d9c5fd74dc660b588985b744b8e995b882db59b901867af96009b7bf7a89fd50c9305c322627b59f5b70890bf817399d14ac715e78d1",
189
+ "text_replacement_decode": "d\u0011L!�y��˰\u0004O*\u000fg��\u000ft�\u001e����t��6\u0017\u001e^\u0013�\u0014�5*�h�~.@\u0013��\u0007�0�P\u0013��{`*w�g����I�T���t�f\u000bX���D�镸��Y�\u0001�z�`\t��z��P�0\\2&'��[p�\u000b�\u00179�\u0014�q^x�",
190
+ "bytes": 128,
191
+ "utf8_valid": false,
192
+ "ascii_printable_fraction": 0.3671875,
193
+ "repeated_8byte_fraction": 0.0,
194
+ "seconds": 1.7773071999981767,
195
+ "generated_bytes_per_second": 72.01906344616806
196
+ },
197
+ {
198
+ "prompt": "The purpose of science is",
199
+ "seed": 44,
200
+ "hex": "7bd91b53e9bdc262dc206da7fc36732b8984597a61f8b1fae7fd8bccfcc0c2107621df3313d5b30a85c7872e7cdc88204c21d74789dc26c2dc87d8fe21727de02c41b977e08c947138980038395e90417137008976359dc4b7f53cd2fc13f109d02b7bf05c2678711e22ddcb641fc84b5955a05f5894fed9e47ab466f9dad9ac",
201
+ "text_replacement_decode": "{�\u001bS��b� m��6s+��Yza����������\u0010v!�3\u0013ճ\n�LJ.|܈ L!�G��&�܇��!r}�,A�w���q8�\u000089^�Aq7\u0000�v5�ķ�<��\u0013�\t�+{�\\&xq\u001e\"��d\u001f�KYU�_X����z�f��٬",
202
+ "bytes": 128,
203
+ "utf8_valid": false,
204
+ "ascii_printable_fraction": 0.4296875,
205
+ "repeated_8byte_fraction": 0.0,
206
+ "seconds": 1.8214621000006446,
207
+ "generated_bytes_per_second": 70.27321622555567
208
+ }
209
+ ],
210
+ "process_rss_bytes": 1124716544,
211
+ "total_seconds": 19.97216300000582,
212
+ "evaluation_complete": true
213
+ }
evaluation/run_16_r2.json ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "run": "run_16_r2",
3
+ "revision": "65951289352c1a036b12ba6d888af037e7c90b13",
4
+ "file": "run_16_r2/model.pt",
5
+ "sha256": "de69bc54a1eba051f8714a3fbfb792643da7f96c6c53626857f6b9043dd8c5df",
6
+ "file_bytes": 42821430,
7
+ "date_utc": "2026-10-06T22:37:56.672066+00:00",
8
+ "threads": 1,
9
+ "torch": "2.6.0+cu124",
10
+ "platform": "Windows-11-10.0.26200-SP0",
11
+ "processor": "Intel64 Family 6 Model 158 Stepping 10, GenuineIntel",
12
+ "corpus_sha256": "11d143c06478ff7bbe364c541a58e6a2e76504c4cb0595b294f46e98f3cfe798",
13
+ "suite_sha256": "8270986de378061f5937687f77288da46d8ff1fdc4938b098dc32cf8fcf678af",
14
+ "seed": 42,
15
+ "config": {
16
+ "d_model": 320,
17
+ "n_layers": 8,
18
+ "d_ff": 853,
19
+ "fp_rank": 4,
20
+ "n_heads": 8,
21
+ "head_dim": 40,
22
+ "window_size": 256,
23
+ "pfnet_hidden": 0,
24
+ "batch_per_gpu": 8,
25
+ "gradient_accumulation_steps": 3,
26
+ "lr": 0.0003,
27
+ "min_lr": 3e-05,
28
+ "warmup_steps": 66,
29
+ "total_steps": 1336,
30
+ "weight_decay_bitlinear": 0.1,
31
+ "weight_decay_fpresidual": 0.0,
32
+ "weight_decay_heads": 0.01,
33
+ "grad_clip": 1.0,
34
+ "seed": 42,
35
+ "training_signal": "ce_only",
36
+ "temperature": 4.0,
37
+ "alpha_kl": 0.9,
38
+ "alpha_ce": 0.1,
39
+ "dataset_repo": "HuggingFaceFW/fineweb",
40
+ "seq_len": 5000,
41
+ "patch_size": 4,
42
+ "use_local_decoder": true,
43
+ "local_decoder_dim": 128,
44
+ "local_decoder_heads": 4,
45
+ "local_decoder_ff_ratio": 4.0,
46
+ "local_decoder_fp16": false,
47
+ "checkpoint_repo": "Cukinator/cpu1-ablation-checkpoints",
48
+ "save_every_steps": 66,
49
+ "checkpoint_fraction": 0.05,
50
+ "log_every_steps": 50,
51
+ "chinchilla": true,
52
+ "chinchilla_tokens_per_param": 15,
53
+ "warmup_ratio": 0.05,
54
+ "target_elimination": 0.4,
55
+ "mlgru_use_wo": true,
56
+ "mlgru_state_expansion": 1,
57
+ "delete_gate_hard": true,
58
+ "delete_gate_gumbel": true,
59
+ "delete_gate_merge": true,
60
+ "delete_gate_bimodal_lambda": 0.05,
61
+ "bolmo_cross_attn_heads": 2,
62
+ "bolmo_cross_patch_window": 3,
63
+ "bolmo_causal_boundary": false,
64
+ "bolmo_causal_cross_patch": false,
65
+ "use_real_gather": true,
66
+ "phase2_budget_fraction": 0.5,
67
+ "use_ternary": true,
68
+ "use_boundary_predictor": false,
69
+ "use_delete_gate": true,
70
+ "use_embedding_alignment": false,
71
+ "name": "small_cpu1_raw_bytes_15t",
72
+ "token_mixer": "mlgru",
73
+ "tokenization": "byte_dynamic",
74
+ "quantization": "ternary",
75
+ "fp_residual": true,
76
+ "use_bolmo_gating": true,
77
+ "description": "run_16 at 15 tok/param — small raw bytes no teacher with real budget.",
78
+ "_current_phase": 1,
79
+ "use_gradient_checkpointing": false
80
+ },
81
+ "step": 1336,
82
+ "stored_training_metrics": {
83
+ "run_name": "small_cpu1_raw_bytes_15t",
84
+ "perplexity": 263.85261048110783,
85
+ "tokens_per_sec_cpu": 29.872668562784426,
86
+ "ram_mb": 42.765484,
87
+ "val_loss": 5.57539065361023,
88
+ "n_params_M": 10.691371
89
+ },
90
+ "parameters": 10691371,
91
+ "parameter_bytes": 42765484,
92
+ "format": "fp32",
93
+ "strict_load": true,
94
+ "correctness": {
95
+ "forward_shapes": {
96
+ "status": "PASS",
97
+ "time_s": 0.96,
98
+ "result": {
99
+ "configs_tested": 6,
100
+ "heads": 4
101
+ }
102
+ },
103
+ "probs": {
104
+ "status": "PASS",
105
+ "time_s": 0.14,
106
+ "result": {
107
+ "max_error": 2.384185791015625e-07
108
+ }
109
+ },
110
+ "determinism": {
111
+ "status": "PASS",
112
+ "time_s": 0.19,
113
+ "result": {
114
+ "deterministic": true
115
+ }
116
+ },
117
+ "state_prop": {
118
+ "status": "FAIL",
119
+ "error": "State propagation error: 0.113838"
120
+ },
121
+ "ternary_weights": {
122
+ "status": "PASS",
123
+ "time_s": 0.35,
124
+ "result": {
125
+ "modules_checked": 73
126
+ }
127
+ },
128
+ "state_size": {
129
+ "status": "PASS",
130
+ "time_s": 0.07,
131
+ "result": {
132
+ "state_kb": 10.0,
133
+ "batch_size": 1,
134
+ "dtype": "float32"
135
+ }
136
+ },
137
+ "causality": {
138
+ "status": "FAIL",
139
+ "max_prefix_logit_diff": 0.015338700264692307,
140
+ "tolerance": 1e-05,
141
+ "protocol": "32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets"
142
+ }
143
+ },
144
+ "loss": {
145
+ "mean_nll": 5.569992631673813,
146
+ "targets": 8192,
147
+ "unit": "byte",
148
+ "perplexity": 262.43216554735716,
149
+ "bits_per_byte": 8.035800747503876,
150
+ "mapped_ids_fraction": null,
151
+ "source": "shared_wikitext_test_sample",
152
+ "teacher_forcing": true,
153
+ "delete_gate": "disabled (phase 1, elimination 0)"
154
+ },
155
+ "benchmark": {
156
+ "forward_steps_per_second": 21.75271074666565,
157
+ "p50_ms": 43.28940000050352,
158
+ "p95_ms": 59.958300000289455,
159
+ "jitter_cv": 0.16876140607108184,
160
+ "warmup_steps": 10,
161
+ "measured_steps": 100,
162
+ "context_steps": 1,
163
+ "backend": "PyTorch FP32; quantization simulated for ternary modules; no C++ kernels",
164
+ "meaning": "one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context"
165
+ },
166
+ "generation": [
167
+ {
168
+ "prompt": "The history of artificial intelligence",
169
+ "seed": 42,
170
+ "hex": "bea1c42bfd77bc2a2a74c37a21631c080b902ee29e29557605f1f05d1307ea12f2391ddc2a158c732c583ed68c7ebdbd76f58e252c552168210d3a2605db4338cb6d8c911eed1fb171b7f59e0550601c1e887d7dfc8bb04d71bf6ac2fd77989476985768cb652d982c56dc1c2ac8c93b53eb5d34f9726a884cada74721728e3a",
171
+ "text_replacement_decode": "���+�w�**t�z!c\u001c\b\u000b�.�)Uv\u0005��]\u0013\u0007�\u0012�9\u001d�*\u0015�s,X>֌~��v��%,U!h!\r:&\u0005�C8�m��\u001e�\u001f�q���\u0005P`\u001c\u001e�}}���Mq�j��w��v�Wh�e-�,V�\u001c*��;S�]4�rj�L��G!r�:",
172
+ "bytes": 128,
173
+ "utf8_valid": false,
174
+ "ascii_printable_fraction": 0.4765625,
175
+ "repeated_8byte_fraction": 0.0,
176
+ "seconds": 2.2022562000056496,
177
+ "generated_bytes_per_second": 58.12221121215217
178
+ },
179
+ {
180
+ "prompt": "Once upon a time",
181
+ "seed": 43,
182
+ "hex": "64114c21be79a3ffcbb0044f2a0f67fafd0f74ba1e888fe489e974c47fd636171e5e13d57f14bf352ab768897f7e2e4013879f07b530ca5013afea9a7b602a77b567dcdedcd549867f54d9c5fd74dc660b588985b744b8e995b882db59b901867af96009b7bf7a89fd50c9305c322627b59f5b70890bf817399d14ac715e78d1",
183
+ "text_replacement_decode": "d\u0011L!�y��˰\u0004O*\u000fg��\u000ft�\u001e����t��6\u0017\u001e^\u0013�\u0014�5*�h�~.@\u0013��\u0007�0�P\u0013��{`*w�g����I�T���t�f\u000bX���D�镸��Y�\u0001�z�`\t��z��P�0\\2&'��[p�\u000b�\u00179�\u0014�q^x�",
184
+ "bytes": 128,
185
+ "utf8_valid": false,
186
+ "ascii_printable_fraction": 0.3671875,
187
+ "repeated_8byte_fraction": 0.0,
188
+ "seconds": 2.5568946999992477,
189
+ "generated_bytes_per_second": 50.060724049386025
190
+ },
191
+ {
192
+ "prompt": "The purpose of science is",
193
+ "seed": 44,
194
+ "hex": "7bd91b53e9bdc262dc206da7fc36732b8984597a61f8b1fae7fd8bccfcc0c2107621df3313d5b30a85c7872e7cdc88204c21d74789dc26c2dc87d8fe21727de02c41b977e08c947138980038395e90417137008976359dc4b7f53cd2fc13f109d02b7bf05c2678711e22ddcb641fc84b5955a05f5894fed9e47ab466f9dad9ac",
195
+ "text_replacement_decode": "{�\u001bS��b� m��6s+��Yza����������\u0010v!�3\u0013ճ\n�LJ.|܈ L!�G��&�܇��!r}�,A�w���q8�\u000089^�Aq7\u0000�v5�ķ�<��\u0013�\t�+{�\\&xq\u001e\"��d\u001f�KYU�_X����z�f��٬",
196
+ "bytes": 128,
197
+ "utf8_valid": false,
198
+ "ascii_printable_fraction": 0.4296875,
199
+ "repeated_8byte_fraction": 0.0,
200
+ "seconds": 2.194542299999739,
201
+ "generated_bytes_per_second": 58.32651300456374
202
+ }
203
+ ],
204
+ "process_rss_bytes": 1124716544,
205
+ "total_seconds": 21.666846000000078,
206
+ "evaluation_complete": true
207
+ }
evaluation/source/audit_model_cards.py ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Generate every model README from the audited Hub inventory and fresh JSONs."""
2
+ from collections import defaultdict
3
+ from datetime import datetime
4
+ import json
5
+ from pathlib import Path
6
+ import re
7
+ import sys
8
+
9
+ from audit_readmes import ROOT, OUT, FINAL, ARCHIVE, DATA, DATA_REV, DATA_FILE, PROMPTS, sha
10
+
11
+
12
+ def link(repo, filename, revision='main'):
13
+ return f'https://huggingface.co/{repo}/blob/{revision}/{filename}'
14
+
15
+
16
+ def manifest_rows(inventory):
17
+ folders = defaultdict(list)
18
+ for f in inventory[ARCHIVE]['siblings']:
19
+ if f['rfilename'].endswith('.pt'):
20
+ folders[f['rfilename'].split('/')[0]].append(f)
21
+ rows = ['| Folder | Step files | Highest filename step | Final file MB | Total GB |', '|---|---:|---:|---:|---:|']
22
+ for run, files in sorted(folders.items()):
23
+ steps = [int(m.group(1)) for f in files if (m := re.search(r'_step(\d+)\.pt$', f['rfilename']))]
24
+ finals = [f for f in files if f['rfilename'].endswith('_final.pt')]
25
+ final = f'{sum(f["size"] for f in finals)/1e6:.2f}' if finals else '—'
26
+ rows.append(f'| `{run}` | {len(steps)} | {max(steps) if steps else "—"} | {final} | {sum(f["size"] for f in files)/1e9:.3f} |')
27
+ return rows
28
+
29
+
30
+ def protocol(inventory, corpus, records):
31
+ return [
32
+ '## Evaluation protocol', '',
33
+ f'This card was rebuilt from a fresh CPU audit on **2026-10-06**. All {len(records)} published FP32 exports were attempted; {sum(r.get("strict_load",False) for r in records)} loaded with zero missing or unexpected state keys. Numerical and loading errors remain visible. Raw JSON, the exact text sample, and the repository inventories are included in [`evaluation/`](evaluation/). Previous `resultados/ablation_*.json` reports are historical and were not mixed into these tables.', '',
34
+ '- Hardware: Intel Core i7-8750H (6 cores / 12 logical processors), Windows 11; CPU execution with **1 PyTorch thread**, batch size 1, FP32 parameters. PyTorch ' + records[0]['torch'] + '. No custom C/C++ kernels were used.',
35
+ '- Test text: [`Salesforce/wikitext`, `wikitext-2-raw-v1`, test split](https://huggingface.co/datasets/Salesforce/wikitext). First 32 non-heading paragraphs with at least 260 UTF-8 bytes, each truncated to 260 bytes without an incomplete trailing character. This is a small diagnostic sample, not the complete benchmark. No exhaustive training-overlap audit was performed.',
36
+ '- Corpus attribution: WikiText by its dataset authors, based on English Wikipedia contributions. The dataset metadata lists CC-BY-SA-3.0 and GFDL; the included corpus excerpt retains those upstream terms, separately from the model repository license. See `evaluation/CORPUS_LICENSE.txt`.',
37
+ f'- Dataset revision: `{DATA_REV}`; exact file: `{DATA_FILE}`; parquet SHA-256: `{corpus["parquet_sha256"]}`.',
38
+ f'- Shared sample JSON SHA-256: `{sha(OUT/"corpus.json")}`.',
39
+ '- Byte targets are the next patch; incomplete final patches are discarded. The first patch is context only. LocalByteDecoder receives ground-truth target bytes and shifts them internally for causal teacher forcing within a patch. Cross-entropy is summed over all targets and divided by their total count.',
40
+ '- Byte loss is nats/byte; `BPB = NLL / ln(2)` and byte PPL is `exp(NLL)`. A uniform byte predictor gives BPB=8 and PPL=256. BPE loss uses Qwen2.5-3B token IDs with IDs outside the configured vocabulary mapped to 0, matching the dataset adapter. Its PPL is over that lossy mapped token stream and cannot be compared with byte PPL or interpreted as the likelihood of the original text.',
41
+ '- All BPE models shared one resolved Qwen tokenizer in this run. Its resolved revision is recorded in `run_01.json` and `environment.json`; reuse that tokenizer revision/cache for strict reproduction. The current evaluator resolves the tokenizer Hub name at runtime rather than hard-coding that revision.',
42
+ '- Causality: change the last 16 of 32 input steps and compare all prefix logits, tolerance `1e-5`. Recurrent chunk equivalence: compare a 128-step forward against four 32-step chunks across all output heads, tolerance `1e-4`. Failed checks remain visible.',
43
+ '- DeleteGate is disabled consistently: phase 1, elimination rate 0. The audit does not measure token elimination, phase-2 quality, or the benefit of DeleteGate.',
44
+ '- Forward timing: 10 warm-up steps, then 100 measured single-input forwards. `steps/s = 100 / total measured seconds`; p50 and p95 are per-step latency. One byte-model step consumes a patch of 4 bytes; one BPE step consumes one token. Local decoder inputs are zeros in this microbenchmark. Transformer timing has one input step and no persistent attention context. This is not a context-scaling test or a generation benchmark.',
45
+ '- Byte generation: three prompts, 128 new bytes per prompt, seeds 42/43/44, temperature 1.0, top-k 40, top-p 0.9. Recurrent models carry state; Transformers reprocess the growing context. Generated bytes/s includes prompt prefill and local sampling. UTF-8 validity is tested on the complete continuation. Samples are retained as hex and decoded text. BPE generation is N/A because vocabulary truncation prevents an equivalent byte-output comparison.',
46
+ '- Printable ASCII fraction, UTF-8 validity, and repetition are diagnostics; they do not measure factual accuracy, instruction following, or useful language quality. RAM columns report parameter storage, not a measured peak process footprint. Ternary models still hold FP32 parameters and simulate quantization in PyTorch.', '',
47
+ f'Export repository revision audited: `{inventory[FINAL]["sha"]}`. Archive inventory revision: `{inventory[ARCHIVE]["sha"]}`. Each result records its checkpoint SHA-256, actual parameter count, saved step, configuration, thread count, time, sample hash, and evaluator hash.', '',
48
+ '### Reproduce', '',
49
+ 'From the source checkout, install PyTorch plus `huggingface_hub`, `transformers`, `tokenizers`, `pyarrow`, `psutil`, `numpy`, and `datasets`. Pin the versions from `evaluation/environment.json` when reproducing this run.', '',
50
+ 'The audit additions are bundled in `evaluation/source/`. Copy those Python files into the checkout’s `eval/` directory when using a source revision that predates this audit. The base Git commit is recorded in `evaluation/environment.json`.', '',
51
+ '```powershell',
52
+ 'python eval/audit_readmes.py --storage D:/cpu1-readme-audit --threads 1',
53
+ 'python eval/audit_readmes.py --storage D:/cpu1-readme-audit --cards',
54
+ '```', '',
55
+ 'Model downloads, tokenizer files, Hugging Face caches, and temporary files go to D:. Only one model checkpoint is kept in the task storage at a time; it is removed after its result is saved. Interrupted runs resume from matching evaluator hashes. Raw reports remain in `resultados/readme_audit/`.', '',
56
+ ]
57
+
58
+
59
+ def tables(records):
60
+ lines = ['## Fresh diagnostic results', '',
61
+ '**Do not rank models across tokenizations or treat a failed-causality loss as autoregressive language-model perplexity.** Saved training metrics are retained separately in the JSONs; the numbers below are recomputed on the shared test sample.', '']
62
+ for byte in (True, False):
63
+ lines += ['### Byte models' if byte else '### BPE models (mapped Qwen token stream)', '',
64
+ '| Run | Params M | Saved step | File MB | NLL | BPB | PPL | Causal | State chunks |',
65
+ '|---|---:|---:|---:|---:|---:|---:|---|---|']
66
+ for r in records:
67
+ if 'config' not in r or (r['config']['tokenization'] in ('byte','byte_dynamic')) != byte:
68
+ continue
69
+ lm = r.get('loss')
70
+ cc = r['correctness']
71
+ if lm is None:
72
+ lines.append(f'| [`{r["run"]}`](evaluation/{r["run"]}.json) | {r["parameters"]/1e6:.3f} | {r["step"]} | {r["file_bytes"]/1e6:.2f} | ERROR | — | — | {cc["causality"]["status"]} | {cc["state_prop"]["status"]} |')
73
+ continue
74
+ bpb = f'{lm["bits_per_byte"]:.4f}' if byte else '—'
75
+ lines.append(f'| [`{r["run"]}`](evaluation/{r["run"]}.json) | {r["parameters"]/1e6:.3f} | {r["step"]} | {r["file_bytes"]/1e6:.2f} | {lm["mean_nll"]:.4f} | {bpb} | {lm["perplexity"]:.3f} | {cc["causality"]["status"]} | {cc["state_prop"]["status"]} |')
76
+ if not byte:
77
+ lines += ['', '| BPE run | IDs mapped to 0 | Vocabulary cap |', '|---|---:|---:|']
78
+ for r in records:
79
+ if r.get('config',{}).get('tokenization') == 'bpe' and 'loss' in r:
80
+ lines.append(f'| `{r["run"]}` | {r["loss"]["mapped_ids_fraction"]*100:.2f}% | {r["config"]["bpe_vocab_size"]:,} |')
81
+ lines += ['']
82
+ lines += ['### CPU timing and byte generation', '', '| Run | Param MB (FP32) | Forward steps/s | p50 ms | p95 ms | Generated bytes/s | Valid UTF-8 samples |', '|---|---:|---:|---:|---:|---:|---:|']
83
+ for r in records:
84
+ bm = r.get('benchmark')
85
+ gen = r.get('generation')
86
+ if bm is None:
87
+ lines.append(f'| `{r["run"]}` | {r.get("parameter_bytes",0)/1e6:.2f} | ERROR | — | — | N/A | N/A |')
88
+ continue
89
+ if isinstance(gen, list):
90
+ speed = f'{sum(s["bytes"] for s in gen)/sum(s["seconds"] for s in gen):.2f}'
91
+ utf = f'{sum(s["utf8_valid"] for s in gen)}/{len(gen)}'
92
+ else:
93
+ speed = utf = 'N/A'
94
+ lines.append(f'| `{r["run"]}` | {r["parameter_bytes"]/1e6:.2f} | {bm["forward_steps_per_second"]:.2f} | {bm["p50_ms"]:.2f} | {bm["p95_ms"]:.2f} | {speed} | {utf} |')
95
+ lines += ['', '### Example continuations', '',
96
+ 'The following fixed examples use the first audit prompt, `The history of artificial intelligence`, seed 42, and the sampling settings above. They illustrate why low diagnostic loss or valid UTF-8 alone does not establish useful text generation. Escapes preserve the recorded characters; complete byte sequences and all three prompts are in the JSON reports.', '']
97
+ for name in ('run_04_v3','run_14_v3'):
98
+ r = next((r for r in records if r['run']==name),None)
99
+ if r and isinstance(r.get('generation'),list):
100
+ lines += [f'`{name}`:', '', '```text', json.dumps(r['generation'][0]['text_replacement_decode'],ensure_ascii=True), '```', '']
101
+ lines += ['', '### Correctness checks', '', '| Run | Shapes | Probabilities | Determinism | State chunks | Ternary projection | State size | Causality |', '|---|---|---|---|---|---|---|---|']
102
+ keys = ['forward_shapes','probs','determinism','state_prop','ternary_weights','state_size','causality']
103
+ for r in records:
104
+ lines.append('| `' + r['run'] + '` | ' + ' | '.join(r.get('correctness',{}).get(k,{}).get('status','ERROR') for k in keys) + ' |')
105
+ failed_causal = [r['run'] for r in records if r.get('correctness',{}).get('causality',{}).get('status')=='FAIL']
106
+ failed_state = [r['run'] for r in records if r.get('correctness',{}).get('state_prop',{}).get('status')=='FAIL']
107
+ lines += ['', f'**Causality failures: {len(failed_causal)}/{len(records)}.** ' + (', '.join(f'`{r}`' for r in failed_causal) or 'None.'), '',
108
+ 'Changing future inputs changed prefix logits in these models. Some saved configurations enable noncausal Bolmo cross-patch operations; the test detects the effect without isolating its individual source. Their full-sequence losses are descriptive reconstruction scores and cannot establish causal prediction quality.', '',
109
+ f'**State chunk failures: {len(failed_state)}.** ' + (', '.join(f'`{r}`' for r in failed_state) or 'None.'), '',
110
+ 'These configurations did not reproduce a full-sequence forward when carrying state between chunks at the stated tolerance. An O(1) state tensor alone does not establish correct streaming equivalence. No fix to the trained architectures or weights was made for this audit.', '']
111
+ diagnostic = OUT/'implementation_diagnostics.json'
112
+ if diagnostic.exists():
113
+ d = json.loads(diagnostic.read_text(encoding='utf-8'))
114
+ lines += ['### Recurrent implementation diagnostic', '',
115
+ f'The source’s `AblationMLGRU._parallel_scan` was tested independently against its defining serial recurrence with random candidate/forget tensors, seed 19, shape `[1,32,8]`, FP32. The maximum difference was **{d["serial_max_diff"]:.6f}**; splitting the same scan into two 16-step chunks differed by **{d["chunks_max_diff"]:.6f}** (tolerance `1e-4`). See [`implementation_diagnostics.json`](evaluation/implementation_diagnostics.json) and the bundled `audit_primitives.py`.', '',
116
+ 'The implementation replaces log-cumulative-sum-exp with a cumulative-maximum normalization followed by a cumulative sum; accumulated terms are not rescaled when that maximum changes. The observed outputs therefore do not satisfy the intended recurrence. This is a source implementation defect; disabling or repairing the scan would create a different inference protocol and was not silently applied to these results. The trained-checkpoint audit uses the source as supplied.', '']
117
+ errors = [r for r in records if r.get('error')]
118
+ if errors:
119
+ lines += ['### Evaluation errors', '', 'Scores and speed are unavailable when model loading or numerical evaluation fails. Nonfinite values are represented as JSON null; they are never substituted with valid-looking numbers.', '', '| Run | Error |', '|---|---|']
120
+ lines += [f'| `{r["run"]}` | {r["error"].replace("|","/")} |' for r in errors]
121
+ lines += ['']
122
+ return lines
123
+
124
+
125
+ def architecture(records):
126
+ lines = ['## Architecture recorded in each checkpoint', '',
127
+ 'Run names identify experiments; dimensions and features below come from the saved configuration. FP16 is the training quantization label, while this audit executes the loaded tensors in FP32. “50M” and “10M” in older cards were design families, not exact model sizes.', '',
128
+ '| Run | Mixer | Tokens | Quant. label | Width / layers / FFN | Local decoder | FP residual | Bolmo | DeleteGate | PFNet hidden | Channel decay |',
129
+ '|---|---|---|---|---|---|---|---|---|---:|---|']
130
+ for r in records:
131
+ if 'config' not in r:
132
+ continue
133
+ c = r['config']
134
+ yes = lambda k: 'yes' if c.get(k, False) else 'no'
135
+ lines.append(f'| `{r["run"]}` | {c["token_mixer"]} | {c["tokenization"]} | {c["quantization"]} | {c["d_model"]} / {c["n_layers"]} / {c["d_ff"]} | {yes("use_local_decoder") if c["tokenization"]!="bpe" else "N/A"} | {yes("fp_residual")} | {yes("use_bolmo_gating")} | {yes("use_delete_gate")} | {c.get("pfnet_hidden",0)} | {yes("mlgru_per_channel_decay")} |')
136
+ lines += ['', 'These experiments change parameter counts, representations, training signal, budgets, saved steps, and sometimes multiple architectural settings. The audit is not a controlled causal estimate of the benefit of an individual component. `chinchilla_tokens_per_param` is a configured budget; it does not prove that a run completed that budget. Actual saved steps are reported separately.', '']
137
+ return lines
138
+
139
+
140
+ def quickstart(repo, revision, compact=False):
141
+ filename = 'run_04/checkpoint_run_04_final.pt' if compact else 'run_04/model.pt'
142
+ loader = ['from train_ablation import build_ablation_model, load_ablation_checkpoint', f'state, config = load_ablation_checkpoint(path)'] if compact else ['from train_ablation import build_ablation_model', 'payload = torch.load(path, map_location="cpu", weights_only=False)', 'config, state = payload["config"], payload["state_dict"]']
143
+ return ['## Load one checkpoint', '', 'Clone the [source repository](https://github.com/Cukinator/1.58bits) and run this from its root. These are custom PyTorch checkpoints; `AutoModelForCausalLM.from_pretrained()` does not load them. The examples use a trusted checkpoint source and strict state loading.', '', '```python', 'import os', 'os.environ["HF_HOME"] = "D:/cpu1/hf"', 'os.environ["HF_HUB_DISABLE_XET"] = "1"', 'import torch', 'from huggingface_hub import hf_hub_download', 'torch.set_num_threads(1)', f'path = hf_hub_download("{repo}", "{filename}",', f' revision="{revision}", local_dir="D:/cpu1/active", cache_dir="D:/cpu1/hf/hub")', *loader, 'config["use_gradient_checkpointing"] = False', 'model = build_ablation_model(config)', 'model.load_state_dict(state, strict=True)', 'model.eval()', 'x = torch.tensor(list(b"The history of AI. ")).reshape(1, -1, 4)', 'with torch.inference_mode():', ' logits, states, extra = model(x, training_phase=1, target_elimination=0.0)', 'print([tuple(head.shape) for head in logits])', '```', '', 'This forward uses zero target bytes in the local decoder; it is a shape smoke test. For scored likelihood, pass `byte_targets` as shown in the audit. For byte generation with retained Transformer context and one recurrent prefill, use `generation()` in `eval/audit_readmes.py`. Generation remains experimental; inspect the saved examples before choosing a checkpoint.', '']
144
+
145
+
146
+ def build_cards(inventory, corpus):
147
+ names = sorted(f['rfilename'].split('/')[0] for f in inventory[FINAL]['siblings'] if f['rfilename'].endswith('/model.pt'))
148
+ records = [json.loads((OUT/f'{r}.json').read_text(encoding='utf-8')) for r in names]
149
+ for r in records:
150
+ if not r.get('evaluation_complete') or r['revision'] != inventory[FINAL]['sha']:
151
+ raise ValueError(f'Incomplete audit for {r["run"]}')
152
+ if len({r['suite_sha256'] for r in records}) != 1 or len({r['corpus_sha256'] for r in records}) != 1:
153
+ raise ValueError('Mixed audit protocols')
154
+ header = ['---', 'license: apache-2.0', 'language:', '- en', 'tags:', '- cpu-1', '- ablation', '- ternary', '- research', '---', '']
155
+ shared = protocol(inventory, corpus, records) + tables(records) + architecture(records)
156
+ final_files = [f for f in inventory[FINAL]['siblings'] if f['rfilename'].endswith('/model.pt')]
157
+ final_card = header + ['# CPU-1 ablations: FP32 checkpoint exports', '',
158
+ f'{len(final_files)} custom PyTorch model exports, {sum(f["size"] for f in final_files)/1e9:.3f} GB of checkpoint files (decimal units). This is a research ablation collection, not an instruction-tuned assistant. It includes Transformer and MLGRU variants with byte patches or truncated BPE vocabularies, and floating-point or simulated ternary projections.', '',
159
+ f'Source: [Cukinator/1.58bits](https://github.com/Cukinator/1.58bits). Training archive: [{ARCHIVE}](https://huggingface.co/{ARCHIVE}). Training dataset companion: [Cukinator/cpu1-ablation-dataset](https://huggingface.co/datasets/Cukinator/cpu1-ablation-dataset).', '',
160
+ '## Payload format', '', '`<run>/model.pt` contains `format="fp32"`, `state_dict`, `config`, `step`, `run_name`, `metrics`, and source metadata. The exported parameters occupy four bytes each. “1.58-bit” describes the ternary value alphabet; these files are not stored as 1.58-bit tensors and this PyTorch path does not use packed-weight inference.', '',
161
+ 'Historical `metrics` may be empty or come from different training validation protocols. They are preserved as metadata, not relabeled as freshly measured test results.', '',
162
+ *quickstart(FINAL, inventory[FINAL]['sha']), *shared,
163
+ '## License', '', 'The Hub metadata declares Apache-2.0 for the model repository. The source checkout does not include a standalone LICENSE file. Upstream datasets and tokenizer assets retain their own licenses.', '']
164
+ archived = [f for f in inventory[ARCHIVE]['siblings'] if f['rfilename'].endswith('.pt')]
165
+ finals = [f for f in archived if f['rfilename'].endswith('_final.pt')]
166
+ archive_card = header + ['# CPU-1 ablations: training checkpoint archive', '',
167
+ f'{len(archived):,} checkpoint files across {len({f["rfilename"].split("/")[0] for f in archived})} run folders, totaling **{sum(f["size"] for f in archived)/1e9:.3f} GB** ({sum(f["size"] for f in archived)/2**30:.3f} GiB). The inventory includes **{len(finals)} `_final.pt` files** and **{len(archived)-len(finals)} step files**. Counts and sizes are derived from the pinned Hub inventory, not estimates from nominal architecture sizes.', '',
168
+ f'For evaluated FP32 exports, see [{FINAL}](https://huggingface.co/{FINAL}). Source code: [Cukinator/1.58bits](https://github.com/Cukinator/1.58bits).', '',
169
+ '## What is stored', '',
170
+ '- `checkpoint_<run>_final.pt`: inference-oriented final checkpoints. Ternary runs use `compact_2bit`; floating-point baselines use floating-point checkpoint storage. File names alone do not identify the serialization format: inspect `format` inside the payload.',
171
+ '- `checkpoint_<run>_step<N>.pt`: intermediate training state; includes saved configuration and model state, and may include optimizer state. `_phase2_step<N>.pt` names distinguish phase-2 files where present.',
172
+ '- The 2-bit codec packs a ternary alphabet into two bits per stored value plus scales and floating-point tensors. It is not a guarantee of 1.58 effective bits per total model parameter. Resume step files and packed finals have different purposes.',
173
+ '- A folder without `_final.pt` is an intermediate-checkpoint archive. The highest filename step establishes the highest stored step; it does not establish convergence, completed training budget, or an early-stop reason.', '',
174
+ '## Archive inventory', '', *manifest_rows(inventory), '',
175
+ 'Sizes use decimal MB and GB. Step counts include phase-2 step files. Highest step is parsed from filenames and does not merge training phases into a continuous training counter.', '',
176
+ *quickstart(ARCHIVE, inventory[ARCHIVE]['sha'], compact=True),
177
+ '## Resume training', '', 'Use an intermediate checkpoint, not an inference-only packed final. The current source CLI names the argument `--resume_ckpt`:', '',
178
+ '```powershell', 'python train_ablation.py --run run_04 --resume_ckpt D:/cpu1/active/run_04/checkpoint_run_04_step640.pt', '```', '',
179
+ 'Download the exact step file from its run folder first. Resume requires matching source/configuration, dependencies, and suitable training hardware. This audit did not run a training-resume experiment.', '',
180
+ '## Scope of the measured results', '',
181
+ f'The results below were measured on the {len(records)} published exports in [{FINAL}](https://huggingface.co/{FINAL}), **not by evaluating every intermediate archive checkpoint**. Matching run names do not prove tensor identity between a packed final, an intermediate step, and an export. No packed/FP32 numerical-parity claim is made by this card.', '',
182
+ *shared, '## License', '', 'Hub metadata declares Apache-2.0. Dataset and tokenizer licenses are separate. The source checkout does not include a standalone LICENSE file.', '']
183
+ directory = ROOT / 'hf_readmes'
184
+ for stem, card in [('cpu1-ablations-final', final_card), ('cpu1-ablation-checkpoints', archive_card)]:
185
+ content = '\n'.join(card)
186
+ repo = FINAL if stem == 'cpu1-ablations-final' else ARCHIVE
187
+ content = content.replace('](evaluation/)', f'](https://huggingface.co/{repo}/tree/main/evaluation)')
188
+ content = content.replace('](evaluation/', f'](https://huggingface.co/{repo}/blob/main/evaluation/')
189
+ for suffix in ('.md', '_README.md'):
190
+ (directory/(stem+suffix)).write_text(content, encoding='utf-8')
191
+ save_environment(records)
192
+ (OUT/'CORPUS_LICENSE.txt').write_text('The text excerpts in corpus.json originate from WikiText (Salesforce/wikitext), based on English Wikipedia.\nDataset authors and contributors: see https://huggingface.co/datasets/Salesforce/wikitext .\nUpstream dataset metadata declares CC-BY-SA-3.0 and GFDL.\nCC-BY-SA-3.0: https://creativecommons.org/licenses/by-sa/3.0/\nGFDL: https://www.gnu.org/licenses/fdl-1.3.html\nChanges: selection of 32 test paragraphs and truncation to 260 UTF-8 bytes.\nThe corpus remains under its upstream terms; the model repository Apache-2.0 metadata does not relicense these excerpts.\n',encoding='utf-8')
193
+ root_card(records, inventory)
194
+ dataset_card()
195
+ print('Generated source README and both model cards (including duplicate templates).', flush=True)
196
+
197
+
198
+ def dataset_card():
199
+ """Update the local companion template; publication scope is the two model repos."""
200
+ path = OUT/'dataset_inventory.json'
201
+ if not path.exists():
202
+ return
203
+ v = json.loads(path.read_text(encoding='utf-8'))
204
+ lines = ['---', 'license: mit', 'task_categories:', '- text-generation', 'language:', '- en', 'configs:', '- config_name: byte_marginalized', ' data_files:', ' - split: train', ' path: byte_marginalized/shard_*.parquet', '- config_name: bpe_tokenized', ' data_files:', ' - split: train', ' path: bpe_tokenized/shard_*.parquet', '---', '',
205
+ '# CPU-1 ablation training dataset', '',
206
+ 'Companion dataset for the CPU-1 distillation experiments. The extraction source config uses Qwen/Qwen2.5-3B as teacher over FineWeb text. The byte and BPE subsets have different schemas and different shard counts; they must not be assumed to be aligned row by row.', '',
207
+ '## Verified Hub inventory: 2026-10-06', '', f'Revision: `{v["sha"]}`. The following counts and compressed sizes are from the Hub file listing, not from a full scan of the dataset rows.', '', '| Subset | Parquet files | Compressed GB | Shard range | Missing IDs within range |', '|---|---:|---:|---|---|']
208
+ for subset in ('byte_marginalized','bpe_tokenized'):
209
+ fs = [f for f in v['siblings'] if f['rfilename'].startswith(subset+'/') and f['rfilename'].endswith('.parquet')]
210
+ ids = sorted(int(re.search(r'shard_(\d+)\.parquet$',f['rfilename']).group(1)) for f in fs)
211
+ missing = sorted(set(range(min(ids),max(ids)+1))-set(ids))
212
+ lines.append(f'| `{subset}` | {len(fs)} | {sum(f["size"] for f in fs)/1e9:.3f} | {min(ids):04d}–{max(ids):04d} | '+', '.join(f'{n:04d}' for n in missing)+' |')
213
+ lines += ['', 'Sizes use decimal GB. Auxiliary `stream_checkpoint.json` and `stream_carry.pkl` files are extraction bookkeeping, not dataset examples. The file listing does not establish document totals, row totals, teacher coverage, split independence, or whether extraction has finished. Older shard and token totals must not be treated as current.', '',
214
+ '## Schema expected by the source adapters', '',
215
+ '| Subset | Fields | Interpretation |', '|---|---|---|',
216
+ '| Byte | `patches`, `targets`, `teacher_probs`, `teacher_mask`; optional `teacher_hidden`, `teacher_dim` | Flattened byte patches and next-patch targets; teacher signal and mask. Hidden arrays may be compacted to teacher-covered positions; follow the adapter. |',
217
+ '| BPE | `input_ids`, `labels`, `teacher_probs_bpe`, `teacher_ids_bpe`, `teacher_mask_bpe` | Qwen token IDs and shifted labels; flattened teacher top-k values and their original IDs. |', '',
218
+ 'This table describes `create_dataset.py` and the readers in `utilities.py`; the October audit did not validate every row or measure teacher-signal quality. Check actual row lengths, optional fields and `teacher_dim` rather than assuming a fixed hidden width or identical schemas in all shards.', '',
219
+ 'The extraction source currently configures four-byte patches, 5,000-step sequences, and top-128 BPE teacher entries. Those are writer settings, not a claim that every stored row matches them. Byte teacher signals are first-byte marginalizations of BPE candidates at mapped boundaries; they are not full autoregressive distributions for all four positions. Training uses the coverage masks.', '',
220
+ 'The BPE adapter maps IDs outside the configured student vocabulary to ID 0, and filters teacher IDs accordingly. This is a lossy representation. Its token perplexity cannot be compared directly with byte perplexity or with an untruncated Qwen language model.', '',
221
+ '## Stream one subset', '', '```python', 'import os', 'os.environ["HF_HOME"] = "D:/cpu1/hf"', 'os.environ["HF_DATASETS_CACHE"] = "D:/cpu1/datasets"', 'from datasets import load_dataset', 'dataset = load_dataset(', ' "Cukinator/cpu1-ablation-dataset",', ' "byte_marginalized",', f' revision="{v["sha"]}",', ' split="train", streaming=True,', ' cache_dir="D:/cpu1/datasets",', ')', 'row = next(iter(dataset))', 'print(row.keys())', '```', '',
222
+ 'Only a training split is declared by the Hub card. If you need held-out evaluation, create and document a deterministic independent split or use a separate test corpus. Never silently substitute the training split for validation. Do not zip the byte and BPE streams by shard index or row index.', '',
223
+ '## Model evaluation', '',
224
+ 'The new model-card audit uses a separate 32-passage WikiText test sample and loads no teacher model. Its corpus, procedure and raw results are in the [FP32 model repository](https://huggingface.co/Cukinator/cpu1-ablations-final). That diagnostic does not evaluate this dataset’s teacher coverage, entropy, hidden-state alignment, or full training distribution.', '',
225
+ '## Related artifacts', '', '- [Source and adapters](https://github.com/Cukinator/1.58bits)', '- [FP32 exports and common evaluation](https://huggingface.co/Cukinator/cpu1-ablations-final)', '- [Packed finals and intermediate checkpoints](https://huggingface.co/Cukinator/cpu1-ablation-checkpoints)', '',
226
+ '## License', '', 'The dataset Hub metadata declares MIT. FineWeb source data and Qwen tokenizer/teacher assets retain their own upstream licenses. The repository label does not replace those upstream terms.', '']
227
+ (ROOT/'hf_readmes'/'cpu1-ablation-dataset_README.md').write_text('\n'.join(lines), encoding='utf-8')
228
+
229
+
230
+ def save_environment(records):
231
+ from audit_readmes import save
232
+ from importlib.metadata import version
233
+ packages = {name: version(name) for name in ('torch','transformers','tokenizers','huggingface_hub','datasets','numpy','pyarrow','psutil')}
234
+ tokenizer_revision = next((r['tokenizer_revision'] for r in records if r.get('tokenizer_revision')), None)
235
+ save(OUT/'environment.json', {'python': sys.version, 'packages': packages, 'hardware': 'Intel Core i7-8750H, 6 cores/12 logical processors', 'platform': records[0]['platform'], 'threads': 1, 'source_commit': '18826ec2827a09950797463633c1f5187af29a5b', 'source_changes': 'audit evaluator and correctness/quality fixes in this checkout', 'audit_script_sha256': sha(ROOT/'eval'/'audit_readmes.py'), 'qwen_tokenizer_resolved_revision': tokenizer_revision})
236
+
237
+
238
+ def root_card(records, inventory):
239
+ causal = sum(r.get('correctness',{}).get('causality',{}).get('status')=='FAIL' for r in records)
240
+ state = sum(r.get('correctness',{}).get('state_prop',{}).get('status')=='FAIL' for r in records)
241
+ errors = sum(bool(r.get('error')) for r in records)
242
+ lines = ['# CPU-1: language-model ablation research', '',
243
+ 'CPU-1 explores byte-patch language models, MLGRU recurrent mixers, and ternary projections. This repository contains training code, custom checkpoint codecs, native kernel experiments, and a reproducible CPU audit of the published ablation exports. The published checkpoints are small research models; the larger production configurations in the source are development targets.', '',
244
+ '## Published artifacts', '', '| Repository | Contents |', '|---|---|',
245
+ f'| [{FINAL}](https://huggingface.co/{FINAL}) | 34 custom PyTorch FP32 exports, each with saved config and step |',
246
+ f'| [{ARCHIVE}](https://huggingface.co/{ARCHIVE}) | Packed finals and intermediate training checkpoints; exact inventory in the model card |',
247
+ '| [Cukinator/cpu1-ablation-dataset](https://huggingface.co/datasets/Cukinator/cpu1-ablation-dataset) | Precomputed teacher signals for the dataset experiments |', '',
248
+ '## Verified status: 2026-10-06', '',
249
+ f'The fresh audit attempted all {len(records)} published exports with strict state compatibility, the same 32 WikiText test passages, and CPU forward timing and byte generation under one protocol. **{causal} models failed the prefix causality check; {state} failed recurrent chunk equivalence; {errors} had a loading or numerical evaluation error.** Detailed failures and all raw evidence are retained, including samples that look printable but are not coherent language.', '',
250
+ 'The audit does not establish a production-ready streaming language model. Some boundary-aware embedding configurations allow future inputs to affect earlier outputs. A separate primitive test also finds that the implemented parallel scan does not satisfy the intended serial recurrence; see [implementation_diagnostics.json](resultados/readme_audit/implementation_diagnostics.json). A small full-sequence loss from a model that fails causality is a reconstruction diagnostic, not evidence of causal next-byte prediction quality. Byte PPL and mapped BPE PPL are separate units. We do not infer component improvements from experiments with different parameter counts, training signals, saved steps, or budgets.', '',
251
+ 'Read the complete [export model card](hf_readmes/cpu1-ablations-final.md) for per-model results, configurations, protocol and limitations. Read the [archive model card](hf_readmes/cpu1-ablation-checkpoints.md) for the pinned file inventory and storage formats. Historical files in `resultados/ablation_*.json` use older protocols and should not be combined with `resultados/readme_audit/`.', '',
252
+ '## Architecture and source', '',
253
+ '- `utilities.py`: BitLinear and BitEmbedding, RMSNorm, MLGRU and attention variants, SwiGLU, FPResidual, PFNet, byte patch embeddings, LocalByteDecoder, DeleteGate, dataset adapters, and checkpoint serialization.',
254
+ '- `train_ablation.py`: constructs an AblationModel from its saved configuration; trains individual experiments and orchestrates run groups. `train_ablation_amd.py` is the ROCm-oriented variant.',
255
+ '- `train_final.py`: larger CPU1ModelV2 training configurations. These are separate from the exported ablation collection.',
256
+ '- `create_dataset.py` and `kaggle/`: teacher signal extraction and dataset preparation.',
257
+ '- `inference/kernels.cpp`, `inference/benchmark.c`, and `inference/links.md`: native kernel experiments and build notes. The Python audit does not use these kernels. Synthetic native-kernel throughput must not be presented as measured trained-model generation speed.',
258
+ '- `eval/audit_readmes.py`: sequential downloads, scoring, correctness checks, generation samples, and timing. `eval/audit_model_cards.py`: cards and publication.', '',
259
+ 'The exact model depends on `config` stored in the checkpoint. Experiments mix BPE and four-byte patches, Transformer and MLGRU mixers, floating-point and ternary projections, optional low-rank residuals, boundary-aware embedding, DeleteGate, PFNet, and learned decay. Check the configuration table instead of assuming all variants form a one-change chain.', '',
260
+ '## Setup and reproduce the audit', '',
261
+ 'Use Python 3.12 with PyTorch installed for your hardware. For the CPU audit:', '', '```powershell',
262
+ 'python -m venv .venv', '.venv/Scripts/python -m pip install torch transformers tokenizers huggingface_hub datasets numpy pyarrow psutil',
263
+ '.venv/Scripts/python eval/audit_readmes.py --storage D:/cpu1-readme-audit --threads 1',
264
+ '.venv/Scripts/python eval/audit_readmes.py --storage D:/cpu1-readme-audit --cards', '```', '',
265
+ 'Exact package versions are recorded in [environment.json](resultados/readme_audit/environment.json). Use them to reproduce the recorded run. The audit pins both Hub inventories and the dataset revision, saves the text sample, hashes each model, and records errors instead of silently filling missing weights. All model downloads, tokenizer caches, and temporaries go to D:. One checkpoint is kept at a time and removed after its JSON is saved. Existing results are reused only when the evaluator hash matches. Use `--force` to repeat or `--runs run_04 run_14_v3` to inspect a subset.', '',
266
+ 'The scoring sample is diagnostic: 32 short passages, batch 1, no teacher model, DeleteGate disabled. Byte models use shifted next-patch targets with proper intra-patch teacher forcing. BPE uses the truncated Qwen vocabulary mapping used during training and reports the fraction mapped to ID 0. Forward steps/s and generated bytes/s are measured separately. The full protocol is in both cards.', '',
267
+ 'Legacy `eval/run_eval.py` expects a production inference engine that is absent from this checkout; use the audit above for the published ablation models. `eval/eval_ablations.py` and `eval/compute_missing_val_loss.py` are legacy entry points and do not reproduce the new common corpus or cards.', '',
268
+ *quickstart(FINAL, inventory[FINAL]['sha']),
269
+ '## Training', '', '```powershell', 'python train_ablation.py --run run_04 --dry_run --total_steps 2', 'python train_ablation.py --run run_04', 'python train_ablation.py --run run_04 --resume_ckpt D:/cpu1/active/run_04/checkpoint_run_04_step640.pt', '```', '',
270
+ 'Normal training uses CUDA/ROCm-capable PyTorch and dataset access. The dry run uses synthetic CPU data and checks plumbing rather than model quality. Intermediate checkpoints may include optimizer state for resumption; packed finals are inference artifacts. `chinchilla_tokens_per_param` is a configured target, not proof of actual training exposure. All reported saved steps come from the evaluated payloads.', '',
271
+ '## Checkpoints and storage', '',
272
+ '- Export: `format="fp32"`, `state_dict`, `config`, `metrics`, `step`, `run_name`. Build from config and load strictly.',
273
+ '- Packed ternary final: `format="compact_2bit"`; use `load_ablation_checkpoint()` to unpack. Floating-point baselines have floating-point payloads.',
274
+ '- Training step: model/configuration and training state, typically BF16 storage. Inspect the payload rather than relying solely on its filename.', '',
275
+ 'A ternary alphabet has log2(3)≈1.585 bits of information per value. The codec stores two bits per packed value plus scales and other floating-point tensors. Unpacked exports hold FP32 tensors; neither their disk footprint nor their Python resident parameter storage is 1.58 bits per parameter. Peak runtime RAM and native packed-inference speed are separate measurements.', '',
276
+ '## License', '', 'The Hugging Face model repositories declare Apache-2.0. This checkout has no standalone LICENSE file. Dataset and tokenizer assets have separate upstream licenses.', '']
277
+ (ROOT/'README.md').write_text('\n'.join(lines), encoding='utf-8')
278
+
279
+
280
+ def upload_cards(inventory):
281
+ from huggingface_hub import HfApi, CommitOperationAdd
282
+ from audit_readmes import save
283
+ import os
284
+ token = os.environ.get('HF_TOKEN')
285
+ if not token:
286
+ print('Provide the authorized Hugging Face token on stdin (not saved).', flush=True)
287
+ token = sys.stdin.readline().strip()
288
+ api = HfApi(token=token)
289
+ identity = api.whoami()
290
+ if identity['name'].lower() != 'cukinator':
291
+ raise ValueError('Token does not belong to the authorized repository owner')
292
+ commits = {}
293
+ for repo, stem in [(FINAL,'cpu1-ablations-final'), (ARCHIVE,'cpu1-ablation-checkpoints')]:
294
+ parent = api.model_info(repo).sha
295
+ if parent != inventory[repo]['sha']:
296
+ raise ValueError(f'{repo} changed since the audit; refresh before publishing')
297
+ files = [('README.md', ROOT/'hf_readmes'/f'{stem}.md')]
298
+ files += [(f'evaluation/{p.name}', p) for p in sorted(OUT.glob('*.json'))]
299
+ files += [('evaluation/CORPUS_LICENSE.txt', OUT/'CORPUS_LICENSE.txt')]
300
+ files += [(f'evaluation/source/{name}', ROOT/'eval'/name) for name in ('audit_readmes.py','audit_model_cards.py','audit_primitives.py','verify_card_examples.py','eval_correctness.py','eval_ablations.py','helpers.py','eval_quality.py','test_readme_audit.py')]
301
+ commit = api.create_commit(repo_id=repo, repo_type='model', parent_commit=parent, commit_message='Rebuild model card from reproducible CPU audit; include evidence and limitations', operations=[CommitOperationAdd(path_in_repo=name,path_or_fileobj=str(path)) for name,path in files])
302
+ commits[repo] = {'oid': commit.oid, 'url': commit.commit_url}
303
+ # Verify the actual published README bytes against the local card.
304
+ from huggingface_hub import hf_hub_download
305
+ readme = hf_hub_download(repo, 'README.md', revision=commit.oid, cache_dir=os.environ['HF_HUB_CACHE'], token=token)
306
+ if Path(readme).read_bytes() != files[0][1].read_bytes():
307
+ raise RuntimeError('Published card verification failed')
308
+ print(f'Published and verified {repo}: {commit.oid}', flush=True)
309
+ save(OUT/'publication.json', commits)
evaluation/source/audit_primitives.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Check the recurrent scan against its defining equation without model files."""
2
+ from pathlib import Path
3
+ import sys
4
+
5
+ ROOT = Path(__file__).resolve().parents[1]
6
+ sys.path.insert(0, str(ROOT))
7
+
8
+
9
+ def main():
10
+ import torch
11
+ from utilities import AblationMLGRU
12
+ from audit_readmes import OUT, save, sha
13
+ torch.set_num_threads(1)
14
+ torch.manual_seed(19)
15
+ c = torch.randn(1, 32, 8)
16
+ f = torch.sigmoid(torch.randn(1, 32, 8))
17
+ initial = torch.randn(1, 8)
18
+ actual, _ = AblationMLGRU._parallel_scan(c, f, initial)
19
+ h = initial.clone()
20
+ steps = []
21
+ for i in range(32):
22
+ h = f[:, i]*h + (1-f[:, i])*c[:, i]
23
+ steps.append(h)
24
+ reference = torch.stack(steps, dim=1)
25
+ first, carry = AblationMLGRU._parallel_scan(c[:, :16], f[:, :16], initial)
26
+ second, _ = AblationMLGRU._parallel_scan(c[:, 16:], f[:, 16:], carry)
27
+ serial_diff = (actual-reference).abs().max().item()
28
+ chunk_diff = (actual-torch.cat([first, second], dim=1)).abs().max().item()
29
+ result = {'seed':19, 'shape':[1,32,8], 'torch':torch.__version__, 'dtype':'float32', 'reference':'h[t] = f[t] * h[t-1] + (1-f[t]) * c[t]', 'serial_max_diff':serial_diff, 'chunks_max_diff':chunk_diff, 'tolerance':1e-4, 'status':'PASS' if max(serial_diff,chunk_diff)<1e-4 else 'FAIL', 'utilities_sha256':sha(ROOT/'utilities.py'), 'script_sha256':sha(Path(__file__))}
30
+ save(OUT/'implementation_diagnostics.json', result)
31
+ print(result)
32
+
33
+
34
+ if __name__ == '__main__':
35
+ main()
evaluation/source/audit_readmes.py ADDED
@@ -0,0 +1,274 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Reproducible Hub audit. Download and evaluate exactly one model at a time.
2
+
3
+ python eval/audit_readmes.py --storage D:/cpu1-readme-audit --threads 1
4
+ python eval/audit_readmes.py --storage D:/cpu1-readme-audit --cards
5
+ python eval/audit_readmes.py --storage D:/cpu1-readme-audit --upload
6
+ """
7
+ import argparse
8
+ import hashlib
9
+ import json
10
+ import math
11
+ import os
12
+ from pathlib import Path
13
+ import platform
14
+ import statistics
15
+ import sys
16
+ import time
17
+ import urllib.request
18
+ from datetime import datetime, timezone
19
+
20
+ ROOT = Path(__file__).resolve().parents[1]
21
+ sys.path.insert(0, str(ROOT))
22
+ sys.path.insert(0, str(ROOT / 'eval'))
23
+ OUT = ROOT / 'resultados' / 'readme_audit'
24
+ FINAL = 'Cukinator/cpu1-ablations-final'
25
+ ARCHIVE = 'Cukinator/cpu1-ablation-checkpoints'
26
+ DATA = 'Salesforce/wikitext'
27
+ DATA_REV = 'b08601e04326c79dfdd32d625aee71d232d685c3'
28
+ DATA_FILE = 'wikitext-2-raw-v1/test-00000-of-00001.parquet'
29
+ PROMPTS = ['The history of artificial intelligence', 'Once upon a time', 'The purpose of science is']
30
+
31
+
32
+ def save(path, value):
33
+ def finite_json(obj):
34
+ if isinstance(obj, float) and not math.isfinite(obj):
35
+ return None
36
+ if isinstance(obj, dict):
37
+ return {k: finite_json(v) for k, v in obj.items()}
38
+ if isinstance(obj, (list, tuple)):
39
+ return [finite_json(v) for v in obj]
40
+ return obj
41
+ path.parent.mkdir(parents=True, exist_ok=True)
42
+ temporary = path.with_suffix('.json.tmp')
43
+ temporary.write_text(json.dumps(finite_json(value), indent=2, ensure_ascii=False, allow_nan=False) + '\n', encoding='utf-8')
44
+ temporary.replace(path)
45
+
46
+
47
+ def sha(path):
48
+ h = hashlib.sha256()
49
+ with path.open('rb') as f:
50
+ for block in iter(lambda: f.read(1024 * 1024), b''):
51
+ h.update(block)
52
+ return h.hexdigest()
53
+
54
+
55
+ def prepare(storage):
56
+ OUT.mkdir(parents=True, exist_ok=True)
57
+ invpath = OUT / 'inventory.json'
58
+ if not invpath.exists():
59
+ inventory = {r: json.load(urllib.request.urlopen('https://huggingface.co/api/models/' + r + '?blobs=true')) for r in (FINAL, ARCHIVE)}
60
+ save(invpath, inventory)
61
+ corpuspath = OUT / 'corpus.json'
62
+ if not corpuspath.exists():
63
+ import pyarrow.parquet as pq
64
+ dest = storage / 'data' / 'test.parquet'
65
+ dest.parent.mkdir(parents=True, exist_ok=True)
66
+ urllib.request.urlretrieve(f'https://huggingface.co/datasets/{DATA}/resolve/{DATA_REV}/{DATA_FILE}', dest)
67
+ texts = pq.read_table(dest, columns=['text']).column('text').to_pylist()
68
+ # First 32 non-heading paragraphs with at least 260 UTF-8 bytes.
69
+ samples = [t.encode('utf-8')[:260].decode('utf-8', errors='ignore') for t in texts if len(t.encode('utf-8')) >= 260 and not t.strip().startswith('=')][:32]
70
+ assert len(samples) == 32
71
+ save(corpuspath, {'dataset': DATA, 'revision': DATA_REV, 'file': DATA_FILE, 'parquet_sha256': sha(dest), 'selection': 'first 32 non-heading paragraphs >=260 UTF-8 bytes; truncate to 260 bytes, discard incomplete trailing UTF-8', 'texts': samples})
72
+ return json.loads(invpath.read_text(encoding='utf-8')), json.loads(corpuspath.read_text(encoding='utf-8'))
73
+
74
+
75
+ def loss_eval(model, config, corpus, tokenizer):
76
+ import torch
77
+ import torch.nn.functional as F
78
+ byte = config['tokenization'] in ('byte', 'byte_dynamic')
79
+ p = config.get('patch_size', 4)
80
+ total, count, mapped, all_ids = 0., 0, 0, 0
81
+ with torch.inference_mode():
82
+ for text in corpus['texts']:
83
+ if byte:
84
+ raw = list(text.encode('utf-8'))
85
+ data = torch.tensor(raw[:len(raw)//p*p]).reshape(1, -1, p)
86
+ x, y = data[:, :-1], data[:, 1:]
87
+ logits = model(x, byte_targets=y, training_phase=1, target_elimination=0.)[0]
88
+ if isinstance(logits, (tuple, list)):
89
+ logits = torch.stack(logits, dim=2)
90
+ else:
91
+ ids = torch.tensor(tokenizer.encode(text, add_special_tokens=False)).reshape(1, -1)
92
+ cap = config['bpe_vocab_size']
93
+ mapped += int((ids >= cap).sum())
94
+ all_ids += ids.numel()
95
+ ids = torch.where(ids < cap, ids, 0)
96
+ x, y = ids[:, :-1], ids[:, 1:]
97
+ logits = model(x, training_phase=1, target_elimination=0.)[0]
98
+ loss = F.cross_entropy(logits.reshape(-1, logits.shape[-1]), y.reshape(-1), reduction='sum')
99
+ if not torch.isfinite(loss):
100
+ raise ValueError('nonfinite loss')
101
+ total += loss.item()
102
+ count += y.numel()
103
+ avg = total / count
104
+ return {'mean_nll': avg, 'targets': count, 'unit': 'byte' if byte else 'mapped_qwen_token', 'perplexity': math.exp(avg), 'bits_per_byte': avg/math.log(2) if byte else None, 'mapped_ids_fraction': mapped/all_ids if all_ids else None, 'source': 'shared_wikitext_test_sample', 'teacher_forcing': True, 'delete_gate': 'disabled (phase 1, elimination 0)'}
105
+
106
+
107
+ def generation(model, config, prompt, length=128):
108
+ """Keep Transformer context; recurrent models carry state exactly once."""
109
+ import torch
110
+ from train_ablation import _global_pass, _sample_logits
111
+ p = config.get('patch_size', 4)
112
+ recurrent = config['token_mixer'] == 'mlgru'
113
+ raw = prompt.encode('utf-8')
114
+ raw += b'\x00' * ((-len(raw)) % p)
115
+ context = torch.tensor(list(raw)).reshape(1, -1, p)
116
+ states = [None] * len(model.blocks)
117
+ output = bytearray()
118
+ with torch.inference_mode():
119
+ h, states = _global_pass(model, context, states, 0.)
120
+ while len(output) < length:
121
+ new = torch.zeros(1, 1, p, dtype=torch.long)
122
+ for k in range(p):
123
+ logits = model.local_decoder(h[:, -1:], new)[k][0, 0] if model.use_local_decoder else model.heads[k](h[:, -1:])[0, 0]
124
+ value = _sample_logits(logits, 1., 40, .9)
125
+ new[0, 0, k] = value
126
+ output.append(value)
127
+ if len(output) >= length:
128
+ break
129
+ if recurrent:
130
+ h, states = _global_pass(model, new, states, 0.)
131
+ else:
132
+ context = torch.cat([context, new], dim=1)
133
+ window = config.get('window_size', 512)
134
+ h, _ = _global_pass(model, context[:, -window:], [None]*len(model.blocks), 0.)
135
+ return bytes(output[:length])
136
+
137
+
138
+ def benchmark(engine):
139
+ """Isolated single-input forward, not generated bytes/s or context scaling."""
140
+ import torch
141
+ dummy = torch.zeros((1, 1, engine.info.patch_size) if engine.info.is_byte_level else (1, 1), dtype=torch.long)
142
+ times = []
143
+ with torch.inference_mode():
144
+ for _ in range(10):
145
+ _, engine.hidden_states = engine._ablation_step(engine._model, dummy)
146
+ engine.reset_state()
147
+ for _ in range(100):
148
+ t = time.perf_counter()
149
+ _, engine.hidden_states = engine._ablation_step(engine._model, dummy)
150
+ times.append(time.perf_counter()-t)
151
+ engine.reset_state()
152
+ values = sorted(times)
153
+ return {'forward_steps_per_second': len(times)/sum(times), 'p50_ms': statistics.median(times)*1000, 'p95_ms': values[94]*1000, 'jitter_cv': statistics.stdev(times)/statistics.mean(times), 'warmup_steps': 10, 'measured_steps': 100, 'context_steps': 1, 'backend': 'PyTorch FP32; quantization simulated for ternary modules; no C++ kernels', 'meaning': 'one input patch/token forward, zero local decoder targets; excludes autoregressive local sampling; Transformer has no persistent context'}
154
+
155
+
156
+ def causality(engine):
157
+ import torch
158
+ from eval_correctness import _get_logits_list, _make_dummy_input
159
+ torch.manual_seed(101)
160
+ x = _make_dummy_input(engine.info, 1, 32)
161
+ changed = x.clone()
162
+ changed[:, 16:] = (changed[:, 16:] + 71) % engine.info.vocab_size
163
+ with torch.inference_mode():
164
+ a = _get_logits_list(engine._model(x)[0], engine.info)
165
+ b = _get_logits_list(engine._model(changed)[0], engine.info)
166
+ diff = max((u[:, :16]-v[:, :16]).abs().max().item() for u,v in zip(a,b))
167
+ return {'status': ('PASS' if diff < 1e-5 else 'FAIL') if math.isfinite(diff) else 'ERROR', 'max_prefix_logit_diff': diff, 'tolerance': 1e-5, 'protocol': '32 input steps; change steps 16:32; compare all heads at steps 0:16 with identical zero local targets'}
168
+
169
+
170
+ def evaluate(storage, inventory, corpus, args):
171
+ import torch
172
+ import psutil
173
+ from huggingface_hub import hf_hub_download
174
+ from eval_ablations import load_run
175
+ from eval_correctness import run_correctness
176
+ from transformers import AutoTokenizer
177
+ torch.set_num_threads(args.threads)
178
+ torch.set_num_interop_threads(1)
179
+ revision = inventory[FINAL]['sha']
180
+ runs = [f['rfilename'].split('/')[0] for f in inventory[FINAL]['siblings'] if f['rfilename'].endswith('/model.pt')]
181
+ if args.runs:
182
+ runs = [r for r in runs if r in args.runs]
183
+ tokenizer = None
184
+ for index, run in enumerate(runs, 1):
185
+ engine = model = raw = None
186
+ result_path = OUT / f'{run}.json'
187
+ if result_path.exists() and not args.force and json.loads(result_path.read_text(encoding='utf-8')).get('suite_sha256') == sha(Path(__file__)):
188
+ print(f'[{index}/{len(runs)}] existing {run}', flush=True)
189
+ continue
190
+ # Only this task-owned file may be removed. No cache of model blobs.
191
+ model_path = storage / 'active' / run / 'model.pt'
192
+ for stale in (storage / 'active').glob('*/model.pt'):
193
+ target = stale.resolve()
194
+ if not target.is_relative_to((storage / 'active').resolve()):
195
+ raise ValueError('unsafe cleanup path')
196
+ target.unlink()
197
+ print(f'[{index}/{len(runs)}] downloading {run} to {model_path}', flush=True)
198
+ started = time.perf_counter()
199
+ hf_hub_download(FINAL, f'{run}/model.pt', revision=revision, local_dir=str(storage/'active'), cache_dir=str(storage/'hf'/'hub'))
200
+ record = {'run': run, 'revision': revision, 'file': f'{run}/model.pt', 'sha256': sha(model_path), 'file_bytes': model_path.stat().st_size, 'date_utc': datetime.now(timezone.utc).isoformat(), 'threads': args.threads, 'torch': torch.__version__, 'platform': platform.platform(), 'processor': platform.processor(), 'corpus_sha256': sha(OUT/'corpus.json'), 'suite_sha256': sha(Path(__file__)), 'seed': 42}
201
+ try:
202
+ torch.manual_seed(42)
203
+ engine, raw, config, _, _ = load_run(model_path, run)
204
+ model = engine._model
205
+ record.update({'config': config, 'step': raw.get('step'), 'stored_training_metrics': raw.get('metrics', {}), 'parameters': sum(p.numel() for p in model.parameters()), 'parameter_bytes': sum(p.numel()*p.element_size() for p in model.parameters()), 'format': raw.get('format'), 'strict_load': True})
206
+ record['correctness'] = run_correctness(engine)
207
+ record['correctness']['causality'] = causality(engine)
208
+ if not engine.info.is_byte_level and tokenizer is None:
209
+ tokenizer = AutoTokenizer.from_pretrained('Qwen/Qwen2.5-3B', cache_dir=str(storage/'hf'/'hub'), trust_remote_code=False)
210
+ record['tokenizer_revision'] = tokenizer.init_kwargs.get('_commit_hash')
211
+ record['loss'] = loss_eval(model, config, corpus, tokenizer)
212
+ record['benchmark'] = benchmark(engine)
213
+ if engine.info.is_byte_level:
214
+ samples = []
215
+ for i, prompt in enumerate(PROMPTS):
216
+ torch.manual_seed(42+i)
217
+ t = time.perf_counter()
218
+ generated = generation(model, config, prompt)
219
+ elapsed = time.perf_counter()-t
220
+ try:
221
+ generated.decode('utf-8', errors='strict')
222
+ valid = True
223
+ except UnicodeDecodeError:
224
+ valid = False
225
+ samples.append({'prompt': prompt, 'seed': 42+i, 'hex': generated.hex(), 'text_replacement_decode': generated.decode('utf-8', errors='replace'), 'bytes': len(generated), 'utf8_valid': valid, 'ascii_printable_fraction': sum(32<=b<127 or b in (9,10,13) for b in generated)/len(generated), 'repeated_8byte_fraction': sum(generated[i:i+8]==generated[i-8:i] for i in range(8,len(generated)-7))/max(1,len(generated)-15), 'seconds': elapsed, 'generated_bytes_per_second': len(generated)/elapsed})
226
+ record['generation'] = samples
227
+ else:
228
+ record['generation'] = {'status': 'N/A', 'reason': 'truncated Qwen vocabulary; token mapping is lossy, no comparable byte generation test'}
229
+ record['process_rss_bytes'] = psutil.Process().memory_info().rss
230
+ except Exception as exc:
231
+ record['error'] = f'{type(exc).__name__}: {exc}'
232
+ print(record['error'], flush=True)
233
+ record['total_seconds'] = time.perf_counter()-started
234
+ record['evaluation_complete'] = True
235
+ save(result_path, record)
236
+ print(f'{run}: loss={record.get("loss",{}).get("mean_nll")} elapsed={record["total_seconds"]:.1f}s', flush=True)
237
+ model_path.unlink()
238
+ engine = model = raw = None
239
+ import gc
240
+ gc.collect()
241
+
242
+
243
+ def main():
244
+ parser = argparse.ArgumentParser(description=__doc__)
245
+ parser.add_argument('--storage', type=Path, default=Path('D:/cpu1-readme-audit'))
246
+ parser.add_argument('--threads', type=int, default=1)
247
+ parser.add_argument('--runs', nargs='+')
248
+ parser.add_argument('--force', action='store_true')
249
+ parser.add_argument('--cards', action='store_true')
250
+ parser.add_argument('--upload', action='store_true')
251
+ args = parser.parse_args()
252
+ if args.storage.resolve().drive.upper() != 'D:':
253
+ raise ValueError('This audit requires storage on D:')
254
+ args.storage.mkdir(parents=True, exist_ok=True)
255
+ for name in ('HF_HOME','HF_HUB_CACHE','HF_DATASETS_CACHE','TRANSFORMERS_CACHE','TEMP','TMP'):
256
+ dest = args.storage / ('temp' if name in ('TEMP','TMP') else name.lower())
257
+ dest.mkdir(parents=True, exist_ok=True)
258
+ os.environ[name] = str(dest)
259
+ os.environ['HF_HUB_DISABLE_XET'] = '1'
260
+ os.environ['HF_HUB_DISABLE_PROGRESS_BARS'] = '1'
261
+ inventory, corpus = prepare(args.storage)
262
+ if args.cards or args.upload:
263
+ from audit_model_cards import build_cards, upload_cards
264
+ build_cards(inventory, corpus)
265
+ if args.upload:
266
+ upload_cards(inventory)
267
+ else:
268
+ evaluate(args.storage, inventory, corpus, args)
269
+
270
+
271
+ if __name__ == '__main__':
272
+ if hasattr(sys.stdout, 'reconfigure'):
273
+ sys.stdout.reconfigure(encoding='utf-8')
274
+ main()
evaluation/source/eval_ablations.py ADDED
@@ -0,0 +1,768 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ eval_ablations.py — Suite de evaluación completa para todos los modelos ablation.
3
+
4
+ Usa los módulos eval existentes de la carpeta (no duplica lógica):
5
+ eval_correctness → run_correctness(engine)
6
+ eval_performance → run_performance(engine) [PyTorch puro, sin kernels nuestros]
7
+ eval_quality → run_quality(engine, dataset=None)
8
+ eval_dataset → run_dataset_checks(dataset) [skip: sin dataset local]
9
+ eval_external → skip (no hay GGUF de ablation)
10
+
11
+ El adaptador AblationEngine hace que cualquier AblationModel sea compatible
12
+ con la interfaz que usan esos módulos (diseñada para CPU1InferenceEngine).
13
+
14
+ Criterio homogéneo de métricas:
15
+ perplexity = exp(val_loss) para TODOS los runs sin excepción
16
+ bpb = val_loss / ln(2) solo runs byte-level
17
+ Referencia uniforme byte: ln(256) = 5.545 nats → PPL=256 → BPB=8.0
18
+
19
+ BPE runs (run_01, run_13, *_r2): PPL es TOKEN-level.
20
+ Byte runs (todos los demás): PPL es BYTE-level.
21
+
22
+ Casos especiales:
23
+ generation (eval_quality): BPE runs → N/A
24
+ state_propagation (eval_correctness): Transformer → N/A
25
+ state_size / ternary_weights: idem condicionados por arquitectura
26
+
27
+ Fuentes de checkpoints (en orden de preferencia):
28
+ 1. models/ablation_models/{run}/checkpoint_{run}_final.pt (compact_2bit)
29
+ 2. models/ablations_final/{run}/model.pt (fp32)
30
+
31
+ Uso:
32
+ python eval/eval_ablations.py # todos los runs locales
33
+ python eval/eval_ablations.py --runs run_02 run_07 # runs concretos
34
+ python eval/eval_ablations.py --no-performance # omitir benchmark CPU
35
+ python eval/eval_ablations.py --update-readme # actualizar HF readme
36
+ """
37
+
38
+ import os
39
+ import sys
40
+ import json
41
+ import math
42
+ import time
43
+
44
+ # Forzar UTF-8 en stdout/stderr para que los caracteres Unicode (═, ─, ⭐, etc.)
45
+ # funcionen en Windows con cp1252 por defecto.
46
+ if hasattr(sys.stdout, "reconfigure"):
47
+ sys.stdout.reconfigure(encoding="utf-8", errors="replace")
48
+ if hasattr(sys.stderr, "reconfigure"):
49
+ sys.stderr.reconfigure(encoding="utf-8", errors="replace")
50
+ import argparse
51
+ from dataclasses import dataclass
52
+ from pathlib import Path
53
+
54
+ ROOT = Path(__file__).parent.parent
55
+ sys.path.insert(0, str(ROOT))
56
+
57
+ import torch
58
+
59
+ MODELS_COMPACT = ROOT / "models" / "ablation_models"
60
+ MODELS_FP32 = ROOT / "models" / "ablations_final"
61
+ RESULTADOS_DIR = ROOT / "resultados"
62
+ HF_README = ROOT / "hf_readmes" / "cpu1-ablations-final.md"
63
+ HF_REPO_MODELS = "Cukinator/cpu1-ablations-final"
64
+
65
+ LN2 = math.log(2)
66
+ UNIFORM_BYTE = math.log(256) # 5.545 nats — entropía uniforme byte
67
+
68
+
69
+ # ─────────────────────────────────────────────────────────────────────────────
70
+ # Metadatos de cada run (para las tablas del README)
71
+ # ─────────────────────────────────────────────────────────────────────────────
72
+
73
+ RUN_META = {
74
+ # ── 50M, Round 1 (2 tok/param) ──
75
+ "run_01": {"label": "Transformer + BPE 16K + FP16", "group": "50M", "round": "r1"},
76
+ "run_02a_byte_only_heads":{"label": "Transformer + Byte + 4 heads (no LBD)", "group": "50M", "round": "r1"},
77
+ "run_02": {"label": "Transformer + Byte + LocalByteDecoder", "group": "50M", "round": "r1"},
78
+ "run_03": {"label": "MLGRU + Byte + FP16", "group": "50M", "round": "r1"},
79
+ "run_04": {"label": "MLGRU + Byte + Ternary", "group": "50M", "round": "r1"},
80
+ "run_05": {"label": "+ FPResidual", "group": "50M", "round": "r1"},
81
+ "run_05b_kernel_strict": {"label": "MLGRU kernel-strict (no W_o)", "group": "50M", "round": "r1"},
82
+ "run_06": {"label": "+ Bolmo patch embedding", "group": "50M", "round": "r1"},
83
+ "run_07": {"label": "+ DeleteGate (CPU-1 completo) ⭐", "group": "50M", "round": "r1"},
84
+ "run_08": {"label": "Folded Transformer + Byte + Ternary", "group": "50M", "round": "r1"},
85
+ "run_09": {"label": "+ PFNet", "group": "50M", "round": "r1"},
86
+ "run_10": {"label": "+ decay per-canal aprendido", "group": "50M", "round": "r1"},
87
+ # ── 10M, Round 1 ──
88
+ "run_13": {"label": "Small CPU-1 + BPE 4K", "group": "10M", "round": "r1"},
89
+ "run_14": {"label": "Small CPU-1 byte (Qwen distill.)", "group": "10M", "round": "r1"},
90
+ "run_15": {"label": "Small CPU-1 byte + hidden distill.", "group": "10M", "round": "r1"},
91
+ "run_16": {"label": "Small CPU-1 raw bytes, no teacher", "group": "10M", "round": "r1"},
92
+ # ── Round 2 (15 tok/param) ──
93
+ "run_04_r2": {"label": "run_04 @ 15 tok/param", "group": "50M", "round": "r2"},
94
+ "run_05_r2": {"label": "run_05 @ 15 tok/param", "group": "50M", "round": "r2"},
95
+ "run_07_r2": {"label": "run_07 @ 15 tok/param", "group": "50M", "round": "r2"},
96
+ "run_08_r2": {"label": "run_08 @ 15 tok/param", "group": "50M", "round": "r2"},
97
+ "run_09_r2": {"label": "run_09 @ 15 tok/param", "group": "50M", "round": "r2"},
98
+ "run_10_r2": {"label": "run_10 @ 15 tok/param", "group": "50M", "round": "r2"},
99
+ "run_13_r2": {"label": "run_13 @ 15 tok/param", "group": "10M", "round": "r2"},
100
+ "run_14_r2": {"label": "run_14 @ 15 tok/param", "group": "10M", "round": "r2"},
101
+ "run_15_r2": {"label": "run_15 @ 15 tok/param", "group": "10M", "round": "r2"},
102
+ "run_16_r2": {"label": "run_16 @ 15 tok/param", "group": "10M", "round": "r2"},
103
+ # ── Round 3 (v3) ──
104
+ "run_01_v3": {"label": "run_01 v3", "group": "50M", "round": "v3"},
105
+ "run_02_v3": {"label": "run_02 v3", "group": "50M", "round": "v3"},
106
+ "run_02a_byte_only_heads_v3": {"label": "run_02a v3", "group": "50M", "round": "v3"},
107
+ "run_03_v3": {"label": "run_03 v3", "group": "50M", "round": "v3"},
108
+ "run_04_v3": {"label": "run_04 v3", "group": "50M", "round": "v3"},
109
+ "run_05_v3": {"label": "run_05 v3", "group": "50M", "round": "v3"},
110
+ "run_05b_kernel_strict_v3": {"label": "run_05b v3", "group": "50M", "round": "v3"},
111
+ "run_06_v3": {"label": "run_06 v3", "group": "50M", "round": "v3"},
112
+ "run_08_v3": {"label": "run_08 v3", "group": "50M", "round": "v3"},
113
+ "run_13_v3": {"label": "run_13 v3", "group": "10M", "round": "v3"},
114
+ "run_14_v3": {"label": "run_14 v3", "group": "10M", "round": "v3"},
115
+ "run_15_v3": {"label": "run_15 v3", "group": "10M", "round": "v3"},
116
+ # ── Round 3 (r3 label — extended budget from r2) ──
117
+ "run_04_r3": {"label": "run_04 r3 (extended)", "group": "50M", "round": "r3"},
118
+ "run_07_r3": {"label": "run_07 r3 (extended)", "group": "50M", "round": "r3"},
119
+ "run_14_r3": {"label": "run_14 r3 (extended)", "group": "10M", "round": "r3"},
120
+ "run_15_r3": {"label": "run_15 r3 (extended)", "group": "10M", "round": "r3"},
121
+ }
122
+
123
+
124
+ # ─────────────────────────────────────────────────────────────────────────────
125
+ # AblationInfo — compatible con la interfaz ModelInfo de los eval_* módulos
126
+ # ─────────────────────────────────────────────────────────────────────────────
127
+
128
+ @dataclass
129
+ class AblationInfo:
130
+ """
131
+ Equivalente a ModelInfo (inference.py) pero para AblationModel.
132
+ Todos los eval_* módulos acceden solo a atributos, nunca a isinstance.
133
+ """
134
+ run_name: str
135
+ model_class: str # config['name']
136
+ tok: str # byte / byte_dynamic / bpe
137
+ quant: str # ternary / fp16
138
+ is_byte_level: bool
139
+ is_recurrent: bool # True → MLGRU (estado persistente), False → Transformer
140
+ is_ternary: bool
141
+ use_local_dec: bool # LocalByteDecoder
142
+ patch_size: int # bytes por patch
143
+ vocab_size: int # 256 (byte) / bpe_vocab_size
144
+ n_heads: int # patch_size para byte, 1 para BPE
145
+ d_model: int
146
+ n_layers: int
147
+
148
+ @staticmethod
149
+ def from_config(run_name: str, config: dict) -> "AblationInfo":
150
+ tok = config.get("tokenization", "byte")
151
+ quant = config.get("quantization", "fp16")
152
+ mixer = config.get("token_mixer", "mlgru")
153
+ patch = int(config.get("patch_size", 4))
154
+ is_byte = tok in ("byte", "byte_dynamic")
155
+ use_lbd = is_byte and config.get("use_local_decoder", True)
156
+ vocab = 256 if is_byte else int(config.get("bpe_vocab_size", 16384))
157
+ # n_heads: siempre patch_size para byte (LocalDecoder se desempaqueta
158
+ # en _get_logits_list de eval_correctness a P tensores [B,S,256])
159
+ n_heads = patch if is_byte else 1
160
+ return AblationInfo(
161
+ run_name = run_name,
162
+ model_class = config.get("name", run_name),
163
+ tok = tok,
164
+ quant = quant,
165
+ is_byte_level = is_byte,
166
+ is_recurrent = (mixer == "mlgru"),
167
+ is_ternary = (quant == "ternary"),
168
+ use_local_dec = use_lbd,
169
+ patch_size = patch,
170
+ vocab_size = vocab,
171
+ n_heads = n_heads,
172
+ d_model = int(config.get("d_model", 512)),
173
+ n_layers = int(config.get("n_layers", 12)),
174
+ )
175
+
176
+
177
+ # ─────────────────────────────────────────────────────────────────────────────
178
+ # AblationEngine — adapter para usar AblationModel con eval_* módulos
179
+ # ─────────────────────────────────────────────────────────────────────────────
180
+
181
+ class AblationEngine:
182
+ """
183
+ Adapter que hace que AblationModel sea compatible con la interfaz
184
+ CPU1InferenceEngine que usan eval_correctness, eval_performance, eval_quality.
185
+
186
+ Los módulos de eval solo acceden a:
187
+ engine.info → AblationInfo (compatible con ModelInfo)
188
+ engine.hidden_states → estado recurrente
189
+ engine._get_model() → AblationModel
190
+ engine._get_embedding(model) → fn(x) → x (identidad, embedding está en el model)
191
+ engine.reset_state() → limpia estado
192
+ engine.generate(...) → generación byte-level
193
+ engine._ablation_step(model, dummy) → (logits, new_states) [performance]
194
+ engine._is_ablation → True (marca para eval_performance)
195
+ """
196
+
197
+ _is_ablation = True # detectado por eval_performance para usar PyTorch puro
198
+
199
+ def __init__(self, model, config: dict, info: AblationInfo):
200
+ self._model = model
201
+ self.config = config
202
+ self.info = info
203
+ self.hidden_states: list | None = None
204
+
205
+ # ── Interfaz básica ──────────────────────────────────────────────────────
206
+
207
+ def _get_model(self):
208
+ return self._model
209
+
210
+ def reset_state(self):
211
+ self.hidden_states = None
212
+
213
+ def _get_embedding(self, model):
214
+ """
215
+ Devuelve una función identidad.
216
+ Para AblationModel, el embedding forma parte del forward completo;
217
+ no hay paso 'solo embedding' separable sin reescribir el modelo.
218
+ eval_performance nunca llama a esto en modo ablation (_is_ablation=True),
219
+ pero si alguien lo llama por error devuelve algo razonable.
220
+ """
221
+ def _identity(x):
222
+ return x
223
+ return _identity
224
+
225
+ # ── Paso autoregressivo — PyTorch puro, SIN kernels nuestros ─────────────
226
+
227
+ def _ablation_step(self, model, dummy: torch.Tensor):
228
+ """
229
+ Un paso de forward completo en PyTorch puro.
230
+
231
+ Garantías:
232
+ - Solo usa model.forward() de PyTorch estándar.
233
+ - No llama a forward_with_prefetch ni a ningún kernel C/SIMD nuestro.
234
+ - Para MLGRU: lleva self.hidden_states entre pasos (real O(1)).
235
+ - Para Transformer: hidden_states siempre None (sin estado persistente).
236
+ """
237
+ result = model(
238
+ dummy,
239
+ hidden_states = self.hidden_states if self.info.is_recurrent else None,
240
+ training_phase = 1,
241
+ target_elimination = 0.0,
242
+ )
243
+ logits, new_states = result[0], result[1]
244
+ return logits, (new_states if self.info.is_recurrent else None)
245
+
246
+ # ── Generación ───────────────────────────────────────────────────────────
247
+
248
+ def generate(self, prompt: bytes, max_bytes: int = 256,
249
+ temperature: float = 1.0, top_p: float = 0.9,
250
+ reset: bool = True) -> bytes:
251
+ """
252
+ Generación byte-level usando _generate_byte de train_ablation.
253
+ BPE runs: devuelve b'' (generate_tokens no implementado).
254
+ """
255
+ if not self.info.is_byte_level:
256
+ return b""
257
+ from train_ablation import _generate_byte
258
+ return _generate_byte(
259
+ self._model, prompt, max_bytes, self.config,
260
+ torch.device("cpu"),
261
+ temperature=temperature, top_k=40, top_p=top_p,
262
+ elimination_rate=0.0,
263
+ )
264
+
265
+
266
+ # ─────────────────────────────────────────────────────────────────────────────
267
+ # Localización y carga de checkpoints
268
+ # ─────────────────────────────────────────────────────────────────────────────
269
+
270
+ def find_checkpoint(run_name: str) -> Path | None:
271
+ """Busca checkpoint local (compact_2bit primero, fp32 como fallback)."""
272
+ candidates = [
273
+ MODELS_COMPACT / run_name / f"checkpoint_{run_name}_final.pt",
274
+ MODELS_FP32 / run_name / "model.pt",
275
+ ]
276
+ for p in candidates:
277
+ if p.exists():
278
+ return p
279
+ return None
280
+
281
+
282
+ def discover_runs() -> list[str]:
283
+ """Lista todos los runs con checkpoint local disponible."""
284
+ return [r for r in RUN_META if find_checkpoint(r) is not None]
285
+
286
+
287
+ def load_run(ckpt_path: Path, run_name: str) -> tuple:
288
+ """
289
+ Carga el checkpoint y construye el modelo. Soporta tres formatos:
290
+
291
+ compact_2bit → load_ablation_checkpoint desempaqueta el ternary
292
+ bf16 → load_ablation_checkpoint castea a fp32
293
+ fp32 → carga directa desde raw['state_dict']
294
+ (formato de cpu1-ablations-final y export_ablations.py)
295
+
296
+ Devuelve (engine, raw_ckpt, config, missing_keys, unexpected_keys).
297
+ """
298
+ from train_ablation import load_ablation_checkpoint, build_ablation_model
299
+
300
+ raw = torch.load(str(ckpt_path), map_location="cpu", weights_only=False)
301
+
302
+ fmt = raw.get("format", "bf16")
303
+ if fmt == "fp32":
304
+ # Descargado de Cukinator/cpu1-ablations-final o exportado localmente.
305
+ # Claves: state_dict, config, metrics, step, run_name, format, source_repo
306
+ config = raw["config"]
307
+ state = raw["state_dict"]
308
+ else:
309
+ # compact_2bit o bf16: load_ablation_checkpoint lo desempaqueta / castea.
310
+ state, config = load_ablation_checkpoint(str(ckpt_path))
311
+
312
+ config["use_gradient_checkpointing"] = False
313
+ model = build_ablation_model(config)
314
+ missing, unexpected = model.load_state_dict(state, strict=False)
315
+ if missing or unexpected:
316
+ raise RuntimeError(f"Checkpoint incompatible: missing={missing}, unexpected={unexpected}")
317
+ model.eval()
318
+
319
+ info = AblationInfo.from_config(run_name, config)
320
+ engine = AblationEngine(model, config, info)
321
+ return engine, raw, config, missing, unexpected
322
+
323
+
324
+ # ─────────────────────────────────────────────────────────────────────────────
325
+ # Métricas de pérdida (del checkpoint guardado)
326
+ # ─────────────────────────────────────────────────────────────────────────────
327
+
328
+ def extract_loss_metrics(raw_ckpt: dict, info: AblationInfo) -> dict:
329
+ """
330
+ Extrae val_loss del checkpoint y calcula métricas derivadas.
331
+
332
+ Criterio homogéneo:
333
+ perplexity = exp(val_loss) para TODOS los runs (byte-level o token-level).
334
+ bpb = val_loss / ln(2) solo runs byte-level.
335
+ delta_uniform = val_loss - ln(256) solo runs byte-level.
336
+ """
337
+ stored = raw_ckpt.get("metrics", {}) or {}
338
+ val_loss = None
339
+ for key in ("val_loss", "loss", "final_val_loss"):
340
+ if key in stored and isinstance(stored[key], (float, int)):
341
+ val_loss = float(stored[key])
342
+ break
343
+
344
+ if val_loss is None:
345
+ return {"val_loss_available": False}
346
+
347
+ ppl = math.exp(min(val_loss, 88.0))
348
+ result = {
349
+ "val_loss": round(val_loss, 6),
350
+ "perplexity": round(ppl, 3),
351
+ "ppl_type": "byte-level" if info.is_byte_level else "token-level",
352
+ "val_loss_available": True,
353
+ }
354
+ if info.is_byte_level:
355
+ result["bpb"] = round(val_loss / LN2, 5)
356
+ result["delta_uniform"] = round(val_loss - UNIFORM_BYTE, 5)
357
+ return result
358
+
359
+
360
+ # ─────────────────────────────────────────────────────────────────────────────
361
+ # Guardado de resultados
362
+ # ─────────────────────────────────────────────────────────────────────────────
363
+
364
+ def _f(v, dec=2, fb="—"):
365
+ if v is None:
366
+ return fb
367
+ if isinstance(v, float):
368
+ return f"{v:.{dec}f}"
369
+ return str(v)
370
+
371
+
372
+ def save_run_json(run_name: str, data: dict) -> Path:
373
+ RESULTADOS_DIR.mkdir(exist_ok=True)
374
+ p = RESULTADOS_DIR / f"ablation_{run_name}.json"
375
+ with open(p, "w", encoding="utf-8") as f:
376
+ json.dump(data, f, indent=2, ensure_ascii=False, default=str)
377
+ return p
378
+
379
+
380
+ def save_summary_markdown(all_results: list[dict]) -> Path:
381
+ RESULTADOS_DIR.mkdir(exist_ok=True)
382
+ path = RESULTADOS_DIR / "ablation_summary.md"
383
+
384
+ lines = [
385
+ "# Ablation Study — Evaluación completa",
386
+ "",
387
+ f"Generado: {time.strftime('%Y-%m-%d %H:%M')}",
388
+ f"Criterio: PPL = exp(val_loss) | BPB = val_loss / ln(2) (byte-only)",
389
+ f"Referencia uniforme byte: ln(256) = {UNIFORM_BYTE:.3f} nats → BPB = 8.000",
390
+ f"Performance: PyTorch puro, sin kernels customizados (ablation mode).",
391
+ "",
392
+ "## Correctness",
393
+ "",
394
+ "| Run | fwd_shapes | probs | determinism | state_prop | ternary | state_size |",
395
+ "|-----|:----------:|:-----:|:-----------:|:----------:|:-------:|:----------:|",
396
+ ]
397
+ for r in all_results:
398
+ nm = r["run_name"]
399
+ C = r.get("correctness", {})
400
+ s = lambda k: C.get(k, {}).get("status", "—")
401
+ lines.append(f"| {nm} | {s('forward_shapes')} | {s('probs')} | "
402
+ f"{s('determinism')} | {s('state_propagation')} | "
403
+ f"{s('ternary_weights')} | {s('state_size')} |")
404
+
405
+ lines += [
406
+ "",
407
+ "## Performance (PyTorch puro)",
408
+ "",
409
+ "| Run | P/s | Bytes/s | p50 ms | p95 ms | CV | ctx_scaling | RAM Δ MB |",
410
+ "|-----|----:|-------:|-------:|-------:|---:|:-----------:|---------:|",
411
+ ]
412
+ for r in all_results:
413
+ nm = r["run_name"]
414
+ P = r.get("performance", {})
415
+ tl = P.get("throughput_latency_jitter", {}).get("result", {})
416
+ cs = P.get("context_scaling", {}).get("status", "—")
417
+ ram = P.get("ram", {}).get("result", {})
418
+ lines.append(
419
+ f"| {nm} "
420
+ f"| {_f(tl.get('throughput_sps'),1)} "
421
+ f"| {_f(tl.get('throughput_bps'),0)} "
422
+ f"| {_f(tl.get('p50_ms'),1)} "
423
+ f"| {_f(tl.get('p95_ms'),1)} "
424
+ f"| {_f(tl.get('jitter_cv'),4)} "
425
+ f"| {cs} "
426
+ f"| {_f(ram.get('delta_mb'),1)} |"
427
+ )
428
+
429
+ lines += [
430
+ "",
431
+ "## Quality",
432
+ "",
433
+ "| Run | Val Loss | PPL | BPB | Δ uniforme | gen% print | utf8% | gen status |",
434
+ "|-----|--------:|----:|----:|----------:|-----------:|------:|:----------:|",
435
+ ]
436
+ for r in all_results:
437
+ nm = r["run_name"]
438
+ lm = r.get("loss_metrics", {})
439
+ Q = r.get("quality", {})
440
+ gn = Q.get("generation", {}).get("result", {})
441
+ u8 = Q.get("utf8", {}).get("result", {})
442
+ gs = Q.get("generation", {}).get("status", "—")
443
+ is_byte = r.get("is_byte_level", True)
444
+ lines.append(
445
+ f"| {nm} "
446
+ f"| {_f(lm.get('val_loss'),4)} "
447
+ f"| {_f(lm.get('perplexity'),2)} "
448
+ f"| {_f(lm.get('bpb'),4) if is_byte else '—'} "
449
+ f"| {_f(lm.get('delta_uniform'),4) if is_byte else '—'} "
450
+ f"| {_f(gn.get('printable_pct'),3) if not gn.get('skipped') else '—'} "
451
+ f"| {_f(u8.get('utf8_pct'),3) if not u8.get('skipped') else '—'} "
452
+ f"| {gs} |"
453
+ )
454
+
455
+ with open(path, "w", encoding="utf-8") as f:
456
+ f.write("\n".join(lines) + "\n")
457
+ return path
458
+
459
+
460
+ # ─────────────────────────────────────────────────────────────────────────────
461
+ # Generación del README actualizado
462
+ # ─────────────────────────────────────────────────────────────────────────────
463
+
464
+ def build_readme(all_results: list[dict]) -> str:
465
+ """Build only from the complete reproducible audit, never a legacy subset."""
466
+ from audit_model_cards import build_cards
467
+ from audit_readmes import OUT
468
+ inventory = json.loads((OUT / 'inventory.json').read_text(encoding='utf-8'))
469
+ corpus = json.loads((OUT / 'corpus.json').read_text(encoding='utf-8'))
470
+ build_cards(inventory, corpus)
471
+ return HF_README.read_text(encoding='utf-8')
472
+
473
+
474
+ def _get_hf_token() -> str | None:
475
+ """Lee HF_TOKEN del entorno o del archivo .env del repo."""
476
+ token = os.environ.get("HF_TOKEN")
477
+ if not token:
478
+ env_path = ROOT / ".env"
479
+ if env_path.exists():
480
+ for line in env_path.read_text(encoding="utf-8").splitlines():
481
+ if line.startswith("HF_TOKEN"):
482
+ token = line.split("=", 1)[1].strip().strip('"').strip("'")
483
+ break
484
+ return token or None
485
+
486
+
487
+ def download_from_hf(runs_to_try: list[str]) -> list[str]:
488
+ """
489
+ Descarga checkpoints hacia disco:
490
+ 1. Intenta fp32 desde Cukinator/cpu1-ablations-final → models/ablations_final/
491
+ 2. Si da 404, intenta compact_2bit desde Cukinator/cpu1-ablation-checkpoints
492
+ → models/ablation_models/ (load_ablation_checkpoint lo desempaqueta)
493
+ Saltea los que ya existen.
494
+ Devuelve lista de runs con checkpoint disponible.
495
+ """
496
+ try:
497
+ from huggingface_hub import hf_hub_download
498
+ except ImportError:
499
+ print(" [ERROR] huggingface_hub no instalado — pip install huggingface-hub")
500
+ return []
501
+
502
+ HF_REPO_COMPACT = "Cukinator/cpu1-ablation-checkpoints"
503
+
504
+ MODELS_FP32.mkdir(parents=True, exist_ok=True)
505
+ MODELS_COMPACT.mkdir(parents=True, exist_ok=True)
506
+ print(f"\n{'=' * 70}")
507
+ print(f" Descargando modelos (fp32 primero, compact como fallback)")
508
+ print(f"{'=' * 70}")
509
+
510
+ available = []
511
+ for run_name in runs_to_try:
512
+ # ── ¿Ya tenemos algo? ────────────────────────────────────────────────
513
+ fp32_dst = MODELS_FP32 / run_name / "model.pt"
514
+ compact_dst = MODELS_COMPACT / run_name / f"checkpoint_{run_name}_final.pt"
515
+
516
+ if fp32_dst.exists():
517
+ size_mb = fp32_dst.stat().st_size / 1e6
518
+ print(f" [cache fp32] {run_name:<30} ({size_mb:.0f} MB)")
519
+ available.append(run_name)
520
+ continue
521
+ if compact_dst.exists():
522
+ size_mb = compact_dst.stat().st_size / 1e6
523
+ print(f" [cache compact] {run_name:<30} ({size_mb:.0f} MB)")
524
+ available.append(run_name)
525
+ continue
526
+
527
+ # ── Intento 1: fp32 desde cpu1-ablations-final ───────────────────────
528
+ fp32_dst.parent.mkdir(parents=True, exist_ok=True)
529
+ print(f" Descargando (fp32) {run_name}...", end="", flush=True)
530
+ try:
531
+ hf_hub_download(
532
+ repo_id = HF_REPO_MODELS,
533
+ filename = f"{run_name}/model.pt",
534
+ repo_type = "model",
535
+ local_dir = str(MODELS_FP32),
536
+ local_dir_use_symlinks = False,
537
+ )
538
+ size_mb = fp32_dst.stat().st_size / 1e6
539
+ print(f" {size_mb:.0f} MB OK")
540
+ available.append(run_name)
541
+ continue
542
+ except Exception:
543
+ print(f" no disponible — probando compact...")
544
+
545
+ # ── Intento 2: compact_2bit desde cpu1-ablation-checkpoints ──────────
546
+ compact_dst.parent.mkdir(parents=True, exist_ok=True)
547
+ print(f" Descargando (compact) {run_name}...", end="", flush=True)
548
+ try:
549
+ hf_hub_download(
550
+ repo_id = HF_REPO_COMPACT,
551
+ filename = f"{run_name}/checkpoint_{run_name}_final.pt",
552
+ repo_type = "model",
553
+ local_dir = str(MODELS_COMPACT),
554
+ local_dir_use_symlinks = False,
555
+ )
556
+ size_mb = compact_dst.stat().st_size / 1e6
557
+ print(f" {size_mb:.0f} MB OK")
558
+ available.append(run_name)
559
+ except Exception as e:
560
+ print(f" FALLO: {e}")
561
+
562
+ print(f" Total disponibles: {len(available)}/{len(runs_to_try)}")
563
+ return available
564
+
565
+
566
+ return available
567
+
568
+
569
+ def upload_readme_to_hf(readme_path: Path) -> None:
570
+ """Sube el README actualizado al repo HuggingFace."""
571
+ try:
572
+ from huggingface_hub import HfApi
573
+ except ImportError:
574
+ print(" [WARN] huggingface_hub no instalado — no se sube el README")
575
+ return
576
+
577
+ token = _get_hf_token()
578
+ if not token:
579
+ print(" [WARN] No hay HF_TOKEN — no se puede subir el README")
580
+ return
581
+
582
+ api = HfApi(token=token)
583
+ commit_msg = f"Update README: recalculated metrics {time.strftime('%Y-%m-%d')}"
584
+ print(f"\n Subiendo README a {HF_REPO_MODELS} ...", flush=True)
585
+ try:
586
+ api.upload_file(
587
+ path_or_fileobj = str(readme_path),
588
+ path_in_repo = "README.md",
589
+ repo_id = HF_REPO_MODELS,
590
+ repo_type = "model",
591
+ commit_message = commit_msg,
592
+ )
593
+ print(f" README subido OK")
594
+ except Exception as e:
595
+ print(f" [ERROR upload README] {e}")
596
+
597
+
598
+ # ─────────────────────────────────────────────────────────────────────────────
599
+ # Main
600
+ # ─────────────────────────────��───────────────────────────────────────────────
601
+
602
+ def main():
603
+ parser = argparse.ArgumentParser(
604
+ description="Suite completa de evaluación para todos los modelos ablation"
605
+ )
606
+ parser.add_argument("--runs", nargs="+", default=None,
607
+ help="Subset de runs (ej: run_02 run_07)")
608
+ parser.add_argument("--no-performance", action="store_true",
609
+ help="Omitir eval_performance (más rápido)")
610
+ parser.add_argument("--update-readme", action="store_true",
611
+ help="Reconstruir hf_readmes/cpu1-ablations-final.md con métricas reales")
612
+ parser.add_argument("--download", action="store_true",
613
+ help="Descargar checkpoints faltantes desde HF (Cukinator/cpu1-ablations-final)")
614
+ parser.add_argument("--upload-readme", action="store_true",
615
+ help="Subir el README actualizado al repo HuggingFace después del eval")
616
+ args = parser.parse_args()
617
+
618
+ # Importar módulos de eval (usamos TODOS)
619
+ from eval_correctness import run_correctness
620
+ from eval_performance import run_performance
621
+ from eval_quality import run_quality
622
+ # eval_dataset y eval_external se saltan para ablation models:
623
+ # eval_dataset → requiere dataset local con teacher signal
624
+ # eval_external → requiere GGUF + llama.cpp (no aplica a ablation)
625
+
626
+ # ── Descarga desde HF si se pidió ─────────────────────────────────────
627
+ if args.download:
628
+ target_runs = args.runs or list(RUN_META.keys())
629
+ download_from_hf(target_runs)
630
+
631
+ runs = args.runs or discover_runs()
632
+ if not runs:
633
+ print(" No se encontraron checkpoints localmente (usa --download para descargar).")
634
+ return
635
+
636
+ print(f"\n{'═' * 70}")
637
+ print(f" Ablation Eval Suite")
638
+ print(f" Módulos: correctness + performance (PyTorch puro) + quality")
639
+ print(f" Runs: {len(runs)}")
640
+ print(f" Criterio: PPL = exp(val_loss) | BPB = val_loss / ln(2) (byte-only)")
641
+ print(f"{'═' * 70}")
642
+
643
+ all_results = []
644
+ t_total = time.perf_counter()
645
+
646
+ for run_name in runs:
647
+ ckpt_path = find_checkpoint(run_name)
648
+ if ckpt_path is None:
649
+ print(f"\n [SKIP] {run_name} — checkpoint no encontrado")
650
+ continue
651
+
652
+ print(f"\n{'─' * 70}")
653
+ print(f" RUN: {run_name} → {ckpt_path}")
654
+ print(f"{'─' * 70}")
655
+ t0 = time.perf_counter()
656
+
657
+ # ── Carga ──────────────────────────────────────────────────────────
658
+ try:
659
+ engine, raw, config, missing, unexpected = load_run(ckpt_path, run_name)
660
+ except Exception as e:
661
+ print(f" [ERROR carga] {e}")
662
+ all_results.append({"run_name": run_name, "error": f"load: {e}"})
663
+ continue
664
+
665
+ model = engine._get_model()
666
+ info = engine.info
667
+
668
+ record: dict = {
669
+ "run_name": run_name,
670
+ "ckpt_path": str(ckpt_path),
671
+ "ckpt_format": raw.get("format", "?"),
672
+ "step": raw.get("step", "?"),
673
+ "tok": info.tok,
674
+ "quant": info.quant,
675
+ "eff_bits": 1.58 if info.is_ternary else 16.0,
676
+ "is_byte_level": info.is_byte_level,
677
+ "is_recurrent": info.is_recurrent,
678
+ "n_params_M": round(sum(p.numel() for p in model.parameters()) / 1e6, 3),
679
+ "ram_fp32_mb": round(sum(p.numel() * 4 for p in model.parameters()) / 1e6, 1),
680
+ }
681
+ if missing:
682
+ record["missing_keys"] = len(missing)
683
+ if unexpected:
684
+ record["unexpected_keys"] = len(unexpected)
685
+
686
+ # ── Métricas de pérdida (del checkpoint) ───────────────────────────
687
+ record["loss_metrics"] = extract_loss_metrics(raw, info)
688
+
689
+ # ── Correctness ────────────────────────────────────────────────────
690
+ record["correctness"] = run_correctness(engine)
691
+
692
+ # ── Performance (eval_performance, modo ablation = PyTorch puro) ───
693
+ if not args.no_performance:
694
+ record["performance"] = run_performance(engine)
695
+ else:
696
+ record["performance"] = {"skipped": True}
697
+
698
+ # ── Quality (eval_quality: generation + utf8 + perplexity) ─────────
699
+ # dataset=None → skip check_perplexity (usamos el del checkpoint)
700
+ record["quality"] = run_quality(engine, dataset=None)
701
+
702
+ # ── eval_dataset: skip (sin dataset local) ─────────────────────────
703
+ record["dataset_eval"] = {"skipped": True, "reason": "sin dataset local"}
704
+
705
+ # ── eval_external: skip (sin GGUF de ablation) ────────────────────
706
+ record["external_eval"] = {"skipped": True, "reason": "sin GGUF (no aplica a ablation)"}
707
+
708
+ record["eval_time_s"] = round(time.perf_counter() - t0, 1)
709
+
710
+ # ── Resumen consola ────────────────────────────────────────────────
711
+ lm = record["loss_metrics"]
712
+ tl = record.get("performance", {}).get("throughput_latency_jitter", {}).get("result", {})
713
+ c_ok = sum(1 for v in record["correctness"].values()
714
+ if isinstance(v, dict) and v.get("status") == "PASS")
715
+ c_n = len(record["correctness"])
716
+ q_ok = sum(1 for v in record["quality"].values()
717
+ if isinstance(v, dict) and v.get("status") == "PASS")
718
+
719
+ print(f"\n ── Resumen {run_name} ({record['eval_time_s']}s) ──")
720
+ print(f" Params: {record['n_params_M']} M | RAM fp32: {record['ram_fp32_mb']} MB")
721
+ if lm.get("val_loss_available"):
722
+ print(f" Val Loss: {lm['val_loss']} nats [{lm['ppl_type']}]")
723
+ print(f" PPL: {lm['perplexity']}")
724
+ if "bpb" in lm:
725
+ print(f" BPB: {lm['bpb']} bits/byte (Δ uniform = {lm.get('delta_uniform','?')})")
726
+ if tl:
727
+ print(f" Throughput: {tl.get('throughput_sps','?')} P/s "
728
+ f"({tl.get('throughput_bps','?')} bytes/s) "
729
+ f"p50={tl.get('p50_ms','?')}ms [pytorch_pure]")
730
+ print(f" Checks: correctness {c_ok}/{c_n} PASS | quality {q_ok}/? PASS")
731
+
732
+ json_p = save_run_json(run_name, record)
733
+ print(f" JSON: {json_p}")
734
+ all_results.append(record)
735
+
736
+ # ── Resumen global ─────────────────────────────────────────────────────
737
+ if all_results:
738
+ md_p = save_summary_markdown(all_results)
739
+ print(f"\n\n Resumen Markdown: {md_p}")
740
+
741
+ if args.update_readme and all_results:
742
+ HF_README.parent.mkdir(parents=True, exist_ok=True)
743
+ readme_txt = build_readme(all_results)
744
+ HF_README.write_text(readme_txt, encoding="utf-8")
745
+ print(f" README local: {HF_README}")
746
+
747
+ if args.upload_readme and all_results:
748
+ if not args.update_readme:
749
+ # Generar el README aunque no se haya pedido guardar localmente
750
+ HF_README.parent.mkdir(parents=True, exist_ok=True)
751
+ readme_txt = build_readme(all_results)
752
+ HF_README.write_text(readme_txt, encoding="utf-8")
753
+ upload_readme_to_hf(HF_README)
754
+
755
+ elapsed = time.perf_counter() - t_total
756
+ total_pass = sum(
757
+ sum(1 for v in r.get("correctness", {}).values()
758
+ if isinstance(v, dict) and v.get("status") == "PASS")
759
+ for r in all_results
760
+ )
761
+ print(f"\n{'═' * 70}")
762
+ print(f" Listo — {len(all_results)} runs | {elapsed:.0f}s total")
763
+ print(f" Correctness PASS total: {total_pass}")
764
+ print(f"{'═' * 70}\n")
765
+
766
+
767
+ if __name__ == "__main__":
768
+ main()
evaluation/source/eval_correctness.py ADDED
@@ -0,0 +1,239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Eval — Correctness: verifica propiedades del modelo.
3
+
4
+ Checks adaptivos segun arquitectura (engine.info):
5
+ forward_shapes — Forward pass sin crash para varias shapes
6
+ probs — Distribuciones de probabilidad validas
7
+ determinism — Mismo input → mismo output
8
+ state_prop — Estado MLGRU se propaga correctamente (solo recurrente)
9
+ ternary_weights — Pesos BitLinear son {-1, 0, 1} (solo ternary)
10
+ state_size — Estado MLGRU < 1MB (solo recurrente)
11
+
12
+ Todos usan el modelo cargado por CPU1InferenceEngine.
13
+ """
14
+ import torch
15
+
16
+ from helpers import get_model, BitLinear
17
+
18
+
19
+ def _make_dummy_input(info, batch: int = 1, seq_len: int = 64):
20
+ """Crear input dummy segun tipo de modelo."""
21
+ if info.is_byte_level:
22
+ return torch.randint(0, 256, (batch, seq_len, info.patch_size), dtype=torch.long)
23
+ else:
24
+ return torch.randint(0, info.vocab_size, (batch, seq_len), dtype=torch.long)
25
+
26
+
27
+ def _unpack_forward(result):
28
+ """Extraer logits y states de cualquier modelo.
29
+ CPU1ModelV2: (logits_tuple, states)
30
+ AblationModel: (logits_or_tuple, states, extra_losses)
31
+ """
32
+ if len(result) == 2:
33
+ return result[0], result[1]
34
+ else:
35
+ return result[0], result[1]
36
+
37
+
38
+ def _get_logits_list(logits, info):
39
+ """Normalizar logits a lista de tensores [B, S, V] siempre.
40
+
41
+ Casos:
42
+ - tuple/list de heads (byte sin LocalDecoder): devuelve lista tal cual.
43
+ - LocalByteDecoder: [B, S, P, 256] → lista de P tensores [B, S, 256].
44
+ - tensor 3D (BPE o produccion): devuelve lista de 1 elemento.
45
+ """
46
+ if isinstance(logits, (tuple, list)):
47
+ return list(logits)
48
+ if logits.dim() == 4:
49
+ # LocalByteDecoder: [B, S, P, 256] → P × [B, S, 256]
50
+ return [logits[:, :, i, :] for i in range(logits.shape[2])]
51
+ return [logits]
52
+
53
+
54
+ def check_forward_shapes(engine) -> dict:
55
+ """Forward sin crash para varias combinaciones batch × seq."""
56
+ info = engine.info
57
+ model = engine._get_model()
58
+ configs = [(b, s) for b in [1, 2] for s in [1, 64, 256]]
59
+ errors = []
60
+
61
+ for batch, seq_len in configs:
62
+ x = _make_dummy_input(info, batch, seq_len)
63
+ with torch.inference_mode():
64
+ result = model(x)
65
+ logits, _ = _unpack_forward(result)
66
+
67
+ logits_list = _get_logits_list(logits, info)
68
+ expected_heads = info.n_heads
69
+ expected_vocab = info.vocab_size
70
+
71
+ if len(logits_list) != expected_heads:
72
+ errors.append(f"Esperado {expected_heads} heads, obtenido {len(logits_list)}")
73
+ continue
74
+
75
+ for i, l in enumerate(logits_list):
76
+ expected_shape = (batch, seq_len, expected_vocab)
77
+ if l.shape != expected_shape:
78
+ errors.append(f"Head {i}: shape {l.shape} != {expected_shape}")
79
+ if torch.isnan(l).any():
80
+ errors.append(f"NaN en logits batch={batch} seq={seq_len} head={i}")
81
+ if torch.isinf(l).any():
82
+ errors.append(f"Inf en logits batch={batch} seq={seq_len} head={i}")
83
+
84
+ assert not errors, "\n".join(errors)
85
+ return {'configs_tested': len(configs), 'heads': info.n_heads}
86
+
87
+
88
+ def check_probs(engine) -> dict:
89
+ """Las heads producen distribuciones validas (suman a 1)."""
90
+ info = engine.info
91
+ model = engine._get_model()
92
+ x = _make_dummy_input(info, batch=1, seq_len=128)
93
+
94
+ with torch.inference_mode():
95
+ logits, _ = _unpack_forward(model(x))
96
+
97
+ logits_list = _get_logits_list(logits, info)
98
+ max_err = 0.0
99
+ for i, head_logits in enumerate(logits_list):
100
+ probs = torch.softmax(head_logits, dim=-1)
101
+ sums = probs.sum(dim=-1)
102
+ err = (sums - 1.0).abs().max().item()
103
+ max_err = max(max_err, err)
104
+ assert err < 1e-4, f"Head {i}: suma de probs error={err:.6f}"
105
+
106
+ return {'max_error': max_err}
107
+
108
+
109
+ def check_determinism(engine) -> dict:
110
+ """Mismo input con mismo estado da output identico."""
111
+ info = engine.info
112
+ model = engine._get_model()
113
+ torch.manual_seed(42)
114
+ x = _make_dummy_input(info, batch=1, seq_len=64)
115
+
116
+ with torch.inference_mode():
117
+ logits1, _ = _unpack_forward(model(x, hidden_states=None))
118
+ logits2, _ = _unpack_forward(model(x, hidden_states=None))
119
+
120
+ list1 = _get_logits_list(logits1, info)
121
+ list2 = _get_logits_list(logits2, info)
122
+
123
+ for i in range(len(list1)):
124
+ diff = (list1[i] - list2[i]).abs().max().item()
125
+ assert diff == 0.0, f"Head {i}: output no deterministico, diff={diff}"
126
+
127
+ return {'deterministic': True}
128
+
129
+
130
+ def check_state_propagation(engine) -> dict:
131
+ """Procesar en chunks da el mismo resultado que todo junto (solo recurrente)."""
132
+ info = engine.info
133
+ if not info.is_recurrent:
134
+ return {'skipped': True, 'reason': 'modelo no recurrente (Transformer)'}
135
+
136
+ model = engine._get_model()
137
+ torch.manual_seed(0)
138
+ x = _make_dummy_input(info, batch=1, seq_len=128)
139
+
140
+ with torch.inference_mode():
141
+ logits_full, _ = _unpack_forward(model(x))
142
+
143
+ states = None
144
+ chunk_outputs = []
145
+ with torch.inference_mode():
146
+ for i in range(0, 128, 32):
147
+ chunk = x[:, i:i + 32] if x.dim() == 2 else x[:, i:i + 32, :]
148
+ result = model(chunk, states)
149
+ logits_chunk, states = _unpack_forward(result)
150
+ chunk_outputs.append(_get_logits_list(logits_chunk, info))
151
+
152
+ full_heads = _get_logits_list(logits_full, info)
153
+ diff = max((full_heads[k] - torch.cat([chunk[k] for chunk in chunk_outputs], dim=1)).abs().max().item()
154
+ for k in range(len(full_heads)))
155
+ assert diff < 1e-4, f"State propagation error: {diff:.6f}"
156
+ return {'max_diff': diff}
157
+
158
+
159
+ def check_ternary_weights(engine) -> dict:
160
+ """Pesos BitLinear quantizados son {-1, 0, 1} (solo ternary)."""
161
+ info = engine.info
162
+ if not info.is_ternary:
163
+ return {'skipped': True, 'reason': 'modelo FP16 (sin BitLinear)'}
164
+
165
+ model = engine._get_model()
166
+ n_checked = 0
167
+
168
+ for name, module in model.named_modules():
169
+ if not isinstance(module, BitLinear):
170
+ continue
171
+
172
+ if hasattr(module, 'weight_T_ternary'):
173
+ w = module.weight_T_ternary
174
+ unique = set(w.unique().tolist())
175
+ invalid = unique - {-1.0, 0.0, 1.0}
176
+ assert not invalid, f"{name}: valores no ternarios en weight_T_ternary: {invalid}"
177
+ elif module.weight.numel() > 0:
178
+ w = module.weight.data
179
+ w_scale = w.abs().mean()
180
+ w_q = (w / (w_scale + 1e-8)).round().clamp(-1, 1)
181
+ unique = set(w_q.unique().tolist())
182
+ invalid = unique - {-1.0, 0.0, 1.0}
183
+ assert not invalid, f"{name}: valores no ternarios: {invalid}"
184
+
185
+ n_checked += 1
186
+
187
+ assert n_checked > 0, "No se encontraron modulos BitLinear"
188
+ return {'modules_checked': n_checked}
189
+
190
+
191
+ def check_state_size(engine) -> dict:
192
+ """Estado MLGRU < 1MB (solo recurrente)."""
193
+ info = engine.info
194
+ if not info.is_recurrent:
195
+ return {'skipped': True, 'reason': 'modelo no recurrente (Transformer)'}
196
+
197
+ model = engine._get_model()
198
+ x = _make_dummy_input(info, batch=1, seq_len=1)
199
+
200
+ with torch.inference_mode():
201
+ _, states = _unpack_forward(model(x))
202
+
203
+ # Filtrar None states (pueden existir si algun bloque es transformer)
204
+ valid_states = [s for s in states if s is not None]
205
+ state_bytes = sum(s.numel() * s.element_size() for s in valid_states)
206
+ state_kb = state_bytes / 1024
207
+
208
+ assert state_kb < 1024, f"Estado MLGRU demasiado grande: {state_kb:.1f} KB"
209
+ return {'state_kb': round(state_kb, 1), 'batch_size': 1, 'dtype': 'float32'}
210
+
211
+
212
+ # =========================================================================
213
+ # Entry point
214
+ # =========================================================================
215
+
216
+ def run_correctness(engine) -> dict:
217
+ """Ejecutar todos los checks de correctness. 1 engine → 6 checks."""
218
+ from helpers import run_check
219
+
220
+ print(f"\n--- Correctness ({engine.info.model_class}) ---")
221
+ results = {}
222
+ checks = [
223
+ ('forward_shapes', check_forward_shapes),
224
+ ('probs', check_probs),
225
+ ('determinism', check_determinism),
226
+ ('state_prop', check_state_propagation),
227
+ ('ternary_weights', check_ternary_weights),
228
+ ('state_size', check_state_size),
229
+ ]
230
+ for name, fn in checks:
231
+ r = run_check(name, fn, engine)
232
+ results[name] = r
233
+ status = r['status']
234
+ extra = ''
235
+ if r.get('result', {}).get('skipped'):
236
+ extra = f" (skip: {r['result']['reason']})"
237
+ print(f" {status:5s} {name}{extra}")
238
+
239
+ return results
evaluation/source/eval_quality.py ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Eval — Quality: generacion, UTF-8, perplexity.
3
+
4
+ Adaptivo segun arquitectura:
5
+ - Byte-level: usa engine.generate() para generar bytes
6
+ - BPE: genera tokens (futuro) — por ahora solo perplexity
7
+ - Perplexity: funciona con ambos formatos
8
+
9
+ Tests 12 y 13 fusionados: generan UNA VEZ y evaluan sobre el mismo output.
10
+ """
11
+ import math
12
+ import os
13
+
14
+ import torch
15
+ import torch.nn.functional as F
16
+ from torch.utils.data import DataLoader
17
+
18
+ from helpers import get_model
19
+
20
+
21
+ def _generate_text(engine, prompt: bytes = b"The history of artificial intelligence",
22
+ max_bytes: int = 1000) -> bytes:
23
+ """Generar texto usando engine.generate() — unica via."""
24
+ return engine.generate(prompt, max_bytes=max_bytes,
25
+ temperature=1.0, top_p=0.9, reset=True)
26
+
27
+
28
+ def check_generation(generated: bytes) -> dict:
29
+ """Output no degenerado."""
30
+ if len(generated) < 8:
31
+ raise AssertionError(f"Output demasiado corto: {len(generated)} bytes")
32
+
33
+ printable = sum(32 <= b < 127 for b in generated)
34
+ pct_print = printable / len(generated)
35
+
36
+ repeats = sum(
37
+ generated[i:i + 8] == generated[i - 8:i]
38
+ for i in range(8, len(generated))
39
+ ) / max(len(generated) - 8, 1)
40
+
41
+ print(f" Printable: {pct_print * 100:.1f}% Repeticion: {repeats * 100:.1f}%")
42
+ print(f" Muestra: {generated[:80]}")
43
+
44
+ assert pct_print > 0.5, \
45
+ f"Solo {pct_print * 100:.1f}% bytes printables — modelo degenerado"
46
+ assert repeats < 0.3, \
47
+ f"Repeticion alta: {repeats * 100:.1f}% — modelo en loop"
48
+
49
+ return {'printable_pct': round(pct_print, 3), 'repeat_ratio': round(repeats, 3)}
50
+
51
+
52
+ def check_utf8(generated: bytes) -> dict:
53
+ """UTF-8 valido en output."""
54
+ windows = [generated[i:i + 64] for i in range(0, len(generated) - 64, 32)]
55
+ if not windows:
56
+ return {'utf8_pct': 0.0}
57
+
58
+ valid = sum(1 for w in windows if _is_valid_utf8(w))
59
+ pct = valid / len(windows)
60
+
61
+ print(f" UTF-8 valido: {pct * 100:.1f}%")
62
+ assert pct > 0.7, f"Demasiados bytes UTF-8 invalidos: {pct * 100:.1f}%"
63
+ return {'utf8_pct': round(pct, 3)}
64
+
65
+
66
+ def _is_valid_utf8(b: bytes) -> bool:
67
+ try:
68
+ b.decode('utf-8')
69
+ return True
70
+ except UnicodeDecodeError:
71
+ return False
72
+
73
+
74
+ def check_perplexity(engine, dataset, max_batches: int = 200) -> dict:
75
+ """Perplexity en held-out dataset. Funciona con byte y BPE."""
76
+ info = engine.info
77
+ model = get_model(engine)
78
+ total_loss = 0.0
79
+ n_batches = 0
80
+ n_targets = 0
81
+
82
+ n_workers = max(0, min(2, (os.cpu_count() or 4) // 4))
83
+ loader_kwargs = {'batch_size': 4}
84
+ if n_workers > 0:
85
+ loader_kwargs['num_workers'] = n_workers
86
+ loader_kwargs['prefetch_factor'] = 2
87
+
88
+ for batch in DataLoader(dataset, **loader_kwargs):
89
+ if n_batches >= max_batches:
90
+ break
91
+
92
+ patches = batch['patches'] if info.is_byte_level else batch['input_ids']
93
+ targets = batch['targets'] if info.is_byte_level else batch['labels']
94
+
95
+ with torch.inference_mode():
96
+ kwargs = {'byte_targets': targets} if getattr(engine, '_is_ablation', False) and info.is_byte_level else {}
97
+ result = model(patches, **kwargs)
98
+ logits = result[0]
99
+
100
+ if isinstance(logits, (tuple, list)):
101
+ # Byte-level: 4 heads × 256
102
+ n_heads = len(logits)
103
+ all_logits = torch.cat(
104
+ [logits[i].reshape(-1, info.vocab_size) for i in range(n_heads)], dim=0
105
+ )
106
+ all_targets = torch.cat(
107
+ [targets[:, :, i].long().reshape(-1) for i in range(n_heads)], dim=0
108
+ )
109
+ else:
110
+ # BPE: single head
111
+ all_logits = logits.reshape(-1, info.vocab_size)
112
+ all_targets = targets.long().reshape(-1)
113
+
114
+ loss = F.cross_entropy(all_logits, all_targets, reduction='sum')
115
+
116
+ total_loss += loss.item()
117
+ n_targets += all_targets.numel()
118
+ n_batches += 1
119
+
120
+ if n_batches == 0:
121
+ raise AssertionError("Dataset vacio — no se pudo calcular perplexity")
122
+
123
+ avg_loss = total_loss / n_targets
124
+ ppl = math.exp(avg_loss)
125
+
126
+ print(f" Perplexity: {ppl:.2f} ({n_batches} batches)")
127
+ assert math.isfinite(avg_loss) and math.isfinite(ppl), 'Loss o perplexity no finita'
128
+ return {'perplexity': round(ppl, 2), 'avg_loss': round(avg_loss, 4),
129
+ 'unit': 'byte' if info.is_byte_level else 'token',
130
+ 'targets': n_targets}
131
+
132
+
133
+ # =========================================================================
134
+ # Entry point
135
+ # =========================================================================
136
+
137
+ def run_quality(engine, dataset=None) -> dict:
138
+ """Ejecutar checks de calidad. Adaptivo por arquitectura."""
139
+ from helpers import run_check
140
+
141
+ info = engine.info
142
+ print(f"\n--- Quality ({info.model_class}) ---")
143
+ results = {}
144
+
145
+ # Generacion solo para modelos byte-level
146
+ if info.is_byte_level:
147
+ try:
148
+ generated = _generate_text(engine, max_bytes=1000)
149
+ except Exception as e:
150
+ print(f" ERROR generation failed: {e}")
151
+ generated = b""
152
+
153
+ if generated:
154
+ results['generation'] = run_check('generation', check_generation, generated)
155
+ print(f" {results['generation']['status']:5s} generation")
156
+
157
+ results['utf8'] = run_check('utf8', check_utf8, generated)
158
+ print(f" {results['utf8']['status']:5s} utf8")
159
+ else:
160
+ results['generation'] = {'status': 'ERROR', 'error': 'No output generated'}
161
+ results['utf8'] = {'status': 'ERROR', 'error': 'No output generated'}
162
+ else:
163
+ print(" N/A generation (BPE — generate_tokens() no implementado aun)")
164
+ print(" N/A utf8 (BPE — no aplica)")
165
+ results['generation'] = {'status': 'N/A', 'reason': 'BPE model'}
166
+ results['utf8'] = {'status': 'N/A', 'reason': 'BPE model'}
167
+
168
+ # Perplexity (funciona con ambos formatos)
169
+ if dataset is not None:
170
+ results['perplexity'] = run_check('perplexity', check_perplexity, engine, dataset)
171
+ print(f" {results['perplexity']['status']:5s} perplexity")
172
+
173
+ return results
evaluation/source/helpers.py ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Utilidades compartidas para la suite de evaluacion CPU-1 v2.
3
+
4
+ Toda la inferencia pasa por CPU1InferenceEngine de inference.py.
5
+ No hay codigo de inferencia duplicado en la suite de eval.
6
+ """
7
+ import sys
8
+ import os
9
+ import platform
10
+ import time
11
+
12
+ # Intel MKL/OpenMP: configurar ANTES de importar torch
13
+ os.environ.setdefault('KMP_AFFINITY', 'granularity=fine,compact,1,0')
14
+ os.environ.setdefault('KMP_BLOCKTIME', '0')
15
+
16
+ import torch
17
+
18
+ # Agregar raiz del proyecto al path
19
+ ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
20
+ if ROOT not in sys.path:
21
+ sys.path.insert(0, ROOT)
22
+
23
+ try:
24
+ from inference import ( # noqa: E402
25
+ CPU1InferenceEngine,
26
+ forward_with_prefetch,
27
+ ModelInfo,
28
+ detect_model_info,
29
+ )
30
+ except ImportError:
31
+ # Fallback: production engine no disponible (p.ej. en eval de ablation models).
32
+ # get_model() y run_check() siguen funcionando; solo falla create_engine().
33
+ CPU1InferenceEngine = None
34
+ forward_with_prefetch = None
35
+ ModelInfo = None
36
+ detect_model_info = None
37
+
38
+ try:
39
+ from train_final import CPU1ModelV2 # noqa: E402
40
+ except ImportError:
41
+ CPU1ModelV2 = None
42
+
43
+ from utilities import BitLinear # noqa: E402
44
+
45
+
46
+
47
+ def create_engine(checkpoint_path: str,
48
+ config: dict | None = None) -> CPU1InferenceEngine:
49
+ """Crear engine de inferencia desde checkpoint.
50
+ Unica forma de cargar un modelo para evaluacion.
51
+ """
52
+ return CPU1InferenceEngine.from_checkpoint(checkpoint_path, config or {})
53
+
54
+
55
+ def get_model(engine: CPU1InferenceEngine) -> CPU1ModelV2:
56
+ """Acceder al modelo subyacente (sin wrapper de compile)."""
57
+ return engine._get_model()
58
+
59
+
60
+ def get_hardware_info() -> dict:
61
+ """Info del hardware para reportes."""
62
+ return {
63
+ 'platform': platform.platform(),
64
+ 'processor': platform.processor() or 'CPU',
65
+ 'cpu_count': os.cpu_count(),
66
+ 'torch_threads': torch.get_num_threads(),
67
+ }
68
+
69
+
70
+ def run_check(name: str, fn, *args, **kwargs) -> dict:
71
+ """Ejecutar un check individual con manejo de errores y timing."""
72
+ try:
73
+ t0 = time.perf_counter()
74
+ result = fn(*args, **kwargs)
75
+ elapsed = time.perf_counter() - t0
76
+ status = 'N/A' if isinstance(result, dict) and result.get('skipped') else 'PASS'
77
+ return {'status': status, 'time_s': round(elapsed, 2), 'result': result}
78
+ except AssertionError as e:
79
+ return {'status': 'FAIL', 'error': str(e)}
80
+ except Exception as e:
81
+ return {'status': 'ERROR', 'error': f'{type(e).__name__}: {e}'}
evaluation/source/test_readme_audit.py ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Offline regression checks for the scoring protocol, not trained-model quality."""
2
+ import json
3
+ import math
4
+ from pathlib import Path
5
+ import tempfile
6
+ import unittest
7
+
8
+ import torch
9
+
10
+ from audit_readmes import loss_eval, save
11
+ from helpers import run_check
12
+ from utilities import LocalByteDecoder
13
+
14
+
15
+ class AuditTests(unittest.TestCase):
16
+ def test_local_teacher_forcing_does_not_look_ahead(self):
17
+ torch.manual_seed(4)
18
+ decoder = LocalByteDecoder(16, 4, 16, 4, use_ternary=False).eval()
19
+ hidden = torch.randn(1, 2, 16)
20
+ targets = torch.tensor([[[5, 6, 7, 8], [9, 10, 11, 12]]])
21
+ future = targets.clone()
22
+ future[:, :, 2:] += 20
23
+ with torch.inference_mode():
24
+ a, b = decoder(hidden, targets), decoder(hidden, future)
25
+ # Head 2 sees only ground-truth bytes 0 and 1; head 3 sees byte 2.
26
+ for k in range(3):
27
+ torch.testing.assert_close(a[k], b[k], rtol=0, atol=0)
28
+ self.assertGreater((a[3]-b[3]).abs().max().item(), 0)
29
+
30
+ def test_loss_uses_shifted_targets_and_target_weighting(self):
31
+ class Model:
32
+ def __init__(self):
33
+ self.seen = []
34
+
35
+ def __call__(self, x, byte_targets, **kwargs):
36
+ self.seen.append(byte_targets.clone())
37
+ logits = torch.zeros(*byte_targets.shape, 256)
38
+ # Distinct losses per passage and unequal target counts.
39
+ logits[..., 0] = len(self.seen)
40
+ return tuple(logits[:, :, k] for k in range(4)), None, {}
41
+ model = Model()
42
+ result = loss_eval(model, {'tokenization':'byte', 'patch_size':4}, {'texts':['abcdefgh','ijklmnopqrst']}, None)
43
+ self.assertEqual(result['targets'], 12)
44
+ self.assertEqual(model.seen[0].flatten().tolist(), list(b'efgh'))
45
+ self.assertEqual(model.seen[1].flatten().tolist(), list(b'mnopqrst'))
46
+ expected = (4*math.log(255+math.exp(1))+8*math.log(255+math.exp(2)))/12
47
+ self.assertAlmostEqual(result['mean_nll'], expected, places=5)
48
+
49
+ def test_skips_are_not_passes(self):
50
+ result = run_check('irrelevant', lambda: {'skipped':True,'reason':'not recurrent'})
51
+ self.assertEqual(result['status'], 'N/A')
52
+
53
+ def test_nonfinite_evidence_is_valid_json(self):
54
+ with tempfile.TemporaryDirectory() as directory:
55
+ path = Path(directory)/'record.json'
56
+ save(path, {'loss':float('nan'), 'nested':[float('inf'), 2.]})
57
+ self.assertEqual(json.loads(path.read_text()), {'loss':None,'nested':[None,2.]})
58
+
59
+
60
+ if __name__ == '__main__':
61
+ torch.set_num_threads(1)
62
+ unittest.main()