01Slices on the Neural Engine
LFM2.5-1.2B has 16 layers. The model was emitted in Swift as separate Core ML packages: layers 0-4, 0-8, 8-16 and the final norm plus tied LM head. Each package ran under .cpuOnly and under .cpuAndNeuralEngine, and each output was compared with a pinned Hugging Face PyTorch oracle for the same layer range.
The gate here is strict: cosine ≥ 0.9999 and relative L2 ≤ 0.005, applied to the Neural Engine run as well as the CPU run. Every slice passed, and MLComputePlan placed every assigned compute operation on the ANE.
| Package | Input | ANE / assigned ops | ANE rel. L2 | CPU rel. L2 | Verdict |
|---|---|---|---|---|---|
| Layers 0-4 | All-ones vector | 229 / 229 | 0.002401 | 0.000330 | Pass |
| Layers 0-8 | All-ones vector | 457 / 457 | 0.003764 | 0.000474 | Pass |
| Layers 8-16 | Oracle output of 0-8 | 553 / 553 | 0.003660 | 0.001091 | Pass |
| Final norm + LM head | Oracle output of 0-16 | 11 / 11 | 0.000395 | 0.001287 | Pass |
“Assigned ops” excludes operations MLComputePlan gives no device, such as constants. The 0-8 and 8-16 packages also passed a weight integrity check: 70/70 and 76/76 tensors byte-identical to the source. The final head’s top-1 token matched the oracle’s (21134).
02The chained run
Feeding the ANE output of layers 0-8 into the ANE package for 8-16, with no oracle in between, gave a 16-layer hidden state with relative L2 0.005975. That misses the 0.005 gate. The same chain on CPU stayed at 0.001204.
| 16-layer chain | Cosine | Rel. L2 | Verdict |
|---|---|---|---|
| CPU → CPU | 0.999999276 | 0.001204 | Pass |
| ANE → ANE | 0.999989419 | 0.005975 | Fail |
A follow-up decomposition split the chained error into three parts of similar size: the 0-8 package’s own error (0.003764), the 8-16 package’s own error (0.003660), and the effect of passing a slightly wrong input forward (0.003949). None of them fails alone. Together they cross the line. The receipts route the cause to FP16 accumulation drift in chunked matrix multiplies on the ANE; that cause is a hypothesis, not yet isolated.
03Tokens
The full pipeline (host embedding lookup, ANE 0-8, ANE 8-16, ANE final head) was then compared with the oracle’s logits for single tokens.
| Check | Observed | Verdict |
|---|---|---|
| BOS token, top-1 | Matches the oracle (token 1) | Pass |
| BOS token, full logits | Rel. L2 0.0560, cosine 0.998441; 2nd and 3rd candidates swap | Fail |
| Seven-token sweep, top-1 | 5 of 7 match | Fail |
| Seven-token sweep, full logits | Rel. L2 from 0.056 to 0.470 | Fail |
The sweep is recorded as a diagnostic: each token was run alone, with no prior context, so it tests the arithmetic path rather than generation.
04What this does and does not show
Per-slice parity does not compose. An error budget that each package meets can still be exceeded by the chain, and a matching top-1 token can hide logits that are measurably wrong. Gate the exact chain you plan to run, at the output you plan to use.
It shows that the whole 16-layer LFM2.5 stack can be placed on the ANE in two packages plus a head, and that the per-package numerics are close to the oracle. It does not show a working ANE model: token-level parity failed, and no generation quality was measured. Later builds changed these packages; this note covers the 17 July receipts only.
05In progress: a larger output-projection gain
Related work on a later model, LFM3-1.7B, is testing one numerical lever: the output-projection gain setting (--attn-o-gain) of a single FP16 attention layer, layer 14. On 30 October 2026, five builds were compared against a teacher at seven positions.
| Gain | Worst rel. L2 | Change vs gain 8 | ANE / CPU / GPU ops |
|---|---|---|---|
| 1 | 0.012514 | +414.5% | 447 / 0 / 0 |
| 2 | 0.005786 | +137.9% | 447 / 0 / 0 |
| 4 | 0.003141 | +29.1% | 447 / 0 / 0 |
| 8 (current) | 0.002432 | — | 447 / 0 / 0 |
| 16 | 0.002180 | −10.4% | 447 / 0 / 0 |
Gain 16 improved all seven positions, and a follow-up on nineteen positions, ten of them held out, improved all nineteen (held-out worst −7.2%). The gain-8 rebuild reproduced the existing build’s hidden states exactly, which is the control.
One layer, a few dozen positions, and a planned placement rather than a traced dispatch. It is not a full-model or release result, and it may not hold across 24 layers.
06Reproducibility boundary
The LFM2.5 receipts are JSON files dated 17 July 2026. Each records the git commit of the emitter, the runner executable hashes, input hashes and the gate it applied. The all-ones input has SHA-256 4e1896175eea3c475e4d4960087ee0d7bd161add337d0bc1d6b7a0705f162f12. The receipts do not record the device or OS version.
| Receipt | Status | SHA-256 (first 16) |
|---|---|---|
lfm25_paired_policy_parity_0_4 | PROVEN | 9d26dcc18b0990e7 |
lfm25_paired_policy_parity_0_8 | PROVEN | 278af461ad03faf4 |
lfm25_paired_policy_parity_8_16 | PROVEN | 472912535cbb6b81 |
lfm25_final_head_parity | PROVEN | d7956fb20ff654ba |
lfm25_m16_chained_parity | FAILED | 9a78e6519e904d95 |
lfm25_t1_token_parity | FAILED | 0eae5cd1cbc495ed |
lfm25_stateless_token_sweep | DIAGNOSTIC | 1fc85f8fb2a04084 |
The LFM3 sweep receipt (o-gain-seven-position-ranked.json, SHA-256 c1d524ae7ddb0ffc…) records a Mac17,5 on macOS 27.2 (26B123), the checkpoint revision, fixture and oracle hashes, and the program and weight hashes of each build.
Source: ane-re receipts directory, 17 July 2026; LFM3 run directory, 30 October 2026. Referenced artifacts are not public downloads.