Tinker Inference engineering

by Kondasamy Jayaraman · drawn with Colorfigures by April Zhu

Static batching, cap 4, 4 GB of KV room: 4 of 24 requests on target.4 of 4 seats busy · 1 waiting · KV cache 54% full

Chapter 7 of 7

Serve Larkspur’s Monday

Everything is on the bench: the batching mode, the batch cap and how much memory to keep for the KV cache. The support lead has set two targets for every customer.

This chapter: Which serving settings get the most of Monday’s customers their reply on target?

You will learn

  • How the settings pull against each other on a real burst of traffic
  • How to read a server run request by request
  • Why more than one setting can be equally good
Words you’ll meet (1)
Service target
A limit the team sets for every request: here, the first token within a second, then each token within a set time.

The picture on the left is live. Each step below asks you to do one thing in it; the story continues here as you go.

Step 1 of 2

The support lead’s targets for every customer: the first token within 1.00 s, then each token within 25 ms. The bench starts on Larkspur’s first server: static batching, a cap of 4 and 4 GB of KV room. Change the settings until as many of Monday’s 24 requests as possible are on target.

4 of 24 on target BEST IS 13

Batching
Every request against the targets
RequestFirst tokenPer tokenResult
1 (420 → 60)70 ms15 mson target
2 (900 → 180)1.10 s17 mslate start
3 (260 → 30)904 ms16 mson target
4 (640 → 120)664 ms16 mson target
5 (300 → 220)544 ms17 mson target
6 (1100 → 40)4.23 s16 mslate start
7 (380 → 90)3.99 s16 mslate start
8 (520 → 150)3.87 s17 mslate start
9 (220 → 25)3.59 s16 mslate start
10 (760 → 200)6.18 s17 mslate start
11 (340 → 70)5.98 s17 mslate start
12 (980 → 110)5.90 s17 mslate start
13 (280 → 45)5.58 s17 mslate start
14 (600 → 240)8.94 s17 mslate start
15 (450 → 35)8.78 s16 mslate start
16 (820 → 130)8.54 s16 mslate start
17 (240 → 80)8.38 s16 mslate start
18 (560 → 55)12.5 s17 mslate start
19 (1200 → 160)12.3 s17 mslate start
20 (320 → 20)12.1 s17 mslate start
21 (700 → 190)11.9 s17 mslate start
22 (400 → 65)15.0 s16 mslate start
23 (880 → 100)14.8 s16 mslate start
24 (360 → 140)14.5 s16 mslate start

Times come from a simulated server: counted work at assumed unit costs, not a measurement of any real server or provider.