Hybrid Edge-Cloud Inference › Worked example: a routing decision
Language AI HandbookAll chapters Let us make the routing rule concrete with numbers, then build intuition without code.
- Edge quality (mean reward score on this task), cloud .
- Edge latency ms; cloud latency ms on this network.
- Cloud monetary cost per request (raw serving + egress, aggregated) is 0.002 dollars. The edge path carries no marginal monetary charge.
Routing every request to the cloud yields a mean quality of 0.80, and routing every request to the edge yields 0.55. The difference is 0.25 across this workload. With the same cloud price on every request, sending 30% to the cloud pays 30% of the all-cloud monetary cost. How much quality that buys depends on which requests the router sends.
Start with two separate hypothetical workloads. With a uniform 0.25 cloud gain on every request, routing 30% to the cloud adds 0.075 to the edge-only mean of 0.55, giving 0.625. In a second workload, the edge scores 0.30 on the 30% sent to the cloud and 0.66 on the rest, while the cloud scores 0.80 throughout. That workload has an edge-only mean of and a hybrid mean of .
The hybrid closes about 60.5% of this workload's gap between 0.552 and 0.80.
At a fixed cloud fraction, selecting larger gains can raise mean quality relative to selecting smaller gains. If every request has the same gain, changing which requests route leaves mean quality unchanged at that fraction. Transfer eligibility, differing costs and a cloud budget can still favor serving some requests on edge and others in the cloud.
On an approved labeled sample, run both models on the same requests and plot their per-request quality differences. A large spread gives the router an opportunity to target high-gain requests if its features predict that gain. Compare each selection under the applicable costs and transfer requirements.
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!