Skip to content

Question / feature request: MTP (Multi-Token Prediction) speculative decoding for Gemma 4 #7595

Description

@maninthemiddle01

Hi! First, thanks for adding MTP speculative decoding in v4.9 — great addition.

The release notes mention:

MTP speculative decoding support: Add draft-mtp as a new --spec-type option. Auto-enabled when loading MTP GGUFs (e.g. Qwen 3.6 MoE MTP builds).

I'm trying to use this with Google's Gemma 4 MTP drafters (https://ai.google.dev/gemma/docs/mtp/overview), but I can't get it to work in textgen, and I'd like to clarify whether this is user error on my side, a missing piece upstream, or a planned enhancement — so others searching the issue tracker can find an answer too.

Background

Unlike the Qwen 3.6 MoE pattern where the MTP head is bundled into the same GGUF, Google ships the drafter as a separate assistant model (e.g. google/gemma-4-E2B-it-assistant) that shares the target model's embedding table and last-layer activations. The official docs show it being used via HF Transformers, vLLM, MLX, SGLang and Ollama — llama.cpp / textgen isn't listed.

Questions

  1. Is Gemma 4 MTP expected to work with the current --spec-type draft-mtp auto-detection? If yes, is there a known Gemma‑4 MTP GGUF that textgen recognizes?
  2. If it's a target+separate-drafter setup, can it be wired up as a normal draft model via --model-draft / --spec-type instead, or does it require dedicated support for the Gemma MTP architecture (shared embeddings + last-layer activation passing)?
  3. Is this on the roadmap, blocked on llama.cpp upstream, or considered out of scope?

Environment

  • textgen version: v4.9
  • Loader: llama.cpp
  • Target model: google/gemma-4-31B-it GGUF
  • Drafter model tried: gemma-4-31B-it-assistant-Q8_0.gguf
  • Command line / flags used: cpu-moe
  • OS + GPU: Debian trixie + intel
  • Exact error / observed behavior: stops loading model while model warmup just saying model loading was stopped

Happy to provide logs if useful. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions