{
  "artifacts": [
    {
      "file": "vela_L128_ids_v3_fp16fc_fp16emb_shift_arith.tflite",
      "sha256": "02c20292cae0358643db91ab2036a1e45dee59172490b5cdced4f6d5ad1d0f54",
      "size_mb": 585.78
    }
  ],
  "benchmarks": [],
  "conversion": {
    "command": "the conversion scripts and the full record are in github.com/john-rocky/hf-to-litertlm vela_work/ (card 'Licence and source'); the card names the tools and the graph, not a command line",
    "quantization": "one-file form: fp16 FULLY_CONNECTED weights and the fp16 token table read through DEQUANTIZE inside the graph (ai-edge-quantizer weight-only; activations float32); int8 weights were tried and rejected (card 'Conversion')",
    "tool": "litert-torch",
    "tool_version": "0.10.0 (litert-converter 0.5.0.dev20260912; ai-edge-litert 2.2.0 for the desktop checks)"
  },
  "cross_runtime": [],
  "delegation": {
    "backend": "gpu_mldrift",
    "blocking_ops": [
      "DEQUANTIZE",
      "SQUARED_DIFFERENCE",
      "RESHAPE",
      "EMBEDDING_LOOKUP"
    ],
    "coverage_ops_pct": 92.0,
    "lint_report_version": "1.1",
    "litert_version": "2.2.0",
    "matched_provenance_counts": {
      "measured": 1643,
      "unmatched": 47
    },
    "partitions": 134
  },
  "device": {
    "records": [
      {
        "device": "galaxy-s26",
        "run": {
          "accelerator": "cpu_xnnpack",
          "context_length": null,
          "date": "2026-10-18",
          "decode_tokens_per_s": null,
          "delegated_ops": 1687,
          "env": {
            "device": "Galaxy S26 (SM-S942Q)",
            "machine_label": "galaxy-s26-vela-gate",
            "os_build": "Android SDK 36 (Build.VERSION.SDK_INT read by the gate app; Build.MODEL SM-S942Q)",
            "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), one cold process per run, the fixture rows pushed as raw tensors, the host token-table lookup (embeds form) done on the Mac before the push; measured interval = input writes + run + output read-back per row.",
            "parity vs the publisher's fp32 stack (sentence-transformers 5.1.2 + transformers 4.57.6, CPU, SDPA math) on the 273 device rows of this window (73 long128, 200 pair): cosine min 0.999990 (p01 0.999998, mean 1.000000), top-1 retrieval 135/135 on non-near-tie queries (1 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999981 over 136 pairs, mask liveness moved, finite True; bar (cos >= 0.999 on every row, top-1 100 %, Spearman >= 0.999, live, finite): PASS.",
            "output_match = the Mac CPU run of the same file on the same rows (ai-edge-litert 2.2.0 XNNPACK, the chain's mac-baseline step): max |out - mac| 0.00e+00, min cos 1.00000000 over 274 rows; rule max_abs <= 1e-4 and cos >= 0.9999 on the unit-norm 768-d vectors -> True. max_rel_diff is not computed by the chain (null).",
            "latency_p50_ms = the timing run (ready=timing: thermal status before the run Thermal Status: 0; 5 warm-ups then 20 calls on one row, one text per call, write + run + read-back): the 128-token row 41.38 ms (min 40.20, max 43.59), the 32-token row 38.59 ms — the time is the window's, not the text's; compile 238 ms. The 269-row check run's warm median was 81.83 ms.",
            "conditions: screen on (the gate activity over the keyguard), USB powered, one process per run; thermal status before the run: Thermal Status: 2; compile 355 ms.",
            "10-18 11:01:59.623 30559 30584 I tflite  : Replacing 1687 out of 1690 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 2 partitions for subgraph 0 (main)."
          ],
          "failure_class": null,
          "full_delegation": false,
          "latency_p50_ms": 41.3828645,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999996477996526,
            "cos_min_vs_reference": 0.999990460730453,
            "cos_p01_vs_reference": 0.9999982590846664,
            "finite": 1,
            "fixtures": 273,
            "gate_leg_rows": 274,
            "gate_leg_warm_max_ms": 86.564375,
            "gate_leg_warm_median_run_ms": 81.789323,
            "gate_leg_warm_median_write_run_read_ms": 81.825365,
            "gate_leg_warm_min_ms": 47.741406,
            "gate_leg_warm_rows": 269,
            "liveness_moved": 1,
            "load_compile_ms": 354.615886,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.001697041094303131,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.00022311030136801246,
            "pair_spearman_vs_reference": 0.9999809169409857,
            "pairs": 136,
            "partitions": 2,
            "threads": 4,
            "timing_leg_compile_ms": 237.703906,
            "timing_leg_long_max_ms": 43.587083,
            "timing_leg_long_median_ms": 41.3828645,
            "timing_leg_long_min_ms": 40.199948,
            "timing_leg_long_row_len": 128,
            "timing_leg_n": 20,
            "timing_leg_short_median_ms": 38.585286499999995,
            "timing_leg_short_row_len": 32,
            "timing_leg_warmups": 5,
            "top1_agree": 135,
            "top1_near_tie": 1,
            "top1_queries": 135
          },
          "output_match": true,
          "peak_mem_mb": null,
          "prefill_tokens_per_s": null,
          "provenance": "measured",
          "runs": true,
          "signature": "CPU XNNPACK 4 threads; fp16 token table in the graph (input_ids); gate app com.mlboydaisuke.d1omni.gate (generic mode)",
          "total_ops": 1690,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-18/vela-1.0-encoder-307m-embedding__vela_l128_fp16__galaxy-s26.json"
      },
      {
        "device": "galaxy-s26",
        "run": {
          "accelerator": "npu_qnn",
          "context_length": null,
          "date": "2026-10-18",
          "decode_tokens_per_s": null,
          "delegated_ops": 1690,
          "env": {
            "device": "Galaxy S26 (SM-S942Q)",
            "machine_label": "galaxy-s26-vela-npu-runner",
            "os_build": "Android SDK 36 (Build.VERSION.SDK_INT read by the gate app; Build.MODEL SM-S942Q)",
            "runtime": "litert",
            "runtime_version": "2.2.0",
            "soc": "Qualcomm SM8850 (Adreno GPU, Hexagon HTP)",
            "vendor_sdk": "Qualcomm QNN HTP libraries (v81) in /data/local/tmp/vela_npu"
          },
          "error": null,
          "evidence": [
            "the LiteRT C-API runner vela_npu_runner (the r17 runner with the Qualcomm QNN HTP libraries pushed to /data/local/tmp/vela_npu), one process per run: the HTP through the Qualcomm compiler plugin (JIT, a fresh cache dir per run).",
            "parity vs the publisher's fp32 stack (sentence-transformers 5.1.2 + transformers 4.57.6, CPU, SDPA math) on the 273 device rows of this window (73 long128, 200 pair): cosine min 0.999548 (p01 0.999574, mean 0.999989), top-1 retrieval 135/135 on non-near-tie queries (1 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999847 over 136 pairs, mask liveness moved, finite True; bar (cos >= 0.999 on every row, top-1 100 %, Spearman >= 0.999, live, finite): PASS.",
            "output_match null: this harness compares the dumped vectors to the fp32 reference only (no same-graph CPU dump); the per-row cosine metrics carry the comparison.",
            "latency_p50_ms = the runner's latency phase: 5 warm-ups then 20 rounds of one call (fixture 000, fp16 token table in the graph (input_ids)), median 13.076 ms (min 12.807, max 13.483); the 273-row parity run's median call was 12.935 ms; compile 5862 ms (JIT, cold cache).",
            "conditions: adb shell, screen state as left by the chain, USB powered, one process per run; thermal status before the run: Thermal Status: 2. Command: cd /data/local/tmp/vela_npu && rm -rf /data/local/tmp/vela_npu/out_N1_npu_v3_L128 && LD_LIBRARY_PATH=/data/local/tmp/vela_npu ADSP_LIBRARY_PATH='/data/local/tmp/vela_npu;/vendor/dsp/cdsp;/vendor/lib/rfsa/adsp;/system/lib/rfsa/adsp;/dsp' ./vela_npu_runner --accel npu+cpu  --burst 1 --libdir /data/local/tmp/vela_npu --cache-dir /data/local/tmp/vela_npu/cache_v3_128 --fixtures /data/local/tmp/vela_npu/fx_L128_ids --count 274 --warmup 5 --rounds 20 --ab-fixture 000 --dump full --out /data/local/tmp/vela_npu/out_N1_npu_v3_L128 --model /data/local/tmp/vela_npu/vela_L128_ids_v3_fp16fc_fp16emb_shift_arith.tflite 2>/data/local/tmp/vela_npu/N1_npu_v3_L128.stderr.txt",
            "INFO: [compiler_plugin.cc:741] Partitioned subgraph<0>, selected 1690 ops, from a total of 1690 ops. resulted in 1 partitions.",
            "VERBOSE: Replacing 1 out of 1 node(s) with delegate (DispatchDelegate) node, yielding 1 partitions for subgraph 0 (main)."
          ],
          "failure_class": null,
          "full_delegation": true,
          "latency_p50_ms": 13.076,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999887815754674,
            "cos_min_vs_reference": 0.9995476415958039,
            "cos_p01_vs_reference": 0.9995740886464325,
            "finite": 1,
            "fixtures": 273,
            "fully_accelerated": 1,
            "liveness_moved": 1,
            "load_compile_ms": 5861.5,
            "max_abs_vs_reference": 0.0033208802342414856,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0014350486626426573,
            "pair_spearman_vs_reference": 0.9998473355278851,
            "pairs": 136,
            "parity_leg_call_ms_median": 12.934999999999999,
            "partitions": 1,
            "runner_call_ms_max": 13.483,
            "runner_call_ms_median": 13.076,
            "runner_call_ms_min": 12.807,
            "runner_rounds": 20,
            "runner_warmups": 5,
            "top1_agree": 135,
            "top1_near_tie": 1,
            "top1_queries": 135
          },
          "output_match": null,
          "peak_mem_mb": null,
          "prefill_tokens_per_s": null,
          "provenance": "measured",
          "runs": true,
          "signature": "QualcommOptions JIT (HTP, burst), cold compile cache per run; fp16 token table in the graph (input_ids); C-API runner --accel npu+cpu",
          "total_ops": 1690,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-18/vela-1.0-encoder-307m-embedding__vela_l128_fp16__galaxy-s26.json"
      },
      {
        "device": "pixel-8a",
        "run": {
          "accelerator": "cpu_xnnpack",
          "context_length": null,
          "date": "2026-10-18",
          "decode_tokens_per_s": null,
          "delegated_ops": 1687,
          "env": {
            "device": "Pixel 8a",
            "machine_label": "pixel-8a-vela-gate",
            "os_build": "Android SDK 36 (Build.VERSION.SDK_INT read by the gate app; Build.MODEL Pixel 8a)",
            "runtime": "litert",
            "runtime_version": "2.2.0",
            "soc": "Google Tensor G3 (Mali-G715 GPU)",
            "vendor_sdk": null
          },
          "error": null,
          "evidence": [
            "gate app com.mlboydaisuke.d1omni.gate in generic mode (Kotlin CompiledModel, LiteRT 2.2.0), one cold process per run, the fixture rows pushed as raw tensors, the host token-table lookup (embeds form) done on the Mac before the push; measured interval = input writes + run + output read-back per row.",
            "parity vs the publisher's fp32 stack (sentence-transformers 5.1.2 + transformers 4.57.6, CPU, SDPA math) on the 273 device rows of this window (73 long128, 200 pair): cosine min 0.999990 (p01 0.999998, mean 1.000000), top-1 retrieval 135/135 on non-near-tie queries (1 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999981 over 136 pairs, mask liveness moved, finite True; bar (cos >= 0.999 on every row, top-1 100 %, Spearman >= 0.999, live, finite): PASS.",
            "output_match = the Mac CPU run of the same file on the same rows (ai-edge-litert 2.2.0 XNNPACK, the chain's mac-baseline step): max |out - mac| 0.00e+00, min cos 1.00000000 over 274 rows; rule max_abs <= 1e-4 and cos >= 0.9999 on the unit-norm 768-d vectors -> True. max_rel_diff is not computed by the chain (null).",
            "latency_p50_ms = this check run's warm median over 269 rows (472.69 ms; min 420.83, max 496.24; write + run + read-back per text, the gate app's own clock) on a working phone (thermal status before the run: Thermal Status: 1) — INFORMATIONAL: no rested timing run was run on this device for this form, and marks these numbers as check-run medians.",
            "conditions: screen on (the gate activity over the keyguard), USB powered, one process per run; thermal status before the run: Thermal Status: 1; compile 1133 ms.",
            "10-18 10:48:24.759 30945 30967 I tflite  : Replacing 1687 out of 1690 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 2 partitions for subgraph 0 (main)."
          ],
          "failure_class": null,
          "full_delegation": false,
          "latency_p50_ms": 472.694051,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999996477996526,
            "cos_min_vs_reference": 0.999990460730453,
            "cos_p01_vs_reference": 0.9999982590846664,
            "finite": 1,
            "fixtures": 273,
            "gate_leg_rows": 274,
            "gate_leg_warm_max_ms": 496.240356,
            "gate_leg_warm_median_run_ms": 472.510172,
            "gate_leg_warm_median_write_run_read_ms": 472.694051,
            "gate_leg_warm_min_ms": 420.826213,
            "gate_leg_warm_rows": 269,
            "liveness_moved": 1,
            "load_compile_ms": 1132.607138,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.001697041094303131,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.00022311030136801246,
            "pair_spearman_vs_reference": 0.9999809169409857,
            "pairs": 136,
            "partitions": 2,
            "threads": 4,
            "top1_agree": 135,
            "top1_near_tie": 1,
            "top1_queries": 135
          },
          "output_match": true,
          "peak_mem_mb": null,
          "prefill_tokens_per_s": null,
          "provenance": "measured",
          "runs": true,
          "signature": "CPU XNNPACK 4 threads; fp16 token table in the graph (input_ids); gate app com.mlboydaisuke.d1omni.gate (generic mode)",
          "total_ops": 1690,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-18/vela-1.0-encoder-307m-embedding__vela_l128_fp16__pixel-8a.json"
      }
    ]
  },
  "model": {
    "family": "vela-1.0-encoder-307m-embedding",
    "id": "vela-1.0-encoder-307m-embedding__vela_l128_fp16",
    "license": "apache-2.0",
    "source_url": "https://huggingface.co/litert-community/Vela-1.0-Encoder-307M-Embedding-LiteRT",
    "task": "sentence-similarity"
  },
  "pitfalls": [
    "The LayerNorms of layers 12-21 and the final norm are computed on x*2^-6 (eps*2^-12), layers 9-11 on x*2^-2: the sum of squares of their inputs reaches 4e7 in float32, beyond float16's 65,504, and the rewrite keeps float16-storage GPU paths finite; exact in float32 (card 'Conversion').",
    "`input_ids` int32 [1,128] + `attention_mask` float32 [1,128] -> `embedding` float32 [1,768] (the normalized vector); tokenize with the repo's tokenizer.json (its post-processor adds `<bos>` = 2 and `<eos>` = 1), pad the rows beyond the text with attention_mask 0 and input_ids 0 (card 'Files').",
    "The one-file form is the CPU form (and the NPU takes it whole): the GPU delegate does not take a float16 token table inside the graph (`EMBEDDING_LOOKUP: Empty quantization params`); the `_embeds_` files of the same repo take the looked-up rows from the host and run fully on the GPU and the NPU (card 'Conversion').",
    "GPU fp16 arithmetic (the GPU defaults on Metal, Adreno and Mali) keeps every top-1 and the pair ranking but drops the per-row cosine floor to 0.991-0.998 on about 1 % of the texts, so the card's GPU numbers are at FP32; on the S26, FP16_WITH_FP32_ACCUM passes the full bar on L128-L512 at 84 ms (L512) if a 0.9994 floor is enough (card 'Performance').",
    "An int8 token table was tried and rejected: its per-row rounding error (0.75 % per row on average, 2.1 % on `<bos>`) moves short sentences by up to 0.7 % in cosine (floor 0.9929 over 3,918 texts) and no set of exactly-kept rows restores the 0.999 floor; int8 FC weights fail harder (floor 0.964); everything shipped is float16 (card 'Conversion').",
    "Every file is a static window: a text of n tokens (including `<bos>` and `<eos>`) runs in the smallest window with L >= n, and the time is the window's, not the text's; the NPU JIT compile on the S26 takes 4-34 s per window on the first run (cache it) (card 'Files', 'Performance').",
    "Strip the text before tokenizing: sentence-transformers does, and a trailing space adds a token (card 'Usage').",
    "The checks measure agreement with the publisher's own stack (cosine per text, top-1 retrieval, pair Spearman) on PAWS-X and STS-B v2 test rows, not accuracy against gold labels; the phone subsets are 140-497 texts per window, the Mac runs the full 3,918-4,184 (card 'Parity')."
  ],
  "schema_version": "1.2"
}
