{
  "status": "measured",
  "model": "deterministic untrained single-layer causal attention toy",
  "quality_evaluated": false,
  "device": "CPU",
  "precision": "float32",
  "measurement": "time.perf_counter_ns median; prefill and forced-token decode timed separately; Python tracemalloc peak reported separately",
  "comparison_contract": "Both paths score the same prefix plus each appended forced token. Decode timers exclude construction of the shared prefix cache.",
  "memory_contract": "kv_cache_bytes is exact NumPy K/V tensor storage only, not Python allocations or process RSS.",
  "python": "3.13.7",
  "numpy": "2.4.2",
  "config": {
    "seed": 7,
    "vocab_size": 256,
    "d_model": 32,
    "context_lengths": [
      16,
      32,
      64,
      128
    ],
    "continuation_tokens": 16,
    "warmups": 2,
    "repetitions": 7,
    "dtype": "float32",
    "device": "CPU"
  },
  "results": [
    {
      "context_tokens": 16,
      "kv_cache_bytes": 4096,
      "bytes_per_token": 256,
      "correctness": {
        "prefill_last_logits_max_abs_error": 4.6566128730773926e-09,
        "prefill_kv_max_abs_error": 0.0,
        "forced_steps_checked": 16,
        "forced_step_logits_max_abs_errors": [
          4.6566128730773926e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          4.190951585769653e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          1.862645149230957e-09,
          3.725290298461914e-09,
          2.7939677238464355e-09,
          3.725290298461914e-09
        ],
        "forced_step_logits_max_abs_error": 4.6566128730773926e-09,
        "all_compared_outputs_match_atol_1e-5": true
      },
      "prefill": {
        "uncached_full_prefix": {
          "median_ms": 0.0735,
          "samples_ms": [
            0.0949,
            0.0768,
            0.0774,
            0.0735,
            0.0714,
            0.0708,
            0.0702
          ],
          "python_tracemalloc_peak_bytes": 34330
        },
        "cached_incremental_prefix": {
          "median_ms": 0.354,
          "samples_ms": [
            0.3698,
            0.354,
            0.3607,
            0.4541,
            0.347,
            0.3195,
            0.3197
          ],
          "python_tracemalloc_peak_bytes": 12856
        }
      },
      "forced_continuation_decode_excluding_prefill": {
        "uncached_full_recomputation": {
          "median_ms": 1.3506,
          "samples_ms": [
            1.3709,
            1.3124,
            1.3183,
            1.3506,
            1.5397,
            1.2886,
            1.3585
          ],
          "python_tracemalloc_peak_bytes": 74306
        },
        "cached_one_new_position": {
          "median_ms": 0.3606,
          "samples_ms": [
            0.3668,
            0.3607,
            0.3567,
            0.3543,
            0.361,
            0.3606,
            0.3597
          ],
          "python_tracemalloc_peak_bytes": 20968
        }
      }
    },
    {
      "context_tokens": 32,
      "kv_cache_bytes": 8192,
      "bytes_per_token": 256,
      "correctness": {
        "prefill_last_logits_max_abs_error": 2.7939677238464355e-09,
        "prefill_kv_max_abs_error": 0.0,
        "forced_steps_checked": 16,
        "forced_step_logits_max_abs_errors": [
          2.3283064365386963e-09,
          3.725290298461914e-09,
          1.862645149230957e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09,
          3.725290298461914e-09,
          1.862645149230957e-09,
          2.3283064365386963e-09,
          2.3283064365386963e-09,
          2.7939677238464355e-09,
          4.6566128730773926e-09,
          2.7939677238464355e-09,
          1.862645149230957e-09,
          2.7939677238464355e-09,
          2.7939677238464355e-09
        ],
        "forced_step_logits_max_abs_error": 4.6566128730773926e-09,
        "all_compared_outputs_match_atol_1e-5": true
      },
      "prefill": {
        "uncached_full_prefix": {
          "median_ms": 0.0934,
          "samples_ms": [
            0.1051,
            0.0929,
            0.0916,
            0.0986,
            0.0962,
            0.0934,
            0.0927
          ],
          "python_tracemalloc_peak_bytes": 68122
        },
        "cached_incremental_prefix": {
          "median_ms": 0.7065,
          "samples_ms": [
            0.719,
            0.8718,
            0.686,
            0.7065,
            0.6741,
            0.7223,
            0.7054
          ],
          "python_tracemalloc_peak_bytes": 21048
        }
      },
      "forced_continuation_decode_excluding_prefill": {
        "uncached_full_recomputation": {
          "median_ms": 1.5228,
          "samples_ms": [
            1.6516,
            1.4955,
            1.7499,
            1.5223,
            1.5228,
            1.6553,
            1.4762
          ],
          "python_tracemalloc_peak_bytes": 110274
        },
        "cached_one_new_position": {
          "median_ms": 0.365,
          "samples_ms": [
            0.3717,
            0.3558,
            0.365,
            0.3721,
            0.3654,
            0.3638,
            0.3635
          ],
          "python_tracemalloc_peak_bytes": 29388
        }
      }
    },
    {
      "context_tokens": 64,
      "kv_cache_bytes": 16384,
      "bytes_per_token": 256,
      "correctness": {
        "prefill_last_logits_max_abs_error": 1.3969838619232178e-09,
        "prefill_kv_max_abs_error": 0.0,
        "forced_steps_checked": 16,
        "forced_step_logits_max_abs_errors": [
          1.862645149230957e-09,
          1.3969838619232178e-09,
          1.6298145055770874e-09,
          1.862645149230957e-09,
          1.3969838619232178e-09,
          1.3969838619232178e-09,
          1.3969838619232178e-09,
          9.313225746154785e-10,
          1.3969838619232178e-09,
          1.6298145055770874e-09,
          1.1641532182693481e-09,
          1.3969838619232178e-09,
          1.3969838619232178e-09,
          1.862645149230957e-09,
          1.862645149230957e-09,
          9.313225746154785e-10
        ],
        "forced_step_logits_max_abs_error": 1.862645149230957e-09,
        "all_compared_outputs_match_atol_1e-5": true
      },
      "prefill": {
        "uncached_full_prefix": {
          "median_ms": 0.1562,
          "samples_ms": [
            0.1565,
            0.1562,
            0.1913,
            0.1638,
            0.1515,
            0.1506,
            0.1503
          ],
          "python_tracemalloc_peak_bytes": 141850
        },
        "cached_incremental_prefix": {
          "median_ms": 1.4364,
          "samples_ms": [
            1.4468,
            1.4228,
            1.4249,
            1.418,
            1.5582,
            1.4364,
            1.4402
          ],
          "python_tracemalloc_peak_bytes": 37916
        }
      },
      "forced_continuation_decode_excluding_prefill": {
        "uncached_full_recomputation": {
          "median_ms": 2.416,
          "samples_ms": [
            2.7202,
            2.7843,
            2.4006,
            2.2949,
            2.2694,
            2.534,
            2.416
          ],
          "python_tracemalloc_peak_bytes": 188354
        },
        "cached_one_new_position": {
          "median_ms": 0.363,
          "samples_ms": [
            0.3808,
            0.3643,
            0.3629,
            0.363,
            0.3622,
            0.3641,
            0.3618
          ],
          "python_tracemalloc_peak_bytes": 46284
        }
      }
    },
    {
      "context_tokens": 128,
      "kv_cache_bytes": 32768,
      "bytes_per_token": 256,
      "correctness": {
        "prefill_last_logits_max_abs_error": 9.313225746154785e-10,
        "prefill_kv_max_abs_error": 0.0,
        "forced_steps_checked": 16,
        "forced_step_logits_max_abs_errors": [
          9.313225746154785e-10,
          9.313225746154785e-10,
          1.3969838619232178e-09,
          9.313225746154785e-10,
          9.313225746154785e-10,
          1.1641532182693481e-09,
          9.313225746154785e-10,
          9.313225746154785e-10,
          1.1641532182693481e-09,
          1.3969838619232178e-09,
          9.313225746154785e-10,
          1.862645149230957e-09,
          1.3969838619232178e-09,
          9.313225746154785e-10,
          1.862645149230957e-09,
          1.6298145055770874e-09
        ],
        "forced_step_logits_max_abs_error": 1.862645149230957e-09,
        "all_compared_outputs_match_atol_1e-5": true
      },
      "prefill": {
        "uncached_full_prefix": {
          "median_ms": 0.2429,
          "samples_ms": [
            0.2517,
            0.2484,
            0.2429,
            0.2414,
            0.2378,
            0.243,
            0.2405
          ],
          "python_tracemalloc_peak_bytes": 364264
        },
        "cached_incremental_prefix": {
          "median_ms": 2.9321,
          "samples_ms": [
            2.9454,
            2.9321,
            2.9877,
            2.894,
            2.9207,
            3.2564,
            2.8995
          ],
          "python_tracemalloc_peak_bytes": 71708
        }
      },
      "forced_continuation_decode_excluding_prefill": {
        "uncached_full_recomputation": {
          "median_ms": 4.6307,
          "samples_ms": [
            5.1112,
            4.4498,
            4.4127,
            4.7665,
            4.9378,
            4.6307,
            4.6123
          ],
          "python_tracemalloc_peak_bytes": 448720
        },
        "cached_one_new_position": {
          "median_ms": 0.381,
          "samples_ms": [
            0.3681,
            0.381,
            0.3789,
            0.3828,
            0.3794,
            0.384,
            0.5675
          ],
          "python_tracemalloc_peak_bytes": 80076
        }
      }
    }
  ]
}
