{
  "artifacts": [
    {
      "file": "vela_L512_ids_v3_fp16fc_fp16emb_shift_arith.tflite",
      "sha256": "1aa6153b7e52510440b775258caf42123aa94bf562f33c2989beac4902a1e339",
      "size_mb": 587.843
    }
  ],
  "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 140 device rows of this window (20 edge512, 40 long256, 80 long512): cosine min 0.999974 (p01 0.999997, mean 0.999999), top-1 retrieval 70/70 on non-near-tie queries (0 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999895 over 70 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 141 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 510-token row 237.28 ms (min 210.20, max 277.56), the 197-token row 210.08 ms — the time is the window's, not the text's; compile 232 ms. The 136-row check run's warm median was 382.25 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 373 ms.",
            "10-18 10:57:22.749 24871 24893 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": 237.2797655,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999992687181859,
            "cos_min_vs_reference": 0.9999739524069919,
            "cos_p01_vs_reference": 0.9999965807743095,
            "finite": 1,
            "fixtures": 140,
            "gate_leg_rows": 141,
            "gate_leg_warm_max_ms": 408.449948,
            "gate_leg_warm_median_run_ms": 382.1841405,
            "gate_leg_warm_median_write_run_read_ms": 382.2508855,
            "gate_leg_warm_min_ms": 235.72802,
            "gate_leg_warm_rows": 136,
            "liveness_moved": 1,
            "load_compile_ms": 372.948594,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.0012089535593986511,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0003688208618111144,
            "pair_spearman_vs_reference": 0.9998950223077595,
            "pairs": 70,
            "partitions": 2,
            "threads": 4,
            "timing_leg_compile_ms": 231.827916,
            "timing_leg_long_max_ms": 277.557813,
            "timing_leg_long_median_ms": 237.2797655,
            "timing_leg_long_min_ms": 210.200625,
            "timing_leg_long_row_len": 510,
            "timing_leg_n": 20,
            "timing_leg_short_median_ms": 210.078464,
            "timing_leg_short_row_len": 197,
            "timing_leg_warmups": 5,
            "top1_agree": 70,
            "top1_near_tie": 0,
            "top1_queries": 70
          },
          "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_l512_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 140 device rows of this window (20 edge512, 40 long256, 80 long512): cosine min 0.999517 (p01 0.999573, mean 0.999994), top-1 retrieval 70/70 on non-near-tie queries (0 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999125 over 70 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 71.033 ms (min 69.994, max 72.014); the 140-row parity run's median call was 70.826 ms; compile 20315 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_L512 && 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_512 --fixtures /data/local/tmp/vela_npu/fx_L512_ids --count 141 --warmup 5 --rounds 20 --ab-fixture 000 --dump full --out /data/local/tmp/vela_npu/out_N1_npu_v3_L512 --model /data/local/tmp/vela_npu/vela_L512_ids_v3_fp16fc_fp16emb_shift_arith.tflite 2>/data/local/tmp/vela_npu/N1_npu_v3_L512.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": 71.033,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999939714526391,
            "cos_min_vs_reference": 0.9995169025872218,
            "cos_p01_vs_reference": 0.9995729007424946,
            "finite": 1,
            "fixtures": 140,
            "fully_accelerated": 1,
            "liveness_moved": 1,
            "load_compile_ms": 20314.9,
            "max_abs_vs_reference": 0.0032675452530384064,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0015145541556194075,
            "pair_spearman_vs_reference": 0.9991251858979966,
            "pairs": 70,
            "parity_leg_call_ms_median": 70.826,
            "partitions": 1,
            "runner_call_ms_max": 72.014,
            "runner_call_ms_median": 71.033,
            "runner_call_ms_min": 69.994,
            "runner_rounds": 20,
            "runner_warmups": 5,
            "top1_agree": 70,
            "top1_near_tie": 0,
            "top1_queries": 70
          },
          "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_l512_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 140 device rows of this window (20 edge512, 40 long256, 80 long512): cosine min 0.999974 (p01 0.999997, mean 0.999999), top-1 retrieval 70/70 on non-near-tie queries (0 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999895 over 70 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 141 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 136 rows (2044.82 ms; min 2015.09, max 2100.13; 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 1295 ms.",
            "10-18 10:34:15.044 19784 19817 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": 2044.822877,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999992687181859,
            "cos_min_vs_reference": 0.9999739524069919,
            "cos_p01_vs_reference": 0.9999965807743095,
            "finite": 1,
            "fixtures": 140,
            "gate_leg_rows": 141,
            "gate_leg_warm_max_ms": 2100.129925,
            "gate_leg_warm_median_run_ms": 2044.6301684999999,
            "gate_leg_warm_median_write_run_read_ms": 2044.822877,
            "gate_leg_warm_min_ms": 2015.086264,
            "gate_leg_warm_rows": 136,
            "liveness_moved": 1,
            "load_compile_ms": 1295.033244,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.0012089535593986511,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0003688208618111144,
            "pair_spearman_vs_reference": 0.9998950223077595,
            "pairs": 70,
            "partitions": 2,
            "threads": 4,
            "top1_agree": 70,
            "top1_near_tie": 0,
            "top1_queries": 70
          },
          "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_l512_fp16__pixel-8a.json"
      }
    ]
  },
  "model": {
    "family": "vela-1.0-encoder-307m-embedding",
    "id": "vela-1.0-encoder-307m-embedding__vela_l512_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,512] + `attention_mask` float32 [1,512] -> `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"
}
