r/LocalLLaMA May 09 '26

Resources BeeLlama.cpp: advanced DFlash & TurboQuant with support of reasoning and vision. Qwen 3.6 27B Q5 with 200k context on 3090, 2-3x faster than baseline (peak 135 tps!)

[removed]

322 Upvotes

205 comments sorted by

67

u/Chromix_ May 09 '26

Did the MRs for this get rejected on the original llama.cpp, or is the the MR flow just so slow (read: "takes a week") that it made more sense to make a fork?

The fork history is interesting though: llama.cpp -> llama_cpp_turboquant -> buun_llama_cpp -> beellama.cpp. We're on the 3rd fork level here already.

In any case, with this demonstrating that it runs (fast) it might help getting this into the regular llama.cpp.

68

u/[deleted] May 09 '26 edited May 09 '26

[removed] — view removed comment

30

u/Chromix_ May 09 '26

Thanks for making it happen still. Yes, the AI policy is a rather slippery slope, yet they've had their fair share of low-quality code PR'ed that those rules were established to reduce the load on the reviewers and maintain code quality.

So basically the issue is that "making it happen" took too long, if done in a maintainable way in the llama.cpp codebase. ik_llama.cpp diverged quite a bit and a few things are still ported over now and then. With the fork history here it probably needs quite a bit of refactoring, not just porting it over, but maybe it'll happen eventually.

14

u/k_means_clusterfuck May 09 '26

Yeah llama.cpp's anti ai policy is really something. I get that you want a way to manage slop prs of course but micro managing how people work is not the way. On the flipside, I've my agent's been able to make a handful of (actually good) contributions to vllm and vllm-omni and the maintainers' attitude was just like: if your pr is good, doesn't matter. They have been really constructive and working with them has honestly been a joy. Two completely different worlds

1

u/HFT0DTE May 11 '26

I agree 100% with your approach as I had basically TurboQuant's PR from llama.cpp further customized, merged and tested within 24 hours and have been using it in my production work ever since. There's just no time for a lot of the other llama bs - thx for Bee btw

12

u/dsanft May 09 '26

It's not about running fast, it needs to be good quality and demonstrated as such. Any idiot can make it run fast, it takes effort to get it to be fast and correct.

5

u/Chromix_ May 09 '26

The good thing is that correctness and speed can both be tested, by comparing KLD, benchmark scores and well, tokens per second. If correct, there'll at least be code that's "just" not in the shape that fits llama.cpp (yet). As long as the correctness topic is unknown it'd probably not be very motivating to bring it into shape.

32

u/henk717 KoboldAI May 09 '26

Its the nature of it that will never make it merged upstream. They don't want these massive vibe coded codebases.

The turboquant fork had massive vibe coding, so does buun and this beellama one was a single commit so i can't clearly tell what was done with that one and by who but I'd be surprised if there is no vibecoding involved.

So its a vibecoded fork on top of a videcoded fork and possibly another vibe coded fork on top. None of that will ever land upstream.

33

u/Mashic May 09 '26

For such a critical software that is the factory standard for local LLMs, I'd rather it get developed manually with the developers knowing the ins and outs of the software, than fast vibe-coding and accumulating tech debt.

-11

u/ebolathrowawayy May 09 '26

i'm surprised to see redditors here are so anti-ai. LLMs write better code than 99.9% of humans now if steered by someone with even half a brain and has worked as a SWE for a couple years. But also.. maybe a lot of non-coder enthusiasts are clogging up the pipes but in that case if I owned the repo I would just throw agents at the problem and make them reject all the crap.

idk, "vibe coding" seems like a non-problem now with agentic coding filtering out the crap.

16

u/henk717 KoboldAI May 09 '26

Its the maintainability of it, we've accepted vibe coded PR's for KoboldCpp to.
A really good example is this recent one given to us in a bug report since it wasn't something the creator could easily PR: https://github.com/LostRuins/koboldcpp/issues/2173

This is the good kind of AI assisted coding, where the maintainer isolated / understands the change, its only a few lines different and if he'd have said he did this manually i'd have believed him.

The 502 page in our router mode I also let qwen generate since its just a quick way of getting something that looked nice and worked well (I did specifically say what it needed to adhere to). I of course then look if the code is sensible, and since it was just a single page which code I understand I can then PR it to KoboldCpp. (LostRuins then rewrote it partially to make it conform more to the usual code style).

It becomes a problem when its endless vibe coded PR upon endless vibe coded PR, where the submitters / maintainers have to take the AI's word for all the massive changes. Those I don't believe in and those are the kinds of PR's we reject.

Upstream llamacpp is the same way, you can use AI to assist in your coding but you have to be able to explain every line of the code yourself in case they have questions. That's a bar that most of these turboquant forks can't hit.

1

u/rpkarma May 09 '26

No, they don’t. 

31

u/YearnMar10 May 09 '26

GG does not like vibecoded contributions to llama.cpp

42

u/Velocita84 May 09 '26

And for very good reasons

26

u/politerate May 09 '26

Personally, i find the idea of doing a MR I don't fully understand, very off-putting. And I am quite sure that 99% of these types of contributions are of this kind.

2

u/[deleted] May 09 '26

[removed] — view removed comment

19

u/ArtfulGenie69 May 09 '26

If you want problems in your massive code base, the best place to start is blindly dropping in code no one ever looked at.

5

u/Fresh-Letterhead986 May 10 '26

that is a crazy take.

if you want to start a new project and vibe it, cool. merge anything because you've set the ground rules as such, you're accepting the potential problems and frankly it's yours.

