how to use mtp in gemma gguf models??

#4
by koyukira - opened

how to use mpt in gemma gguf models??

koyukira changed discussion title from how to use mpt in gemma gguf models?? to how to use mtp in gemma gguf models??
Google org

Hi @koyukira
To enable MTP in Gemma 4 GGUF models, you can leverage the optimized MTP speculative engine inside llama.cpp.
In llama.cpp, add the -model-draft flag to your command. For example ,
llama-server
-m gemma-4-12B-it-qat-UD-Q4_K_XL.gguf
--model-draft gemma-4-12B-it-qat-assistant-MTP-Q8_0.gguf
--spec-type draft-mtp
--spec-draft-n-max 4
--parallel 1
--ctx-size 131072
--temp 1.0
--top-p 0.95
--top-k 64

If using a GUI like LM Studio, enable Speculative Decoding in the settings and select the corresponding MTP drafter model.
Thanks

@pannaga10
LM Studio says I can't use MTP gguf as you described.
(I'm using LM Studio 0.4.16 build 2 and CUDA 12 llama.cpp (Windows) v2.21.0)

image

@pannaga10

-m gemma-4-12B-it-qat-UD-Q4_K_XL.gguf
--model-draft gemma-4-12B-it-qat-assistant-MTP-Q8_0.gguf

  1. Need same quant Q4 and Q4 ?
  2. Need delete mmproj from directory with model?

Same issue. No speculative decoding option available.

Sign up or log in to comment