DLite
This repository contains a DLite draft checkpoint presented in DLite: History-free Speculative Decoding for Agentic AI.
DLite is a history-free speculative decoding framework for agentic AI. It reuses contextual hidden states from the target model to predict draft tokens without maintaining a historical draft KV cache. A lightweight sequential head restores dependencies within each speculative block, while a two-stage training strategy aligns the draft model with the target model.
DLite draft checkpoints are paired with specific target models. See the Hugging Face collection for available checkpoints.
Quick Start
from dlite import DLiteEngine
engine = DLiteEngine.from_pretrained(
target_model="/path/to/Qwen3-8B",
draft_model="/path/to/dlite-student",
attention_backend="auto", # auto, eager, sdpa, flash_attention_2
)
result = engine.generate("Explain speculative decoding in one paragraph.")
print(result.text)
print(result.stats)
The draft checkpoint must use DLiteDraftModel, model_role: "student", and sequential_head: "rnn".
Code
See https://github.com/SJTU-DAI-Sys/DLite for the inference release, including the Python API, CLI, and JSONL throughput benchmark.