Hybrid Edge-Cloud Inference › The three control decisions, kept separate
Language AI HandbookAll chapters The most common design error is to blur routing, partitioning, and fallback into one tangled "if the model is unsure, call the cloud" rule. That makes the system hard to reason about, test, or measure. When the three mechanisms are fused, a bug in any one of them looks like a quality problem, and you cannot tell which component to fix. Keep them as three distinct mechanisms with clear interfaces, each with its own inputs, outputs, and evaluation.
Choosing a single execution site for an entire request before generation begins. The request is fully served by either the edge model or the cloud model. Routing does not split a request across both.
Dividing one inference pass across edge and cloud. Examples: early transformer layers on device and later layers remotely; edge drafts tokens and cloud verifies them; edge handles retrieval or prefill while cloud handles decode. The output is produced by a joint computation, not one site alone.
The predetermined behavior when a primary path is unavailable or fails: network down, cloud timeout or error, device thermal throttling, quota exhausted. Fallback is about resilience, not optimization; it must be deterministic and tested.
Why separate them? Because they have different failure modes, different measurement, and different privacy implications.
| Mechanism | Decision granularity | Primary goal | Privacy exposure | When it fails |
|---|---|---|---|---|
| Routing | whole request | cost/quality tradeoff | sends the approved model input | misclassification |
| Partitioning | per layer / per token | latency + quality | sends activations or draft | coordination + network fragility |
| Fallback | on error condition | availability | depends on the fallback target | untested path returns wrong output |
When the router chooses the cloud, the application sends the approved input. A layer split instead sends the hidden activation at the split boundary. That can still disclose information about the original text. If a stream falls back to a different model after output has started, specify whether it restarts or continues and how the already displayed prefix is handled.
Routing decisions can be logged and tested per request under the applicable data policy. Partitioning adds distributed state and timing, so test prefix and cache consistency. Test fallback with deliberately injected faults as well as recorded failures.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!