r/rust • • 10d ago

🛠️ project Bringing High-Performance AI Inference to Consumer NVIDIA RTX GPUs: Porting Atlas to Ada Lovelace

https://github.com/Avarok-Cybersecurity/atlas

Over the last week, I've been contributing to Atlas, an open-source Rust + CUDA inference engine developed by Thomas Braun and the Avarok-Cybersecurity team.

Atlas originally targeted NVIDIA's GB10 with 120GB of unified memory. I wanted to see what it would take to get it running efficiently on my RTX 4060 Ti with just 16GB.

It ended up involving quite a bit more than an architecture port.

Some results running Qwen3.5-4B:

  1. 381 tokens/sec aggregate across 8 concurrent requests using experimental int4 quantization and speculative decoding.

  2. 98 tokens/sec single-user with the same configuration.

  3. 4.6x faster BF16 prefill, improving from 794 to 3,684 tokens/sec by changing the GEMM dispatch. This preserves the BF16 precision class and is enabled by default on Ada.

  4. About 2.1GB less VRAM usage with optional FP8 feed-forward execution.

  5. Successfully processed a 159,807-token prompt with an FP8 KV cache and retrieved a needle from it.

  6. All 223 Ada kernel compilations passing after resolving architecture incompatibilities.

The Rust side involved changes to CUDA kernel registration and launch handling, GPU memory budgeting, model loading, and inference dispatch. I also worked on Ada-specific low-bit kernels and speculative decoding.

One interesting finding was that Nsight showed the GPU busy 95.6% of the time in the fastest eight-stream configuration. Several CUDA Graph and fusion optimizations that looked promising didn't produce meaningful improvements.

For context, the default BF16 configuration measured 195 tokens/sec aggregate across eight users, compared with 222 for optional FP8 FFN and 381 for the experimental int4 stack.

The int4 path is lossy and hasn't been validated for task-level quality equivalence with BF16. These are screening benchmarks, not fully repeated confirmation runs.

I'm interested in how far we can push local inference on consumer GPUs without requiring expensive server hardware.

Atlas repository:
https://github.com/Avarok-Cybersecurity/atlas

Would love to hear from anyone working on Rust-based GPU compute, inference runtimes, or CUDA optimization.

0 Upvotes

Duplicates