MTP Draft Model Configuration and Troubleshooting for LLM Inference

    Learn how to distinguish multi-token prediction from speculative decoding, check framework and model compatibility, prepare model files, and configure draft-model loading. This guide also covers controlled performance testing, common deployment issues, GPU memory planning, and licensing checks.

    1. Understand the Key Concepts

    Multi-token prediction (MTP), speculative decoding, and draft models are often treated as interchangeable terms. They are related, but confusing them can lead to incorrect configurations.

    Multi-token prediction (MTP) originated as a training objective. In addition to predicting the next token, a model uses extra prediction heads to predict several subsequent tokens, providing additional training signals. Some models retain these heads for generating draft tokens during inference.

    Speculative decoding is a family of inference acceleration methods. A low-cost draft source first proposes several candidate tokens. The main model then verifies them in a single forward pass, accepting valid tokens and rejecting invalid ones. The draft source can be a separate small model, an n-gram-based method, additional prediction heads such as Medusa or EAGLE, or the model’s own MTP heads.

    The distinction is straightforward: MTP heads can serve as one draft source for speculative decoding, but MTP itself is not speculative decoding. With standard rejection-sampling verification, speculative decoding preserves the output distribution. Under greedy decoding, with temperature set to 0, outputs with and without drafting should match. This provides a useful correctness check during troubleshooting.

    Quantization-aware training (QAT) simulates low-bit quantization errors during training or fine-tuning so that model weights adapt to low-precision representations. Compared with post-training quantization (PTQ), QAT typically introduces less accuracy loss at the same bit width. However, actual accuracy and speed should be assessed using the evaluations published in the model card, rather than inferred from the technique’s name alone.

    2. Check Framework and Model Support

    Before downloading any files, confirm two things.

    1. Does your inference framework support MTP for this model? Review the framework’s release notes and relevant commits, searching for the model name and terms such as “MTP” or “draft.” After upgrading, check whether draft-related options are available:

      1. ./llama-server --help | grep -i draft
    2. Does the model card provide MTP files? Read its descriptions of the file layout, quantized variants, and usage terms. Some publishers place MTP weights in a separate subdirectory; other releases do not provide draft files at all.

    3. Prepare the Model Files

    Example Directory Layout

    The following layout is illustrative. Replace the filenames with those listed in the model card:

    1. models/
    2. ├── main/
    3. │ └── your-model-qat-Q4_K_M.gguf # Main model, QAT-quantized version
    4. └── draft/
    5. └── your-model-mtp-Q8_0.gguf # MTP draft file from the directory specified in the model card

    You can keep the main model and draft file in the same directory or in separate directories. In either case, use absolute paths in the startup command.

    Verify File Integrity

    Large model downloads can be interrupted or corrupted. After downloading, check each file against the publisher’s SHA256 checksum:

    1. sha256sum models/main/your-model-qat-Q4_K_M.gguf
    2. sha256sum models/draft/your-model-mtp-Q8_0.gguf

    Check Vocabulary Compatibility

    The main model must be able to interpret the draft tokens correctly. Use GGUF inspection tools to examine both files’ metadata and confirm that their vocabulary sizes and tokenizer types match.

    A mismatch may cause an immediate error or produce garbled output, which can be harder to detect.

    4. Configure Startup Parameters and Loading

    The example below follows llama.cpp parameter naming. It has not been tested with a specific model, so verify parameter names and defaults against the --help output of your installed version.

    1. ./llama-server \
    2. -m /abs/path/models/main/your-model-qat-Q4_K_M.gguf \
    3. -md /abs/path/models/draft/your-model-mtp-Q8_0.gguf \
    4. -ngl 99 \
    5. -ngld 99 \
    6. -c 4096 \
    7. --draft-max 4 \
    8. --draft-min 1 \
    9. --port 8080

    The parameters serve the following purposes:

    • -m: Path to the main model file.
    • -md: Path to the draft model file. When the framework recognizes it correctly, inference follows the draft-generation and main-model-verification process.
    • -ngl: Number of main-model layers to offload to the GPU. A value of 99 is intended to offload as many layers as possible.
    • -ngld: Number of draft-model layers to offload to the GPU. If drafting runs on the CPU, its per-step overhead may cancel out the acceleration benefit.
    • -c: Context length, which directly affects GPU memory consumption for the KV cache.
    • --draft-max and --draft-min: Upper and lower bounds on the number of draft tokens per round. Larger values offer greater potential gains per round, but also waste more computation when acceptance rates fall.

    If the draft file is incompatible with the main model, loading may fail. If the framework does not recognize the file’s intended role, it may consume GPU memory without accelerating inference. Use the checks in the next section to determine what is actually happening.

    5. Verify That MTP Is Working

    A successful loading message does not prove that acceleration is active. Use the following checks to obtain verifiable results.

    Inspect Startup Logs

    Confirm that the logs show the draft model being loaded and that its GPU or system memory usage is consistent with expectations. Exact log messages vary by framework version, so rely on the output from the version you are running.

    Run a Controlled Comparison

    • Use the same machine, main model, and prompt set. Ideally, include at least 50 prompts covering short question-answer tasks and long-form generation.
    • Keep sampling parameters identical. Set temperature to 0 when checking output consistency.
    • Run a baseline with drafting disabled by removing -md, then repeat with drafting enabled. Run each configuration three times and use the median.
    • If the framework reports draft acceptance statistics, record them. The acceptance rate is the number of accepted draft tokens divided by the total number of proposed draft tokens.

    Record the Relevant Metrics

    Metric Measurement method
    Generation throughput, in tokens/s Calculate from server-reported generation time, excluding network time
    Time to first token (TTFT) Measure from sending the request to receiving the first token
    P95 latency Measure the 95th percentile of request latency under the same load
    Peak GPU memory usage Sample periodically with nvidia-smi during the run and take the maximum observed value
    Output consistency Compare outputs prompt by prompt under greedy decoding

    Define success according to your workload. For example, consider a configuration effective only if outputs match, generation throughput improves beyond a predefined threshold, and the additional GPU memory usage remains acceptable.

    6. Troubleshooting Checklist

    Symptom Possible cause What to check
    Architecture mismatch error at startup The draft and main model belong to different generations or architectures Check the model cards, filenames, and architecture metadata
    No speedup, or slower generation Low acceptance rate, excessive draft length, or CPU-based drafting Inspect acceptance statistics, reduce --draft-max, and check -ngld
    Greedy outputs differ from the baseline Vocabulary mismatch, quantization error, or a framework defect Check vocabulary sizes and retest with a fixed framework version
    Out of GPU memory Combined memory usage of the main model, draft model, and KV caches Reduce -c, lower -ngl, or use a lower-bit draft file
    File not found Relative paths resolve differently across working directories Use absolute paths
    Permission error The runtime user lacks read access to the directory Inspect permissions with ls -l, then adjust permissions or change the runtime user

    7. Plan GPU Memory and Deployment

    With drafting enabled, GPU memory usage can be approximated as:

    GPU memory ≈ main-model weights + draft-model weights + KV caches + framework runtime overhead

    KV cache usage scales approximately with concurrency and context length. A useful estimate is:

    KV cache memory ≈ concurrent sequences × context length × KV bytes per token

    The draft model also requires its own KV cache. Plan memory headroom around peak concurrency and the longest supported context, rather than a single request.

    For cloud deployments, consider these general practices:

    • Store model files in object storage or a shared volume. Retrieve them when an instance starts and verify their SHA256 checksums.
    • Inject model paths and parameters such as -md through environment variables or configuration files instead of hard-coding them into the image.
    • Before scaling out, repeat the controlled comparison from Section 5 on the target instance type. The draft model’s GPU memory footprint may reduce concurrency, so compare cost per token rather than generation throughput alone.

    8. Check Licensing and File Access

    Before downloading or deploying a model, verify the following:

    • The model license permits your intended use, especially commercial use and redistribution.
    • The files come from the publisher’s official page or a trusted mirror.
    • Model files are not stored in publicly readable buckets where unauthorized users could download them.

    9. Key Takeaways

    MTP can provide a draft source for speculative decoding. Configuring it successfully comes down to three essentials: match the draft files to the main model, verify parameters against your current framework version, and measure results through controlled comparisons.

    These checks establish whether acceleration is real—and how much additional GPU memory it costs.