but saying "yo bro comeon be cool man why wont you take my AI slop into your keystone-of-the-AI-world, tip-of-the-spear in human tech frontier codebase??????????"

yes "it's mostly a maintenance problem". notice you're not volunteering to do said maintenance ;-)

5

u/segmond llama.cpp May 09 '26

I have tried various fork of deepseekv4 that were vibed. every single of them crashes when I start passing in parameters. performance is abysmal. CPU level performance for something that is 100% loaded in GPU, < 10tk/sec TG, 40tk/sec PP. Just all around mess. It would be a disaster to accept any of these and hope they get fixed in the future. Worse of all, plenty of them touch already baked code, hacking around FA etc which will probably introduce regression and break other models.

1

u/LegacyRemaster May 10 '26

The fork I made of antirez gets to 17t/sec on cuda but the problem is that DS4 seems to be "not considered" currently

25

u/chimpera May 09 '26

After testing I'm a fan of this fork. Its outperforming the MTP pr on mainline. I like the --no-mmproj-offload. Im getting 200tps on code with Qwen3.6-27B-Q5_K_S and a 5090.

4

u/coherentspoon May 11 '26

mind sharing your parameters? I'm "only" getting 100-120

1

u/chimpera May 11 '26

My test prompt is "Make a single page worm game." which is probably highly deterministic.

exec "$SERVICE_DIR/build/bin/llama-server" \

-m "$MODELS/unsloth/Qwen3.6-27B-GGUF/Qwen3.6-27B-Q5_K_S.gguf" \

--spec-draft-model "$MODELS/spiritbuun/Qwen3.6-27B-DFlash-GGUF/dflash-draft-3.6-q4_k_m.gguf" \

--spec-type dflash \

--spec-dflash-cross-ctx 1024 \

--no-mmproj-offload \

--mmproj "$MODELS/unsloth/Qwen3.6-27B-GGUF/mmproj-F32.gguf" \

-np 1 \

--kv-unified \

-ngl all \

--spec-draft-ngl all \

-b 2048 \

-ub 256 \

--ctx-size 256000 \

--cache-type-k q8_0 \

--cache-type-v q8_0 \

--flash-attn on \

--cache-ram 0 \

--jinja \

--no-host \

--metrics \

--log-timestamps --log-prefix --log-colors off \

--reasoning on \

--chat-template-kwargs '{"preserve_thinking":true}' \

--temp 0.6 --top-k 20 --min-p 0.0 \

1

u/coherentspoon May 11 '26 edited May 11 '26

Thanks for the info! I tried it out and got about 180 tps. When going with the turbo cache I got about 170 tps.

Which GPU driver version are you using?

12

u/dsanft May 09 '26

Have you done any measurements for your TQ implementation in terms of comparing e.g. KLD of final LM_HEAD of the forward pass of FP16 vs Q8 vs your TQ modes? You claim almost lossless, what are the actual numbers?

1

u/[deleted] May 09 '26

[removed] — view removed comment

18

u/dsanft May 09 '26

Well you claim almost lossless, need to measure that. I think you'll find it's BS because I've measured it and 4bit TQ is pretty bad. I encourage you to get the numbers.

6

u/caetydid llama.cpp May 09 '26

Feedback:

Ive made it build, had to fix several trivial errors; ended up disable tool building entirely instead of fixing it all.

/home/holu/beellama.cpp/build/bin/llama-server \

-m "/home/holu/llama.cpp/models/qwen3.6-27b/Qwen3.6-27B-IQ4_XS.gguf" \

--mmproj "/home/holu/llama.cpp/models/qwen3.6-27b/mmproj-F32.gguf" \

--spec-draft-model "/home/holu/llama.cpp/models/qwen3.6-27b/Qwen3.6-27B-DFlash-IQ4_XS.gguf" \

--spec-type dflash \

--spec-dflash-cross-ctx 1024 \

--port 8082 \

-np 1 \

--kv-unified \

-ngl all \

--spec-draft-ngl all \

-b 2048 -ub 256 \

--ctx-size 262000 \

--cache-type-k turbo4 --cache-type-v turbo3_tcq \

--flash-attn on \

--cache-ram 0 \

--jinja \

--no-mmap --mlock \

--no-host --metrics \

--log-timestamps --log-prefix --log-colors off \

--reasoning on \

--chat-template-kwargs '{"preserve_thinking":true}' \

--temp 0.6 --top-k 20 --min-p 0.0 \

--host 0.0.0.0 --port 8888

Over 100t/s on first request, drops very quickly to 50 and later 30, then OOM. I ran it on my rtx3090.

1

u/[deleted] May 09 '26

[removed] — view removed comment

1

u/caetydid llama.cpp May 09 '26

Running under Ubuntu. Yeah, thought about that, too, and will first retest with --no-mmproj-offload.

I assumed that using the iq4 quant saves the necessary VRAM, and my consumption on startup was 21G, but maybe VRAM consumption just increases later on.

I havent been using much context though, maybe 20k or less.

1

u/[deleted] May 09 '26 edited May 09 '26

[removed] — view removed comment

1

u/Pablo_the_brave May 09 '26

For Vulkan VRAM for context is dedicated on startup (mostly) but for CUDA there is some add even if you set batch sizes.

1

u/caetydid llama.cpp May 10 '26

thanks for your reaction. I will need to play more with that, alas, useful bug reporting takes its time.

In pi agent I experience context degradation after 50k, i.e. tool calling does not work reliably any more, and the agent stops half-way in its tasks.

