r/LocalAIStack
•
u/Serious_Scarcity7818
•
24d ago
•
1
I wrote a Rust inference engine for Qwen models on a 12 GB GPU, decode is ~1.7x llama.cpp on my RTX3060
I've been working on this for a while: RustingStrata. It runs Qwen GGUF models (Qwen3.5/3.6 from 2B up to 35B-A3B, Qwen3 4B and 30B-A3B, Qwen3-Next 80B). It's pure Rust, no ggml. The CUDA kernels get compiled at startup with NVRTC, and the same kernels also run on Vulkan.
The main trick is for MoE models that don't fit in VRAM. Experts that don't fit run on the CPU at the same time as the GPU work, and the engine keeps moving the often-used experts onto the GPU while it runs.
My setup is a 3060 12 GB, a 7600X and 32 GB RAM. Qwen3.6-35B-A3B Q2_K_XL is 11.7 GiB, so it doesn't fit. On it I get about 118 tok/s decode on a short prompt and 113 after a 4K prompt. llama.cpp, tuned as well as I could (-ncmoe 12, -ub 2048, flash attention), gets 68 and 66. Prefill is basically a tie: 2216 tok/s vs about 2236 for llama.cpp at 4K, so I'm not claiming anything there. At 32K it's 1800 prefill and 92 decode.
With MTP drafts on, decode goes up to 160 tok/s, but that's on an easy prompt. On normal text expect around +16%.
Qwen3-Next-80B IQ1_S was the most fun one: most experts sit on the CPU, and it still decodes at about 92 tok/s. llama.cpp's best -ncmoe gives me around 44.
Output matches llama.cpp greedy on 98-99% of tokens. llama.cpp agrees with itself only 98.3% between its batch and token-by-token modes, so the misses are near-ties.
It also has chat, an OpenAI-compatible server with tool calling, and a calibrate command that tunes itself for your machine.
I've only tested it on my own machine. If you have a different card, especially AMD on Vulkan, I'd love to see strata bench output. Vulkan needs shaderFloat64 and subgroup size 32, so Intel Arc and older AMD won't work. On Windows you need the VS C++ Build Tools.
[RustingStrata](https://github.com/RustingStudio/RustingStrata)
3
u/Ori_553 24d ago
I like that it's pure rust with presumably fewer dependencies than other inference engines.
How does it compare to strata itself?
3
u/backafterdeleting 22d ago
now all we need is for qwen to actually release some smaller modern models with MoE. As a 3060 user I'm definetely going to try this though
2
u/Possible_Ingenuity69 18d ago
Golang may be good too
1
u/ea_man 23d ago
Can we ask how much did it take?
I may like to do the same yet for AMD / ROCm.
Also if you didn't use the very 27B to do that what did you use? DeepSeek or a closed source SOTA?
1
u/RDA_Gg2 21d ago
Yo, i'm just asking, but would it work on my rx 580 8gb and my 16gb of ram?
1
u/mesolimbic-bliss 20d ago
how about a version for 2 x 3060's?
1
u/Life-Screen-9923 17d ago
There are no Prebuilt binaries for Linux (x86_64, glibc 2.35+) and Windows (x86_64)
2
u/RelaxedFlame311 21d ago
Noticed this, I have an RX 7900 XTX + 7900 XT setup on Ubuntu, and Opus 5.5 vibe coded an RDNA3 inference engine for Qwen3.8-Flash-Next. The decode path is HIP kernels: one persistent kernel launch per token, with tensor parallelism across both cards over PCIe p2p. It doesn't use llama.cpp or PyTorch for any of the model math. With DFlash speculative decoding I'm getting about 123-203 tok/s vs llama.cpp + DFlash's 65-92. What a time to be alive.
1
u/Joseflong1 8d ago
Check this out, I have a merge for RTX support.
https://github.com/Avarok-Cybersecurity/atlas