Whittle-Next-26B-A3B-MTP
An Accelerated Language Model with Multi-Token Prediction
2 min readupdated
The model adds a trained 597M-parameter MTP (Multi-Token Prediction) module to the base Whittle-Next-26B-A3B model. This enables text generation to run 1.9–2.1x faster through speculative decoding (where the model guesses multiple upcoming tokens at once and the base model verifies them). Based on the Qwen architecture, the model is available either as a full download or as a lightweight 1.11 GiB standalone addon for an already downloaded base. It is useful for developers and researchers looking to speed up large language model inference without losing quality.
Key features
- Speculative speedup: generation speed (TPOT) increased by 1.898x with standard sampling and 2.155x in greedy mode.
- Exact base preservation: all 975 base model weights remain 100% identical to the original checkpoint.
- Flexible installation: download the full model or attach just the
mtp_only.safetensorsfile to an existing base. - Compatibility: full support for standard
vLLMandtransformerslibraries.
What you can do
- Accelerate local inference: run the model with speculative generation support for fast responses in chatbots and services.
- Integrate into pipelines: use the
speculative_generatemethod from thetransformerslibrary for efficient text processing. - Test sampling: adjust generation parameters (temperature, top_p, top_k) to achieve maximum response speed.
Example
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "gxunda/Whittle-Next-26B-A3B-MTP"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
dtype=torch.bfloat16,
device_map="cuda",
).eval()
messages = [{"role": "user", "content": "Explain why binary heaps support O(n) build-heap."}]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
)
input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(model.device)
out_ids, stats = model.speculative_generate(
input_ids,
max_new_tokens=256,
draft_depth=4,
do_sample=True,
temperature=0.7,
top_p=0.8,
top_k=20,
)
print(tokenizer.decode(out_ids[0, input_ids.shape[1]:], skip_special_tokens=True))Read more
DetailsBenchmarks: the model achieves 88.0% accuracy on GSM8K.
Parameters: the MTP module contains 597M parameters (1.11 GiB BF16).
Limitations: requires support in
transformers and compatible CUDA hardware.









Comments