{
  "artifacts": [
    {
      "file": "model.litertlm",
      "sha256": "ee46dec376e1aee8190c41bce5f29d3b891db3eaa0e92ce5a6a28e24f04067ba",
      "size_mb": 2655.005
    }
  ],
  "benchmarks": [],
  "conversion": {
    "command": "TODO (the HF card states the two adjustments and the recipe, not the invocation)",
    "quantization": "int4 blockwise-32 + OCTAV, embeddings INT8, KV cache 4096, externalize_embedder=True (HF card Conversion)",
    "tool": "litert-torch (official converter; Phi3ForCausalLM with LongRoPE + a nominal sliding window, two export-time adjustments) (HF card Conversion)",
    "tool_version": "TODO (the HF card names the converter but not its version; no export log in the sources)"
  },
  "cross_runtime": [],
  "delegation": null,
  "device": {
    "records": [
      {
        "device": "mac-studio-m4-max",
        "run": {
          "accelerator": "gpu",
          "context_length": null,
          "date": "2026-07-23",
          "decode_tokens_per_s": 83.68,
          "delegated_ops": null,
          "env": {
            "device": "Mac Studio (M4 Max)",
            "machine_label": "mac-studio-m4-max",
            "os_build": null,
            "runtime": "litert-lm",
            "runtime_version": "0.14.0",
            "soc": "Apple M4 Max",
            "vendor_sdk": null
          },
          "error": null,
          "evidence": [
            "results block: prefill=1135.30 decode=83.68 tokens/s, init=3.2506 s"
          ],
          "failure_class": null,
          "full_delegation": null,
          "latency_p50_ms": null,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {
            "decode_tokens": 256.0,
            "init_s": 3.2506,
            "max_num_tokens": 1024.0,
            "prefill_tokens": 256.0
          },
          "output_match": null,
          "peak_mem_mb": null,
          "prefill_tokens_per_s": 1135.3,
          "provenance": "measured",
          "runs": true,
          "total_ops": null,
          "ttft_ms": 237.4
        },
        "source": "data/device_runs/0.14.0/2026-07-23/phi4-mini-reasoning__mac-studio-m4-max.json"
      },
      {
        "device": "raspberry-pi-5",
        "run": {
          "accelerator": "cpu",
          "context_length": null,
          "date": "2026-09-01",
          "decode_tokens_per_s": 1.62,
          "delegated_ops": null,
          "env": {
            "device": "Raspberry Pi 5 Model B Rev 1.1",
            "machine_label": "raspberry-pi-5-cooled-52c",
            "os_build": "Linux-6.18.34+rpt-rpi-2712-aarch64-with-glibc2.41",
            "runtime": "litert-lm",
            "runtime_version": "0.16.1",
            "soc": "Broadcom BCM2712",
            "vendor_sdk": null
          },
          "error": null,
          "evidence": [
            "pi5 LLM sweep row: `litert-lm benchmark --backend cpu --cpu-thread-count 4 -p 256 -d 256 --runs 1 --cache memory` (wave-2 driver pi5_llm_bench.py; --cache memory rather than the house --cache no, which OOM-kills every >=1.2B file on the 8 GB Pi — equivalence measured on granite-350m int8, +2-3%), 3 invocations per file with cool-down to <=52 C between them, vcgencmd measure_temp + get_throttled logged per invocation, peak RSS polled from /proc; throughput = median of the three invocations (spread in metrics); a row counts as measured only when the real-generation gate (`litert-lm run`, degenerate-output check) passed and every invocation exited 0 with get_throttled 0x0",
            "versions: cpu=Raspberry Pi 5 Model B Rev 1.1, litert-lm=0.16.1, litert-lm-api=0.16.1, platform=Linux-6.18.34+rpt-rpi-2712-aarch64-with-glibc2.41, python=3.13.5",
            "cache mode 'memory'; -p 256 -d 256 --runs 1 --cpu-thread-count 4",
            "gate ('What is 17 plus 26? Answer with the number only.'): status pass, exit 0, wall 370.9 s, output head \"[thought] Okay, let's see. The problem is asking for the sum of 17 and 26, and t\"",
            "invocation 0: exit=0 wall_s=456.3 temp 50.5->53.2C throttled=0x0 prefill_tps=13.89 decode_tps=1.62 ttft_s=21.3309 init_s=60.8657 peak_rss_mb=4274",
            "invocation 1: exit=0 wall_s=454.3 temp 49.9->54.3C throttled=0x0 prefill_tps=14.06 decode_tps=1.62 ttft_s=21.1448 init_s=60.6877 peak_rss_mb=4274",
            "invocation 2: exit=0 wall_s=454.3 temp 51.0->56.5C throttled=0x0 prefill_tps=14.15 decode_tps=1.62 ttft_s=20.9965 init_s=60.6101 peak_rss_mb=4211"
          ],
          "failure_class": null,
          "full_delegation": null,
          "latency_p50_ms": null,
          "loads": true,
          "max_abs_diff": null,
          "max_rel_diff": null,
          "metrics": {
            "decode_tokens": 256.0,
            "decode_tps_max": 1.62,
            "decode_tps_min": 1.62,
            "init_s": 60.6877,
            "init_s_max": 60.8657,
            "init_s_min": 60.6101,
            "invocations": 3.0,
            "prefill_tokens": 256.0,
            "prefill_tps_max": 14.15,
            "prefill_tps_min": 13.89,
            "runs_per_invocation": 1.0,
            "threads": 4.0,
            "ttft_s_max": 21.3309,
            "ttft_s_min": 20.9965
          },
          "output_match": null,
          "peak_mem_mb": 4274.0,
          "prefill_tokens_per_s": 14.06,
          "provenance": "measured",
          "runs": true,
          "total_ops": null,
          "ttft_ms": 21144.8
        },
        "source": "data/device_runs/0.16.1/2026-09-01/phi4-mini-reasoning__raspberry-pi-5.json"
      }
    ]
  },
  "model": {
    "family": "phi",
    "id": "phi4-mini-reasoning",
    "license": "mit",
    "source_url": "https://huggingface.co/litert-community/Phi-4-mini-reasoning",
    "task": "text-generation"
  },
  "pitfalls": [
    "Two export-time adjustments for current litert-torch: (1) LongRoPE — replace Phi3RotaryEmbedding.forward with a static version (the @dynamic_rope_update seq-len branch is data-dependent under torch.export; for cache <= original_max=4096 the short factor is always correct); (2) sliding window — set config.sliding_window=None (it is 262144 >> context, i.e. full-causal) so the standard causal mask path is used (HF card Conversion).",
    "License MIT, inherited from microsoft/Phi-4-mini-reasoning (HF card License).",
    "LiteRT-LM .litertlm bundle: LiteRT.js cannot run it, so delegation stays null and there is no browser block; device rows come from data/device_runs/ (Pi 5 / S26 / Pixel 8a / Mac / iPhone as measured)."
  ],
  "schema_version": "1.2"
}