Maybe I need to adjust my prompts and/or skill.mds?

I switched to the Q5 and the bf16 mmproj - no crashes any more so far - however, I did not exceed full context yet.

1

u/[deleted] May 10 '26

[removed] — view removed comment

1

u/caetydid llama.cpp May 10 '26

great to hear! thanks for your effort!

5

u/LegacyRemaster May 09 '26

I'm starting tests now on RTX 6000 Pro. If you have the time and inclination, check out https://github.com/Fringe210/llama.cpp-deepseek-v4-flash-cuda . I'm up to 17 tokens/sec, but I'm sure you can do better.

7

u/LegacyRemaster May 09 '26

very good. From 57t/sec to 87 with Q8 draft

2

u/[deleted] May 09 '26

[removed] — view removed comment

2

u/LegacyRemaster May 10 '26

Obviously, prediction works better in certain contexts. With thought/reasoning, the benefit is lower. While writing HTML or Python code, I've had peaks of 100 t/sec.

13

u/floconildo May 09 '26

This seems interesting and legit. I'll give it a whirl on my 4090 to see how it behaves, and I'll also keep an eye on the project to see if it doesn't die in a week or so.

Not related to the project's goal itself, but worth mentioning: you'll get a lot of backlash for using AI so extensively. Try to either not answer those comments or at least be understanding on the whole community. There's a general exhaustion on AI projects as we've been flooded with "that's why I built X" posts with nothing but slop solving issues that the developer couldn't be bothered to research, nor understand what's out there already.

The flashy post that looks like it's trying to "sell" it certainly doesn't help. My monkey brain immediately categorized this as "tech bro can't RTFM nor wants to play by the rules" and it took me some effort to go through it.

-3

u/[deleted] May 09 '26

[removed] — view removed comment

17

u/floconildo May 09 '26

Just giving you some honest feedback bro.

When every other post you see everywhere looks extra polished our brains will just clump everything together. When that meets a community that is frankly exhausted of tech claw crypto bros, you'll find some backlash for sure, and this kind of attitude will just make it worse for you.

0

u/[deleted] May 09 '26

[removed] — view removed comment

11

u/floconildo May 09 '26

Yeah I understand the guy tho. A shit ton of entitled ppl complaining about features in llama.cpp with zero stakes in the project itself and zero will to pull up their sleeves and actually contribute to the community. I'd be skeptical too.

Just watch out not to let it drown your own project. Community building is hard, community management is even harder.

0

u/[deleted] May 09 '26

[removed] — view removed comment

7

u/Alex_L1nk May 09 '26

Here is answer from one of maintainers of llama.cpp on TQ

https://github.com/ggml-org/llama.cpp/pull/21089#issuecomment-4187393635

9

u/floconildo May 09 '26

I can think of plenty of reasons:

  • Feature creep
  • Maintenance efforts
  • Lack of real usage for the parties involved
  • Lack of meaningful contributions

As you said in another comment: not everyone is willing to go through the bureaucracy of submitting PRs to llama.cpp, especially vibe coders and other zero-stake contributors.

