RunEconomy

Study 3 · Hosted vs self-hosted order lookups

Keep the hosted configuration for this workload. Moving the same two-call order-support agent from hosted DeepSeek to self-hosted Qwen reduced latency on shared successes, missed the preregistered task-quality gate and increased cost per successful lookup.

Held-out result Hosted DeepSeek Self-hosted Qwen
Successful workflows / attempts 80 / 80 75 / 80
Mean latency on each arm's successes 3.14 s 1.38 s
Attributed spend across all 80 attempts $0.020065 $0.056135
Cost per 1,000 successful workflows $0.251 $0.748
Projection for 10,000 successes per month $2.51 $7.48

The self-hosted arm had four model-output failures and one timeout. The frozen quality test used the 79 evaluable pairs. Its one-sided 95% lower bound was −11.21 percentage points against a −5-point margin. The resulting verdict was regression. Across the 75 pairs where both arms succeeded, self-hosting was 1.75 seconds faster on average (95% interval 1.51 to 2.00 seconds faster).

Workload and provider window

Each synthetic task asked for one field of an order. Both arms used the same local lookup, evaluator and output allowance. Calibration used 12 separate tasks. The initial short output allowance produced 0/12 hosted successes and 12/12 self-hosted successes. With 512 tokens per call, calibration produced 12/12 and 11/12. The team froze that design before the 80 held-out pairs. Traces span November 30, 2026, from 13:59:20 to 14:06:41 UTC.

The hosted service identified the model as deepseek-ai/DeepSeek-V4.1-Flash-1017. The self-hosted service ran Qwen/Qwen2.5-1.5B-Instruct, revision 989aa7980e4cf806f80c7fef2b1adb7bc71aa306, on vLLM 0.34.0 and one Modal A10G. Model and serving stack changed together. These measurements describe one sequential workload and provider window.

Pricing and projection

Hosted rates per million tokens were $0.25 for ordinary input, $0.005 for cached input and $1 for output including reasoning. Self-hosted costs use the recorded active reservation time at $1.10 per GPU-hour, including failed attempts. The projection assumes full utilization of that time and excludes idle capacity, CPU and memory. Under those assumptions self-hosting costs about $4.98 more per 10,000 successes. The projection uses unrounded measured unit costs.

The aggregate record contains the freeze digest, provider-window timestamps, exact rates, spend and denominators. The example and preparation scripts reproduce the task split and analysis. Share the SVG card or PNG card.