{
  "artifacts": [
    {
      "file": "vela_L64_ids_v3_fp16fc_fp16emb_shift_arith.tflite",
      "sha256": "4703af6896075ea8d30ea5b880f1f91a5f3b90036ad57455ccb34bdf0322cbd7",
      "size_mb": 585.639
    }
  ],
  "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": 91.9,
    "lint_report_version": "1.1",
    "litert_version": "2.2.0",
    "matched_provenance_counts": {
      "measured": 1642,
      "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": 1686,
          "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 497 device rows of this window (377 pair, 120 stsb): cosine min 0.999997 (p01 0.999999, mean 1.000000), top-1 retrieval 235/235 on non-near-tie queries (13 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999998 over 248 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 498 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 61-token row 19.84 ms (min 19.60, max 21.88), the 32-token row 19.85 ms — the time is the window's, not the text's; compile 236 ms. The 493-row check run's warm median was 41.40 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 338 ms.",
            "10-18 11:03:54.181   794   816 I tflite  : Replacing 1686 out of 1689 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 2 partitions for subgraph 0 (main)."
          ],
          "failure_class": null,
          "full_delegation": false,
          "latency_p50_ms": 19.8360675,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999997286907742,
            "cos_min_vs_reference": 0.9999972984945988,
            "cos_p01_vs_reference": 0.9999993813388288,
            "finite": 1,
            "fixtures": 497,
            "gate_leg_rows": 498,
            "gate_leg_warm_max_ms": 44.433073,
            "gate_leg_warm_median_run_ms": 41.360729,
            "gate_leg_warm_median_write_run_read_ms": 41.400833,
            "gate_leg_warm_min_ms": 23.465729,
            "gate_leg_warm_rows": 493,
            "liveness_moved": 1,
            "load_compile_ms": 337.566718,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.00040581822395324707,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0003395934899381725,
            "pair_spearman_vs_reference": 0.9999976397689491,
            "pairs": 248,
            "partitions": 2,
            "stsb_v2_spearman_delta": 0.0,
            "threads": 4,
            "timing_leg_compile_ms": 235.747708,
            "timing_leg_long_max_ms": 21.877761,
            "timing_leg_long_median_ms": 19.8360675,
            "timing_leg_long_min_ms": 19.600834,
            "timing_leg_long_row_len": 61,
            "timing_leg_n": 20,
            "timing_leg_short_median_ms": 19.849349,
            "timing_leg_short_row_len": 32,
            "timing_leg_warmups": 5,
            "top1_agree": 235,
            "top1_near_tie": 13,
            "top1_queries": 235
          },
          "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": 1689,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-18/vela-1.0-encoder-307m-embedding__vela_l64_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": 1689,
          "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 497 device rows of this window (377 pair, 120 stsb): cosine min 0.999530 (p01 0.999589, mean 0.999995), top-1 retrieval 235/235 on non-near-tie queries (13 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999958 over 248 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 6.823 ms (min 6.760, max 9.528); the 497-row parity run's median call was 6.835 ms; compile 4963 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_L64 && 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_64 --fixtures /data/local/tmp/vela_npu/fx_L64_ids --count 498 --warmup 5 --rounds 20 --ab-fixture 000 --dump full --out /data/local/tmp/vela_npu/out_N1_npu_v3_L64 --model /data/local/tmp/vela_npu/vela_L64_ids_v3_fp16fc_fp16emb_shift_arith.tflite 2>/data/local/tmp/vela_npu/N1_npu_v3_L64.stderr.txt",
            "INFO: [compiler_plugin.cc:741] Partitioned subgraph<0>, selected 1689 ops, from a total of 1689 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": 6.823,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999948519274587,
            "cos_min_vs_reference": 0.9995304416646922,
            "cos_p01_vs_reference": 0.9995894319792719,
            "finite": 1,
            "fixtures": 497,
            "fully_accelerated": 1,
            "liveness_moved": 1,
            "load_compile_ms": 4963.3,
            "max_abs_vs_reference": 0.004412218928337097,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.002162050098064583,
            "pair_spearman_vs_reference": 0.999957515841084,
            "pairs": 248,
            "parity_leg_call_ms_median": 6.835,
            "partitions": 1,
            "runner_call_ms_max": 9.528,
            "runner_call_ms_median": 6.823,
            "runner_call_ms_min": 6.76,
            "runner_rounds": 20,
            "runner_warmups": 5,
            "stsb_v2_spearman_delta": -0.00016684515062603822,
            "top1_agree": 235,
            "top1_near_tie": 13,
            "top1_queries": 235
          },
          "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": 1689,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-18/vela-1.0-encoder-307m-embedding__vela_l64_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": 1686,
          "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 497 device rows of this window (377 pair, 120 stsb): cosine min 0.999997 (p01 0.999999, mean 1.000000), top-1 retrieval 235/235 on non-near-tie queries (13 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999998 over 248 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 498 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 493 rows (180.73 ms; min 120.16, max 294.14; 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 443 ms.",
            "10-18 10:23:58.106 13403 13426 I tflite  : Replacing 1686 out of 1689 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 2 partitions for subgraph 0 (main)."
          ],
          "failure_class": null,
          "full_delegation": false,
          "latency_p50_ms": 180.72762,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999997286907742,
            "cos_min_vs_reference": 0.9999972984945988,
            "cos_p01_vs_reference": 0.9999993813388288,
            "finite": 1,
            "fixtures": 497,
            "gate_leg_rows": 498,
            "gate_leg_warm_max_ms": 294.144165,
            "gate_leg_warm_median_run_ms": 180.460002,
            "gate_leg_warm_median_write_run_read_ms": 180.72762,
            "gate_leg_warm_min_ms": 120.156331,
            "gate_leg_warm_rows": 493,
            "liveness_moved": 1,
            "load_compile_ms": 443.249471,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.00040581822395324707,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0003395934899381725,
            "pair_spearman_vs_reference": 0.9999976397689491,
            "pairs": 248,
            "partitions": 2,
            "stsb_v2_spearman_delta": 0.0,
            "threads": 4,
            "top1_agree": 235,
            "top1_near_tie": 13,
            "top1_queries": 235
          },
          "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": 1689,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-18/vela-1.0-encoder-307m-embedding__vela_l64_fp16__pixel-8a.json"
      },
      {
        "device": "pixel-8a",
        "run": {
          "accelerator": "gpu_mldrift",
          "context_length": null,
          "date": "2026-10-18",
          "decode_tokens_per_s": null,
          "delegated_ops": null,
          "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": "10-18 10:23:38.897 12960 12994 E tflite  : EMBEDDING_LOOKUP: EMBEDDING_LOOKUP: Empty quantization params.",
          "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.",
            "the GPU delegate does not take the float16 (DEQUANTIZE-fed) token table inside the one-file graph: CompiledModel creation fails before any row runs; the host-table form of the same window ran whole on this GPU (its record).",
            "conditions: screen on, USB powered, one process per run; thermal status before the run: Thermal Status: 1.",
            "10-18 10:23:38.897 12960 12994 E tflite  : EMBEDDING_LOOKUP: EMBEDDING_LOOKUP: Empty quantization params.",
            "10-18 10:23:40.242 12960 12994 E litert  : [litert_compiled_model_jni.cc:802] Failed to create compiled model: Failed to compile model",
            "10-18 10:23:40.244 12960 12994 E D1OMNI_GATE: com.google.ai.edge.litert.LiteRtException: Failed to compile model"
          ],
          "failure_class": "compile_error",
          "full_delegation": null,
          "latency_p50_ms": null,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {},
          "output_match": null,
          "peak_mem_mb": null,
          "prefill_tokens_per_s": null,
          "provenance": "measured",
          "runs": false,
          "signature": "GpuOptions precision=FP16 (the delegate default); fp16 token table in the graph (input_ids); gate app com.mlboydaisuke.d1omni.gate (generic mode)",
          "total_ops": null,
          "ttft_ms": null
        },
        "source": "data/device_runs/2.2.0/2026-10-18/vela-1.0-encoder-307m-embedding__vela_l64_fp16__pixel-8a.json"
      }
    ]
  },
  "model": {
    "family": "vela-1.0-encoder-307m-embedding",
    "id": "vela-1.0-encoder-307m-embedding__vela_l64_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,64] + `attention_mask` float32 [1,64] -> `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"
}