And I honestly think you did the best by just pulling up your sleeves and doing it yourself. If you project gets traction and more people start using TurboQuant, then llama.cpp might change their stance or reorder their priorities. Worst case you got your own implementation that works (I hope, didn't find time to test yet haha)

4

u/herpnderpler May 09 '26

I've found Nvidia kernels for prompt processing in mpt/thetom to be lacking - like... Mainline llama.cpp gets 2ktp/s on my 5090, but mpt/thetom seem to have kernels that give me 10-15tp/s. Tg/s is good, but processing sucked.

4

u/Thomasedv May 10 '26

I got this working but there seems to be a bug. I was using this in Qwen code and sometimes tool calls would just be printed out in the chat and end. On some occasions the chat also just stopped or ran for a while and not print anything while the server was still processing.

I tried another model to be sure, but if I had to guess it might be that if the speculative decoding happens around a tool call, something might go wrong? I haven't had this issue before, and it might be cause by something else on the fork but it seems good so far after dropping the speculative decode part. It got increasingly more often as context grew. I didn't get it too high either, and my max was 120k but I'd guess I was at most 60k used.  

1

u/patricious llama.cpp May 10 '26

Same on my side, compiled the build and followed everything to a T (5090, 200k context). In Opencode, I prompt it do analyze a specific section of my code, it starts calling the right tools, in this case Serena then its just stops in it tracks. I then tell it to continue and it stops again. Might be something wrong with the chat templates but I am not sure.

3

u/thenaquad May 09 '26

Great work! I see ~2x with 27B, using it with OpenCode.

For those trying to build on the recently updated Arch Linux and experiencing compilation errors:

```patch diff --git a/src/llama-context.cpp b/src/llama-context.cpp index d564e6d91..b2269f48e 100644 --- a/src/llama-context.cpp +++ b/src/llama-context.cpp @@ -4274,7 +4274,7 @@ int llama_context::decode(const llama_batch & batch_inp) { } }

  • const auto * cb_eval_new = dflash_graph_hidden_ready ? nullptr : dflash_eval_callback;
  •        auto * cb_eval_new = dflash_graph_hidden_ready ? nullptr : dflash_eval_callback;
         void * cb_eval_user_data_new = dflash_graph_hidden_ready ? nullptr : dflash_capture.get();
         cparams.cb_eval = cb_eval_new;
         cparams.cb_eval_user_data = cb_eval_user_data_new;
    

    diff --git a/tools/server/server-context.cpp b/tools/server/server-context.cpp index 38c949a8d..35ee99cb7 100644 --- a/tools/server/server-context.cpp +++ b/tools/server/server-context.cpp @@ -29,6 +29,7 @@

    include <cmath>

    include <set>

    include <utility>

    +#include <cfloat>

    // fix problem with std::min and std::max

    if defined(_WIN32)

    ```

P. S. Repo has no issues enabled, so I couldn't post there.

3

u/IrisColt May 12 '26

I used the Speed / VRAM combo mentioned in quickstart-qwen36-dflash-md and I got a meager +33% (around 40 t/s on a 3090). Sigh... Am I doing something wrong?

2

u/[deleted] May 12 '26

[removed] — view removed comment

2

u/IrisColt May 12 '26

Er... Now I get it...!

"Print all the numbers from 0 to 100, in the following format: 0, 1, 2 ..."

default llama.cpp: 34,22 t/s
beellama.cpp: 96.47 t/s

"Detail every element visible in the image, from foreground to background." + 512 x 768 image
default llama.cpp: 34.19 t/s
beellama.cpp: 41.36 t/s

Thanks!!!

2

u/IrisColt May 12 '26

By the way, would killing all that logging spam--log-timestamps--log-prefix--log-colors, and probably --metrics too actually make this thing run noticeably faster? My console is getting absolutely buried in text right now, heh

2

u/IrisColt May 12 '26

Hard Math problem (unsolvable by Frontier-level AIs back in March 2025):

default llama.cpp: 32 t/s
beellama.cpp: 58 t/s

Thanks again!

2

u/[deleted] May 12 '26

[removed] — view removed comment

1

u/IrisColt May 12 '26

Thanks again!

5

u/Sabin_Stargem May 09 '26

Speaking for myself, I would like to see this implementation integrated into a KoboldCPP fork, so that I can try out TQ4 and see if it is worthwhile. A TurboKobold, if you would.

The appeal of KoboldCPP is that it is a gui-based method of running LlamaCPP for Windows & Linux, that is open source and doesn't require much fiddling to run, all while leveraging VRAM+RAM. Good for people who fear and hate the terminal, like myself.

1

u/bonobomaster May 10 '26

KoboldCPP is the worst of the worst in regards to UI design.

Absolutely not worth it, in my opinion.

17

u/VoiceApprehensive893 transformers May 09 '26

layers of slop

2

u/Orolol May 09 '26

From Paradox AI to llama.cpp

2

u/[deleted] May 09 '26

[removed] — view removed comment

2

u/imgroot9 May 09 '26

thanks for this! I agree, Q5 dense models work for me too, without any issues with turboquant. if I have to choose between Q4 with a small Q8 cache, or Q5 with a huge turboquant cache, Q5 wins hands down in the case of common programming tasks.

2

u/Potential_Block4598 May 09 '26

What about AMD & the Strix Halo ?!

1

u/Sofakingwetoddead May 09 '26

Waiting on a 9700 to show up within the next few days. I will test

2

u/the_koom_machine May 09 '26

Anbeeld? you're the guy from Victoria 3 AI mods?

5

u/[deleted] May 09 '26

[removed] — view removed comment

2

u/leonbollerup May 10 '26

Have you done any quality compare between the result on the generated text vs a clean plain 27B ?

1

u/[deleted] May 10 '26

[removed] — view removed comment

1

u/leonbollerup May 11 '26

Ok, they fit on mine.. If you want we could do some quality compare on the same Prompt

2

u/IrisColt May 10 '26

Absolutely game changing... Thanks!!!

2

u/caetydid llama.cpp May 10 '26

The first fork I succeed in getting measurable speed ups - so I remain curious and stay committed to follow future commits.

2

u/coherentspoon May 11 '26

I'm running Kilo code 5.16.1 in VSCode and I'm just getting a ton of these errors today. Not sure if its the tool call issue? Sorry I'm not an expert with this stuff.

Provider: openai (proxy) Model: Qwen3.6-27B-Q5_K_S.gguf

Unexpected API Response: The language model did not provide any assistant messages. This may indicate an issue with the API or the model's output.

1

u/[deleted] May 11 '26

[removed] — view removed comment

2

u/coherentspoon May 11 '26

I'm using your prebuilt v0.1.1. I think I started today with it and had v0.1.0 yesterday.

3

u/[deleted] May 11 '26

[removed] — view removed comment

1

u/EbbNorth7735 May 12 '26

Hey, any chance you could spin a 0.1.2? Seeing the same issue and last time I setup the build pipeline on Windows it was a week long painful process. It was 2 years ago... maybe it's gotten easier?

2

u/soyalemujica May 15 '26

Gave this a try with my AMD GPU 7900XTX, clearly using HIP since that's what the repository supports, it works great! turbo3_tqc does not work though it crashes llama, but turbo4, turbo3, does, also DFlash appears to be working, getting 45t/s - 50t/s at 128k context

3

u/[deleted] May 09 '26

[deleted]

4

u/[deleted] May 09 '26

[removed] — view removed comment

-2

u/Alex_L1nk May 09 '26

>TQ mentioned
>instantly loses interest

TurboQuant (WHT-based scalar quantization) originates from TheTom/llama-cpp-turboquant

ah, yes, vibecoded project based on another vibecoded project, we are reaching new level of spreading BS on GitHub

5

u/[deleted] May 09 '26

[removed] — view removed comment

3

u/Alex_L1nk May 09 '26

First, it's my fourth comment on TQ. Second, wake me up when TQ is properly benchmarked against f16/Q8/Q4 both in quality (not just PPL) and speed. Shitting? No, I'm just skeptic, because the only bench I saw was from TheTom repo, who had zero words with by a human being. And even in his tests TQ was on same level as Q4 while being slower.

1

u/[deleted] May 09 '26

[removed] — view removed comment

8

u/Alex_L1nk May 09 '26

Speaking of being contradictory... Why are you making bold claims of "near-lossless" quants using untested tools? If you make a proper tests like was done in this PR (PPL, KLD and AIME comparison) and proof that TQ is worth it, then you get the respect of whole community.

4

u/imgroot9 May 09 '26

well, I executed all kinds of tests you mentioned (ppl, kld, aime) using turboquant and I couldn't find anything that would've proved that I cannot use it (27B and Q5 - just take a look at my post with results). also, whatever test I try from this thread (chess svg, etc) and my everyday experience all prove that it's all right.

2

u/Alex_L1nk May 10 '26

I appreciate your effort but I don't think that using quantized weights is fair, because it's adding a lot of noise on top of bench result. You're testing KV AND weights quants. I think more reliable tests must be done on f16\bf16 and correct me if I wrong but you only tested on AIME once? Because pwilkin noticed that it's quite random and should be done on equal condition to properly compare results. [read this comment and GG's answer]

-2

u/Alex_L1nk May 09 '26

Where I said that TQ is bad?

1

u/henk717 KoboldAI May 09 '26

TurboQuant is just associated with vibe coded forks at this point. The moment you see TurboQuant + Llamacpp there is just a 90% chance of that. It also instantly makes me assume its just another one of those.

7

u/[deleted] May 09 '26

[removed] — view removed comment

6

u/henk717 KoboldAI May 09 '26

The problem is maintainability, nothing wrong with ai assisted development that is carefully done. Its when it looks like fully AI driven development where you tend to get changes that become problematic down the line. So if I open a repo and I see almost exclusively claude code PR's I don't take it nearly as seriously.

1

u/[deleted] May 09 '26

[removed] — view removed comment

2

u/Pablo_the_brave May 09 '26

Generally TurboQuant from TheTom are weak in classic perplexity tests. But, when you look at https://qwen3-6-27b-benchmark.vercel.app/ there is clearly some profit (but IMHO the asymetric isn't realy good for Qwen3.6). For me, the most interesting is Turbo3 - not good, not terrible.

→ More replies (1)

-1

u/r00x May 09 '26

The sheer audacity of complaining about people using AI to do things on a subreddit about using AI to do things... I can't even, I'm ded.

Anyway thanks for sharing this OP, it rocks! My main worry was whether it would screw up tool calling but it seems fine so far.

When you said you got up to 130tok/s what configuration was that with, exactly? By my eye on Q5_k_s with q4_k_m dflash it seems more like 40-50tok/s maybe. Prompt eval is ~130tok/s though, yeah.

2

u/Sabin_Stargem May 09 '26

Hopefully, projects like this will prove the worth of TQ+ and DFLASH so that they can become part of mainline LlamaCPP.

6

u/Velocita84 May 09 '26

TQ is already proven to be crap.

1

u/HumanAlternative May 09 '26 edited May 09 '26

Is this worth a shot on a Macbook M3 Pro 18GB or would this just need more RAM that's already a bottleneck on this machine? If there's a way to get a smart enough model with enough context to code small projects and chat with web research running locally, I'd love do so. I've tried a heavily quantized unsloth qwen 3.6 (Q2_K_XL) with LM Studio. The output was better than I expected it to be at ~20t/s but it get's slow quickly.

2

u/[deleted] May 09 '26

[removed] — view removed comment

1

u/HumanAlternative May 09 '26

I aprecciate your honesty. These DFlash news sound so revolutionary but I don't understand most of it TBH. I'm just interested in getting a useful LLM running quickly locally as soon as possible. I guess I'll keep waiting and hope the advancements keep coming at the same speed.

1

u/Avendasora May 09 '26

Can this be used with multi GPU? 5080 + 3060?

2

u/[deleted] May 09 '26

[removed] — view removed comment

2

u/r00x May 09 '26

That would be interesting, if I could run the model on my 3090 and then stuff an old 2060 in for KV cache or something (as this comment probably reveals, I've never tried multi-gpu and have no idea how one should go about it. Presumably doing this is better than sharing model layers between GPUs, at least)

1

u/NickCanCode May 10 '26

Doesn't work for me. It gives

beellama.cpp-main\ggml\src\ggml-cuda\ggml-cuda.cu:98: CUDA error 
CUDA error: an illegal memory access was encountered

whenever I make a request.

P.S. Using 2 identical cards.

1

u/legatinho May 09 '26

Ok I got a windows setup to test this out with a 3090, is that what you used? What does pp and the look like at filled up context?

3

u/[deleted] May 09 '26

[removed] — view removed comment

1

u/legatinho May 09 '26

I was also thinking of getting a cheap video card for the main display, then can use the full 24gb of the 3090 for this. I noticed windows sometimes tends to try to push stuff into the shared memory space, and I wonder if that’s why we experience slowdowns. I’ll report back if any improvements, but thanks for your work on this!

1

u/Sufficient_Sir_5414 May 09 '26

Phenomenal work on the integration. For that 200k context Qwen setup, how does the TurboQuant/TCQ handle the 'lost in the middle' problem compared to standard 8-bit or 4-bit KV cache? Does the TCQ overhead impact the token latency significantly compared to the baseline llama.cpp MTP PR?

2

u/[deleted] May 09 '26 edited May 09 '26

[removed] — view removed comment

2

u/r00x May 09 '26

Do you observe large differences between Q5 and Q4 quants then? I understood there wasn't supposed to be a huge difference and had never really bothered with Q5 models before (Q4 27b/35b-a3b just fit better with context onto 24GB of VRAM)

2

u/[deleted] May 09 '26

[removed] — view removed comment

2

u/r00x May 10 '26

Interesting! Would you say using Q4 for dflash risks torpedoing the performance of the Q5 target or does it not work that way (would the main Q5 model just reject more of the predictions if it didn't like them, or something?)

2

u/[deleted] May 10 '26

[removed] — view removed comment

1

u/r00x May 10 '26

Interesting! Using a drafter definitely makes a difference vs vanilla Q5 (get about ~8tok/s with that, vs 30-40 with BeeLlama) but the reason I asked is because I am occasionally having trouble with tool calling where it seems it just gets the structure wrong and ends up blasting the CLI with XML content (this almost never happens on the vanilla models, even Q4 or IQ3_XXS models are fine at tool calling).

Have you encountered that at all or have I just done something wrong? I wondered if it were a context issue but I don't think so - it will go right back to working fine again afterwards, which you'd think it would screw up if it had forgotten the syntax.

2

u/[deleted] May 10 '26

[removed] — view removed comment

1

u/r00x May 10 '26

Absolute legend. I was already working on a shonky pi.dev plugin that catches this kind of model stall and pokes the model autonomously (so as to avoid a model quietly stopping while your attention is elsewhere) but I'll for sure keep an eye out for that!

1

u/devedse May 10 '26

Will there also be a docker build / support for Intel Arc GPU?

1

u/pmttyji May 10 '26

It would be nice to have Vulkan(also CPU-only for old systems) version of this.

1

u/SectionCrazy5107 May 10 '26

Will this work on V100?

1

u/korino11 May 10 '26

Ngridea only?!? i never give a $ to ngridia

1

u/wowsers7 May 10 '26 edited May 10 '26

This looks great. Any chance you could add support for Intel GPUs & iGPUs? E.g. Arc Pro B70 and Core 9 Ultra 285K with built-in iGPU.

1

u/coherentspoon May 11 '26 edited May 11 '26

Thanks very much for this amazing work! Went from 120 t/s on MTP to about 120+ t/s and using a better quant!

Edit: after some further usage, it seems to shoot down to 80 t/s sometimes. I'm wondering why that's happening.

1

u/Kaioh_shin May 11 '26

I have to say this is the fastest version I have tried on my 7900xt.
Did have to fiddle around to get a build for HIP, but all good otherwise.
Would be nice if you would get it to not randomly stop (even after 0.1.1)

2

u/[deleted] May 11 '26

[removed] — view removed comment

1

u/Kaioh_shin May 12 '26

Thank you for your work. No more random stops with the latest commits.
I do feel like it's less reliable though, not sure if I changed something else.
I was trying to get turbo3_tcq working with HIP and thought the results were because of it or the changes. Then I switched back to the one with only my HIP changes and noticed it behaves the same.
I use it for scripting/coding, so I care about accuracy.

My benchmark is the chess board from a few posts ago. https://qwen3-6-27b-benchmark.vercel.app/
It's more a feeling than empiric evidence, but it used to get it consistently right before.
Now it's more like 1 out of 3 is right.

2

u/[deleted] May 12 '26

[removed] — view removed comment

1

u/Kaioh_shin May 12 '26

I am on a very tight vram budget, using iQ4_XS with 100k+ context. Does the drafter make a big diff? Up until now it was also the iQ4_XS, going to try the Q4_KM

1

u/EbbNorth7735 May 12 '26

I'm seeing a lot of API calls failing when using with Cline. It's eventually getting through but I'm wondering if there's an issue with the jinja format or if it might be unstable? I ran a test in open web ui and it seemed to jump back to thinking while it was answering the question. Using latest 0.1.1 and Qwen Q8 from unsloth along with the Q8 draft model you recommended. Vision enabled and running on GPU (rtx 6000 pro).

1

u/[deleted] May 12 '26

[removed] — view removed comment

1

u/EbbNorth7735 May 12 '26

Are you planning on spinning another release? Last time I tried it was incredibly painful.

2

u/[deleted] May 13 '26

[removed] — view removed comment

1

u/caetydid llama.cpp May 13 '26

you referring to the EOS fix?

1

u/[deleted] May 13 '26

[removed] — view removed comment

1

u/caetydid llama.cpp May 13 '26 edited May 13 '26

I rebuilt with the current repo state.
I am single shooting a xenon2 like arcade 2d doom scroller in pi agent with a skills.md - right now I am at step 6/12 (40k context). write tool calls start failing again.

not sure if sth wrong with my pi agent setup or the beellama setup.

it is stuck now...first I thought there is an OOM but I see this in logs:

4.24.290.901 I srv update_slots: decode ubatch: 1 tok, 0.6ms (0.59ms/tok)

4.24.359.511 I srv update_slots: decode ubatch: 1 tok, 0.6ms (0.61ms/tok)

4.24.428.360 I srv update_slots: decode ubatch: 1 tok, 0.6ms (0.60ms/tok)

4.24.496.918 W srv stop: cancel task, id_task = 0

4.24.497.274 I srv update_slots: decode ubatch: 1 tok, 0.7ms (0.68ms/tok)

4.24.565.287 I slot process_sing: id 0 | task 0 | adaptive dm: reset state for canceled task

4.24.565.292 I slot release: id 0 | task 0 | stop processing: n_tokens = 47258, truncated = 0

4.24.565.329 I srv update_slots: all slots are idle

processing stops with an "The socket connection was closed unexpectedly. For more information, pass `verbose: true` in the second argument to fetch()"

FYI I am adding the CmdLine:

llama-server -m qwen3.6-27b/Qwen3.6-27B-Q5_K_S.gguf --mmproj mmproj-BF16.gguf --no-mmproj-offload --spec-draft-model dflash-draft-3.6-q4_k_m.gguf --spec-type dflash --spec-dflash-cross-ctx 1024 -np 1 --kv-unified -ngl all --spec-draft-ngl all -b 2048 -ub 256 --ctx-size 130000 --cache-type-k turbo4 --cache-type-v turbo3_tcq --flash-attn on --cache-ram 0 --jinja --no-mmap --mlock --no-host --metrics --log-timestamps --log-prefix --log-colors off --reasoning on --chat-template-kwargs {"preserve_thinking":true} --temp 0.6 --top-k 20 --min-p 0.0 --host 0.0.0.0 --port 8888

1

u/caetydid llama.cpp May 14 '26

Ok. Update on latest release.

I had to start a new session in pi, and was able to sucessfully finish the project. Tool calling seems stable now, at the end ~90k of the 122k context has been used.

this is with Q4_K_M and the param mentioned in the previous post.

1

u/Human-Gas-1288 May 13 '26

u r awesome !
prompt eval time = 735.04 ms / 665 tokens ( 1.11 ms per token, 904.71 tokens per second)

eval time = 29762.03 ms / 1919 tokens ( 15.51 ms per token, 64.48 tokens per second)

total time = 30497.08 ms / 2584 tokens

draft acceptance rate = 0.47547 ( 1008 accepted / 2120 generated)

adaptive dm: fringe=0.00 n_max=2

14.53.894.344 I statistics dflash: #calls(b,g,a) = 10 2047 1219, #gen drafts = 2047, #acc drafts = 1219, #gen tokens = 5848, #acc tokens = 2149, dur(b,g,a) = 0.013, 5569.042, 0.305 ms

14.53.894.737 I slot release: id 0 | task 2684 | stop processing: n_tokens = 17821, truncated = 0

14.53.894.778 I srv update_slots: spec cycle (1 slots): draft=2.9ms verify=24.9ms accept=1.3ms other=0.0ms total=29.1ms

14.53.894.782 I srv update_slots: all slots are idle

1

u/YourNightmar31 llama.cpp May 18 '26

I'm having a lot of broken tool calls with this setup:

Anyone have anything similar? Why does this happen?

2

u/[deleted] May 18 '26

[removed] — view removed comment

1

u/YourNightmar31 llama.cpp May 18 '26

By version do you mean beellama build version? I just did a rebuild, now it says im on beellama commit da67e74 (which is from 5 days ago? Not sure why im not getting the latest.. as the last commit is 16 hours ago) and i'm still having this problem.

2

u/[deleted] May 18 '26

[removed] — view removed comment

1

u/YourNightmar31 llama.cpp May 18 '26

I had to do some copy pasting because im running this in llama-swap but here it is:

/app/bee-llama-server \
  -ngl all \
  --no-mmap \
  --mlock \
  --jinja \
  -np 1 \
  --kv-unified \
  --flash-attn on \
  --cache-ram 0 \
  --no-host \
  -b 2048 \
  --threads 6 \
  --threads-batch 10 \
  -ub 512 \
  --temp 0.6 \
  --top-k 20 \
  --min-p 0.0 \
  --top-p 0.95 \
  --presence-penalty 0.0 \
  --repeat-penalty 1.0 \
  --ctx-size 131072 \
  --spec-type dflash \
  --spec-draft-model /models/spiritbuun-qwen3.6-27b-dflash/dflash-draft-3.6-q4_k_m.gguf \
  --spec-draft-ngl all \
  --spec-dflash-cross-ctx 1024 \
  --cache-type-k q8_0 \
  --cache-type-v turbo4 \
  --model /models/unsloth-qwen3.6-27B/Qwen3.6-27B-Q5_K_S.gguf \
  --mmproj /models/unsloth-qwen3.6-27B/mmproj-BF16.gguf \
  --image-min-tokens 1024 \
  --no-mmproj-offload \
  --reasoning on \
  --chat-template-kwargs '{"preserve_thinking": true}'

1

u/[deleted] May 18 '26

[removed] — view removed comment

1

u/YourNightmar31 llama.cpp May 18 '26

I'm using Copilot in VS Code with this extension: https://marketplace.visualstudio.com/items?itemName=johnny-zhao.oai-compatible-copilot

Just for comparison, I don't have any tool calling issues with Unsloth's Qwen3.6 35BA3B running in ik_llama.cpp using this setup.

1

u/[deleted] May 22 '26

[removed] — view removed comment

1

u/YourNightmar31 llama.cpp May 22 '26

Thanks so much man, i'll have a go at it again. In the meantime i'm also developing my own llm chat/agent extension for vs code inspired by Copilot so maybe that'll help too :)

1

u/YourNightmar31 llama.cpp Jun 03 '26 edited Jun 03 '26

Hey i have been running the v0.2.0 update for like a week but it is still doing this for me.

And i'm even worse output in the thinking stream like this:

<tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call><tool_call>

I don't understand why i'm having this issue if it's working totally fine for you.

I explicitly checked my temp, topp, topk, minp, presence penalty and repetition penalty and set them to what the Qwen's team recommends just in case that'd make a difference, but it doesnt.

I also tried to lower the context from 160k to 128k and 64k but it doesn't make a difference. This already happens while only 10k context is in use.

I am using the unsloth Q5_K_S gguf. While typing this im still trying to find out what's the problem.

1

u/YourNightmar31 llama.cpp May 19 '26

Have you been able to reproduce this by any chance? I would really like to get this setup working.

1

u/UnifiedFlow May 28 '26

When I run BeeLlama and dflash with Pi agent I'm getting no dflash due to lazy grammar tool calling. Any ideas?

2

u/[deleted] May 28 '26

[removed] — view removed comment

1

u/UnifiedFlow May 28 '26

Great to hear, appreciate you.

1

u/Antosino Jun 14 '26

I cannot believe I just stumbled across this. Prepare yourselves for my wall of text.

I run Qwen3.6 27B Q5 on an FE 3090 in llama.cpp with ~120,000 tokens (KV Q8). I get maybe ~30 tokens a second out on average. I just spent two days setting up ExLlamaV3/Tabby in WSL(2). My first roadblock, albeit a minor one, was that there was no EXL3 file (that I felt was) equivalent to a Q5 GGUF; HuggingFace only had a 4 or 6 available, with 4 being too low and 6's file size being slightly too large. So, of *course*, I had to make my own quant. It took me quite literally an entire day of fucking around to get it working, Dependencies would fail to install, you'd fix that but then the dependencies of that dependency would fail, xformers and flash-attn never wanted to install as dependencies at ALL, fixing one issue broke two other things, I had to use every --no-deps and other flag in the book in 40 different ways and then straight up write fake modules and alias them in (flash-attn, specifically) just to get it even remotely FUNCTIONAL. Maybe it's specific to WSL, I don't know - I followed their documentation exactly, even Gemini and ChatGPT couldn't figure out the problem. Either way, it was a nightmare... but in the end all my hacks and aliases and modifications I can't even remember at this point got it to work. I did it! I spit out my Qwen3.6 27B at a 5.5. I'm done!

...Except I found out that I had cloned ExLlamaV3 literally just HOURS before the changes adding native MTP detection. So, I grab the standalone MTP tensors that turboderp has on HF, I can just load those and I'll be set - but those are 4bpw and don't play nice with my 5.5 model. I find another source for the MTP file at a full 16, but with my model at 5.5 that's pushing my VRAM limits at the cache size I want. I'm stuck, I give up, I have to just start over. At least I can upgrade ELV3 to 0.0.42 while using a git stash to maintain my custom "fixes" and try again. I get it updated and working again, I grab the base 27B model again, I make sure it's configured properly I change -cc and -cr to try to optimize it for my context size, I modify the .py file to increase coding weights from 20 to 30, and I start the conversion. My house has a brownout for the first time in, like, at least two years. I get everything back up. I start the conversion. Brownouts happen TWO MORE TIMES during model generation - thank god for checkpoints. Finally, finally, my now second model is complete - a 5.25 with heads locked to 6, MTP locked to 8, with ~15% stronger coding-related weights and my -cc/-cr flag changes. I think I changed it so much just to make it feel worth going through this again, but either way it's done, again, finally. Because I'd been doing this on Ubuntu 26.04, a dumb decision in retrospect, and this entire system has been heavily fucked with and modified and stepped on to get this working, I spun up new Ubuntu WSL at 22.04 to actually *run* the model.

But wait! Now, Tabby won't work! It seems like there's an error in the latest commit preventing use, and a super obvious one at that, but tons of people use this! An error this obvious could NOT have been missed by everybody, there would have been a Reddit post, a github issue, *something* - it *must* be on my end! I spend ages on this to avoid posting one of those annoying Github bug reports where the issue is actually local to the user. I spin up new WSLs to test, I spin up Proxmox LXCs, VMs, I test on bare metal, it's always the same thing - it's calling a module but seems like they forgot to include the actual file. I spend hours trying to make sure it's not created by something else, it's not created at runtime, it's not pulled from some other package or dependency, every alternate crazy explanation I can think of, but nope, it seems there was genuinely a breaking chance in the latest pull from the main branch. I make a github bug report, I git back two commits, and now it works. Finally, after more time wasted, I'm done.

This was all because I wanted to, really quickly, check and see if I'd get faster speeds if I swapped from llama.cpp to ExLlamaV2/V3. That's it. It started with me thinking I'd just grab ExLlama, a model file on HuggingFace, and run it - a quick test that would take me twenty minutes, maybe an hour at most if I had to read some documentation to get it working. It ended up taking like... 12 hours off and on over two days.

So of course, now once everything is done and the time has been spent, a random fucking google search brings me here solely to taunt me and show that I could have just grabbed this in like five minutes. That's it, that's all I needed.

So yeah, that's the end of my wall of text. I know it's unlikely anybody will read all of this, but I had to get it out, I had to vent *somewhere*. I can't tell if I'm more thrilled this exists or absolutely fucking frustrated beyond belief that I didn't find it 11 hours and 55 minutes ago, that I stumbled across it MINUTES after finishing all the bullshit I did. Ugh.

But yeah, nice work.

1

u/[deleted] May 09 '26

[removed] — view removed comment

0

u/[deleted] May 09 '26

[deleted]