Create model card with pipeline tag, license, and usage instructions
#1
by nielsr HF Staff - opened
README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# JetSpec: Parallel Tree Drafting
|
| 8 |
+
|
| 9 |
+
JetSpec is an implementation of **parallel tree drafting** for fast LLM speculative decoding inference with up to 10x acceptance length, and 1000+ TPS on coding and math tasks using B200 GPUs. This repository contains the draft head model presented in [JetSpec: Breaking the Scaling Ceiling of Speculative Decoding with Parallel Tree Drafting](https://huggingface.co/papers/2606.18394).
|
| 10 |
+
|
| 11 |
+
A causal-parallel draft head proposes a token tree, and the frozen target model verifies the whole tree in one forward pass under a tree-causal attention mask. The accepted path is selected in accordance with the target's own logits, so decoding is lossless by construction.
|
| 12 |
+
|
| 13 |
+
For more details, please refer to the [Project Webpage](https://hao-ai-lab.github.io/JetSpec) and the [GitHub Repository](https://github.com/hao-ai-lab/JetSpec).
|
| 14 |
+
|
| 15 |
+
## Installation
|
| 16 |
+
|
| 17 |
+
Create an environment and install the package:
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
pip install -e '.[bench,kernel]'
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
You can run speculative decoding using the lightweight Hugging Face-based reference implementation:
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
from jetspec import LLM, SamplingParams
|
| 29 |
+
|
| 30 |
+
llm = LLM("Qwen/Qwen3-8B", attn_implementation="flash_attention_2")
|
| 31 |
+
out = llm.generate(
|
| 32 |
+
"The three primary colors are",
|
| 33 |
+
SamplingParams(temperature=0.0, max_new_tokens=64),
|
| 34 |
+
)
|
| 35 |
+
print(out["text"])
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Citation
|
| 39 |
+
|
| 40 |
+
```bibtex
|
| 41 |
+
@inproceedings{jetspec2026,
|
| 42 |
+
title = {JetSpec: Breaking the Scaling Ceiling of Speculative Decoding with Parallel Tree Drafting},
|
| 43 |
+
author = {Hu, Lanxiang and Feng, Zhaoxiang and Wu, Yulun and Yuan, Haoran and Zhao, Yujie and Qian, Yu-Yang and Wang, Bojun and Zhao, Peng and Jiang, Daxin and Zhu, Yibo and Rosing, Tajana and Zhang, Hao},
|
| 44 |
+
year = {2026},
|
| 45 |
+
url = {https://arxiv.org/abs/2606.18394},
|
| 46 |
+
eprint = {2606.18394},
|
| 47 |
+
note = {Preprint}
|
| 48 |
+
}
|
| 49 |
+
```
|