How to get up to 2.3 faster GLM and DeepSeek inference by switching providers
Mistral is hosting Chinese open-weight models on its own infrastructure and states that it serves them without modifications. But how much can switching inference providers actually improve performance? I used LLM API A
Mistral is hosting Chinese open-weight models on its own infrastructure and states that it serves them without modifications. But how much can switching inference providers actually improve performance?
I used LLM API Adapter, my lightweight, open-source Python library with just one core runtime dependency (requests), to compare GLM 5.3 Flash and DeepSeek V4.1 Flash through their original APIs and Mistral.
Across 200 streaming requests and five workloads, Mistral delivered 1.75β2.27Γ higher median generation throughput on long responses.
Here's what the experiment revealed, where the differences matter, and what remains uncertain.
1. Benchmark methodology
I tested four API routes: GLM 5.3 Flash through Z.ai and Mistral, and DeepSeek V4.1 Flash through DeepSeek and Mistral.
The benchmark covered five workloads:
| Scenario | Input | Output |
|---|---|---|
| A | Short | Short |
| B | Short | Long |
| C | Long | Short |
| D | Long | Long |
| E | Reasoning task | Model-dependent |
Each scenario included 10 requests per route, producing 200 completed requests with no recorded errors. Requests were executed sequentially with varied provider order, using matching prompts, reasoning_level="low", and no application-level output-token limit.
I measured two primary metrics:
Time to first visible text (TTFT) measures the delay between starting a request and receiving its first nonblank text fragment. This includes any hidden reasoning performed before visible output begins.
Generation throughput measures how quickly visible text arrives after the first chunk. I used the same o200k_base tokenizer across all routes to estimate visible-text tokens per second. These are approximate rates, not native provider token counts.
I focused the throughput comparison on scenarios B and D. Short responses are less reliable for measuring sustained generation speed because individual streaming chunks and their delivery timing can strongly affect the result.
2. Generation throughput results
| Model | Input | Direct API | Mistral | Speedup |
|---|---|---|---|---|
| GLM 5.3 Flash | Short | 43.25 tok/s | 98.33 tok/s | 2.27Γ |
| GLM 5.3 Flash | Long | 54.35 tok/s | 95.36 tok/s | 1.75Γ |
| DeepSeek V4.1 Flash | Short | 139.15 tok/s | 245.89 tok/s | 1.77Γ |
| DeepSeek V4.1 Flash | Long | 205.58 tok/s | 361.68 tok/s | 1.76Γ |
Median estimated visible-text throughput across 10 requests per route and scenario. All four comparisons use long outputs.
Mistral delivered higher median throughput in all four comparisons, although the advantage varied. For GLM, the improvement decreased from 2.27Γ to 1.75Γ with the longer-input workload. DeepSeek showed approximately 1.76Γ higher throughput in both scenarios.
Interestingly, DeepSeek generated faster in the long-input scenario than in the short-input scenario on both providers. That doesn't establish any causal relationship with context length: the tasks were different, and generation behavior can vary with the requested output.
How do these results compare with OpenRouter?
OpenRouter's provider metrics for GLM 5.3 Flash and DeepSeek V4.1 Flash showed a similar trend, but with substantial variation over time.
| Model | November 13 | November 16 |
|---|---|---|
| GLM 5.3 Flash | 3.8Γ | 2.6Γ |
| DeepSeek V4.1 Flash | 1.8Γ | 1.25Γ |
These are historical observations I recorded from OpenRouter, not results from my benchmark. The methodologies and workloads differ, so the numbers aren't directly interchangeable.
Both datasets showed a throughput advantage for Mistral during the observed periods. The changing figures illustrate why a single published speed measurement shouldn't be treated as a permanent characteristic of an inference provider.
3. Time to first visible text
Generation throughput isn't the whole picture. For interactive applications, the delay before visible output begins also matters.
Here are the median TTFT measurements:
| Model and scenario | Direct API | Mistral |
|---|---|---|
| GLM β short input, long output | 1.52 s | 0.77 s |
| GLM β long input, long output | 23.22 s | 23.60 s |
| DeepSeek β short input, long output | 15.50 s | 9.70 s |
| DeepSeek β long input, long output | 59.05 s | 31.44 s |
Mistral reduced median TTFT for DeepSeek in both scenarios, while GLM showed almost no difference with a long input.
These measurements include any hidden reasoning before the first visible text, so they shouldn't be interpreted as pure network or infrastructure latency. The same reasoning_level="low" parameter also doesn't guarantee identical internal reasoning behavior across providers.
4. What about output quality?
Mistral states in its documentation that it serves GLM 5.3 Flash and DeepSeek V4.1 Flash without modifications. This suggests that their underlying capabilities should be comparable to the original providers.
However, identical model weights don't guarantee identical outputs. Sampling, reasoning configuration, inference settings, and request handling can all affect the results.
I didn't evaluate output quality in this experiment, so I can't confirm that faster inference preserves exactly the same accuracy or behavior. That would require a separate evaluation with matched tasks and objective quality criteria.
5. Limitations and practical implications
This benchmark measures public API performance, not the hardware or inference engines behind it. I can't determine whether the speed differences come from GPUs, batching strategies, serving optimizations, or a combination of factors.
The throughput figures are estimates derived from visible text using a common tokenizer. They don't include a direct measurement of internal decoding speed, and hidden reasoning may affect the observed results. Performance may also change with provider load, time of day, and infrastructure updates.
For applications that generate long responses, switching inference providers may be a straightforward performance improvement. For short interactive requests, TTFT can matter more. And for agent workflows, output quality, tool compatibility, and reasoning behavior may outweigh raw generation speed.
Conclusion
Across 200 streaming requests, Mistral delivered higher median visible-text generation throughput for GLM 5.3 Flash and DeepSeek V4.1 Flash on every long-output workload tested, with improvements ranging from 1.75Γ to 2.27Γ.
Before replacing a slow LLM with another model, benchmark the same model through a different inference provider.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.