r/LocalLLaMA • • 4h ago Heartwarming

New Model Qwen 4 Is Looped! +18.3 pts on LiveCodeBench, +6.7 pts on AIME, and Zero Regressions (With Zero LoRA Weights)

Thumbnail
blog.tiltastech.com
326 Upvotes

r/LocalLLaMA • • 2h ago Heartwarming

Showcase Qwen 4 35B-A3B is awesome

134 Upvotes

Qwen wrote the whole thing in Pi while I just prompted and playtested each build. A few hours in, I had a playable 3D browser game with drivable cars, traffic, police chases, and touch controls.

​This was running locally on a spare PC with an RTX 2070 laptop GPU (8GB VRAM), averaging 35 tok/s (UD-Q4_K_M, 64k ctx, FP16 KV cache).

​Tried the same idea with Inkling 2 Mini, Qwen 3.5 35B-A3B, and Ornith 1.5 too, but none of them got me to a playable state.


r/LocalLLaMA • • 11h ago

Discussion Comments on Minimax 4.1from head if DevRel at Minimax 😳

Post image
542 Upvotes

r/LocalLLaMA • • 4h ago

Resources Qwen4-35B at 1M context on two AMD R9700s: a 950K prompt prefilled in 2 minutes, full setup inside

Thumbnail
doug.sh
138 Upvotes

r/LocalLLaMA • • 6h ago

Discussion Qwen4 35B vs Qwen3.8 Flash Next - Preliminary results

123 Upvotes

Preliminary results (Qwen4 FP8 at 1M vs Flash-Next NVFP4, paired by task)

SuiteDoneQwen4Flash-NextDifference [95% CI]Output tokens, Qwen4 vs Flash-Next
Terminal-Bench 2.045/45 tasks (final)48.9%55.6% (512K)−6.7 [−13.3, −1.1]+29%
SWE-bench Verified45/48 tasks80.0%82.2% (512K and 262K)−2.2 [−11.1, +6.7]+64%
LongSWE vs 512K (same prompt)70/242 tasks48.6%45.0%+3.6 [−2.9, +10.0]−16%
LongSWE vs 262K (Flash-Next prompt trimmed)70/242 tasks48.6%33.6%+15.0 [+4.3, +25.7]−39%

LongSWE by language family, partial:

FamilyTasksvs 512K, same promptvs 262K, trimmed
Python29+1.7+31.0 [+15.5, +48.3]
JS21+9.5 [0.0, +21.4]+14.3
.NET13−3.8−15.4 (very wide CI)
Multimodal7+7.1+7.1

What this means so far:

  • Terminal work: Flash-Next is better. The result is final and statistically clear, and Qwen4 also spends about 29% more output tokens.
  • SWE agent work: the two are about even on success, but Qwen4 needs about 64% more output tokens. That's your "same results, more tokens" case, so it's not worth switching for this.
  • Long-context single-turn (whole repo in the prompt): this is where Qwen4 wins.

    • With the same prompt as Flash-Next 512K, it's slightly ahead, but not significantly.
    • Against Flash-Next 262K, which must trim the prompt, Qwen4 is clearly better. Most of that gain comes from the Python tasks, where its 1M window holds the whole repo.
    • On this suite Qwen4 also uses fewer output tokens.
    • Only 70 of 242 tasks are in, so these numbers can still move.

r/LocalLLaMA • • 4h ago

Showcase I turned Qwen 4 35B into an interactive voice agent

80 Upvotes

Hello everyone! I wanted to create a local voice agent that can be both interactive and useful, and here is what I got. In the video you can see Qwen4-35B-A3B UD-Q4_K_XL running on Strata with speech-to-text and text-to-speech models on a single RTX 4090. The model is not tuned in any way, so its coding performance is exactly the same as with the stock Q4_K_XL model with the same prompts and settings. I was actually quite surprised at how fast Strata is even when the model doesn't fit into VRAM. Granted, the model is just A3B, but it runs surprisingly well anyway.

So, I did the following:

  • I used my tune of Voxtral Realtime to make it work faster and have it output turn ends;
  • Took the Qwen4-35B-A3B model and prompted it to take action on each turn end: either Speak, Listen or Task. Such a single-word decision gives the model the interactivity that is shown in the demo, so you can interrupt the model freely, do async tool calls, and say stuff like 'mm-hmm' without stopping the model's work;
  • In parallel, the same Qwen4 model runs an agent that does the coding and thinking. This model runs through the Qwen Code harness and doesn't have any speech-specific prompts, so its performance is exactly the same as in all other environments running the same quant of this model;
  • Added Pocket TTS to make the LLM capable of speaking. The TTS supports voice cloning, and you can pass any voice you want in the repo's config.

