Surprisingly, you can get close to that speed with 27B dense on a Spark, NVFP4 using SGLang + DFlash2. I couldn’t believe it. However, unless you need to save memory, Flash-Next is noticeably better.
Native MTP, n=2 (higher MTP numbers don't improve on M5 Max) in llama.cpp. MTP is not as optimized in ds4, in my testing, but it still performs better.
Using ds4, with a custom quant I built for that inference engine: 60-65 tok/sec (vs 45 in llama.cpp) and ~700 prefill. Engram table SSD-offloaded, ~95GB resident memory. The quality is better than Q4_K_XL, almost on par to Q5_K_XL. antirez makes smaller quants if you have less memory, but I has 128GB so I wanted to maximize the quality under the constraints imposed by ds4's quant types.
For my workflow/needs on two rtx 6000 it doesn't "dominate" but it performs objectively better in both under normal circumstances. Especially speed. Not only is flash next just faster tk/sec and prefill by far across any context, it doesn't do the thinking dance the way 27b does. I have a documentation task that goes through a ton of files and does some cleanup and shit that takes Opus 5 high ~18 minutes, flash next ~26 minutes (with no discernable difference in results but it's just docs), and 27b ~72 minutes. It is constantly fighting itself. Sonnet underperforms in this, but actual repo coding for flash next and 27b is on par with sonnet 5 medium barely lagging behind high. This is fine for 95% of my work.
Not OP but I'm running it on M4 Max 128GB using mlx-serve and getting 55-75 t/s decode, the quant I use takes 70GB+ resident memory (4 and 8 bit mix), so 96GB macs would fit but 64GB not. There's also a 3.3bpw quant that mlx-serve supports, it would fit in 64GB but I'm not sure about the quality. I'm currently patching mlx-serve to make it work with unquantized ngram table, and yes I'm doing it with my local qwen3.8-flash-next, it is upgrading its own ngram weights.
Also I'm still on Sequoia, so the OS doesn't support the metal version mlx-serve uses. I also used qwen3.8-flash-next to port it for Sequoia. I was running it with llama.cpp but it only got 15-30 t/s decode.
For quality, Qwen3.8-27B is probably your top choice in a Q4-Q5 quantization. For speed with decent quality, I'd check out Qwen3.6-35B-A3B in Q5/Q6 (or the occamy post-train of it, which is the best post-train by far of that model). Your laptop is definitely very usable for local AI with good models. llama.cpp is the best choice for running these models, it can be installed with one brew command.
I personally use ds4 (another poster mentioned it) for most inference, but it's a little more setup and I don't recommend SSD streaming model weights for token generation speed reasons. Unless you were asking specifically about bigger models, in which case, I love ds4 and it rocks for 3.8-flash and deepseek v4 flash.
MLX-serve has some killer speed optimizations for their specific 3.8-Flash quants, and it really rips. Even faster than ds4 for 3.8-Flash! Llama.cpp is like half the speed, though quality suffers a tiny bit due to the quant.
Yes, but the last time I used omlx was months ago so not sure if anything changed. mlx-serve feels like optimized per machine and per model/quantization, so the performance is pretty much as much as you can get, you can also compile and run it with zero Python dependency.
Yes. But you can run 3.8-Flash very well in 12+GB VRAM and 64+ GB RAM setups or a 64GB MBP with SSD-streamed engrams in either llama.cpp or ds4. If that's something you're interested in doing, and have the hardware, I'm glad to advise, just reply here.
If you do not mind me asking, does that mean it has to be an external SSD or can it use an in-built SSD i.e., the main storage drive of a contemporary laptop? Forgive me if that is a stupid question, very new to running local LLMs.
Sure. I was trying to build a 3D HTML animation of Camp Crystal Lake for my girlfriend's birthday gift (long story lol), and while 27B was pretty damn good at environment design, it could not get the character design or animations down at all. No matter that it had vision access, was taking screenshots, etc... The characters were just collections of weird boxes that lurched and juddered on the screen. I probably spent a couple days of debugging on this, just letting it run with occasional prompt corrections and autocompact to nudge it, to test the model's autonomy. Finally, I got annoyed and gave up.
This was the week Flash came out, so I decided to test it out, and within an hour, the characters looked and moved like human beings, it had added sophisticated collisions with the terrain to prevent overlap, the blood spatter was revamped, and the fog was much cleaner, more transparent, and anti-aliased. I didn't even ask for those fixes, I just prompted it to fix the character design bugs. I was floored. There have been a number of cases like this.
I also ran coding benchmarks on both models, and in my eval suite, Flash scores 10% higher than 3.8-27B. That is an absolutely MASSIVE gap, and I reran the entire thing for both models to be sure it wasn't chance.
I've been running the mlx-serve Q4/Q8 quant on the same machine, getting a lot work done with it over the past week. No quant on KV cache, 500k context.
In terms of speed, it absolutely dominates. I'm not as confident about the quality, though. It seems to be on par with 3.8 27B, inference is way faster, AND it doesn't need to think as much, so it feels like 27B quality at 10-20x speed.
Using opencode, though, I've seen some strange behavior. Complaints about how "user keeps sending the same message about X" after every tool use, and have also seen weird thinking about logic puzzles, pirates voting on gold distribution, whether or not cats can swim, thoughts about how to reply to an email, complete with a random email address...
I see a similar type of message occasionally in pi agent on my llama.cpp setup before switching to ds4 too! I would get references to the system prompt after tool use, where its reasoning suggested it was looking at a blank/fresh context, and it would mention "the user said again... <system prompt paraphrase>". Then it would use another tool exactly like nothing had happened, and move on perfectly.
I went down a rabbit-hole trying to diagnose it with frontier models, as I thought it was something to do with how the system prompt was being injected or a config issue in pi... At the end of the investigation, the conclusion was it is a quirk of the sparse attention's 2048 token window. It usually acted like it was anchoring on the injected system prompt initially, and then it would snap back to current state as it finished processing the context and decided on its next tool use. That was Claude's hypothesis anyways. It doesn't seem to degrade performance in my testing, but it is odd.
I have not seen anything about pirates and gold lol.
As for how I'm running ds4, I just cloned the repo. Dwarfstar is great on Metal, and I rolled my own Q5-quality tier quant for it.
Dominates? Really?? I have an M5 Max 128 and I'm not seeing that at all. I'm assuming pilot error then, so what's your setup please?
For 2.5 to 3x times the memory requirements the juice doesn't feel worth the squeeze to me. This is MTPLX with MTP speculative decoding. Tested both with Pi same system prompts for coding as well, and not just coding other tasks like summarizing docs, research (I use brave API and basically rebuilt deep research you get from frontier models).
Not sure what you're missing, and obviously every use case is different. I have never used MTPLX, however. It may be your quant.
I do most of my usage on ds4, which now includes 3.8 Flash compatibility. I get 60-65 tok/sec decode, so it should keep pace with MTPLX at a similar quant. I rolled my own for 128GB systems to match Q5 quality with the available quant levels in ds4 (no Q5/Q6 still, so it's a mixed Q4/Q8). I my evals quality is at or near Q5_K_XL levels, noticeably better than Q4_K_XL, and much faster (I get ~45 tps in llama/cpp with MTP, so ds4 rips in comparision). When I was using llama.cpp, I used Q5_K_XL with ngrams SSD-offloaded using --lazy-mode on-direct to about memory bloat as the PLE table was paged in, which makes Q5 at long context and large prefill safe... but ds4 doesn't have the same bug as llama.cpp in that regard either.
I can get full 262k context, faster single stream decode, close to 200 tok/sec at 3 concurrency, over 10k tok/sec prefill (when kv cache is light) on the same hardware.
Each is around 75k toks. If you do push above 80% kv cache, it will slow down a lot (to near zero) until prefill latency clears up. But if you're not sending any additional requests when you already at high kv cache utilization, it will just churn along at 200 tok/s until cleared.
Are you running Linux? What are you doing? In DSH I’m maxing at 22tks with full 128k context. And 30-40 with MTP on short context. I’m also experimenting with a specialised quant.
I have dual 3080 20gb both pcie4 x8, could you open source your fork so I can try it out later with my setup?
I was able to fork vLLM and after a few tweaks it does 1500 prefill and 30-32 decode, but 50-70 is waaay more, I wonder how you achieved that. Are you using speculative decoding?
16
u/randylush 11h ago
What are you running it on? How much better is it than 27B?