Taking Strands Decider v2 from 62 ms to under 25 ms
How we drove down median latency to make agent decisions faster, step by step

An agent’s next step often hangs on a small decision: did this patch fix the failing test? Which team owns this ticket? How risky is this diff on a scale of 0 to 1? Strands Decider v2 is a small model that answers questions like these and provides a confidence score that agents can take action on.
These small decisions sit on the hot path so tuning it for latency helps reduce the cost of each call. Strands publishes a median of 62 ms per JevBench question on one NVIDIA H100, and we wanted to see how low we could drive that with additional tuning.
The starting point
We started with the stock strands-decider package serving strands-decider-E2B-gemma4-v2-2611 on a g6.xlarge (one NVIDIA L4, about $0.80 an hour). The median JevBench question took 54 ms, but for those 54 ms, the GPU was busy only 55% of the time.
Why was the GPU idle for nearly half of every decision?
Faster but still accurate
We wanted to reduce latency but maintain accuracy, so before changing anything we determined how every build would be judged:
- Speed on JevBench’s 231 public tasks, one request at a time, each run on a freshly started server. The typical task is 159 tokens, the longest 4,000.
- Answers compared task by task against the stock model’s. The stock model gets the same 202 of 231 questions right on every run. A faster build can also score 202 and still answer differently: it might get one question right that the stock model missed, and one wrong that the stock model got right. The score stays the same and hides both changes. So for every build we recorded two numbers: how many questions it got right, and how many of its 231 answers differed from the stock model’s.
What contributes to a decision’s latency?
We profiled one short decision (130 input tokens). The model’s forward pass took 50 ms, 96% of the total. Parsing the request, tokenizing and building the response took about 2 ms, so we left that code alone.
Within the forward pass, the GPU worked for only 27 ms: 19 ms of matrix multiplication and 8 ms of small operations. It sat idle for the other 23 ms.
Where the 50 ms of one forward pass went
- Matrix multiplication
- Small GPU operations
- GPU idle
One 130-token decision on the stock model, measured with the PyTorch profiler.
The GPU sat idle because the CPU sent it about 3,300 tiny operations one at a time, and the GPU waited for each one. For a short decision, that overhead set the latency, not the GPU’s speed.
The profile helped to clarify our plan: first remove that overhead and GPU idle time, then try to make the arithmetic cheaper.
30 ms: compiling the text decoder with torch.compile
The 3,300 small operations were spread across the model’s layers, and rewriting them by hand wasn’t practical. Instead, we enabled torch.compile, which does that work automatically. It reads the model’s code, finds runs of small operations that can be combined, and generates larger GPU operations that do the same math in fewer trips to the GPU.
The median JevBench latency dropped from 54 ms to 30 ms, and accuracy was not impacted. The score held at 202 of 231 and every one of the 231 answers matched the stock model’s. Compiling alone cut nearly half the stock latency, and we hadn’t even touched the arithmetic yet.
23 ms: storing the weights in FP8
With the overhead gone, what was left was the 19 ms of matrix multiplies. The model ships with 16-bit weights. We stored the decoder’s 205 linear layers in FP8, an 8-bit floating-point format, using torchao. Half the bits per weight makes each multiply cheaper.
The median JevBench latency dropped from 30 ms to 23 ms, and accuracy stayed close to the stock model’s.
Storing weights in fewer bits usually costs some quality, and here the cost shows up mostly in the confidence score. A well-calibrated model that says it is 90% sure is right about 90% of the time. Calibration error measures how far a model is from that: it rose from 0.060 on the stock model to between 0.066 and 0.075 with FP8, so the stated confidence sits about one percentage point further from reality. The compiled build without FP8 stayed at 0.060.
Calibration error by build (lower is better)
JevBench’s expected calibration error over its 231 public tasks
Whether that matters depends on what the confidence is used for. If an agent is labeling the priority of a production ticket, a slightly off confidence means the occasional ticket lands in the wrong queue and someone moves it. If the score decides whether a payment is blocked as fraud, and only decisions above a tuned threshold go through without review, the same shift changes how many bad transactions pass and how many good customers get stopped. For more low-stakes, latency-sensitive work, the FP8 build may be the better option.
Where we landed
The median decision now takes 23 ms with minimal change to accuracy. That is 63% lower than the 62 ms Strands publishes on an H100 and 57% lower than the stock model’s baseline 54 ms on our L4. For an agent that makes ten decisions over the course of one reply, that is 540 ms of waiting cut to 230 ms.
Median JevBench latency after each step
The first bar is the median Strands publishes for one NVIDIA H100; the others are medians of JevBench’s 231 public tasks on one NVIDIA L4.
JevBench latency and accuracy at each step
| Configuration | Median | p99 | Slowest task | Answers changed, of 231 |
|---|---|---|---|---|
| Stock | 54 ms | 514 ms | 571 ms | |
| Compiled (bf16) | 30 ms | 384 ms | 435 ms | 0 |
| Compiled + FP8 weights | 23 ms | 307 ms | 336 ms | 2 to 7 |
JevBench public set, 231 tasks, one request at a time, on one NVIDIA L4 (g6.xlarge).