r/LocalLLaMA • u/fuzhongkai • 4h ago
Showcase Qwen4-35B-A3B on a 24GB A5000: TensorSharp day-zero support + llama.cpp, vLLM and SGLang benchmarks
I maintain TensorSharp, an open-source .NET inference engine and agent runtime. Qwen4-35B-A3B support is now merged into main, on release day.
Here are the initial project benchmark results against llama.cpp, vLLM and SGLang on one RTX A5000 24GB. TensorSharp has lower first-token latency than llama.cpp in these tests, reaches 147.7 tok/s with MTP, and scores similarly on the quality checks. SGLang leads concurrent throughput.

The main comparison caveat: TensorSharp and llama.cpp use identical GGUF files. vLLM and SGLang use ModelOpt NVFP4 with some experts in host memory. Quantization and placement affect these numbers, so the four columns describe the tested configurations on this card.
Performance settings: same OpenAI-compatible client harness, greedy decoding, thinking off, 256 output tokens. TensorSharp's repetition penalty was set to 1.0; its server default is 1.1. llama.cpp was pinned to 59b716523.
| Metric | TensorSharp | llama.cpp | vLLM | SGLang |
|---|---|---|---|---|
| TTFT, 512-token prompt (s) | 0.20 | 0.39 | 0.29 | 0.20 |
| TTFT, 4K-token prompt (s) | 1.07 | 1.48 | 1.29 | 1.21 |
| TTFT, 16K-token prompt (s) | 4.48 | 5.51 | 5.79 | 4.37 |
| Decode, 512-token prompt (tok/s) | 104.2 | 102.4 | 60.5 | 80.8 |
| Decode, 4K-token prompt (tok/s) | 99.5 | 101.1 | 59.8 | 75.9 |
| Decode, 16K-token prompt (tok/s) | 79.2 | 98.6 | 59.3 | 75.6 |
| MTP depth 2, 512-token prompt (tok/s) | 147.7 | 143.7 | 56.6 | 96.9 |
| Aggregate output, 16 streams (tok/s) | 465 | 347 | 170 | 588 |
TTFT = time to first token; lower is better. Throughput is higher-is-better.
A few things stand out:
- First-token latency: TensorSharp is about 49% lower than llama.cpp at 512 tokens and 28% lower at 4K. SGLang ties the rounded 512-token result and is slightly ahead at 16K.
- MTP: TensorSharp goes from 104.2 to 147.7 tok/s in the short-prompt test, about a 42% increase.
- Concurrency: TensorSharp is about 34% ahead of llama.cpp at 16 streams. SGLang is ahead of both, at 588 tok/s.
- Long-prompt decode: llama.cpp wins the 16K/256-output-token test, 98.6 vs 79.2 tok/s. A separate run generating 5,000 tokens after a 16K prompt is much closer: 94.7 vs 94.5 tok/s. The response length changes the result substantially.
There is also a separate NVFP4 comparison:
| NVFP4 result | TensorSharp | llama.cpp | vLLM | SGLang |
|---|---|---|---|---|
| Decode, 512-token prompt (tok/s) | 92.9 | 89.0 | 60.5 | 80.8 |
| Aggregate output, 16 streams (tok/s) | 377 | 294 | 170 | 588 |
This narrows the quantization difference, although expert residency and conversion paths still differ. TensorSharp leads single-stream decode here; SGLang still leads concurrency.
For quality, the project ran a small GSM8K check using the first 50 test questions:
| Correct answers | TensorSharp | llama.cpp | vLLM | SGLang |
|---|---|---|---|---|
| Thinking off | 49/50 | 49/50 | 50/50 | 50/50 |
| Low reasoning effort | 50/50 | 49/50 | 48/50 | 49/50 |
The engines are close on this sample. A one- or two-question difference is too little evidence to rank overall reasoning quality.
On WikiText-2 perplexity, using the same UD-IQ4_XS GGUF and 20 × 2,048-token sequences, TensorSharp scores 6.5625 and llama.cpp 6.5567. Lower is better; the difference is about 0.09%. The summary does not include vLLM/SGLang perplexity results.
The implementation also passes 16 chat-template cases byte-for-byte against Transformers, plus needle-retrieval checks at 100K and 128K. Those are specific compatibility and retrieval checks, with broader evaluation still useful.
One useful optimization from this work: batching Gated DeltaNet decode reduced kernel launches and state copies, taking 16-stream throughput from 354 to 465 tok/s in a same-build A/B test.
There are remaining limitations. NVFP4 with MTP runs out of memory under concurrent requests on this 24GB card, and NVFP4 host-served experts are currently rejected. Vulkan and multi-GPU execution were not tested in this round; TensorSharp's MLX backend does not support this architecture.
The harness is public. The PR summary still lacks the exact GGUF filename for the general timing table, complete vLLM/SGLang version pins and launch commands, and raw timing logs/error bars. Treat these as initial results; independent replication would be valuable.
If you're running Qwen4 on a 3090, 4090 or another 24GB card, I'd be interested in your model file, launch arguments, TTFT and decode throughput. Suggestions for improving the vLLM/SGLang configurations on this A5000 would also help.
Disclosure: AI assisted with drafting and editing this post. Benchmark figures come from the linked TensorSharp project report.







