13/30
Part 4 of 7 · Long promptsLearn
A long prompt in one step stalls every answer in progress
A customer pastes an 8,000-token order history while 64 others are mid-answer. A server that batches by step runs the new prompt's prefill inside one step, and nobody gets a token until that step ends.
# ms for one prompt token
prefill_ms = 2 * params / (989e12 * 0.5) * 1000
print(f"{prefill_ms * 1000:.1f} microseconds a prompt token")
print(f"8,000 tokens in one step: {8000 * prefill_ms:.0f} ms, while 64 users wait")
Prefill costs about 31 microseconds a prompt token here. How long do the 64 users wait for their next token?
Pick one to see what it prints.
Pick an answer above to see the rest