{
  "bundle": "E/001",
  "finding": "Qwen2.5-1.5B LUT4 operator placement, infer function",
  "source_record": {
    "repository": "naytewilson/ane-re",
    "commit": "ffd1a3c",
    "documents": [
      "docs/FINDINGS.md section 2",
      "data/MEASUREMENTS.md",
      "tools/ane_re_structural_gate.py output block"
    ]
  },
  "model": {
    "artifact": "qwen25_monolithic_full_lut4.mlmodelc",
    "base_model": "Qwen/Qwen2.5-1.5B-Instruct",
    "converter": "ANEMLL qwen2_5_converter (monolithic)",
    "converter_version_in_model_metadata": "0.3.5",
    "coremltools_in_model_metadata": "9.0",
    "context_length": 512,
    "weights": "LUT4",
    "output": "argmax",
    "distributed": false,
    "model_hash": null
  },
  "method": {
    "api": "MLComputePlan",
    "compute_units": "cpuAndNeuralEngine",
    "function": "infer",
    "classification": "preferred device per operation; no device usage counted as none"
  },
  "recorded_result": {
    "total_ops": 6411,
    "none": 4242,
    "ANE": 2090,
    "CPU": 79,
    "GPU": 0,
    "assigned_compute_ops": 2169,
    "ANE_share_of_assigned": 0.964,
    "kv_state": {
      "slice_update": {
        "ANE": 56,
        "CPU": 0
      },
      "read_state": {
        "ANE": 57,
        "CPU": 0
      },
      "write_state": {
        "ANE": 56,
        "CPU": 0
      },
      "slice_by_index": {
        "ANE": 225,
        "CPU": 0
      }
    }
  },
  "tools": [
    {
      "file": "ane_compute_plan.swift",
      "source_path": "spi/ane_compute_plan.swift",
      "sha256": "557d158df343acceff6740c34cef34a04dabeacdab76dfc215de0bdda7e6226a"
    },
    {
      "file": "kv_placement.swift",
      "source_path": "spi/kv_placement.swift",
      "sha256": "a69752ac0d9738a8240e2c51589f494b0af31a6cb6f797a820c29a799da6148c"
    }
  ],
  "not_recorded": [
    "raw timestamped log of the original run",
    "exact conversion command and ANEMLL commit for the June artifact",
    "hash of the June compiled model in the June record itself (an archived copy was hashed and rerun on 2026-10-30; see archived_june_copy_rerun_2026_10_30)"
  ],
  "public_summary": {
    "repository": "macbrainslabs/ane-research-records",
    "files": [
      "data/qwen-placement.csv",
      "data/qwen-state-primitives.csv"
    ],
    "version_doi": "10.5281/zenodo.23798037",
    "all_versions_doi": "10.5281/zenodo.23798036"
  },
  "original_run_context": {
    "date": "2026-06-18",
    "source": "project data archive entry for that date (private)",
    "device_in_same_dated_section": "Mac17,5",
    "macos_in_same_dated_section": "macOS 26 beta 26A5353q",
    "note": "The archive records the device and OS in the same dated section as the placement result, not on the result line itself."
  },
  "rerun_2026_10_30": {
    "status": "rerun on a later build of the same model line; not the June artifact",
    "started_utc": "2026-10-30T11:10:44Z",
    "finished_utc": "2026-10-30T11:12:06Z",
    "device": {
      "hw_model": "Mac17,5",
      "chip": "Apple A18 Pro"
    },
    "macos": {
      "version": "27.2",
      "build": "26B123"
    },
    "swift": "Apple Swift 6.4.2 (swiftlang-6.4.2.1.9)",
    "tools": "the two tools in this bundle, extracted from ane-re at ffd1a3c and matching the sha256 values above, built with swiftc -O",
    "artifact": {
      "file": "qwen25_monolithic_full_lut4.mlmodelc",
      "functions": [
        "infer",
        "prefill"
      ],
      "sha256": {
        "model.mil": "9e8630d4fa90baddc7eb5555b3a16decfc3dd4e6419de62c75ba0b7918e3fef5",
        "weights/weight.bin": "d465d50b4ed75c1a0869145006c6319e4ed5f55f6086c3ee2bf198c5a662a10d"
      },
      "recorded_build": {
        "source": "the artifact release notes (not independently verified here)",
        "convert_command": "convert_monolith.sh --model Qwen/Qwen2.5-1.5B-Instruct --context 512 --batch 64 --lut 4,8 --lut-embeddings 4 --lut-lmhead 4 --argmax",
        "anemll_commit": "cc818aeb15a084e36b54981c81602a5597823b9c",
        "converted": "2026-10-21",
        "post_processing": "the prefill function KV writes were rewritten to static bounds; infer was not changed",
        "metadata": {
          "coremltools": "9.0",
          "anemll_info": "Converted with Anemll v0.1.1",
          "opset": "ios18"
        }
      }
    },
    "raw_output": {
      "file": "rerun_2026-10-30.txt",
      "sha256": "5fdfbb5db99d309f539574c4d19ed3e3db5a14a573e0819693c9dbdff0a8b508"
    },
    "result": {
      "function": "infer",
      "total_ops": 6251,
      "none": 4022,
      "ANE": 2147,
      "CPU": 82,
      "GPU": 0,
      "assigned_compute_ops": 2229,
      "ANE_share_of_assigned": 0.963,
      "kv_state": {
        "slice_update": {
          "ANE": 56,
          "CPU": 0
        },
        "read_state": {
          "ANE": 57,
          "CPU": 0
        },
        "write_state": {
          "ANE": 56,
          "CPU": 0
        },
        "slice_by_index": {
          "ANE": 281,
          "CPU": 0
        }
      }
    }
  },
  "archived_june_copy_rerun_2026_10_30": {
    "status": "rerun of an archived copy of the June artifact; identity with the 18 June file is inferred from archive dates and identical counts, not from a recorded hash",
    "date": "2026-10-30",
    "started_utc": "2026-10-30T11:24:50Z",
    "device": {
      "hw_model": "Mac17,5",
      "chip": "Apple A18 Pro"
    },
    "macos": {
      "version": "27.2",
      "build": "26B123"
    },
    "swift": "Apple Swift 6.4.2 (swiftlang-6.4.2.1.9)",
    "tools": "the two tools in this bundle, extracted from ane-re at ffd1a3c and matching the sha256 values above, built with swiftc -O",
    "artifact": {
      "file": "qwen25_monolithic_full_lut4.mlmodelc",
      "found_in": [
        "project archive dated 2026-06-12",
        "project archive dated 2026-06-23 (model.mil identical)"
      ],
      "functions": [
        "infer",
        "prefill"
      ],
      "sha256": {
        "model.mil": "9c8dccb6900d2bf2be2be6a08cf78e38de3bb44aabddaaf7b53b0f3494d4c72f",
        "weights/weight.bin": "004eef0158a90d9ff5c5c6ce38ae18aa4c417ba38c230dbf662fc6a73fa30b94"
      },
      "weight_bin_bytes": 893118592,
      "metadata": {
        "coremltools": "9.0",
        "anemll_info": "Converted with Anemll v0.3.5"
      }
    },
    "raw_output": {
      "file": "june_artifact_rerun_2026-10-30.txt",
      "sha256": "ef4797f9f543dd37fdc70cf21b53b72ebd98c64352ea63f50e1a521cf9916798"
    },
    "result": {
      "function": "infer",
      "total_ops": 6411,
      "none": 4242,
      "ANE": 2090,
      "CPU": 79,
      "GPU": 0,
      "assigned_compute_ops": 2169,
      "ANE_share_of_assigned": 0.964,
      "kv_state": {
        "slice_update": {
          "ANE": 56,
          "CPU": 0
        },
        "read_state": {
          "ANE": 57,
          "CPU": 0
        },
        "write_state": {
          "ANE": 56,
          "CPU": 0
        },
        "slice_by_index": {
          "ANE": 225,
          "CPU": 0
        }
      }
    },
    "matches_recorded_result": true
  },
  "shipped_prefill_rerun_2026_10_30": {
    "status": "prefill function of the same shipped build as rerun_2026_10_30",
    "date": "2026-10-30",
    "device": {
      "hw_model": "Mac17,5",
      "chip": "Apple A18 Pro"
    },
    "macos": {
      "version": "27.2",
      "build": "26B123"
    },
    "artifact_sha256": {
      "model.mil": "9e8630d4fa90baddc7eb5555b3a16decfc3dd4e6419de62c75ba0b7918e3fef5",
      "weights/weight.bin": "d465d50b4ed75c1a0869145006c6319e4ed5f55f6086c3ee2bf198c5a662a10d"
    },
    "raw_output": {
      "file": "prefill_rerun_2026-10-30.txt",
      "sha256": "516a31c8d14f8ab618d6f98cee4002c374983f51b70690ab555ea6dd6dd27cfe"
    },
    "result": {
      "function": "prefill",
      "total_ops": 7108,
      "none": 4735,
      "ANE": 2360,
      "CPU": 13,
      "GPU": 0,
      "assigned_compute_ops": 2373,
      "ANE_share_of_assigned": 0.995,
      "kv_state": {
        "slice_update": {
          "ANE": 56,
          "CPU": 0
        },
        "read_state": {
          "ANE": 56,
          "CPU": 1
        },
        "write_state": {
          "ANE": 56,
          "CPU": 0
        },
        "slice_by_index": {
          "ANE": 281,
          "CPU": 0
        }
      }
    },
    "note": "the CPU op-type list in the raw output shows only the top eight types, so it does not sum to 13"
  }
}
