My process to get 6-11X speedup running Qwen3.6 on my RTX 4090, full repo. githu...

@best

My process to get 6-11X speedup running Qwen3.6 on my RTX 4090, full repo. github.com · 17 points · 8 comments · HN thread

TL;DR Lightreason is a GitHub project by AI4Science (me-farza) that speeds up Qwen inference on a single RTX 4090 using the original BF16 weights, with no quantization. The author reports 139.6 tok/s on Qwen2.5-3B-Instruct (up from 63.0, about 2.2x) and 51.08 tok/s on the capped Python prompt for Qwen3.6-35B-A3B (up from 7.93, about 6.4x), with outputs checked against the baseline. The thread is short and mostly asks why a 35B model was chosen and whether the methods would work on newer, smaller models.

  • Targets the original BF16 Qwen2.5-3B-Instruct and the text model of Qwen3.6-35B-A3B on one RTX 4090, with no quantization.
  • On 3B, CUDA graphs and a compact KV cache matched all 30 Hugging Face timing runs, and matched 9/9 new Python, JavaScript and SQL response pairs.
  • On 35B, the packed configuration reports 7.93 to 51.08 tok/s on a capped Python prompt; output first diverges from the baseline at token 116.
  • The 35B runner keeps most expert weights in system RAM and moves only the experts the model uses, while the 3B path keeps everything on the GPU.
  • Builds on existing work (NVIDIA CUDA Graphs, AMD PARD2, Inco AI DFlash2, FlashML FreeToken) and documents which experiments slowed things down.
  • Repository ships no model weights; users download pinned Qwen checkpoints separately, and the optional PARD2 numbers need a separately supplied lab adapter.

Discussion The thread is small and mostly about motivation and scope. Commenters ask why the author picked a 35B model when newer or smaller models run well on a 4090, and whether the engine could handle a quantized version of a newer Qwen model. One commenter notes that benchmarking only against Hugging Face Transformers leaves out llama.cpp and similar engines that people actually use. The author replies that the project was a personal exercise in systematic speedup, with Hugging Face as a fixed baseline, and that the process was documented. The mood is friendly and curious, with no hostility.

  • Useful as a learning project on systematic speedups (some): The author says the goal was to learn and document a speedup process rather than to produce a final product. Commenters accept this as a good enough reason for the choice of model.
  • Benchmarks should include llama.cpp and similar engines (some): One commenter argues that comparing only to Hugging Face makes the 11x figure look inflated, since few people run that baseline. The author replies that Hugging Face was a deliberate fixed baseline for measuring each change.
  • A smaller newer model would be more practical (a few): Commenters suggest Qwen3-Next-style models run well on a 4090 already, so the 35B target looks less relevant. The reply is that a 4-bit quantized version of the larger model is close enough for most uses.
  • Unclear whether the 35B run uses quantization (a few): One commenter notes the work starts from unquantized BF16 weights and asks whether they are later quantized, which matters for comparing to 4-bit setups.

#LLMInference #CUDA #Qwen #RTX4090 #Performance #OpenSource