You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.31.4
Libc version: glibc-2.35
Python version: 3.12.9 | packaged by Anaconda, Inc. | (main, Feb 6 2025, 18:56:27) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-6.8.0-1021-aws-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA H200
GPU 1: NVIDIA H200
GPU 2: NVIDIA H200
GPU 3: NVIDIA H200
GPU 4: NVIDIA H200
GPU 5: NVIDIA H200
GPU 6: NVIDIA H200
GPU 7: NVIDIA H200
Nvidia driver version: 550.144.03
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 192
On-line CPU(s) list: 0-191
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Platinum 8488C
CPU family: 6
Model: 143
Thread(s) per core: 2
Core(s) per socket: 48
Socket(s): 2
Stepping: 8
BogoMIPS: 4800.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd ida arat avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq rdpid cldemote movdiri movdir64b md_clear serialize amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 4.5 MiB (96 instances)
L1i cache: 3 MiB (96 instances)
L2 cache: 192 MiB (96 instances)
L3 cache: 210 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-47,96-143
NUMA node1 CPU(s): 48-95,144-191
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.1
[pip3] sentence-transformers==3.2.1
[pip3] torch==2.5.1
[pip3] torchaudio==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.48.2
[pip3] transformers-stream-generator==0.0.5
[pip3] triton==3.1.0
[pip3] tritonclient==2.51.0
[pip3] vector-quantize-pytorch==1.21.2
[conda] numpy 1.26.4 pypi_0 pypi
[conda] nvidia-cublas-cu12 12.4.5.8 pypi_0 pypi
[conda] nvidia-cuda-cupti-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-cuda-nvrtc-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-cuda-runtime-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-cudnn-cu12 9.1.0.70 pypi_0 pypi
[conda] nvidia-cufft-cu12 11.2.1.3 pypi_0 pypi
[conda] nvidia-curand-cu12 10.3.5.147 pypi_0 pypi
[conda] nvidia-cusolver-cu12 11.6.1.9 pypi_0 pypi
[conda] nvidia-cusparse-cu12 12.3.1.170 pypi_0 pypi
[conda] nvidia-nccl-cu12 2.21.5 pypi_0 pypi
[conda] nvidia-nvjitlink-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-nvtx-cu12 12.4.127 pypi_0 pypi
[conda] pyzmq 26.2.1 pypi_0 pypi
[conda] sentence-transformers 3.2.1 pypi_0 pypi
[conda] torch 2.5.1 pypi_0 pypi
[conda] torchaudio 2.5.1 pypi_0 pypi
[conda] torchvision 0.20.1 pypi_0 pypi
[conda] transformers 4.48.2 pypi_0 pypi
[conda] transformers-stream-generator 0.0.5 pypi_0 pypi
[conda] triton 3.1.0 pypi_0 pypi
[conda] tritonclient 2.51.0 pypi_0 pypi
[conda] vector-quantize-pytorch 1.21.2 pypi_0 pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.1.dev5011+ge1f0835.d20250307 (git sha: e1f0835.d20250307
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X NV18 NV18 NV18 NV18 NV18 NV18 NV18 0-47,96-143 0 N/A
GPU1 NV18 X NV18 NV18 NV18 NV18 NV18 NV18 0-47,96-143 0 N/A
GPU2 NV18 NV18 X NV18 NV18 NV18 NV18 NV18 0-47,96-143 0 N/A
GPU3 NV18 NV18 NV18 X NV18 NV18 NV18 NV18 0-47,96-143 0 N/A
GPU4 NV18 NV18 NV18 NV18 X NV18 NV18 NV18 48-95,144-191 1 N/A
GPU5 NV18 NV18 NV18 NV18 NV18 X NV18 NV18 48-95,144-191 1 N/A
GPU6 NV18 NV18 NV18 NV18 NV18 NV18 X NV18 48-95,144-191 1 N/A
GPU7 NV18 NV18 NV18 NV18 NV18 NV18 NV18 X 48-95,144-191 1 N/A
Legend:
X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks
NCCL_CUMEM_ENABLE=0
TORCHINDUCTOR_COMPILE_THREADS=1
CUDA_MODULE_LOADING=LAZY
🐛 Describe the bug
This bug, incurring significant degradations to EAGLE's acceptance rate, is actually quite subtle, so I would like to first provide some contexts.
As described in its paper, EAGLE tries to predict the hidden states of future tokens, and uses them autoregressively during drafting. The important point is that these hidden states are approximated, rather than ground truths from the target model. As a result, even though some draft tokens are accepted, their corresponding KV cache is to some extent, not accurate. Let $h$ be the hidden state from the target model, $\hat{h}$ be the hidden state predicted by the EAGLE model during drafting, and $e$ be the embedding of the accepted draft token. Now, the KV cache should be from some transformation of the concatenation of ($h$, $e$), not ($\hat{h}$, $e$). This is not immediately clear solely from the EAGLE paper, but is quite evident if we look at the codebase. In EAGLE’s codebase, the authors keep track of stable_kv which are KV cache from hidden states of the target model, which are retrieved here. In contrast, the KV cache during drafting, from predicted hidden states (past_key_values), were never saved to the next forward pass. However, in vLLM, we never overwrite EAGLE’s approximated KV cache if the drafted token is accepted. Since we always use the target model’s ground truth hidden states during training, having these approximated KV cache creates problems when we speculated more tokens for longer horizons. Concretely, let’s say at a certain step we speculate 5 tokens, and 3 of them accepted. Because we have these approximated KV cache that’s not quite right, we will have a harder time drafting accurately later since we have 3 approximated KV cache in memory. In the following table, I show the acceptance rate drop between EAGLE repo and vLLM’s EAGLE as we increase the number of speculated tokens. I computed the average accepted length using features added in this PR. We can see that generally, with more speculated tokens, we observe larger acceptance length discrepancies. In vLLM, with 4 and 5 speculated tokens, we even see lower acceptance length. The reason is likely due to the accumulation of approximated KV cache in EAGLE, which ends up hurting the acceptance rate for all positions.
Number of Speculated Tokens
1
2
3
4
5
EAGLE Repo
1.73
2.13
2.28
2.35
2.40
vLLM
1.60
1.84
1.95
2.08
2.04
Acceptance Rate Drop
8%
14%
14%
11%
15%
This issue also bothers DeepSeek MTP when number of MTP modules > 1 PR in a similar manner.
Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
The text was updated successfully, but these errors were encountered:
Your current environment
The output of `python collect_env.py`
🐛 Describe the bug
This bug, incurring significant degradations to EAGLE's acceptance rate, is actually quite subtle, so I would like to first provide some contexts.
As described in its paper, EAGLE tries to predict the hidden states of future tokens, and uses them autoregressively during drafting. The important point is that these hidden states are approximated, rather than ground truths from the target model. As a result, even though some draft tokens are accepted, their corresponding KV cache is to some extent, not accurate. Let$h$ be the hidden state from the target model, $\hat{h}$ be the hidden state predicted by the EAGLE model during drafting, and $e$ be the embedding of the accepted draft token. Now, the KV cache should be from some transformation of the concatenation of ($h$ , $e$ ), not ($\hat{h}$ , $e$ ). This is not immediately clear solely from the EAGLE paper, but is quite evident if we look at the codebase. In EAGLE’s codebase, the authors keep track of stable_kv which are KV cache from hidden states of the target model, which are retrieved here. In contrast, the KV cache during drafting, from predicted hidden states (past_key_values), were never saved to the next forward pass. However, in vLLM, we never overwrite EAGLE’s approximated KV cache if the drafted token is accepted. Since we always use the target model’s ground truth hidden states during training, having these approximated KV cache creates problems when we speculated more tokens for longer horizons. Concretely, let’s say at a certain step we speculate 5 tokens, and 3 of them accepted. Because we have these approximated KV cache that’s not quite right, we will have a harder time drafting accurately later since we have 3 approximated KV cache in memory. In the following table, I show the acceptance rate drop between EAGLE repo and vLLM’s EAGLE as we increase the number of speculated tokens. I computed the average accepted length using features added in this PR. We can see that generally, with more speculated tokens, we observe larger acceptance length discrepancies. In vLLM, with 4 and 5 speculated tokens, we even see lower acceptance length. The reason is likely due to the accumulation of approximated KV cache in EAGLE, which ends up hurting the acceptance rate for all positions.
This issue also bothers DeepSeek MTP when number of MTP modules > 1 PR in a similar manner.
cc @LiuXiaoxuanPKU @benchislett
Before submitting a new issue...
The text was updated successfully, but these errors were encountered: