MTP / Expert Selection Map

#21
by Davidmg0815 - opened

Hallo zusammen!

Der MTP-Head lässt sich nicht mit der geprunten Coder-Version laden, da der Head 512 Experten erwartet, das Modell aber nur 256 hat:
llama_model_load: error: expert_count mismatch (model: 256, mtp: 512)

Könntet ihr bitte entweder:

  1. Einen passenden 256-Expert MTP-Head hochladen?
  2. Oder die mask.pt (Expert Selection Map) bereitstellen, damit wir den Head selbst anpassen können?

Vielen Dank für eure tolle Arbeit an den Modellen!

+1 on this request. Some numbers from an M5 Max Mac Studio, running llama-server with n-gram drafting (ngram-map-k):

Writing new text: 47 to 54 tok/s
Editing existing code: 157 to 180 tok/s, with 93% of drafts accepted
Qwen3.8-27B at 8-bit with MTP on the same machine: 45 to 52 tok/s

So the Coder model already matches or beats the dense 27B with MTP, using only n-gram drafting. A native MTP head would help most on new text, where n-gram drafting has little to copy from.

One note on option 2: as far as I can tell, the MTP layer has its own expert set, separate from the 48 pruned layers, so the existing expert mask may not cover it. A 256-expert MTP head selected with the same RCO search (option 1) seems like the more reliable path.

Thanks for the release. It's now in my daily coding setup on a trial basis, and I'm happy to test an MTP build.

Ich hab's jetzt so gelöst und damit die best n Ergebnisse... Ich hab über 100 token mit Ner alten 3080 Viel spaass

What an excellent read on your model! I'm flattered that you tried out my mtp gguf. I haven't had the chance to dig up the rest of it. At the time, I didn't see anything that seemed to fit the bill, so I had the ISTA model whip a few things up for me. That resulted in this:

https://github.com/eudaimonenterprises/llama.cpp/tree/fix/mtp-hybrid-device-matching-exact

I'm working with a smaller dgpu and an igpu that I can get to work together over rpc. As you stated, memory is worth considering in that situation, hence the want to free up as much of it as I could. I'm definitely going to see how the other models work on my rig as I move forward. You highlighted some settings that I wasn't even aware of as I'm more of a generalist when it comes to these things. What I lack in depth I try to make up for in breadth. Such a great learning experience!

Thanks a lot — glad the write-up was useful! Your MTP GGUF was one of the more interesting ones to test.

Your branch fix/mtp-hybrid-device-matching-exact caught my eye: we run the Flash-Next 176B (hybrid, split across two RTX 3080) and MTP there gets unstable at large context. What exactly does your fix change — the device placement of the MTP head relative to the hybrid layers? If it's in a reviewable state I'd be happy to try it on our setup and report back.

Sign up or log in to comment