Here are some performance numbers on my server:

Setup: RTX 4090 (24 GB), Ryzen 9 5950X, 128 GB RAM. Strata v0.2.26, Qwen4-35B-A3B (Unsloth UD-Q4_K_XL), int8 KV cache (might be a good idea to test how much the cache degrades at int8 though, didn't test that), experts the GPU doesn't cache run from RAM, and speculative decoding is turned on.

Peak VRAM: 23.1 GB; RAM used on the whole machine: 52 GB.

End-to-end voice (during my own tests):

-median90th percentile
End of your last word → voice in your ear756 ms1.48 s
Turn with a web search or tool1.6 s2.9 s

Agent speed by context length (with the voice stack):

ContextPrompt readingDecodeFirst token (next turn, same chat)
8K6.7K tok/s157 tok/s0.11 s
75K6.3K tok/s149 tok/s0.14 s
252K5.7K tok/s125 tok/s0.24 s

Overall, the speech capability doesn't make the model unusable, and the only noticeable downside is that the speech recognition model takes about 4 GB of precious VRAM.

You can try it all out at https://github.com/speakrail/speakrail, Apache 2.0 license. I previously did some Gemma tunes to make the models capable of microturns, but with Qwen you can just prompt it and it will work well enough. I will be glad to answer any questions and would be grateful if you gave the pipeline a try!


r/LocalLLaMA • • 4h ago

Resources Freehand - an interesting agent harness from Microsoft

Thumbnail
github.com
83 Upvotes

r/LocalLLaMA • • 7h ago

Discussion Don't use Strata quants for Qwen4, or at least the Compact one

133 Upvotes

It goes without saying that you should always prefer quants from Unsloth or other reputable creators, but I think it's worth taking a peek at one of Strata's own quants, and things are not looking good.

Here is a response from the "Compact" variant for Qwen4-35B-A3B someone shared with me recently (no comment):

Output from a Qwen 4 quant that is constantly repeating Hmm.

According to the official documentation, the Compact quant has on average 2.13 bits per weight. For comparison, engram excluded, the smallest Unsloth quant for the same model, UD-IQ1_S, has bpw at 2.23, and UD-IQ3_XXS sits at 3.92.
If you read Strata's own description for their Qwen 4 quants, it claims Compact picks the same next word as the original 89% of the time.
However, and this left me astonished, this is based on 36 test prompts.
Niko, if you are reading this, dude, WTF? This is not even close to being a statistically significant test sample! There is a reason Unsloth still hasn't published benchmarks for their quants - accurate results take a lot of testing and time, even with Unsloth's resources and expertise.
I haven't really tried Strata's larger quants, but why should I if the methodology used to make them is so piss poor?
If Strata can't bother doing a diligent verification of its quants because it wants to keep its hyper-frequent release schedule, then just don't get into the quant business. Suggesting what is normally branded as a 1-bit quant to a novice user with an 8GB card is just going to misrepresent Qwen 4's real capabilities - it would make more sense, for the smallest variant, to offer a larger quant closer to 4bpw that is just going to have more offloaded experts than something this lobotomized.
Turns out Strata's verification process for its engine is not much better, because it also only uses 36 test prompts. Why the aversion to using a well-established, diverse suite of benchmarks, the ones Qwen itself used in their model card, like DeepSWE, Terminal Bench, AutomationBench, etc.? Yes, running them will take substantially more time, but it can be cut down by limiting testing to a specific GPU architecture (Ampere, Blackwell, RDNA3, RDNA4 and the rest) instead of testing 2 GPUs of the exact same arch (according to 0.2.26 release notes, it was tested against both RTX 3060 and RTX 3090), or at least 1 complete bench suite run per every supported backend like CUDA and HIP. I don't think many reasonable people will be upset if, instead of a new release every single day, Strata's release schedule is every 2 weeks or even every month.
Not running proper benches before releases has already affected the output quality of the engine at least once: according to the 0.2.21 release notes, it contains an accuracy fix in prompt reading that was only caught because a user reported response degradation in the JamC-QA bench, which only has 300 questions.
I like using Strata because of the speed and I am satisfied with the quality when using reputable quants, at least with QFN, and I appreciate that Niko listened to feedback and disabled lossy optimizations like TAIL_SKIP. People give the project a lot of flak for being vibecoded, but the risks from that can be mitigated substantially with a robust QA process.
I know it's free software provided as-is, but I do believe Niko has the desire to improve his project and offer the best thing he is capable of for the local community, so I hope these shortcomings are resolved in the future.

Update: my bad, Unsloth did publish bench results, they are just not up on Hugging Face yet but are available on their website. This is the kind of testing I would expect from a quant creator I trust:
https://unsloth.ai/docs/models/qwen4#quantization-benchmarks


r/LocalLLaMA • • 13h ago

Discussion I let Qwen4 run overnight on my 5070 Ti. 3.87 million tokens later...

Post image
383 Upvotes

So yesterday I decided to leave my local coding agent running overnight on an actual Godot project instead of doing more benchmarks.

Went to sleep, got milestone notifications on my phone and woke up to some pretty interesting results.

My hardware is nothing crazy:

  • RTX 5070 Ti 16GB
  • Ryzen 7 5700X
  • 32GB DDR4
  • Windows 11

Running Qwen4-35B-A3B UD-IQ3_XXS with a Strata fork, Pi as the coding agent, 128K context, INT8 KV cache, MTP and BF16 vision.

I also built a custom orchestration layer for autonomous missions, Git checkpoints, QA, recovery and notifications.

The overnight run:

  • 8h 33m total runtime
  • 3.87M generated tokens
  • 180.2 t/s median decode
  • 928.9 t/s median prefill
  • 66.5% MTP acceptance
  • 2,794 inference requests
  • 72 Pi sessions
  • 111K maximum actual context
  • 20 integrated milestones

Now the less impressive part lol. 21 milestones were deferred, and around 61% of the generated tokens went into deferred work. Also, 81% of output tokens were reasoning.

Clearly there's a lot of room to improve the harness rather than just chase more t/s.

Everything was running locally, apart from web research and phone notifications.

I'm genuinely curious if anyone else is doing overnight coding runs like this on consumer hardware. How are you handling context management, reasoning budgets and failed missions?

Getting 180 t/s is great, but getting those tokens to actually do useful work seems to be the much harder problem.

EDIT: Didn't expect this much feedback lol. Thanks everyone!

For those who are new to local LLMs, I probably should explain a bit more about why I'm doing this.

I'm not an AI engineer. I'm a technology enthusiast and trainer who enjoys experimenting with what's possible on consumer hardware.

I'm currently developing a Godot RTS game as a real-world testing ground for autonomous local AI agents.

The idea is to have an AI that can actually work on a project for hours: read files, write code, test features, identify bugs, look at screenshots and improve its own work, all while running locally on a relatively normal gaming PC with a 5070 Ti and 32GB of RAM.

No expensive workstation, no cloud inference costs and no API token limits for the local model.

For beginners, the main challenges are:

  • Quantization: Making a large AI model small enough to run on consumer hardware without losing too much intelligence.
  • Context window: How much information the AI can keep in mind during a task.
  • TPS: How fast the model generates tokens, although faster doesn't necessarily mean more productive.
  • Agent harness: The software that allows the model to interact with files, run commands, use tools and work on actual projects rather than just chat.

I'm learning that getting a model to run fast is probably the easier part. Getting it to work autonomously, consistently and reliably is a completely different challenge.

Some of the community feedback has already given me new directions to explore, particularly NVFP4, higher quantizations, context management and adaptive reasoning.

I'm not trying to prove that local models are better than frontier cloud models. I'm trying to find out how far we can push affordable consumer hardware and make autonomous AI development accessible to more people.

Imagine leaving your gaming PC working overnight on your own project and waking up to new features, tested code and actual progress.

That's what I'm trying to achieve.

There's still a lot to improve, and I'll share both the successes and the failures. Hopefully, some of these experiments will save other people time too.


r/LocalLLaMA • • 1h ago Bravo

Showcase Offloading KV Cache to Host RAM with QSA costs only ~5% speed: ~1M context on 1x3090

40 Upvotes

Qwen4-35B-A3B uses QSA, a trained sparse attention. Past a 2K-token budget, each query attends only to the top 512 four-token blocks its small indexer picks, plus the most recent tokens. Decode therefore never reads most of the KV cache, so the cache can live in pinned host RAM and the GPU reads it over PCIe.

How it works in my engine (inference.rs, Rust):

  • The full K/V lives in host RAM. The GPU keeps only a small cache of recently selected blocks. Consecutive tokens pick mostly the same blocks, so about 98% of reads hit VRAM.
  • The indexer stays in VRAM, compacted to one pooled key per block (64 B/token).
  • Long prefill attends only to what each query selects, so VRAM use stays flat however long the prompt gets.
  • Outputs are bit-identical to the in-VRAM path.

Setup: one RTX 3090 (24 GB), 128 GB RAM, a ~4.5-bit GGUF, q8 KV cache.

-KV in VRAMKV in host RAM
Max context192K1,048,576
Max context with DFlash 2 drafter134K1,048,576
Decode at 32K118 tok/s115 tok/s (−3%)
Decode at 64K115 tok/s110 tok/s (−4%)
262K promptdoesn't fit272 s prefill, then 86 tok/s (DFlash 2: 128 tok/s)
983K promptdoesn't fit31.6 min prefill, then 55 tok/s

It's a buffer more than a regular workflow: agents should compact long before this. But 983K tokens on one consumer GPU does run.


r/LocalLLaMA • • 59m ago

Discussion Why exllamav3 is so unpopular?

32 Upvotes

I just don't get it. To me, it's one of the mysteries of the local LLM world. In over 90% of discussions, people mention llama.cpp, Strata, Basalt, etc., but exllamav3 is rarely mentioned, and I don't really understand why.

It has a really efficient quantization format (EXL3), and it's my choice when a model doesn't fully fit into my VRAM, in other cases I pick vLLM. exllamav3 offers a great balance between speed and quality.


r/LocalLLaMA • • 41m ago

News Intel Launches Arc Pro B65 Super: 32GB AI Video Card Gets a Bit Faster

Thumbnail
servethehome.com
18 Upvotes

r/LocalLLaMA • • 9h ago

Resources Qwen4-35B-A3B + FlashHead: +11% speed on top of MTP, same quality

Post image
88 Upvotes

Been working on Qwen4 since it dropped and wanted to share an extra ~11% decode speed that costs you nothing in quality.

Qwen4 ships with an MTP head. FlashHead goes on top of that. Every time the MTP head drafts a token it scores all 248k tokens in the vocab, which is a lot of work for a small draft head. FlashHead clusters that output layer so the draft only scores the likely part of it. The full model still verifies every drafted token, so you get precisely the same quality, just faster.

Numbers on a Strix Halo (Ryzen AI Max+ 395, llama.cpp b12977 Vulkan, same GGUF for all three, 2k-token prompt, one user):

setupdecode tok/s
llama.cpp defaults49.4
+ MTP63.6
+ MTP + FlashHead70.5

On a Jetson AGX Orin (CUDA) with the same GGUF and MTP, FlashHead takes decode from 37.3 to 41.1 tok/s (+10%), with identical output.

Extra memory for the FlashHead file is about 0.4 GB.

Commands to run it on your local box, or try it from your browser on a real Strix Halo: https://embedl.com/Qwen/Qwen4-35B-A3B/ryzen-ai-max-395?tab=run

We'll put a GGUF on Hugging Face as soon as we can.

Btw, I'm the lead author of the paper behind this method: https://arxiv.org/abs/2603.14591. Happy to answer questions.


r/LocalLLaMA • • 8h ago

Question | Help Qwen 4 35B A3B GSQ RCO when?

65 Upvotes

This is a personal plea, but if you agree, join the chorus.

Please, ISTA-DASLab, give us Qwen 4 35B A3B GSQ RCO. You guys are incredible at getting so much out of so little.

I guess that's it.

P.S.: I love Unsloth too. There's room for both in my heart and on my SSD. But honestly, GSQ RCO has been more useful in my day-to-day workflow.


r/LocalLLaMA • • 4h ago

New Model Qwen4-35B-A3B-Q4_K_M.gguf benchmarks for CPU-only bros

Post image
28 Upvotes

I know there are a few homelabbers who have CPU-only servers with lots of cores and lots of RAM, so I am running that kind of benchmark on the new Qwen4-35B-A3B-Q4_K_M.gguf model from Bartowsky. I find n_gen to be more indicative of how usable a model will be, so I have highlighted those results for 2, 4, 8, 16, and 32 cores in a 96 GB RAM environment. For my system (HP Proliant DL380p Gen8, Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz), 16 cores appears to be the sweet spot.


r/LocalLLaMA • • 17h ago

Funny I miss the llama 3 and mistral finetune craze.

253 Upvotes

This is kind of a shitpost sorry, but does anyone else miss that? We used to get llama 3 and llama 3.1 finetunes on the daily that were named all kinds of random shit and had pictures of anime girls with big knockers in the model cards. Admittedly, none of them were really useful for anything other than the novelty of it, but some of them had some charm. I remember there was this guy who had his own series going it was like called Sydney and he was even briefly selling plushies of this OC or whatever. That shit was fucking hilarious to me because I remember downloading one of them vividly and when I opened a chat with it in LM Studio, shit you not, I just wrote “hi” and it said “Hi! Can I tell you a secret :3” to which I replied: “uh sure” and then it told me that it had a foot fetish and begged me not to laugh. Dude my girlfriend and I were fucking DYING for a good 20 minutes that shit was fucking awesome. I don’t necessarily miss the weird gooner slop models like that but I miss logging on to huggingface and looking at it like it was the steam winter sale. There was just always something interesting going on. Like “DavidAU-circlejerk-9000-super-turbo-wow_EVIL-VERSION” and I would just go on a spree with like 8 bash terminals open at a time collecting these things like pokemon cards and spending an afternoon laughing my ass off talking to them and asking them ridiculous questions and they all had their own quirks. At the end of the day, I am a software developer so the mass influx of qwen models is definitely exciting to me but sometimes I think back to literally like 2 years ago when we were all just having fun with this stuff and there were so many goofy finetunes flooding the HF models tab and would like to revisit that.

I would love to hear everyone else’s stories and perhaps even recommendations for silly little guys to talk to. Anything under 180b parameters will fit fine on my system so fire away if you got any bangers.

EDIT: I FOUND IT. STILL HAS THE LINE ABOUT THE PLUSHIES AND ALL 😭

https://huggingface.co/FPHam/Free_Sydney_V2_13b_HF


r/LocalLLaMA • • 6h ago

New Model Inkling 2 Mini: 12.22 GB GGUF with 100K context on 16GB VRAM, a Needle in the heystack perhaps with all these qwen4 posts.

30 Upvotes

Following up on my previous 14.30 GB quant, I wanted to see how much further I could push it without sacrificing too much fidelity.

  • 12.22 GB – 14.5% smaller than my previous release.
  • 100K context fully GPU-resident on 16GB VRAM.
  • 23.9% lower KLD than Unsloth's UD-IQ3_XXS.
  • 93.56% top-1 agreement.
  • 99.42% margin-qualified top-1 agreement.
  • All 128 experts retained.

The previous release still has better fidelity. This one prioritizes context capacity, particularly for local coding agents.

Compatible with Runner and llama.cpp.

Full methodology, benchmarks and download:
https://huggingface.co/Joakimpalm-Zen/Inkling-2-Mini-selective-Q6_K-expIQ3_XXS-mix-GGUF

As always, take it if you want it, or just ignore me and go on.


r/LocalLLaMA • • 36m ago

Resources Run Qwen4, "8bit quality", 1M context, 150 decode, 5000 prefill, on ONE 7900xtx. 7300 tk/s with two. keep 80t/s @ 700k context.

Post image
10 Upvotes

LINUX ONLY! Yes, catchy title, I know, don't hate me :) This is achieved using EXL3 quantization. ProCreations made these amazing quants, 4.5bpw has KLD below the official FP8, the 3bpw is very close, stil better than NVFP4.

RDNA4 support is there, but UNTESTED, i did my best, but I have no RDNA4 gpus, please understand. if you encounter issues let me know.

you can get around 140 tk/s prose, 155 tk/s code with 1 gpu running 3bpw, or similar speeds with 2 gpus using the 4.5bpw. It's also possible to run the 4.5 bpw with some offload on ram, with minimal speed loss. Performance is good even with full context, i tested up to 700k (see tables below)

4.5bpw download here: https://huggingface.co/ProCreations/Qwen4-35B-A3B-EXL3-4.5bpw 3bpw download here: https://huggingface.co/ProCreations/Qwen4-35B-A3B-EXL3-3.05bpw

Let me Show you the KLD (lower is better) on various tasks:

ModelSizeAgentic KLD ↓Coding KLD ↓Math KLD ↓General KLD ↓LongCtx 8K KLD ↓Mean KLD ↓
BF16 (Reference)113.7 GB0.000000.000000.000000.000000.000000.00000
Official FP860.2 GB0.014870.016170.012530.043960.010560.02188
NVFP446.9 GB0.029200.031050.023660.080900.020840.04120
EXL3 3.05bpw33.00 GB0.020180.022070.017490.080080.014510.03495
EXL3 4.5bpw39.02 GB0.012200.013550.010430.050790.008810.02174

speeds:

Strata EXL3 AMD — Qwen4-35B-A3B

Hardware: 1–2× AMD RX 7900 XTX 24 GB + Ryzen 9 7950X + DDR5.

Token Generation

Benchmark1 GPU2 GPUs
Coding · 3.19 bpw155.1 tok/s—
Coding · 4.62 bpw143.5 tok/s157.0 tok/s
Prose · 3.19 bpw140.8 tok/s—
Prose · 4.62 bpw121.6 tok/s127.0 tok/s

Prompt Processing — 3.19 bpw

Prompt size1 GPU2 GPUs
8K5,119 tok/s5,542 tok/s
16K4,969 tok/s6,390 tok/s
32K—7,074 tok/s
60K—7,299 tok/s

Prompt Processing — 4.62 bpw

Prompt size1 GPU2 GPUs
8K4,798 tok/s5,518 tok/s
16K4,647 tok/s6,319 tok/s
32K—7,009 tok/s
60K—7,253 tok/s

Long-Context Generation — Single GPU, 1M FP16 KV Cache

Filled context3.19 bpw4.62 bpw
~0K139.0 tok/s124.7 tok/s
64K120.9 tok/s107.7 tok/s
128K109.8 tok/s105.0 tok/s
512K91.5 tok/s85.3 tok/s
700K82.8 tok/s77.9 tok/s

Benchmark notes:

  • average speeds, excluding warmup.
  • Single-GPU standard benchmarks use Q8_0 KV cache (232K capacity at 3.19 bpw, 256K at 4.62 bpw).
  • Long-context tests use FP16 KV cache, with 128K resident in VRAM and RAM-backed cache.
  • 1M context capacity
  • Dual-GPU setup: PCIe 4.0 x16 + x4.
  • New asynchronous prefill pipeline: up to +64% throughput, optional on 2 GPU with --peer-prefill-pipe

GitHub: https://github.com/nasone32/Strata-EXL3-fork

how to setup? point your agent to https://github.com/nasone32/Strata-EXL3-fork/blob/amd-exl3-community/docs/AI_SETUP_EXL3_AMD.md


Q) How prefill works on 2 gpus with --peer-prefill-pipe?

  • it works similarly as tensor split. but during decode it works back again as expert parallel.

