01Recorded result
MLComputePlan was loaded for the infer function with compute units set to CPU and Neural Engine. Each operation was counted by the device MLComputePlan reports as preferred for it. Operations with no reported device usage are counted as none.
| Bucket | Ops | Of all ops | Of assigned compute |
|---|---|---|---|
| ANE | 2,090 | 32.6% | 96.4% |
| CPU | 79 | 1.2% | 3.6% |
| GPU | 0 | 0.0% | 0.0% |
| none | 4,242 | 66.2% | n/a |
| Total | 6,411 | 100% | 2,169 assigned |
Recorded in ANE-RE FINDINGS §2 and in the output block reproduced in the ANE-RE structural gate source. The 79 CPU operations are the lm_head argmax tail.
The same placement and state-primitive counts are published as qwen-placement.csv and qwen-state-primitives.csv in the MacBrains Labs ANE Research Records, archived at Zenodo under DOI 10.5281/zenodo.23798037. This bundle adds the tools that produced the counts. Raw experimental data, private fixtures and model weights remain unpublished.
KV-state machinery in the same function, counted by kv_placement.swift:
| Operator | ANE | CPU |
|---|---|---|
slice_update | 56 | 0 |
read_state | 57 | 0 |
write_state | 56 | 0 |
slice_by_index | 225 | 0 |
The recorded output, as transcribed: recorded_output.txt. Machine-readable provenance: provenance.json.
02Model under test
The measured artifact is qwen25_monolithic_full_lut4.mlmodelc. It is a Core ML conversion of Qwen/Qwen2.5-1.5B-Instruct produced with ANEMLL's Qwen2.5 converter: monolithic export, 512-token context, LUT4 palettization, argmax output. The model's metadata records coremltools 9.0 and ANEMLL v0.3.5.
The conversion that makes this model ANE-resident is ANEMLL's work. This record measures where that model's operations are assigned and what that says about the KV-state path. It does not claim the converter.
The compiled model is not distributed here. It is derived from the Qwen weights; its stored weight file is about 893 MB.
03Tools
Both tools are short Swift programs that use only the public MLComputePlan API (macOS 14.4 or later). They are byte-for-byte copies from the ane-re repository at commit ffd1a3c.
| File | Counts | SHA-256 |
|---|---|---|
| ane_compute_plan.swift | Every operation by assigned device | 557d158d…7e6226a* |
| kv_placement.swift | KV-state operators by assigned device | a69752ac…9da6148c* |
* Full hashes are in provenance.json.
04Rerun it
- Convert
Qwen/Qwen2.5-1.5B-Instructwith ANEMLL'sconvert_monolith.shat context 512 with LUT4 weights and argmax output, then compile the package withxcrun coremlcompiler compile. - Build and run both tools against the compiled model's
inferfunction:
swiftc -O ane_compute_plan.swift -o ane_compute_plan
swiftc -O kv_placement.swift -o kv_placement
./ane_compute_plan qwen25_monolithic_full_lut4.mlmodelc infer
./kv_placement qwen25_monolithic_full_lut4.mlmodelc infer
Compare the output with recorded_output.txt. These build commands are the standard way to compile a single Swift file. They were not rerun for this bundle.
Different converter flags can change the graph and therefore the counts. If your counts differ, the model's ANEMLL version, LUT settings and argmax setting are the first things to compare.
05Reruns, 30 October 2026
Three runs were made on 30 October 2026 with the two tools in this bundle, on Mac17,5 (Apple A18 Pro), macOS 27.2 build 26B123, with the tools built by Apple Swift 6.4.2.
The archived June artifact
A copy of qwen25_monolithic_full_lut4.mlmodelc sits in two project archives dated 12 and 23 June 2026, with the same model.mil in both. Its metadata records ANEMLL v0.3.5 and coremltools 9.0, and its weight file is 893,118,592 bytes. Run on the current OS, its infer function gave the recorded June counts exactly, including the KV-state counts.
The June record holds no model hash, so it cannot confirm that this copy is the file measured on 18 June. That is inferred from the archive dates and the identical counts.
The current shipped build
The same tools were also run on the current shipped build of the same model line, which has an infer function and a 64-token prefill function. It is a different artifact from the June one, so its counts are reported beside the June result and do not replace it.
| Bucket | June record | June copy, rerun | Shipped, infer | Shipped, prefill |
|---|---|---|---|---|
| ANE | 2,090 | 2,090 | 2,147 | 2,360 |
| CPU | 79 | 79 | 82 | 13 |
| GPU | 0 | 0 | 0 | 0 |
| none | 4,242 | 4,242 | 4,022 | 4,735 |
| Total | 6,411 | 6,411 | 6,251 | 7,108 |
| ANE share of assigned compute | 96.4% | 96.4% | 96.3% | 99.5% |
slice_update / read_state / write_state on ANE | 56 / 57 / 56 | 56 / 57 / 56 | 56 / 57 / 56 | 56 / 56 / 56 |
slice_by_index on ANE | 225 | 225 | 281 | 281 |
No KV-state operator was assigned to the CPU in either infer function. In the shipped prefill function, one of the 57 read_state operations was assigned to the CPU.
| Artifact | model.mil | weight.bin | Raw output |
|---|---|---|---|
| June copy | 9c8dccb6…94d4c72f | 004eef01…a73fa30b94 | infer |
| Shipped build | 9e8630d4…918e3fef5 | d465d50b…c5a662a10d | infer, prefill |
Full hashes, including each output file's, are in provenance.json. Each output file is the tools' stdout as captured; the shipped infer file also carries start and end timestamps and the OS and device lines.
The shipped artifact's release notes record how it was built: ANEMLL at commit cc818aeb, convert_monolith.sh with context 512, batch 64, LUT 4 and 8, LUT4 embeddings and LM head, and argmax output, converted on 21 October 2026. Its prefill function was post-processed to make the batched KV writes compile for the ANE; infer was not changed. That build record is quoted, not re-derived. Only the file hashes and the counts were checked on these runs.
06What it shows
MLComputePlan is the compiler's assignment, not a hardware trace. These counts show where Core ML planned each operation of this build. They do not prove zero CPU work across the whole inference stack, and they do not transfer automatically to a different Core ML build.
The KV-state counts correct an earlier claim in the same research record. An earlier note said slice_update and write_state were an irreducible CPU floor. That came from a hand-written toy graph, not from a hardware limit. In the infer function of this production graph, all four KV-state operators are assigned to the ANE.
07Gaps in the record
A reader should know what this bundle cannot supply.
- No raw, timestamped log of the June run is in the record. Its numbers come from the findings document, the output block reproduced in the gate source, and a project archive entry dated 18 June 2026.
- The archive gives Mac17,5 and macOS 26 beta 26A5353q in the same dated section as the result, but not on the result line itself.
- The exact conversion command and ANEMLL commit for the June artifact were not recorded, and the June record holds no model hash. The archived copy rerun here is identified by its archive dates and matching counts, not by a recorded hash.
- All 30 October runs record their raw output, OS build, device and model hashes. The compiled models themselves are not distributed.
Corrections and independent reruns are welcome at research@macbrainslabs.org.