How I Got Qwen3.8-27B Running at 105 Tokens per Second on an RTX 5070 Ti

How I Got Qwen3.8-27B Running at 105 Tokens per Second on an RTX 5070 Ti

When I first ran Qwen3.8-27B on my gaming PC, my benchmarks gave me a speed of 44.5 output tokens per second. That’s perfectly usable for a chatbot or coding assistant, if not quite blazing. But I had good reason to think I could do much better, thanks to prior work tuning a RTX 3090 Linux system. But would the learnings of that project cross-over when I’m working with only 66% of the VRAM on a Windows VM?Well, it now runs the 27-billion-parameter model at 105.7 tokens per second, That's about 2.3x once you account for some day-to-day drift (explained below). It runs on one RTX 5070 Ti, inside a Windows virtual machine, with no Linux, no WSL and no containers. Benchmark scores stayed within 1% of a 6-bit reference: on 524 questions for the fastest mode, and on all 1,048 for the MTP mode. Three changes did the work. Two optimizations I thought would work for sure ended up making things worse. The 2nd led me to land on a set-up with different running modes for different use cases. In August, Michał Piszczek wrote here about getting Qwen3.8-27B to 50 tokens per second with a 256K context on a 24 GB RTX PRO 4000 Blackwell SFF under Linux. He was after the model's full context, image input and the best quality that would fit. I went the other way and gave up context and some precision for speed, on Windows. The two cards also sit at different prices. When I checked in mid-November 2026, US listings for his ran from about $2,600 to about $4,000, and a 5070 Ti like mine was about $1,350 to $1,500, nearly double its $749 launch price. My entire PC, including the GPU, came in at less than most listings for his RTX PRO 4000 alone. Best Buy had my Orion 6000 configuration at $2,350 in early November, Amazon and Best Buy have put this machine on sale in recent months for under $2200, and Newegg lists it at about $2,600 to $2,700 as of this writing, so shop around a bit, if this sounds like the right machine for you. For one request at a time, my fastest mode generates a little over twice as fast as Michal’s 50. That mode gives each request 16k tokens of context. My roomiest mode gives each request 48k and runs at 85 tokens per second. His gives a single request all 256K and takes images, which mine doesn't. It isn't a like-for-like benchmark either. My number comes from short test prompts and his from his production workload, his model keeps about 5 bits per weight to my 3.5, and his is a 70-watt half-height card where mine draws about 275 watts at load. If you have reasons to keep your machine on Windows, or you can decide to trade context size for about double the speed, you might be interested in my findings. The Set-up To give a bit more detail, the PC under test here is an off-the-shelf gaming desktop, an Acer Predator Orion 6000 (PO6-605) I bought in October 2026: Core Ultra 7, 32 GB of RAM, an RTX 5070 Ti with 16 GB of VRAM. It runs Windows 11 Home with Hyper-V switched on (which Home doesn't officially offer, but its easy to enable from an Administrator command prompt). To isolate the Qwen workload from other workloads (or, lets be honest: lightweight games that don’t need much GPU), the model runs in a virtual machine that gets most of the GPU capacity and 12 GB of the host’s 32GB of system RAM. Steam, Edge and Gigabyte's Control Center were open and idle on the host for part of the weekend, and that mattered more than I expected. Sitting and doing “nothing”, they hurt my numbers; so its valuable to avoid any activity on the host that isn’t absolutely necessary. The model is Qwen3.8-27B. I'd already tuned it’s config on a Linux server with an RTX 3090, which gave me two things most people starting out don't have: a speed to beat, and a stored set of per-question answers from a 6-bit (Q6_K) reference run. My rule was that no setup could score more than 2% worse than that reference, question by question, on the same four public benchmarks (MMLU-Pro, GSM8K, HumanEval, MBPP) with identical settings. I also wanted the first token in under 30 seconds for nearly every request, and I'd only use official llama.cpp release binaries and a PowerShell script, to maximize reusability of my tooling on other possible future Windows machines. I measured generation speed on 800-token answers, one request at a time, because that's what you feel when you're waiting on a chat window. Why did I bother, when I have the 3090 server already running this model at 153 tokens per second? Partly curiosity: I wanted to see how a modern card that's faster but has less memory stacks up against an older, bigger one. And partly planning ahead; I can easily imagine a point very soon where I have enough separate work for Qwen that running two servers at once would pay off, and this PC would be the second one. The first surprise came before any benchmark. The official Windows build exited silently, with no output, until I installed the Microsoft Visual C++ runtime. How It started; how it’s going…. On the 3090, the winning llama.cpp setup was a standard 4-bit quant (Q4_K_M) plus the model's own multi-token-prediction (MTP) head for speculative decoding. That file is 17.4 GB, more than the whole card. The card reports 16.3 GB, the Windows desktop holds about half a gigabyte of that, and llama.cpp saw 15.0 GB free. So the first decision was easy: take the largest 4-bit-class quant that fits entirely on the GPU, run it with no tricks, and get a clean number. That was IQ4_XS, a 15.5 GB download (about 14.8 GB once loaded; download sites and graphics drivers count gigabytes differently). Every layer on the GPU, 8k context, one request at a time: 44.5 tokens per second, a little better than the 3090 did with the same kind of setup. The final configuration runs at 105.7 with thinking on and 117 with it off. That's 2.38 times the baseline, with an asterisk. I measured the baseline and the final number two days apart, and the one setup I ran on both days came out 5% faster the second time while producing identical output. I haven’t yet got to the root cause, but given all of Windows automated updates and such, its easy to blame it on variance in the background load of the host. Using only same-day comparisons gives 2.26x, so I call it ~2.3x for all prompts together. But it is an average over six prompts: prose and code landed near 2x, step-by-step reasoning and JSON near almost 3x, and thats the sweet spot for me! But this broad range is the reason why everyone needs to maintain their own benchmarks for their own real workloads. I’m not even reporting the (similar) results on my private benchmark prompts, because they are useless to anyone else not working with my context-engineering, data, and goals. The three biggest steps that got me there As detailed later, I ran over 30 experiments to tune this configuration, aided by a coding agent (hosted elsewhere) to keep the queue running overnight. Here are the 3 experiments that had the biggest positive impact. 1. A smaller file, picked for what it leaves free (44.5 to 50.2, +13%) Speculative decoding was the biggest lever on both machines. If you’re not familiar with the technique: a smaller, faster predictor picks the next few tokens, and the big model checks them all in one pass. On the 3090, MTP was good for 1.6x, but here IQ4_XS left no room for it, so I needed something smaller that didn't cost quality. I found it in a research lab's quant: ISTA-DASLab's GSQ-RCO IQ3_S, about 3.5 bits per weight with the precision chosen tensor by tensor, and the MTP head included. At 12.1 GB it freed more than 3 GB. On its own, even without speculation, it was already slightly faster than IQ4_XS. With MTP on (the next step), this file scored 0.6% above the reference on all 1,048 questions. That's noise (the 95% interval runs from -1.1% to +2.5%). The less flattering cut is coding: on 328 coding problems it lost 10 answers and gained 5. That's inside the noise too, but coding leaned the same way in every comparison I ran. If you mostly write code, test on your own code! (You’ll start noticing a pattern here…) 2. Speculative decoding with the model's own MTP head (50.2 to 79.3, +58%) With room to spare, turning MTP on took the same test from 50.2 to 79.3 tokens per second: 1.58x, almost exactly what the 3090 showed; not too surprising by itself. The smaller file was worth 13% by itself. What it left room for was worth 58% more. One setting inside that improvement is worth detailing, because getting it wrong makes a large difference. The drafts are sampled the way the model itself samples at the recommended temperature of 1.0, rather than always proposing the single most likely token. Switching to the always-most-likely default cost 6% (76.1 against 81.0), because fewer drafts were accepted. 3. A diffusion drafter in the last gigabyte (85 to 105.7, +24%) MTP is part of the model. DFlash is a separate small drafter (1 GB here, from ggml-org) that proposes a whole block of tokens at once. On the 3090, a DFlash drafter in llama.cpp had given no real gain over MTP and cost 1.7 GB of VRAM, so I had no evidence it would help here. The first attempt here loaded at 15.9 of the card's 16.3 GB. I'd left a batch of tests running overnight. About a minute after that load, early Saturday morning, the Windows host froze. I found it that afternoon, powered on but with no signal coming from the HDMI port on the GPU that fed the monitor, so I had to give it a hard-reset. I can't pin that on the model with certainty, but the main symptom sure looks like a GPU-based crash. But later, the machine ran eight more loads that took usage from 15.6 to 15.9 GB without complaint. I would bet even minor thermal variance is a factor here, but haven’t proven that yet. Anyway, after that, I had every automated run check memory right after loading, and stopped anything over a cap, just to be safe. To make more room, I first stored the model's context cache in 8 bits instead of 16, which freed about 0.9 GB at 32k context with no change in speed and no measurable change in quality. That wasn't enough, and the reason surprised me. I'd assumed the drafter's cost was its 1 GB of weights plus the main model's context, but shrinking the context barely helped. Most of the extra memory was the drafter's own cache and working buffers. Giving the drafter an 8-bit cache and a much smaller processing batch saved about 500 MB at no cost in speed. That got it to fit at 32k context: 15.4 GB at load on a quiet desktop. With Steam and a browser idling on the host, it's back up to 15.9 GB in use, the same level as the load before the freeze. I ran a nine-minute soak there (72 requests, no errors, memory flat), so that's where my default config sits now. Single-stream speed: 105.7. Quality on the first 524 questions was 0.64% below the reference (21 answers lost, 18 gained) and level with the MTP setup on the same questions. The two things that made it slower (at first!) 1. "Just add MTP to the 4-bit quant" This was “plan A.” IQ4_XS ran at 44.5, MTP was worth 1.6x on the 3090, so I expected something like 70. I got 40.2, slower than with no speculation at all, even though 62 to 91% of the drafted tokens were accepted. Nothing crashed and nothing logged an error. The MTP head and its buffers added about 300 MB to a setup already using 15.6 of the card's 16.3 GB, and the Windows display driver quietly paged the overflow into system RAM. On the one long prompt in my test set (3,900 tokens), processing fell from 1,940 to 95 tokens per second, so it waited 41 seconds for its first token instead of 3. The GPU claimed 90 to 99% utilization while drawing 160 W instead of 240. On Linux, running out of VRAM is a crash you can't miss. On Windows, it's a slowdown you can easily mistake for "this idea doesn't work." In my virtual machine, the shared-GPU-memory counter that should reveal it read zero the whole time. On a normal desktop install it may work, but don't rely on it. NVIDIA's control panel also has a per-program setting, CUDA Sysmem Fallback Policy, that can be set to prefer no fallback, which turns the silent slowdown back into an out-of-memory error. I left it at the default for these runs, so treat it as an option and test it yourself. From then on I didn't believe a speed number until I'd looked at the long prompt's processing rate and the card's power draw. Plan B was the usual fallback for a card that's slightly too small: move a few layers to the CPU. With three of the 65 layers off the GPU, everything fit and the long prompt was back to 1,230 tokens per second. Generation ran at 41.8 (on shorter, 400-token answers), still below the 44.5 I had with no speculation. Three layers on the CPU cost just as much as everything MTP gained! 2. "The faster drafter is the better drafter" Once DFlash was 24% ahead of MTP for a single request, it became my default. If it feels too easy, just wait… I then sent two requests at once. Each ran at about 40 tokens per second, a disappointing 66 TPS in total. The MTP setup it had just beaten does 108 in total on the same test. The drafter that wins alone loses by 39% as soon as a second request arrives. I’d guess that llama.cpp doesn't batch the drafter's work across requests the way it does for MTP, but I haven’t profiled it yet. That one result is why I ended up with more than one mode. Although most of my use-cases for this machine will be fine with a single stream, I wouldn't be surprised if I decide one day to hand this box to a coding agent that may want to use a sub-agent to parallelize work, or to have a separate chat thread to help me keep abreast of what my automated agent is doing. So My launch script has a easy toggle for 3 different modes, described fully in the table below. Four other upgrade hypotheses that looked free didn't earn their keep once measured under experiment. Three more did nothing measurable: the CUDA 13.5 build on this Blackwell card (79.6 against 81.0, plus one very slow start), a llama.cpp build 58 commits newer (80.7), and n-gram drafting on top of MTP (83.9 against 85.3). Deeper MTP drafts were 3% faster, for 300 MB of memory I couldn’t afford to assume would be available. If you can guarantee that your box will be solely dedicated to running Qwen, you might see an extra bump by asking for more drafter tokens. Why not HyperQwen? The fastest thing I found for my 3090 server was HyperQwen, a community-patched vLLM that runs Qwen3.8-27B as a 4-bit model with an 8-bit output head and a DFlash2 drafter proposing seven tokens at a time. It does 153 tokens per second for one request and 300 in total for four, and scored 0.2% above the reference on all 1,048 questions. It was never an option here. Its main model alone is 19.5 GB, against about 15 GB free on this card. It ships as a Linux container (its Windows route goes through WSL2), and vLLM has no official native Windows build, while I wanted this machine on stock Windows software. And it takes four to eight minutes to start while it compiles, against 20 to 60 seconds for llama.cpp on Windows. I never expected to match HyperQwen here, but I’m proud of how close I’ve gotten in less than 2 days of experimentation. One aside that will be worth the price of this article for system builders stinging from the RAM shortage: the last-gen 3090 system that outperforms this current gaming rig runs on DDR4 system memory, which can be had much cheaper than the theoretically faster DDR5 standard on new systems. Specification HyperQwen (RTX 3090, 24 GB, Linux) Optimized Config (RTX 5070 Ti, 16 GB, Windows) Engine Patched vLLM in a container Official llama.cpp binaries Main model 4-bit, 19.5 GB 3.5-bit, 12.1 GB Drafter DFlash2, 7 tokens DFlash, 4 tokens (or the built-in MTP head) Single-request throughput 153 tok/s 105.7 tok/s Concurrent throughput (total) 300 tok/s (4 requests) 108 tok/s (2 requests, MTP mode) Quality vs. 6-bit reference +0.2% (1,048 questions) −0.6% (524 questions, DFlash); −0.1% (1,048 questions, MTP) Startup time 4–8 minutes 20–60 seconds Both builds had the same problem: a drafter needs VRAM the main model is already using. HyperQwen finds it by quantizing the model's output head inside a patched vLLM. I found it by storing both models' caches in 8 bits and shrinking the drafter's batch, with options stock llama.cpp already has. The other difference shows up under parallel work streams: HyperQwen's drafter keeps working when requests overlap, four at once at 90 tokens per second each. In llama.cpp the drafter drops to 66 in total with just two, which is why the Windows build needs modes and HyperQwen doesn't. For scale: with stock llama.cpp and MTP on both machines, the 16 GB card does 85 tokens per second against the 3090's 67. The cards ran different files at different power limits, so take that as "the smaller card didn't cost speed" (unsuprisingly) and nothing more. Two drafters, three modes I settled on one parameter that picks the mode for my running service: Mode Best for… One Req Two Parallel (total TPS) Context Per Req DFlash (default) One user or agent 105.7 66 16k Dflash, long One user w/ larger documents 99.6 62 24k MTP Several Users or Agents 85 108 48k Every mode splits its context between two request slots, and the table shows one request's share. The two larger shares came from a late experiment. Storing the context cache in 4 bits halved its memory again. Across all 1,048 questions that scored 0.07% below the reference, which is no measurable loss. It doubled MTP's total from 48k to 96k tokens at the same speed, and gave DFlash a 48k-total option at about 6% less speed. I scored the 4-bit cache with MTP only, so the long DFlash mode combines two pieces I tested separately. DFlash at 64k total crashed on its first request, and MTP at 96k already runs within about 350 MB of the most I've seen this card use cleanly. For chatting or a single agent, DFlash is probably the way to go: requests come one after another, and the extra speed shows up as answers that finish sooner. Check your agent's appetite first, though. Each request gets only 16k tokens, and a full-size coding agent can spend most of that on its own instructions before it reads a line of your code. For questions about a long report or oversized code modules, DFlash long gives each request 24k for a small speed cost. When several people share Qwen service, or one agent fires off parallel sub-agents and tool calls, MTP wins: overlapping requests are normal there, and 108 in total beats 66. It has two request slots, so a third request waits, and while one request is reading in a long prompt the other's output slows to a crawl until it's done. For an agent that needs even longer context, MTP can be set to a single slot so that request gets all 96k. I haven't run that variant, and a cold 96k prompt would take about a minute and a half before the first token. Caveats, if you want to try this at home Don't bother trying to copy my exact configuration; its not spelled out here anyway, for good reason: YMMV. Instead, copy my discovery process. My numbers belong to one card, one driver, one llama.cpp build, one virtual machine and one host desktop. Some of what moved them was invisible until I measured it. Several quirks are specific to running in a VM: the shared-memory counter that read zero, the limited share of system RAM, and the host's own desktop sharing the card. After a host reboot with a few host apps open, the identical model load used 360 MB more VRAM. On a 16 GB card that's all of your headroom. Out-of-memory on Windows usually doesn't fail, it slows down *significantly*, so check prompt processing on a long prompt as well as generation speed. Measure memory after loading and again under full load: my drafter setups grew about 440 MB between loading and their first request. My safety limit was wrong twice. The first one, set from the early spills, rejected configurations that used less memory than the default I was already running cleanly. The corrected one, checked right after loading, let through a configuration that then crashed on its first request. The speed-up is for generation only. On the same 3,900-token prompt, the final setup reads at about 1,350 to 1,500 tokens per second against the 4-bit baseline's 1,940, roughly a quarter slower. Longer prompts run slower still, about 1,100 at 44k tokens, so a 44k-token prompt waits 40 seconds or more for its first token, past my own 30-second target. Prompt processing is never the bottleneck for my current project, but it might be an important factor for you. Run-to-run noise was 1 to 2% within a session, but the same setup moved 5% between sessions two days apart, so I only trust comparisons made back to back. Thanks, Windows! Trust me, I wish I could run bare-metal Linux on this hardware, but for reasons outside the scope of this article, **cough** (gaming) **cough**, that’s not an option for this box right now. Quality was measured with thinking off, at temperature 0, on four public benchmarks, against a reference I could only produce because I had a 24 GB card to make it on. I’d consider that a sanity check, not a guarantee for results you can assume apply to your prompts. What I'd actually suggest to anyone looking to optimize their local model hosting config is the hypothesize-experiment-adapt loop that gradually took my system’s performance from OK to impressive. Before each configuration change, I wrote down what I expected and why. I ran one experiment that could prove me wrong, recorded the result, and updated the plan. Of 31 logged experiments, a good share went against me, and the silent VRAM spill would have sent me the wrong way if I hadn't written my expectation down first; the surprising result led me to look closer and find the real (silent) culprit on the slowdown caused by a changed that actually helped once I understood the environment better. Your hardware, software, prompting & context patterns, and project goals will have their own unexpected pitfalls & viable solutions. Keep a quality reference, change one thing at a time, write down the failures too, and go find your own 3x.

Original Source

Read the full article at Hackernoon →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.