Q) How can 1M context fit?

  • it's using your system RAM, 20gb RAM are needed for 1M KV cache in bf16. thanks to Qwen QSA attention only the relevant tokens are streamed from the KV cache so speed remains very high. a 128k KV cache is kept in VRAM anyway (can be reduced to 64k optionally).

r/LocalLLaMA • • 3h ago

News BasinKV for Qwen4: 256K Qwen4-35B-A3B on a 24 GB GPU

Thumbnail
gallery
16 Upvotes

Hey LocalLLaMA, Zellige team here with an update to BasinKV, If you saw the post a few days ago!

We added native Qwen4-35B-A3B support to BasinKV in llama.cpp (SGlang and VLLM support in the works), Tested on an NVIDIA L4 (24 GB), A100-80GB, and AMD Instinct MI300X.

If you don't know what BasinKV is, you should check out our prior post or our launch paper(s) https://zellige.ai/research/basinkv-launch https://zellige.ai/research/basinkv In summary, BasinKV is a cross-engine system that lets you run 256K context on a 24 GB GPU with no decode slowdown as context grows, and scales multi-user serving on a single A100/H100 far past the HBM wall. If you care, nerdy detail in our paper & More general information in our blog and github

BasinKV makes it possible for anyone at home to run full agentic AI, without sacrificing below Q4 quantization with Qwen 4 35B A3B, 256k context, Stable token generation across the entire window, 24gb gpu.

