Beyond KV Reconstruction: Functional Reconstruction for MLA Draft Models in Speculative Decoding

Weiye Shi, Fanxu Meng, Muhan Zhang
7/29/2026
cs.LG

Official code: swyhahaha/FunctionalMLA (0 stars, Python, Apache-2.0, last commit 2026-07-29).

Abstract

Multi-head latent attention (MLA) is increasingly important for long-context LLM inference because compact latent states replace the growing key-value (KV) cache and reduce decoding memory traffic. Yet most capable open checkpoints use multi-head or grouped-query attention (MHA/GQA), so conversion is needed to obtain MLA's cache efficiency without retraining from scratch.

Show full abstract

Speculative decoding offers complementary acceleration, but its speedup depends on agreement between draft proposals and target verification. We find that direct MHA/GQA-to-MLA conversion can sharply reduce this agreement: low-rank factorization and RoPE handling introduce attention-function errors that may be tolerable for standalone generation but substantially lower draft-token acceptance. We therefore formulate MLA draft construction as functional reconstruction rather than cache compression. Our end-to-end (E2E) method optimizes each converted MLA attention module to reproduce the post-output-projection response of its original MHA/GQA counterpart on calibration hidden states. This converter-agnostic post-conversion procedure preserves the converted cache and inference graph and requires neither verifier logits nor verifier supervision. We evaluate 192 model-converter-backend-method-task configurations spanning four Llama/Qwen draft-target pairs, TransMLA and MHA2MLA, HF and vLLM, and four 200-prompt tasks. With a 0.5-percentage-point reporting tolerance, Functional Reconstruction materially improves acceptance in 37 of 64 matched task cells, leaves 26 practically unchanged, and materially decreases one. Code and evaluation artifacts are available at https://github.com/swyhahaha/FunctionalMLA.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Anonymous review artifact for functional MLA reconstruction

00PythonJul 27, 20264 months agoApache-2.0

Similar Papers

Cite this paper

@article{shi2026beyond,
  title  = {Beyond KV Reconstruction: Functional Reconstruction for MLA Draft Models in Speculative Decoding},
  author = {Weiye Shi and Fanxu Meng and Muhan Zhang},
  year   = {2026},
  eprint = {2607.27269},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.27269v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2607.27269.svg)](https://codeofpaper.com/paper/2607.27269)

Discussion