{
  "artifacts": [
    {
      "file": "vela_L256_ids_v3_fp16fc_fp16emb_shift_arith.tflite",
      "sha256": "ed359a4afeeefd0e65c38ecab55a8e1597438140fa22b7f551776fde8283358f",
      "size_mb": 586.218
    }
  ],
  "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 200 device rows of this window (40 long128, 80 long256, 80 pair): cosine min 0.999996 (p01 0.999998, mean 1.000000), top-1 retrieval 100/100 on non-near-tie queries (0 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999976 over 100 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 201 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 241-token row 88.03 ms (min 85.48, max 89.04), the 32-token row 85.07 ms — the time is the window's, not the text's; compile 240 ms. The 196-row check run's warm median was 164.29 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 361 ms.",
            "10-18 10:59:57.946 27742 27766 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": 88.03138,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.99999956087171,
            "cos_min_vs_reference": 0.9999955307256274,
            "cos_p01_vs_reference": 0.9999982183899894,
            "finite": 1,
            "fixtures": 200,
            "gate_leg_rows": 201,
            "gate_leg_warm_max_ms": 175.707083,
            "gate_leg_warm_median_run_ms": 164.240729,
            "gate_leg_warm_median_write_run_read_ms": 164.294948,
            "gate_leg_warm_min_ms": 101.105625,
            "gate_leg_warm_rows": 196,
            "liveness_moved": 1,
            "load_compile_ms": 361.408021,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.0004570186138153076,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0003688208618111144,
            "pair_spearman_vs_reference": 0.9999759975997602,
            "pairs": 100,
            "partitions": 2,
            "threads": 4,
            "timing_leg_compile_ms": 240.342656,
            "timing_leg_long_max_ms": 89.03526,
            "timing_leg_long_median_ms": 88.03138,
            "timing_leg_long_min_ms": 85.48026,
            "timing_leg_long_row_len": 241,
            "timing_leg_n": 20,
            "timing_leg_short_median_ms": 85.071667,
            "timing_leg_short_row_len": 32,
            "timing_leg_warmups": 5,
            "top1_agree": 100,
            "top1_near_tie": 0,
            "top1_queries": 100
          },
          "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_l256_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 200 device rows of this window (40 long128, 80 long256, 80 pair): cosine min 0.999405 (p01 0.999526, mean 0.999990), top-1 retrieval 100/100 on non-near-tie queries (0 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999844 over 100 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 29.049 ms (min 28.809, max 29.521); the 200-row parity run's median call was 28.767 ms; compile 39903 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_L256 && 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_256 --fixtures /data/local/tmp/vela_npu/fx_L256_ids --count 201 --warmup 5 --rounds 20 --ab-fixture 000 --dump full --out /data/local/tmp/vela_npu/out_N1_npu_v3_L256 --model /data/local/tmp/vela_npu/vela_L256_ids_v3_fp16fc_fp16emb_shift_arith.tflite 2>/data/local/tmp/vela_npu/N1_npu_v3_L256.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": 29.049,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.9999895598574904,
            "cos_min_vs_reference": 0.9994046121556962,
            "cos_p01_vs_reference": 0.9995257490430577,
            "finite": 1,
            "fixtures": 200,
            "fully_accelerated": 1,
            "liveness_moved": 1,
            "load_compile_ms": 39902.6,
            "max_abs_vs_reference": 0.008413225412368774,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.004074296729470461,
            "pair_spearman_vs_reference": 0.99984398439844,
            "pairs": 100,
            "parity_leg_call_ms_median": 28.767,
            "partitions": 1,
            "runner_call_ms_max": 29.521,
            "runner_call_ms_median": 29.049,
            "runner_call_ms_min": 28.809,
            "runner_rounds": 20,
            "runner_warmups": 5,
            "top1_agree": 100,
            "top1_near_tie": 0,
            "top1_queries": 100
          },
          "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_l256_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 200 device rows of this window (40 long128, 80 long256, 80 pair): cosine min 0.999996 (p01 0.999998, mean 1.000000), top-1 retrieval 100/100 on non-near-tie queries (0 near ties, reference top-2 gap <= 0.01), pair Spearman 0.999976 over 100 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 201 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 196 rows (935.79 ms; min 891.39, max 966.89; write + run + read-back per text, the gate app's own clock) on a working phone (thermal status before the run: Thermal Status: 2) — 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: 2; compile 1225 ms.",
            "10-18 10:42:17.563 26281 26307 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": 935.7937830000001,
          "loads": true,
          "max_abs_diff": 0.0,
          "max_rel_diff": null,
          "metrics": {
            "bar_pass": 1,
            "cos_mean_vs_reference": 0.99999956087171,
            "cos_min_vs_reference": 0.9999955307256274,
            "cos_p01_vs_reference": 0.9999982183899894,
            "finite": 1,
            "fixtures": 200,
            "gate_leg_rows": 201,
            "gate_leg_warm_max_ms": 966.887045,
            "gate_leg_warm_median_run_ms": 935.537069,
            "gate_leg_warm_median_write_run_read_ms": 935.7937830000001,
            "gate_leg_warm_min_ms": 891.385661,
            "gate_leg_warm_rows": 196,
            "liveness_moved": 1,
            "load_compile_ms": 1225.397177,
            "mac_same_graph_max_abs": 0.0,
            "mac_same_graph_min_cos": 0.9999999999999998,
            "max_abs_vs_reference": 0.0004570186138153076,
            "nonfinite_rows": 0,
            "pair_max_abs_dcos": 0.0003688208618111144,
            "pair_spearman_vs_reference": 0.9999759975997602,
            "pairs": 100,
            "partitions": 2,
            "threads": 4,
            "top1_agree": 100,
            "top1_near_tie": 0,
            "top1_queries": 100
          },
          "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_l256_fp16__pixel-8a.json"
      }
    ]
  },
  "model": {
    "family": "vela-1.0-encoder-307m-embedding",
    "id": "vela-1.0-encoder-307m-embedding__vela_l256_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,256] + `attention_mask` float32 [1,256] -> `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"
}
