Hybrid Edge-Cloud Inference › Why hybrid at all
Language AI HandbookAll chapters An edge-only deployment must fit the model in device memory and stay within power and latency budgets. A cloud-only deployment needs connectivity to its inference service and sends whatever input that service requires. Running both adds orchestration work. The extra work can pay off when one path handles common requests well and the other handles a distinct set of harder requests.
Consider a concrete product: a mobile writing assistant on a smartphone.
- Most keystrokes trigger tiny suggestions (next word, grammar fix). These must appear in a few tens of milliseconds, must never leak the draft to a server, and must work on a plane. A small on-device model handles them.
- Occasionally the user asks "rewrite this paragraph to be more formal." That is longer, harder, and the user may accept a one-second delay. A cloud model handles it far better.
- When the device is offline or on a metered connection, the app must degrade gracefully to the edge model rather than fail.
That mix of cheap-frequent-easy and rare-expensive-hard is the classic case for routing. Partitioning and fallback enter when the boundary is fuzzier: when even a hard request should start on device for privacy or responsiveness, or when the edge should stay in the loop to keep the user moving while the cloud composes a better answer.
The writing assistant has many short suggestions and fewer full rewrites. Measure this mix on your workload before estimating the benefit of a router. Three forces shape the design.
- Latency. A remote request adds transfer and waiting time. Local inference still uses device compute. Compare both paths on the devices, links and request lengths you serve.
- Cost. In the worked example, each successful cloud request has a fixed fee. A different provider may bill for tokens, compute, network transfer or capacity. Local execution consumes device energy. Track those units separately.
- Privacy and availability. Local inference can keep prompts on the device when the application also excludes them from logs and telemetry. A cloud path needs connectivity and transfer approval for each workload. For a local-only request, use the approved local path or decline the request.
These three forces do not always point in the same direction. Privacy pushes toward the edge; quality pushes toward the cloud; latency can push either way depending on the network and the model sizes. A hybrid system is a policy for resolving these conflicts consistently, and the rest of this chapter builds that policy piece by piece.
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!