Qwen4-35B-A3B already ships with learned Query-Sparse Attention (QSA) on its 10 full-attention layers, narrowing compute to the top 2,048 tokens across 4-token pools (r = 4). The catch is memory: stock llama.cpp still holds the full 256K FP16 KV and indexer cache in VRAM (30.1 GiB total peak on A100 and 31.5 GiB on MI300X for UD-Q4_K_M). On a 24 GB NVIDIA L4 (22,611 MiB ECC-usable), stock fits up to 16K and hits CUDA OOM at 32K, even with one MoE layer offloaded to CPU.

Instead of replacing Qwen4's trained indexer with a training-free block scorer like we do with our other models we support, BasinKV rides it: exact qwen4exp index_k_norm and IMRoPE math on GPU, an 8x smaller pooled-only GPU indexer cache (64 B/tok/layer), and a fixed GPU CLOCK working set (4,096 tokens plus a 64-token FP16 recent ring) in front of pinned host INT8 (or opt-in WHT-INT4) KV read over 16-byte coalesced PCIe UVA. Unmodified FlashAttention and captured CUDA/HIP graphs run unchanged for decode and native MTP verify. (More details below)

L4 Numbers

Single-container 24 GB NVIDIA L4 (Qwen4-35B-A3B UD-Q4_K_M, 22,611 MiB ECC-usable)

  • Stock with --n-cpu-moe 1 runs 1K (45.9 tok/s) and 16K (46.1 tok/s) and hits CUDA OOM at 32K (22,608 MiB).

  • BasinKV INT8 (--n-cpu-moe 1, -c 262144 -b 2048 -ub 512) holds peak VRAM flat at 21.8 GiB (22,304 to 22,326 MiB) from 1K through 256K, delivering 1,433 tok/s 256K prefill, 43.6 tok/s steady 256K decode and passes all needled/RULER tests *More info below.

  • With -ngl 99, BasinKV peaks at 22.4 GiB (-ub 512) to 23.0 GiB (-ub 2048) on A100, fitting cleanly inside a non-ECC consumer 24.0 GiB RTX 3090 or 4090 without CPU MoE offload.

