Instructions to use amd/PARD2-Qwen3-8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amd/PARD2-Qwen3-8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amd/PARD2-Qwen3-8B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amd/PARD2-Qwen3-8B") model = AutoModelForCausalLM.from_pretrained("amd/PARD2-Qwen3-8B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amd/PARD2-Qwen3-8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amd/PARD2-Qwen3-8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/PARD2-Qwen3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/amd/PARD2-Qwen3-8B
- SGLang
How to use amd/PARD2-Qwen3-8B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "amd/PARD2-Qwen3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/PARD2-Qwen3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "amd/PARD2-Qwen3-8B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/PARD2-Qwen3-8B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use amd/PARD2-Qwen3-8B with Docker Model Runner:
docker model run hf.co/amd/PARD2-Qwen3-8B
Update README.md
#2
by zihaoan - opened
README.md
CHANGED
|
@@ -1,4 +1,60 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
library_name: transformers
|
| 4 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
library_name: transformers
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/66a056d0229269a861ac1245/UmJOD5HnhCfvy3nAXgxgE.png" alt="PARD" width="100" align="left">
|
| 7 |
+
<div align="center">
|
| 8 |
+
<h1>PARD-2: Target-Aligned Parallel Draft Model for Dual-Mode Speculative Decoding</h1>
|
| 9 |
+
</div>
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
<p align="center"> |
|
| 13 |
+
<a href="https://arxiv.org/pdf/2605.08632"><b>Paper</b></a> |
|
| 14 |
+
<a href="https://github.com/AMD-AIG-AIMA/PARD"><b>Github</b></a> |
|
| 15 |
+
</p>
|
| 16 |
+
|
| 17 |
+
<br clear="left"/>
|
| 18 |
+
|
| 19 |
+
## Introduction
|
| 20 |
+
|
| 21 |
+
PARD is a high-performance speculative decoding method that also enables low-cost adaptation of autoregressive draft models into parallel draft models. PARD-2 further advances PARD by introducing a Target-Aligned Parallel Draft Model for dual-mode speculative decoding. Instead of optimizing draft models only for token-level prediction accuracy, PARD-2 aligns draft-model training with the inference-time objective of maximizing consecutive token acceptance. PARD-2 offers the following advantages:
|
| 22 |
+
|
| 23 |
+
- **Target-Aligned Optimization**: PARD-2 reformulates the draft-model objective from next-token prediction accuracy to acceptance-length optimization, better matching the draft-then-verify process used during speculative decoding.
|
| 24 |
+
|
| 25 |
+
- **Confidence-Adaptive Token Optimization**: PARD-2 introduces Confidence-Adaptive Token (CAT) optimization, which adaptively reweights tokens according to their contribution to the verification process. This improves the alignment between draft generation and target-model acceptance.
|
| 26 |
+
|
| 27 |
+
- **Dual-Mode Speculative Decoding**: A single PARD-2 draft model supports both target-independent and target-dependent modes, combining the deployment flexibility of PARD with the stronger alignment capability of target-aware methods.
|
| 28 |
+
|
| 29 |
+
State-of-the-Art Performance: Across diverse models and tasks, PARD-2 achieves up to 6.94× lossless acceleration. On LLaMA3.1-8B, PARD-2 surpasses EAGLE-3 by 1.9× and PARD by 1.3×, setting a new performance frontier for speculative decoding.
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
<p align="center">
|
| 33 |
+
<img src="https://raw.githubusercontent.com/AMD-AGI/PARD/master/datas/img/pard_2.png" width="100%">
|
| 34 |
+
<br>
|
| 35 |
+
<em>Throughput and Latency Trade-offs on vLLM. PARD-2 consistently achieves a superior Pareto frontier across various batch sizes from 1 to 64.</em>
|
| 36 |
+
</p>
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
## Model Weights
|
| 40 |
+
|
| 41 |
+
| Model Series | Model Name | Download |
|
| 42 |
+
|--------------|---------------------------------------|---------------|
|
| 43 |
+
| Llama3 | amd/PARD2-Llama-3.1-8B | [🤗 HuggingFace](https://huggingface.co/amd/PARD2-Llama-3.1-8B ) |
|
| 44 |
+
| Qwen3 | amd/PARD2-Qwen3-8B | [🤗 HuggingFace](https://huggingface.co/amd/PARD2-Qwen3-8B) |
|
| 45 |
+
| Qwen3 | amd/PARD2-Qwen3-14B | [🤗 HuggingFace](https://huggingface.co/amd/PARD2-Qwen3-14B) |
|
| 46 |
+
|
| 47 |
+
## How To Use
|
| 48 |
+
|
| 49 |
+
Please visit [PARD2](https://github.com/AMD-AIG-AIMA/PARD) repo for more information
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
## Citation
|
| 53 |
+
```
|
| 54 |
+
@article{an2026pard,
|
| 55 |
+
title={PARD-2: Target-Aligned Parallel Draft Model for Dual-Mode Speculative Decoding},
|
| 56 |
+
author={An, Zihao and Liu, Taichi and Liu, Ziqiong and Li, Dong and Liu, Ruofeng and Barsoum, Emad},
|
| 57 |
+
journal={arXiv preprint arXiv:2605.08632},
|
| 58 |
+
year={2026}
|
| 59 |
+
}
|
| 60 |
+
```
|