01 logo

Qwen4-35B-A3B Runs on an RTX 5090 at 512 Tokens per Second. Here's How.

Alibaba's latest open-weight model combines 35 billion parameters, a one-million-token context window and an unusual memory architecture. SGLang's deployment techniques make it possible to run on consumer hardware, challenging assumptions about the cost of local AI.

By JinPublished about 11 hours ago • 4 min read

Running a 35-billion-parameter AI model on a consumer graphics card sounds expensive. Generating more than 500 tokens per second on an RTX 5090 sounds even more surprising.

Qwen4-35B-A3B, released under the Apache 2.0 licence, demonstrates how much inference engineering has changed. With SGLang, the model can run across several NVIDIA platforms, including consumer and professional GPUs.

Its reported single-concurrency decoding results are impressive:

HardwareDecode speedRTX 5090 32GB512.1 tokens/sRTX PRO 6000 96GB435.7 tokens/sDGX Spark 128GB104.1 tokens/s

These figures use NVFP4 quantisation and DFlash2 speculative decoding. They represent specific benchmark conditions, not guaranteed performance in everyday conversations.

The more interesting development is how the model manages its memory requirements.

A 35B model with an unusual architecture

Qwen4-35B-A3B is a Mixture-of-Experts model containing approximately 35 billion backbone parameters, with around 3 billion activated per token.

It also includes a separate 20.5-billion-parameter Per-Layer N-gram Embedding (PLE) table and a multi-token prediction component.

Its main architectural features include:

  • Gated DeltaNet (GDN) linear attention.

  • Qwen Sparse Attention (QSA).

  • Four-stream gated residual connections.

  • N-gram embeddings.

  • Native one-million-token context support.

The design builds on the hybrid architecture introduced with Qwen3.8-Flash-Next.

GDN uses recurrent state updates to reduce the memory cost associated with conventional attention. QSA handles selected portions of the longer context through sparse attention.

The model therefore avoids applying full attention to every historical token across all layers.

However, supporting one million tokens does not mean every consumer GPU can process that context at full speed. The standard RTX 5090 deployment recipe, for example, sets a 32,768-token runtime limit.

The 20B embedding table is the deployment challenge

The most unusual part of Qwen4 is its PLE table.

Although it contains more than 20 billion parameters, it mainly performs sparse lookups rather than conventional dense computation on every token.

This creates an opportunity to place the table in system RAM while keeping the model's routed experts in GPU memory.

In the NVFP4 configuration, the complete weight footprint is approximately 44 GiB, including the PLE table, which occupies around 19 GiB.

SGLang provides different memory configurations for different hardware:

RTX 5090: All routed experts remain in 32GB VRAM, while the PLE table is offloaded to system RAM. Approximately 25GB of host memory should be reserved for the table and runtime overhead.

RTX PRO 6000: Its 96GB VRAM allows the experts and PLE table to remain on the GPU.

DGX Spark: Its 128GB unified-memory architecture accommodates the model without requiring separate GPU and CPU memory pools.

The important engineering decision is separating components according to how they access memory.

Where the 512 tokens-per-second figure comes from

The RTX 5090 demonstration uses speculative decoding through DFlash2.

Instead of generating each token sequentially, a smaller draft model proposes several tokens. The main model verifies those proposals together, accepting multiple tokens when they are correct.

The headline benchmark used:

  • 8K input tokens.

  • 1K output tokens.

  • Single concurrency.

  • Zero prefix-cache hits.

  • Simulated acceptance length of 4.5 tokens.

  • NVFP4 model weights.

The simulated acceptance length is important. It controls how many proposed tokens are accepted during verification, allowing engineers to test performance under a specified condition.

DFlash2's model-card evaluations reported average acceptance lengths between approximately 4.35 and 4.66 across six datasets. Ordinary conversational workloads can achieve lower acceptance rates, so the headline speed should not be assumed for every application.

A separate SGLang benchmark provides a more practical reference. With 8K input and 1K output, the RTX 5090 achieved approximately 248.7 tokens per second end-to-end using NEXTN MTP, with a time to first token of around 1.4 seconds.

These results measure different configurations and should not be compared directly.

Can it run on a 16GB GPU?

SGLang also provides an experimental Paged Experts configuration.

The system keeps only 30 of the model's 256 experts per layer in GPU memory. Other experts remain in system RAM and are transferred when required.

The recommended configuration uses 16GB VRAM and 64GB system RAM.

An experiment reported 101.6 tokens per second, with GPU memory peaking at 11.86 GiB. However, this result was obtained on an RTX PRO 6000 with its resident experts restricted to 30 per layer, not a physically installed 16GB consumer GPU.

Physical 16GB validation remains an important next step.

The software ecosystem makes the difference

SGLang provides a dedicated Qwen4 Docker image and deployment instructions for NVIDIA H200, B200, B300 and GB300 systems, AMD MI350X and MI355X accelerators, DGX Spark and several local GPUs.

The ecosystem also includes support work for Intel, Ascend and Moore Threads hardware. Training-side infrastructure has been extended through Miles for reinforcement-learning workloads.

For local AI developers, this matters as much as downloading the model itself. Attention kernels, expert loading, speculative decoding and memory placement determine whether a large model can actually run efficiently.

What Qwen4 changes for local AI

Qwen4-35B-A3B is interesting because it challenges the assumption that a model of this size automatically requires an expensive multi-GPU server.

It still needs substantial memory. Its fastest results depend on carefully configured speculative decoding, and its performance varies with the workload.

But the deployment options are significant. The RTX 5090 can offload embeddings to system RAM, the RTX PRO 6000 can keep everything resident, and DGX Spark can exploit unified memory. Experimental expert paging may eventually extend deployment to smaller GPUs.

The next test is everyday performance: longer conversations, real reasoning workloads, different context lengths and multiple simultaneous users.

For developers building local inference systems, the achievement is not simply a model generating 512 tokens per second. It is the way model architecture and inference software work together to make previously expensive deployments accessible on more affordable hardware.

tech newsfact or fictionthought leadersapps

About the Creator

Jin

Writer of reamstories

https://reamstories.com/jin

Enjoyed the story? Support the Creator.

Subscribe for free to receive all their stories in your feed. You could also become a paid subscriber or give them a one-off tip, letting them know you appreciate their work.

Subscribe For Free

Reader insights

Share your insights about this piece.

How does it work?

Add your insights

Comments

There are no comments for this story

Be the first to respond and start the conversation.

Sign in to comment
    Written by Jin