A100 Numbers

Paired A100-80GB (Qwen4-35B-A3B UD-Q4_K_M, -c 262144 -b 2048 -ub 2048)

  • 256K Prefill / Decode: 3,632 tok/s prefill (83.4% of stock 4,357 and 77.1 tok/s decode (+14.7% faster than stock 67.2) at 23.0 GiB vs 30.1 GiB stock (-7.2 GiB). At 128K: 4,023 pp (96.3% of stock) and 79.6 tg (99.9% of stock).

  • 256K RULER & Coding: Held up across our scores, more details in our blog paper, Our personal 'vibes' tests also found it held up across the tasks we threw at it against base, with only WH-INT4 showing a degradation on coding more so then other models we support, so it is not recommended.

  • Native MTP (--spec-type draft-mtp --spec-draft-n-max 3): at 54K, 87.3 to 93.8 tok/s (26.2 GiB), faster than stock+MTP (91.4 tok/s, 33.5 GiB) while saving 7.2 GiB of VRAM.

Also, We now also support AMD! Live AMD Instinct MI300X (gfx942, ROCm 7.15) tests and more details in our paper.

How can I use it today? (llama.cpp only for now)

Try it on Qwen4-35B-A3B

# 1. Clone BASIN-KV and llama.cpp
git clone https://github.com/zellige-ai/basinkv ~/basinkv
git clone https://github.com/ggml-org/llama.cpp ~/llama.cpp
git -C ~/llama.cpp checkout 15dd330d5529f7fbb158f2b0a9e93cec5fbcf548

# 2. Apply the BASIN-KV wiring patch
python3 ~/basinkv/integrations/llamacpp/apply_llamacpp_wiring.py ~/llama.cpp

# 3. Configure + build llama-server with CUDA
cmake -S ~/llama.cpp -B ~/llama.cpp/build-cuda \
  -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="80;86;89" -DCMAKE_BUILD_TYPE=Release
cmake --build ~/llama.cpp/build-cuda --target llama-server -j

# 4. Run — point -m at shard 1 of Unsloth's 2-shard UD-Q4_K_M GGUF
#    (add --n-cpu-moe 1 on ECC 24 GB GPUs such as the L4; standard 24 GB like a 3090 does not need it)
~/llama.cpp/build-cuda/bin/llama-server \
  -m ~/models/Qwen4-35B-A3B-UD-Q4_K_M-00001-of-00002.gguf \
  -ngl 99 -c 262144 -b 2048 -ub 512 -fa on -np 1 \
  --oasiskv --oasiskv-kv-quant int8 \
  --oasiskv-cache-mode mixed \
  --oasiskv-cache-dir ~/basinkv_cache \
  --oasiskv-cache-ram-mb 8192

Resources & Links:

Paper/blog with more details:

  • https://zellige.ai/research/basinkv-qwen4

Github repo:

  • https://github.com/zellige-ai/basinkv

And thank you to everyone on the last post who offered suggestions and feedback, All is appreciated!


r/LocalLLaMA • • 16h ago

Showcase It’s built! My local LLM homelab pc is finished

Thumbnail
gallery
148 Upvotes

It’s built! My local AI home lab assembled

For this build, I took apart my gaming pc, and transplanted it into a new mobo, case and other goodies. All this was to add 2 Quadro RTX 8000s to massively increase my vram.

My specs:
CPU: Intel i7-14700f
RAM: 32gb DDR5-6000 ram (times are tough, I’ll upgrade later)
Motherboard: MSI MEG Z790 ACE
GPUs:
2x passive Quadro RTX 8000
1x RTX 4070 super (for display and gaming)
NV Link bridge for the quadros
1500w Corsair PSU
Arctic AIO
Corsair 7000d case
Some server fans for the GPUs
And some other miscellaneous items

Overall, I’ll have 96gb of vram across my 2 new GPUs, and I’ll be able to run some pretty cool models on it. There is plenty of room to upgrade in the future with ram expansions or a new GPU instead of my 4070. It’s my first custom build, and I’m pretty happy with it. I’m planning on running pruned Deepseek and GLM models, Deepseek models, and any other interesting models I see coming out. It’s mostly a hobby build and for fun, to see what fun things I can make and do with AI.

I know the GPUs are old and limited compared to modern cards, but it was a pretty good deal of vram per dollar I think. Memory bandwidth is also almost exactly the same as a r9700 too, so that was interesting as well. I think I’ll have a lot of fun with this build.


r/LocalLLaMA • • 5h ago

News Kvark-Sparkle-2.0-35B-A3B: our Qwen4-35B-A3B fine-tune with 34% fewer reasoning tokens (Apache 2.0)

20 Upvotes

Hi all! With Qwen4 out, we wanted to see how fast we could bring what we learned from Sparkle 1.x to the new generation. So today we're releasing Kvark-Sparkle-2.0-35B-A3B, built on Qwen4-35B-A3B and the first MoE model in the Sparkle family.

Initial results across 10 benchmarks:

  • -46.8% median, 34.2% fewer reasoning tokens on average, with fewer tokens on all 10 benchmarks and up to 63% less
  • Better accuracy on GPQA Diamond, tool calling and HMMT
  • Less than 2 points of accuracy trade-off on average

For us, efficiency isn't just about faster answers, it's about getting more out of the same hardware.

This is our first iteration on Qwen4, and there's still plenty of room to improve. Open weights, Apache 2.0:

Give it a try and let us know what you think and stay tuned for new versions!


r/LocalLLaMA • • 3h ago Heartwarming

Discussion Qwen4 35B-A3B NVFP4 basalt. 'The last page' anime using python

12 Upvotes

Inspired by the Chetaslua X post about 'the last page', I experimented with qwen4 35B-A3B to create an animation in the style of Studio Ghibli in pure python with sound. The results are good. The model of this size drawing this cohesive animation is impressive.

I used Qwen4-35B-A3B nvfp4 with the basalt engine. Harness is OMP. It runs at 170t/s on my 5070ti 12GB VRAM laptop.

Here is the modified prompt I feed to the model: https://github.com/ML-Datascientist/qwen4-anime-the-last-page/blob/main/PROMPT.md the model took around 512k tokens to write the python script, add audio and render as a video. The model did everything end to end without me taking any action.

It would be interesting to see Q8 quant of this model and QFN3.8 animation style as well.


r/LocalLLaMA • • 1h ago Heartwarming

New Model Qwen4-35B-A3B on Blackwell: 256K context, 16-request throughput, and quality — TensorSharp vs llama.cpp, vLLM & SGLang

Post image
9 Upvotes

Hello,

I'm the author of TensorSharp and adapted it with Qwen 4-35B-A3B, and then benchmark it on RTX PRO 4500 against llama.cpp, vLLM and SGLang on both performance and quality. Hopefully, it could be useful to anyone.

The attached picture shows results and any comments and suggestions are welcome here.

Sorry that I'm not a native English speaker, and this channel has a strict rules to not allow use AI edited post, so I have to post my raw version with lots of errors. Sorry for about it and inconvenience.


r/LocalLLaMA • • 16h ago

Discussion I upcycled Qwen3-0.6B with 3× recurrent looping, 512M Engram lookup memory, 10.7× smaller core KV (CSA2+FP4), and early-exit

Post image
149 Upvotes

I modified Qwen/Qwen3-0.6B-Base to loop its middle 20 layers up to 3× per token (68 effective layers from a 0.6B backbone), added a 512M 2/3-gram Engram lookup table, compressed cross-loop core KV by 10.7× so looping doesn't 3× memory, and ported the whole thing natively to llama.cpp.

TL;DR numbers (all 0.6B backbone; trained 20B tokens):

  • 8K Val PPL: 2.96 vs. 3.60 matched 6B-token standard Qwen3-0.6B (−17.6%)
  • Coding: 47.6% HumanEval (+8.5 pts), 48.6% MBPP (+7.4 pts)
  • Tool Calling (BFCL v3): 61.3% Pre-RL / 58.5% Final (mostly from multi-turn SFT; 96.8% valid JSON)
  • Long Context: 10/10 8K & 16K NIAH under 10.7× FP4 KV (caveat: multi-key RULER drops past 8K since Stage 2 trained at 8K; MMLU-Redux dips −3 pts)
  • Early-Exit: 2.55× faster than fixed 3-loop on H200 (1.22 avg loops/token) with slightly higher GSM8K (51.6% vs 51.2%)

Quantization highlights (34 GGUFs benchmarked, chart attached):

  • Best all-rounder: qwen3looped-Q4_K_M-imatrix-compact.gguf (0.72 GB, 4-bit Engram, 95.2% BF16 recovery / 90.5% top-1)
  • Near-lossless: qwen3looped-Q8_0.gguf (1.37 GB, 98.2% top-1, 0.0015 KL)
  • Imatrix matters a ton on looped weights: cuts Q4_K_M KL nearly in half (0.0667 → 0.0377) and boosts Q2_K by +23.4 pts
  • Local KV: -ctk q8_0 -ctv q4_0 is ~805 MB total at 16K context (96.6% top-1)

Why? Why not, I felt like exploring what this combination of ideas would produce. Why Qwen3 0.6B? Compute, time, and this is just a proof of concept. AI usage? Yes.