Context The examples come from the four-phone Inkling 2 Mini cluster and the Qwen4 study; the research page has both testbeds. Distributed AI research.
A layer-placement diagram usually shows a clean pipeline: layers 0–9 on one device, 10–19 on the next, and so on. The diagram is necessary and incomplete. It does not show which device owns the key-value (KV) cache, the recurrent state, the router, the sampler, or the attention mask. Those ownership choices decide how much state crosses the network for every token.
On a cluster of phones, the network is not a detail at the edge of the diagram. It is part of the critical path. A placement that looks balanced by layer count can be badly unbalanced by state transfer. The four phones in these examples are named Ajax, Achilles, Aeneas, and Athena; the names identify devices, not models. They communicate over remote procedure calls (RPC).
The state that follows the layer
In a conventional transformer, the KV cache lives with the layer that produced it. In a hybrid model, there may also be recurrent convolution or delta state. If a layer is moved, its state moves with it. If a consumer on another device needs a normalized embedding or a depth-mixer output, that tensor crosses the wire too.
The Inkling 2 Mini depth-state trace made this concrete. A prior sampling trace contained 17,664 reads of 9,216 bytes, each followed by a 9,521-byte set. The usual sequence of copy runs was 20, 122, 2, 40, and 8 per generated token. The 122-pair run accounted for 64% of small reads.
A candidate created one view when each block state entered the residual list, instead of copying the same state repeatedly for multiple depth mixers. Concatenation and mix arithmetic were unchanged. In a matched full-model comparison, the candidate removed 182 GET/SET pairs per token and transferred 78.43 MB less across each observed decode window.
| Per token or per 23-interval window | Athena sampling control | Shared depth views |
|---|---|---|
| 9 KiB reads per token | 192 | 10 |
| Mean GET requests per token | 203 | 21 |
| Mean SET requests per token | 230 | 48 |
| GET payload per window | 45.36 MB | 6.78 MB |
| SET payload plus headers per window | 47.40 MB | 7.55 MB |
| Decode rate, two prompts | 1.43–1.49 tok/s | 3.02–3.22 tok/s |
The token interval fell from roughly 674 ms to 304 ms in the matched control/candidate pair. That is a placement-and-state result, not a faster matrix kernel. The largest remaining 36 KiB read still blocked for an average of 136–147 ms per decode interval, overlapping with 127–138 ms of Achilles compute. The handoff was now the thing to study.
A wait is not always a transport problem
The handoff trace joined all 23 decode intervals of a real request by scheduler evaluation, graph split, RPC ordinal, and tensor identity. The scheduler numbers its graph splits; split 4 is the repeated Achilles core in this trace. Ajax's 36 KiB read waited 128.78 ms at the median. But split 4 on Achilles ran for 123.14 ms, and 123.01 ms of that overlapped the read. The RPC call was waiting for the producer, not for the wire.
Split 6 started 0.63 ms after the read and produced the tensor. The tensor was ready 3.85 ms later on Ajax, installed on Aeneas after 8.87 ms, and the consumer split 7 started 37.60 ms after readiness. The observed token interval was 305.03 ms. The worker-local data read took about 0.01 ms.
This is the distinction that matters for placement: a coordinator blocked on a read can look like an RPC bottleneck. The trace showed the read was issued while the repeated Achilles core was still running. Optimizing the transport without shortening the producer would have moved a small number. The larger opportunity was the dependency.
Expert placement adds a second graph
Mixture-of-experts models add a routing decision and a set of expert matrices. The router may live on one device, the experts on several, and the reduction on another. The placement question is not only “which layers fit where,” but “which device can reach the routed expert's weights without a remote read on the critical path.”
The Qwen4-35B-A3B trial used a historical 10/10/10/10 layout with Aeneas leading. Aeneas executed layers 0–9 and gathered the n-gram table locally; Achilles ran 10–19, Ajax 20–29, and Athena 30–39 plus the output projection. Athena returned 248,320 32-bit floating-point (FP32) logits to the Aeneas sampler. In a warm traced token, the coordinator RPC wait was 299.3 ms, with 201.1 ms overlapping peer execution and 95.8 ms outside it. The whole token interval was 367.7 ms.
The overlap is the point. Adding the RPC wait to the peer execution would double-count time. Subtracting it entirely would hide the 95.8 ms that was not covered by measured peer work. A placement decision needs both numbers.
Practical rules
- Place state with its producer. Moving a layer without moving its KV or recurrent state creates a permanent tax on every token.
- Count state, not just weights. A layer that fits in memory may still be a bad placement if its output crosses the cluster twice.
- Trace the dependency before the transport. A blocking read may be waiting on a worker graph. Fix the producer if that is the critical path.
- Keep the sampler close to the logits. Returning a full vocabulary across the wire can cost more than the sampling itself.
- Report overlap. Coordinator wait that overlaps peer execution is not the same as exposed wait.
The local studies do not produce a universal placement recipe. They do produce a reliable first move: draw the state diagram next to the layer diagram. The device that owns the state, and the device that needs it next, will explain more of the token interval than a balanced layer count.