﻿# Hedged inference: count the work done by losing attempts

Measure the resource amplification of hedged inference at matched accepted workload, including overlapping attempts and delayed cancellation cleanup.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-econ-hedging-losing-attempt-work/
Language: en

## The response that disappears from the report

A document assistant sends the same generation to another replica when the original is slow. The user sees an earlier answer, while the capacity report records only that answer's tokens. This hides the losing replica's prefill, partial decode and cleanup. The economic question is whether the faster accepted workload merits the additional resource occupation. This is a measurement protocol, not a claim that hedging improves any particular model or that a provider charges for every attempt.

## Establish which race actually runs

The [gRPC hedging guide](https://grpc.io/docs/guides/request-hedging/) describes delayed copies with a shared call deadline and cancellation of outstanding requests after success. [Envoy's routing guide](https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/http_routing.html) describes timeout-triggered hedging that leaves the original attempt in flight while awaiting an acceptable response. These are specific mechanisms, not interchangeable settings. Record the installed policy, route, response-selection rule and whether streaming commitment prevents the proposed race. Never assume that the first transport response is a complete, acceptable model answer.

## Keep logical work and physical attempts

Assign a logical operation identity before duplication and a separate identity to every attempt. Preserve parentage, selected winner, dispatch time, execution admission, generated work and terminal state. Classify an attempt that never entered the engine separately from one that generated an unused answer. An unobserved remote outcome remains unknown. Include work after winner selection until cancellation or natural completion actually releases resources; a client cancellation event alone does not establish that boundary.

## Run a paired capacity experiment

First define answer acceptance and the latency requirement on a fixed, versioned input collection. Replay its arrival schedule without hedging, then with the proposed delay and attempt cap, alternating run order to reduce drift. Keep model, length limits, replica count and cache preparation matched. Repeat under a bounded shared bottleneck, because racing idle replicas cannot reveal what duplicate requests do to neighboring traffic. Stop at the declared safety limit rather than increasing load until the service becomes unavailable.

## Report benefit beside amplification

Count timely accepted logical operations across the entire submitted population, including failures. Beside this denominator report attempt admissions, losing-attempt input and output work, occupied intervals and pool-level resource consumption. Overlapping requests make summed wall times different from elapsed pool time; present both with explicit units. Attribute shared GPU energy only where measurement supports that allocation. Otherwise keep energy at pool scope and disclose the uncertainty instead of manufacturing an exact per-request figure from utilization.

## Test the condition that defeats the policy

A common slow dependency can delay every raced replica together. Duplicate prefill may then deepen the same queue while providing little latency benefit. Include this failure case, as well as slow cancellation and an error response that changes winner selection. The gRPC documentation provides throttling and pushback mechanisms, but their presence is not evidence that an inference deployment has enabled them. Preserve effective configuration and observed suppression of extra attempts in the test record.

## Choose a workload-specific boundary

Accept the policy only for the demonstrated workload and resource envelope, with a rollback condition based on amplification and useful completions. A good result on short prompts does not establish the same tradeoff for long documents or expensive image preprocessing. The existing [goodput guide](/journal/llm-goodput-vs-tokens-per-second/) explains the useful completion denominator; the [idempotency ledger](/journal/provider-post-retry-idempotency-ledger/) explains operation identity. Here the additional deliverable is a resource account for every losing branch of the race.
