Difficulty loading due to the naming of layers (`blk.45` vs `blk.0`)

#1
by iandennismiller - opened

Very interested to try out the MTP draft! However, I was unable to run using the llama.cpp commit you referenced. It seems like llama.cpp wanted a draft model that started with layer 0, but you've named it after the layer where it belongs when MTP is merged.

Would it work to simply rename the layers in the draft models?

Owner

The uploaded draft files intentionally keep the original tail-layer
names (blk.45-blk.47) because the tested llama.cpp Step MTP loader treats
the draft as the MTP tail of a 48-layer model (nextn_predict_layers=3), not as
a normal standalone draft model.

If llama.cpp is asking for blk.0, it is likely using the normal speculative
draft path instead of the Step MTP path. make sure the command includes
--spec-type draft-mtp and is built from the referenced/current commit. A simple
tensor rename is probably not gonna work, because the metadata still says
block_count=48 and nextn_predict_layers=3. This is just how the Step model is

Owner

Or just ask codex/claude to figure it out and fix it

Owner

ive updated the repo with better instructions

Amazing. I did attempt to rebuild the MTP draft model using the gguf python library but it was not as simple as renaming the layers; the geometry was wrong. Thanks for taking a look.

Okay, so that patch is non-trivial. I've watched how PRs go with llama.cpp and I suspect this isn't getting merged without some feedback from the core devs. (I'm not one).

This is really cool work, though ... have you already got a PR going for this?

FYI, this PR was just merged and your MTP models work just fine now when compiling the master llama.cpp branch.

https://github.com/ggml-org/llama.cpp/pull/23274

notSnix changed discussion status to closed

Sign up or log in to comment