r/LocalLLM • • 1d ago

Project I need some help with Speculative Decoding.

12900kf, 64gb DDR4, Arc B580 ... and Linux mint.

I am working with llama.cpp (technically llama app, but they don't have a Linux app, so I am stuck with just llama cli / llama serve) it naively works with ARC GPUs and Intel recommends them.

My system is not ideal for running llms, but it also isn't incompetent: Qwen3.5 9B will run around 40 tokens, gemma-4 will run around 20, and Qwen3.8 chokes and runs at 1.7.

Speculative Decoding seems like the perfect fit for my system, since the system ram can hold bigger models, while the B580 runs the little ones pretty good, and it actually does work, as I eventually got the llama app command line to work and that boosted gemm-4 up to the high 40's.

llama serve \

-hf ggml-org/gemma-4-e4b-it-GGUF:Q4_0 \

--hf-repo-draft ggml-org/gemma-4-e4b-it-GGUF:Q4_0 \

--spec-type draft-mtp

But getting this to run was a battle as llama would crash on the repo-draft command, and I had to manually download the main model before llama would fetch the draft model from huggingface. I also don't actually know what it is doing, because it seems like instead of a big model and draft model; it is running two instances of the same model.

I tried following llama app's template

llama serve -m big-model.gguf -md small-draft-model.gguf --spec-type draft-simple

But it crashes every time I try to run it with models I selected and pre-downloaded, instead of using the gemma-4 example. So I don't know I am just not understanding the instructions, or if I am selecting incompatible model versions, or if I am just reading the model descriptions wrong.

I am very new to this, only having been playing around with local llms for the last week, and I am trying to get this to work specifically because I knew it wasn't going to be easy and it would force me to learn things ... but I am not learning anything from face planting into a brick will, with no explanation as to why the wall exists.

Is there anyone who can explain what I am missing / what I a should be looking for?

My ideal solution for this project is to get Qwen3.8's performance out of the gutter (ideally I would like to see 10t/s, but I will call it a win to get it up to 5t/s) and I am open to using a different application than llama, as long as it supports both Linux and Arc GPUs.

0 Upvotes

11 comments sorted by

1

u/FizzyDuncDizzel 1d ago

I think you’re doing it the hard way. Your system can easily support strata. Install it and let it tune.

1

u/Xijit 1d ago

that looks perfect for my system and they recently added Arc cards to the Linux branch, but the damn thing is fighting me on the install and I need to read farther into the troubleshooting.

1

u/FizzyDuncDizzel 1d ago

If you have a Claude it ChatGPT sub just install Claude code or codex and make the clankers do the work!

1

u/Right_Simple_6813 1d ago

The reason why it seems like you're loading in the same model twice... is because you're loading in the same model as the drafter.
ggml-org/gemma-4-e4b-it-GGUF:Q4_0 and gemma-4-e4b-it-GGUF:Q4_0 is the same thing. Try using an actual drafter.

1

u/Xijit 1d ago

That is the code prompt llama app lists in their user guide for how to run from a repo, not something I put together.

I tried using the "llama serve -m _____ -md ______ --spec-type draft-simple" format, running Qwen3.8 27B as the main model and a Qwen3.8 "drafter" model I found on huggingface as the drafter, but it got pissed off and wouldn't start the server.

1

u/Right_Simple_6813 1d ago

The drafter model should not be the same model as the main model, I don't know what you're talking about. Make sure to select the correct drafter type? MTP, DSpark, DFlash, all different types.

0

u/Xijit 1d ago

slow blink . gif

I did not do this:

llama serve \

-hf ggml-org/gemma-4-e4b-it-GGUF:Q4_0 \

--hf-repo-draft ggml-org/gemma-4-e4b-it-GGUF:Q4_0 \

--spec-type draft-mtp

That code is supplied by llama app as an example of how to run speculative decoding ... I don't know why it works, but it does work.

When I tried to use the less complicated example

llama serve -m "big model" -md "small model" --spec-type draft-simple

using a full size Qwen3.8 27B model as the big model and another model that was labeled as a Qwen3.8 Drafter model, it failed to run ... I don't know why and I am trying to figure out my mistake.

If you know of a good combination of big model / drafter model that runs, I will give them a shot and see if I can get them to work for me.

1

u/Right_Simple_6813 1d ago

Could you paste the error message at least? And the exact command you used?

1

u/Fearless_Call_4964 1d ago

I downloaded gemma4 mtp 300 mb file and am running it in Big Moe on Edge software. I am getting 30-35 tokens per sec on a 8gb laptop 4070 and 32 gb ram. Maybe try that. And for Qwen 3.8 I would recommend you Ternary Bonsai 2 27B models. It will take some time to set up their llama.cpp fork to work, but models saved around 98% for 4x less weights.

1

u/Perfect-Mark-1045 1d ago

speculative decoding needs a smaller model that's fast to run, not just any smaller one. I tried one that was too big and it just made the main model slower. try a tiny one that fits in ram and doesn't lag the GPU.