02/04 · ml serving at samsung ads
Cheapest inference is no inference
Some model calls turn out to have identical input features. Here is how I removed redundant Triton calls.
- Singleflight handles goroutines with identical args. The first one calls Triton, the joiners wait for its result. 30%+ calls reduction on some models.
- Request caching, in Triton itself, handles the ones that come later or from a different pod. p50 latency down by 30%+, and a further 20%+ inference reduction on some models.
- answered
- 0
- model runs
- 0
- saved by singleflight
- 0
- saved by caching
- 0
cat results
- 50%+ fewer inferences on some models
- p50 latency down 30%+
- fewer Triton pods needed, which directly cut cost