{
  "artifacts": [
    {
      "file": "timestral-209m-c2048-h1024.tflite",
      "sha256": "5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5",
      "size_mb": 386.278
    }
  ],
  "benchmarks": [],
  "conversion": {
    "command": "python scripts/r4_export.py --bucket 64x32 --rows 2 --norm pow2 --norm-k scripts/normk_fixture.json --attn-k 4 --attn-clamp --dec-only-last --fp16  # in timestral/ of github.com/john-rocky/LiteRT-Models, the zoo sample the card links (github.com/john-rocky/LiteRT-Models timestral/README.md at main ceb8299 ('Rebuilding the graphs')), after hf download mistralai/Timestral-209M config.json model.safetensors --revision 9874d252ab0aae16f7f7c999f98f98d6ad7d8365; the float16-weight output timestral209m_r2_l64_h32_pow2knormk_fixture_att4c_dl_wfp16.tflite is published as timestral-209m-c2048-h1024.tflite",
    "quantization": "float16 weights (cast with ai-edge-quantizer 0.9.0); inputs and output float32; made for the GPU's FP16 precision (card 'Files', 'How the graphs were made')",
    "tool": "litert-torch",
    "tool_version": "0.9.4 (ai-edge-quantizer 0.9.0 for the weights; torch 2.13.0; ai-edge-litert 2.2.0 for the desktop checks)"
  },
  "cross_runtime": [],
  "delegation": {
    "backend": "gpu_mldrift",
    "blocking_ops": [
      "DEQUANTIZE",
      "LOGISTIC",
      "EXP",
      "LOG"
    ],
    "coverage_ops_pct": 85.4,
    "lint_report_version": "1.1",
    "litert_version": "2.2.0",
    "matched_provenance_counts": {
      "measured": 1825,
      "unmatched": 58
    },
    "partitions": 276
  },
  "device": {
    "records": [
      {
        "device": "galaxy-s26",
        "run": {
          "accelerator": "cpu_xnnpack",
          "context_length": null,
          "date": "2026-10-22",
          "decode_tokens_per_s": null,
          "delegated_ops": 1883,
          "env": {
            "device": "Galaxy S26 (SM-S942Q)",
            "machine_label": "galaxy-s26-timestral-gate",
            "os_build": "Android 16 BP4A.251205.006.S942QOPS1AZH9",
            "runtime": "litert",
            "runtime_version": "2.2.0",
            "soc": "Qualcomm SM8850 (Adreno GPU, Hexagon HTP)",
            "vendor_sdk": null
          },
          "error": null,
          "evidence": [
            "gate app com.mlboydaisuke.d1omni.gate in generic mode (Kotlin CompiledModel, LiteRT 2.2.0; debug build r9), one cold process per run, the fixture rows pushed as raw float32 tensors (the host steps done on the Mac); measured interval = the five input writes + run + the output read-back per call. Holds s4 and t4 of 2026-10-22.",
            "forecast check vs the official TimestralForecaster.forecast() (PyTorch, float32, CPU, every default) on the 71 fixture windows of this size (contexts of up to 2,048 steps, every horizon; 18 groups): MASE 1.393783 vs 1.393860 (ratio x0.999945), CRPS 0.172876 vs 0.172875 (ratio x1.000004); NaN / inf 0, quantile order broken 0, graph inputs equal to the host's 71 / 71; the bar (both ratios <= 1.01, no NaN / inf, the 21 quantiles in order at every step): PASS.",
            "output_match = the shared element rule (|out - ref| <= max(1e-05, 0.001 * |ref|) per element, litert_compat.probe.runners.Tolerance) against the same file on the Mac CPU on the same rows (ai-edge-litert 2.2.0 XNNPACK, 8 threads; the vs_mac.cpu block): every one of the 71 rows is bit-equal (max |d| 0) -> True.",
            "latency_p50_ms = the timing run (ready: clean; rested 60s since 20:27:37; thermal before the run: Thermal Status: 0; 5 warm-ups then 20 calls on one window, tsl_l64h32_r2_att_one): median 93.7571 ms (min 88.2155, max 96.9382; run() alone 93.6745); one call is one forecast (the two rows, the series and its negation, in one graph call; the host steps around it not included); compile 410 ms. The 71-window check run's warm median was 101.6965 ms (thermal before it: Thermal Status: 0).",
            "peak_mem_mb = the app process's VmHWM at the end of the timing run (1360716 kB, read by the gate app from /proc/self/status); the check run's 1381060 kB.",
            "os_build = the device line of hold n5's npu_chain log (2026-10-22 21:03 JST); holds t4 and s4 ran on the same phone the same evening without a reboot (its uptime grew by the wall-clock gap); the gate app reads Build.VERSION.SDK_INT 36, Build.MODEL SM-S942Q.",
            "sha256 timestral209m_r2_l64_h32_pow2knormk_fixture_att4c_dl_wfp16.tflite phone=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 mac=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 MATCH",
            "sha256 timestral209m_r2_l64_h32_pow2knormk_fixture_att4c_dl_wfp16.tflite phone=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 mac=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 MATCH",
            "10-22 20:28:38.330 12204 12237 I tflite  : Replacing 1883 out of 1883 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for subgraph 0 (main).",
            "10-22 20:37:40.633 23255 23279 I tflite  : Replacing 1883 out of 1883 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for subgraph 0 (main)."
          ],
          "failure_class": null,
          "full_delegation": true,
          "latency_p50_ms": 93.7570575,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": 0.0,
          "metrics": {
            "bar_pass": 1,
            "crps": 0.17287597252267203,
            "crps_ratio_vs_reference": 1.000004042557122,
            "crps_reference": 0.17287527366450328,
            "gate_leg_compile_ms": 429.077395,
            "gate_leg_rows": 71,
            "gate_leg_vmhwm_kb": 1381060,
            "gate_leg_warm_median_write_run_read_ms": 101.69653650000001,
            "gate_leg_warm_min_write_run_read_ms": 95.017135,
            "gate_leg_warm_rows": 66,
            "inputs_equal": 71,
            "mac_same_graph_bit_equal_rows": 71,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_median_ch_max_abs": 0.0,
            "mac_same_graph_ratio_crps": 1.000004042557122,
            "mac_same_graph_ratio_mase": 0.9999449947933899,
            "mac_same_graph_rows": 71,
            "mase": 1.3937831316547369,
            "mase_ratio_vs_reference": 0.9999449947933899,
            "mase_reference": 1.3938598012010874,
            "nonfinite": 0,
            "partitions": 1,
            "q_max_rel_vs_reference": 0.0008784518398197885,
            "quantile_order_broken": 0,
            "threads": 4,
            "timing_leg_compile_ms": 409.784999,
            "timing_leg_max_ms": 96.938229,
            "timing_leg_median_ms": 93.7570575,
            "timing_leg_min_ms": 88.21552,
            "timing_leg_n": 20,
            "timing_leg_run_only_median_ms": 93.67450450000001,
            "timing_leg_vmhwm_kb": 1360716,
            "timing_leg_warmups": 5,
            "window_groups": 18,
            "windows": 71
          },
          "output_match": true,
          "peak_mem_mb": 1328.824,
          "prefill_tokens_per_s": null,
          "provenance": "measured",
          "runs": true,
          "signature": "CPU XNNPACK 4 threads; gate app com.mlboydaisuke.d1omni.gate (generic mode)",
          "total_ops": 1883,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-22/timestral-209m__timestral-209m-c2048-h1024__galaxy-s26.json"
      },
      {
        "device": "galaxy-s26",
        "run": {
          "accelerator": "gpu_mldrift",
          "context_length": null,
          "date": "2026-10-22",
          "decode_tokens_per_s": null,
          "delegated_ops": 1883,
          "env": {
            "device": "Galaxy S26 (SM-S942Q)",
            "machine_label": "galaxy-s26-timestral-gate",
            "os_build": "Android 16 BP4A.251205.006.S942QOPS1AZH9",
            "runtime": "litert",
            "runtime_version": "2.2.0",
            "soc": "Qualcomm SM8850 (Adreno GPU, Hexagon HTP)",
            "vendor_sdk": null
          },
          "error": null,
          "evidence": [
            "gate app com.mlboydaisuke.d1omni.gate in generic mode (Kotlin CompiledModel, LiteRT 2.2.0; debug build r9), one cold process per run, the fixture rows pushed as raw float32 tensors (the host steps done on the Mac); measured interval = the five input writes + run + the output read-back per call. Holds s4 and t4 of 2026-10-22.",
            "forecast check vs the official TimestralForecaster.forecast() (PyTorch, float32, CPU, every default) on the 71 fixture windows of this size (contexts of up to 2,048 steps, every horizon; 18 groups): MASE 1.383213 vs 1.393860 (ratio x0.992362), CRPS 0.172739 vs 0.172875 (ratio x0.999214); NaN / inf 0, quantile order broken 0, graph inputs equal to the host's 71 / 71; the bar (both ratios <= 1.01, no NaN / inf, the 21 quantiles in order at every step): PASS.",
            "output_match null: the work compares the graph output with the same file on the Mac CPU on the same rows (ai-edge-litert 2.2.0 XNNPACK, 8 threads; the vs_mac.cpu block): max |d| 1.53277 over 71 rows (the median quantile's max |d| 0.0531685), 0 rows bit-equal; against Mac Metal at its default (fp16) precision max |d| 1.56445, 0 rows bit-equal. That summary does not decide the shared element rule (|out - ref| <= max(1e-05, 0.001 * |ref|) per element), which needs |ref| at each element, so max_abs_diff / max_rel_diff stay null; the forecast check above is the bar.",
            "latency_p50_ms = the timing run (ready: clean; rested 64s since 20:20:07; thermal before the run: Thermal Status: 0; 5 warm-ups then 20 calls on one window, tsl_l64h32_r2_att_one): median 28.8382 ms (min 27.9168, max 31.2878; run() alone 0.4945); one call is one forecast (the two rows, the series and its negation, in one graph call; the host steps around it not included); compile 1414 ms. The 71-window check run's warm median was 28.5203 ms (thermal before it: Thermal Status: 0).",
            "peak_mem_mb = the app process's VmHWM at the end of the timing run (1915840 kB, read by the gate app from /proc/self/status); the check run's 1915836 kB.",
            "os_build = the device line of hold n5's npu_chain log (2026-10-22 21:03 JST); holds t4 and s4 ran on the same phone the same evening without a reboot (its uptime grew by the wall-clock gap); the gate app reads Build.VERSION.SDK_INT 36, Build.MODEL SM-S942Q.",
            "sha256 timestral209m_r2_l64_h32_pow2knormk_fixture_att4c_dl_wfp16.tflite phone=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 mac=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 MATCH",
            "sha256 timestral209m_r2_l64_h32_pow2knormk_fixture_att4c_dl_wfp16.tflite phone=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 mac=5e825e884bf96f6acb5ee40553cbac453d85cfb53f9eae9a0630c31b6e0c1ae5 MATCH",
            "10-22 20:21:12.989  7247  7273 I tflite  : Replacing 1883 out of 1883 node(s) with delegate (LITERT_CL) node, yielding 1 partitions for subgraph 0 (main).",
            "10-22 20:37:25.433 22716 22767 I tflite  : Replacing 1883 out of 1883 node(s) with delegate (LITERT_CL) node, yielding 1 partitions for subgraph 0 (main)."
          ],
          "failure_class": null,
          "full_delegation": true,
          "latency_p50_ms": 28.838151,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "crps": 0.17273937790594762,
            "crps_ratio_vs_reference": 0.9992139086424853,
            "crps_reference": 0.17287527366450328,
            "gate_leg_compile_ms": 1449.714166,
            "gate_leg_rows": 71,
            "gate_leg_vmhwm_kb": 1915836,
            "gate_leg_warm_median_write_run_read_ms": 28.520287,
            "gate_leg_warm_min_write_run_read_ms": 27.600208,
            "gate_leg_warm_rows": 66,
            "inputs_equal": 71,
            "mac_metal_fp16_bit_equal_rows": 0,
            "mac_metal_fp16_max_abs": 1.564453125,
            "mac_same_graph_bit_equal_rows": 0,
            "mac_same_graph_max_abs": 1.5327720642089844,
            "mac_same_graph_median_ch_max_abs": 0.053168535232543945,
            "mac_same_graph_ratio_crps": 1.000004042557122,
            "mac_same_graph_ratio_mase": 0.9999449947933899,
            "mac_same_graph_rows": 71,
            "mase": 1.3832132832596533,
            "mase_ratio_vs_reference": 0.992361844475133,
            "mase_reference": 1.3938598012010874,
            "nonfinite": 0,
            "partitions": 1,
            "q_max_rel_vs_reference": 0.06290613466576676,
            "quantile_order_broken": 0,
            "timing_leg_compile_ms": 1414.22453,
            "timing_leg_gpu_max_clock_mhz": 1300,
            "timing_leg_max_ms": 31.287761,
            "timing_leg_median_ms": 28.838151,
            "timing_leg_min_ms": 27.916823,
            "timing_leg_n": 20,
            "timing_leg_run_only_median_ms": 0.4944785,
            "timing_leg_vmhwm_kb": 1915840,
            "timing_leg_warmups": 5,
            "window_groups": 18,
            "windows": 71
          },
          "output_match": null,
          "peak_mem_mb": 1870.938,
          "prefill_tokens_per_s": null,
          "provenance": "measured",
          "runs": true,
          "signature": "GpuOptions precision=FP16; gate app com.mlboydaisuke.d1omni.gate (generic mode)",
          "total_ops": 1883,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-22/timestral-209m__timestral-209m-c2048-h1024__galaxy-s26.json"
      }
    ]
  },
  "model": {
    "family": "timestral-209m",
    "id": "timestral-209m__timestral-209m-c2048-h1024",
    "license": "other (modified-mit)",
    "source_url": "https://huggingface.co/mlboydaisuke/Timestral-209M-LiteRT",
    "task": "time-series-forecasting"
  },
  "pitfalls": [
    "Timestral-209M's attention logits (up to 242,875) and RMSNorm sums of squares (up to 164,602,176) leave the float16 range (65,504): each RMSNorm input is pre-scaled by a power of two, the logits are computed at 1/16 with the row maximum subtracted before the scale is restored, the softmax input is clamped at -3*10^4 and the mask value is -3*10^4; in float32 these rewrites leave the results unchanged (card 'How the graphs were made').",
    "Five float32 inputs, one signature `serving_default`: `patches` [2,64,64] (per patch 32 normalized values then 32 missing flags), `dec` [2,32,768] (`forecast_query.f32` for every decoder token), `bias` [1,1,96,96] (additive mask: 0 or -3*10^4), `cos` / `sin` [1,1,96,64] (rows cut from `rope_cos.f32` / `rope_sin.f32`) -> `output_0` [2,32,32,21], the normalized quantiles; the two rows are the series and its negation (card 'Inputs and output').",
    "The graph is one step of the forecast: the host builds the inputs and finishes the forecast the way the official forecaster does (causal float64 scaling and asinh, the attention mask, the inverse map and the advancing refine frame, the caps at the context's range widened by 10^4 times the scale, symmetric averaging with the negation, clipping at 0 for non-negative series); the repository's `host_forecast.py` and `android/TimestralHost.kt` do it (card 'Inputs and output').",
    "A file holds a context of up to 2,048 steps and a horizon of up to 1,024 steps (patches of 32): the host pads a shorter series in front with missing steps and keeps the requested steps; the smallest file that holds the series and the horizon takes the least time (card 'Files').",
    "One series per forecast without covariates; a horizon of up to 1,024 steps (the Python class and the Kotlin host stop there; no result covers the official block-by-block decoding of longer horizons); of a series longer than 8,192 steps the last 8,192 are read (the official forecaster with max_context = 8192; its default is 32,768); the Python class refuses fewer than 16 values (card 'Limits').",
    "The float16 files are made for the GPU's FP16 precision: set it explicitly, `CompiledModel.GpuOptions(precision = CompiledModel.GpuOptions.Precision.FP16)` (card 'Minimal usage').",
    "NPU (Qualcomm HTP): the graph is compiled on the phone at its first load (Galaxy S26: first JIT compile 19.5 s in the speed run; in the card's Kotlin run the first process took 18.1 s for the compile, one forecast and close(), the next 0.3 s from the cache); LiteRT keeps the result in the app's cache when the Environment is created with a Context. When the compiler plugin is missing, LiteRT runs the graph on the CPU without an error: look for `Replacing 1 out of 1 node(s) with delegate (DispatchDelegate)` in logcat (card 'Speed on phones', 'Minimal usage').",
    "LiteRT starts the NPU runtime once per process with the options of the first graph it compiles on any accelerator: compile the NPU graph first, or give every graph the same `qualcommOptions` (card 'Minimal usage').",
    "The Qualcomm libraries are not in the repository (the Qualcomm runtime may be distributed only inside an app); put them in `jniLibs/arm64-v8a/` with `useLegacyPackaging = true` so `libQnnHtpV81Skel.so` is extracted as a real file. The NPU path was run on one chip, the Snapdragon SM8850 of a Galaxy S26 (card 'Minimal usage', 'Limits')."
  ],
  "schema_version": "1.2"
}
