vllm - 💡(How to fix) Fix [Bug] gpt-oss-120b + P-EAGLE speculative decoding causes openai_harmony parse errors and severe chat latency regression [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#37295Fetched 2026-04-08 00:48:13
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Timeline (top)
commented ×1labeled ×1mentioned ×1subscribed ×1

When serving openai/gpt-oss-120b on one RTX6000 with our old baseline (no problems, stable) with speculative decoding (p-eagle drafter amazon/gpt-oss-120b-p-eagle which is a new approach (see vllm blog)) via vLLM OpenAI chat endpoint, I get repeated openai_harmony.HarmonyError during streaming and major mixed-workload latency/throughput regressions.

Related https://github.com/vllm-project/vllm/issues/27626 and https://github.com/vllm-project/vllm/issues/22519

Baseline (stable and no HarmonyParser errors)

Args (key):

  • --max-model-len 131072
  • --max-num-batched-tokens 8192
  • --max-num-seqs 128
  • --long-prefill-token-threshold 100
  • --gpu-memory-utilization 0.95
  • --tool-call-parser openai
  • --enable-auto-tool-choice
  • --compilation-config {"pass_config":{"fuse_allreduce_rms":true,"eliminate_noops":true,"fuse_norm_quant":true,"fuse_act_quant":true,"enable_sp":true,"fuse_gemm_comms":true},"custom_ops":["+rms_norm"],"cudagraph_mode":"FULL_AND_PIECEWISE"}

Failing config (combined)

Same as baseline + speculative:

  • --speculative-config {"method":"eagle3","model":"amazon/gpt-oss-120b-p-eagle","num_speculative_tokens":2,"parallel_drafting":true}

(also tested num_speculative_tokens=4, similar/bad for mixed chat)

Reproduction

  1. Start vLLM with baseline args above and confirm chat works.
  2. Add speculative config above (everything else unchanged).
  3. Run mixed scenarios with vllm bench serve (OpenAI chat backend, random datasets; includes short+medium+decode+prefill mixes).
  4. Observe repeated parser errors and degraded TTFT/throughput.

Error logs

(APIServer pid=1) ERROR ... Error in chat completion stream generator.
(APIServer pid=1) ERROR ... openai_harmony.HarmonyError: Unexpected token 200002 while expecting start token 200006

Stack points to:

- vllm/entrypoints/openai/chat_completion/serving.py (stream generator)
- openai_harmony/__init__.py parser process(token)

## Impact (A/B result highlights)

Fresh A/B in same cluster/time window:

- recipe_2048_512:
    - baseline: total_tok/s=12830, p99_ttft=5646ms
    - speculative(2): total_tok/s=3888, p99_ttft=46487ms
- thr_1k_512_c12:
    - baseline: 5373 tok/s
    - speculative(2): 4729 tok/s
- decode_256_2048_c4:
    - baseline: 744 tok/s
    - speculative(2): 521 tok/s

No OOM in this specific A/B run; failures are parser/stream related.

## Expected behavior

Speculative decoding should not emit invalid token sequences for OpenAI Harmony parser, and should not cause severe chat streaming regression in mixed workloads.

Any help is appreciated!

Error Message

Error logs

(APIServer pid=1) ERROR ... Error in chat completion stream generator. (APIServer pid=1) ERROR ... openai_harmony.HarmonyError: Unexpected token 200002 while expecting start token 200006

Root Cause

When serving openai/gpt-oss-120b on one RTX6000 with our old baseline (no problems, stable) with speculative decoding (p-eagle drafter amazon/gpt-oss-120b-p-eagle which is a new approach (see vllm blog)) via vLLM OpenAI chat endpoint, I get repeated openai_harmony.HarmonyError during streaming and major mixed-workload latency/throughput regressions.

Related https://github.com/vllm-project/vllm/issues/27626 and https://github.com/vllm-project/vllm/issues/22519

Baseline (stable and no HarmonyParser errors)

Args (key):

  • --max-model-len 131072
  • --max-num-batched-tokens 8192
  • --max-num-seqs 128
  • --long-prefill-token-threshold 100
  • --gpu-memory-utilization 0.95
  • --tool-call-parser openai
  • --enable-auto-tool-choice
  • --compilation-config {"pass_config":{"fuse_allreduce_rms":true,"eliminate_noops":true,"fuse_norm_quant":true,"fuse_act_quant":true,"enable_sp":true,"fuse_gemm_comms":true},"custom_ops":["+rms_norm"],"cudagraph_mode":"FULL_AND_PIECEWISE"}

Failing config (combined)

Same as baseline + speculative:

  • --speculative-config {"method":"eagle3","model":"amazon/gpt-oss-120b-p-eagle","num_speculative_tokens":2,"parallel_drafting":true}

(also tested num_speculative_tokens=4, similar/bad for mixed chat)

Reproduction

  1. Start vLLM with baseline args above and confirm chat works.
  2. Add speculative config above (everything else unchanged).
  3. Run mixed scenarios with vllm bench serve (OpenAI chat backend, random datasets; includes short+medium+decode+prefill mixes).
  4. Observe repeated parser errors and degraded TTFT/throughput.

Error logs

(APIServer pid=1) ERROR ... Error in chat completion stream generator.
(APIServer pid=1) ERROR ... openai_harmony.HarmonyError: Unexpected token 200002 while expecting start token 200006

Stack points to:

- vllm/entrypoints/openai/chat_completion/serving.py (stream generator)
- openai_harmony/__init__.py parser process(token)

## Impact (A/B result highlights)

Fresh A/B in same cluster/time window:

- recipe_2048_512:
    - baseline: total_tok/s=12830, p99_ttft=5646ms
    - speculative(2): total_tok/s=3888, p99_ttft=46487ms
- thr_1k_512_c12:
    - baseline: 5373 tok/s
    - speculative(2): 4729 tok/s
- decode_256_2048_c4:
    - baseline: 744 tok/s
    - speculative(2): 521 tok/s

No OOM in this specific A/B run; failures are parser/stream related.

## Expected behavior

Speculative decoding should not emit invalid token sequences for OpenAI Harmony parser, and should not cause severe chat streaming regression in mixed workloads.

Any help is appreciated!

Fix Action

Fix / Workaround

============================== CPU Info

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 52 bits physical, 57 bits virtual Byte Order: Little Endian CPU(s): 96 On-line CPU(s) list: 0-95 Vendor ID: AuthenticAMD Model name: AMD EPYC 9654 96-Core Processor CPU family: 25 Model: 17 Thread(s) per core: 1 Core(s) per socket: 96 Socket(s): 1 Stepping: 1 Frequency boost: enabled CPU max MHz: 3709.3569 CPU min MHz: 1500.0000 BogoMIPS: 4800.17 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpuid_fault cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap Virtualization: AMD-V L1d cache: 3 MiB (96 instances) L1i cache: 3 MiB (96 instances) L2 cache: 96 MiB (96 instances) L3 cache: 384 MiB (12 instances) NUMA node(s): 1 NUMA node0 CPU(s): 0-95 Vulnerability Gather data sampling: Not affected Vulnerability Ghostwrite: Not affected Vulnerability Indirect target selection: 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 Old microcode: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Not affected Vulnerability Spec rstack overflow: Mitigation; Safe RET 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; STIBP disabled; PBRSB-eIBRS Not affected; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsa: Mitigation; Clear CPU buffers Vulnerability Tsx async abort: Not affected Vulnerability Vmscape: Mitigation; IBPB before exit to userspace

Code Example

Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cu130
Is debug build               : False
CUDA used to build PyTorch   : 13.0
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 (main, Mar  4 2026, 09:23:07) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-6.17.13+deb13-amd64-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 13.0.88
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : GPU 0: NVIDIA RTX PRO 6000 Blackwell Server Edition
Nvidia driver version        : 590.48.01
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           52 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  96
On-line CPU(s) list:                     0-95
Vendor ID:                               AuthenticAMD
Model name:                              AMD EPYC 9654 96-Core Processor
CPU family:                              25
Model:                                   17
Thread(s) per core:                      1
Core(s) per socket:                      96
Socket(s):                               1
Stepping:                                1
Frequency boost:                         enabled
CPU max MHz:                             3709.3569
CPU min MHz:                             1500.0000
BogoMIPS:                                4800.17
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpuid_fault cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap
Virtualization:                          AMD-V
L1d cache:                               3 MiB (96 instances)
L1i cache:                               3 MiB (96 instances)
L2 cache:                                96 MiB (96 instances)
L3 cache:                                384 MiB (12 instances)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-95
Vulnerability Gather data sampling:      Not affected
Vulnerability Ghostwrite:                Not affected
Vulnerability Indirect target selection: 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 Old microcode:             Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Mitigation; Safe RET
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; STIBP disabled; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Mitigation; Clear CPU buffers
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.4
[pip3] numpy==2.2.6
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cudnn-cu13==9.15.1.9
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.4.1
[pip3] nvidia-cutlass-dsl-libs-base==4.4.1
[pip3] nvidia-ml-py==13.590.48
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu130
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.10.0+cu130
[pip3] torchvision==0.25.0+cu130
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.17.0
vLLM Build Flags:
  CUDA Archs: 7.0 7.5 8.0 8.9 9.0 10.0 12.0; ROCm: Disabled
GPU Topology:
  	GPU0	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	0-95	0		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

==============================
     Environment Variables
==============================
VLLM_USE_FLASHINFER_MOE_FP4=1
VLLM_ENABLE_CUDA_COMPATIBILITY=0
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/nvidia/lib64:/usr/local/cuda/lib64
VLLM_LOGGING_LEVEL=INFO
VLLM_USE_FLASHINFER_MOE_MXFP4_MXFP8=1
CUDA_VERSION=13.0.1
TORCH_CUDA_ARCH_LIST=7.0 7.5 8.0 8.9 9.0 10.0 12.0
NVIDIA_REQUIRE_CUDA=cuda>=13.0 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=565,driver<566 brand=grid,driver>=565,driver<566 brand=tesla,driver>=565,driver<566 brand=nvidia,driver>=565,driver<566 brand=quadro,driver>=565,driver<566 brand=quadrortx,driver>=565,driver<566 brand=nvidiartx,driver>=565,driver<566 brand=vapps,driver>=565,driver<566 brand=vpc,driver>=565,driver<566 brand=vcs,driver>=565,driver<566 brand=vws,driver>=565,driver<566 brand=cloudgaming,driver>=565,driver<566 brand=unknown,driver>=570,driver<571 brand=grid,driver>=570,driver<571 brand=tesla,driver>=570,driver<571 brand=nvidia,driver>=570,driver<571 brand=quadro,driver>=570,driver<571 brand=quadrortx,driver>=570,driver<571 brand=nvidiartx,driver>=570,driver<571 brand=vapps,driver>=570,driver<571 brand=vpc,driver>=570,driver<571 brand=vcs,driver>=570,driver<571 brand=vws,driver>=570,driver<571 brand=cloudgaming,driver>=570,driver<571 brand=unknown,driver>=575,driver<576 brand=grid,driver>=575,driver<576 brand=tesla,driver>=575,driver<576 brand=nvidia,driver>=575,driver<576 brand=quadro,driver>=575,driver<576 brand=quadrortx,driver>=575,driver<576 brand=nvidiartx,driver>=575,driver<576 brand=vapps,driver>=575,driver<576 brand=vpc,driver>=575,driver<576 brand=vcs,driver>=575,driver<576 brand=vws,driver>=575,driver<576 brand=cloudgaming,driver>=575,driver<576
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VLLM_FLASHINFER_ALLREDUCE_FUSION_THRESHOLDS_MB={"2":32,"4":32,"8":8}
PYTORCH_ALLOC_CONF=expandable_segments:True,max_split_size_mb:512
VLLM_USAGE_SOURCE=production-docker-image
OMP_NUM_THREADS=4
NVIDIA_VISIBLE_DEVICES=GPU-f191e8de-cbbd-be35-55b6-bd65e9ce1839
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root
RAW_BUFFERClick to expand / collapse

Your current environment

<details> <summary>The output of <code>python collect_env.py</code></summary>
Collecting environment information...
==============================
        System Info
==============================
OS                           : Ubuntu 22.04.5 LTS (x86_64)
GCC version                  : (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
Clang version                : Could not collect
CMake version                : Could not collect
Libc version                 : glibc-2.35

==============================
       PyTorch Info
==============================
PyTorch version              : 2.10.0+cu130
Is debug build               : False
CUDA used to build PyTorch   : 13.0
ROCM used to build PyTorch   : N/A

==============================
      Python Environment
==============================
Python version               : 3.12.13 (main, Mar  4 2026, 09:23:07) [GCC 11.4.0] (64-bit runtime)
Python platform              : Linux-6.17.13+deb13-amd64-x86_64-with-glibc2.35

==============================
       CUDA / GPU Info
==============================
Is CUDA available            : True
CUDA runtime version         : 13.0.88
CUDA_MODULE_LOADING set to   : 
GPU models and configuration : GPU 0: NVIDIA RTX PRO 6000 Blackwell Server Edition
Nvidia driver version        : 590.48.01
cuDNN version                : Could not collect
HIP runtime version          : N/A
MIOpen runtime version       : N/A
Is XNNPACK available         : True

==============================
          CPU Info
==============================
Architecture:                            x86_64
CPU op-mode(s):                          32-bit, 64-bit
Address sizes:                           52 bits physical, 57 bits virtual
Byte Order:                              Little Endian
CPU(s):                                  96
On-line CPU(s) list:                     0-95
Vendor ID:                               AuthenticAMD
Model name:                              AMD EPYC 9654 96-Core Processor
CPU family:                              25
Model:                                   17
Thread(s) per core:                      1
Core(s) per socket:                      96
Socket(s):                               1
Stepping:                                1
Frequency boost:                         enabled
CPU max MHz:                             3709.3569
CPU min MHz:                             1500.0000
BogoMIPS:                                4800.17
Flags:                                   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good amd_lbr_v2 nopl xtopology nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpuid_fault cpb cat_l3 cdp_l3 hw_pstate ssbd mba perfmon_v2 ibrs ibpb stibp ibrs_enhanced vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk avx512_bf16 clzero irperf xsaveerptr rdpru wbnoinvd amd_ppin cppc arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif x2avic v_spec_ctrl vnmi avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq la57 rdpid overflow_recov succor smca fsrm flush_l1d debug_swap
Virtualization:                          AMD-V
L1d cache:                               3 MiB (96 instances)
L1i cache:                               3 MiB (96 instances)
L2 cache:                                96 MiB (96 instances)
L3 cache:                                384 MiB (12 instances)
NUMA node(s):                            1
NUMA node0 CPU(s):                       0-95
Vulnerability Gather data sampling:      Not affected
Vulnerability Ghostwrite:                Not affected
Vulnerability Indirect target selection: 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 Old microcode:             Not affected
Vulnerability Reg file data sampling:    Not affected
Vulnerability Retbleed:                  Not affected
Vulnerability Spec rstack overflow:      Mitigation; Safe RET
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; STIBP disabled; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds:                     Not affected
Vulnerability Tsa:                       Mitigation; Clear CPU buffers
Vulnerability Tsx async abort:           Not affected
Vulnerability Vmscape:                   Mitigation; IBPB before exit to userspace

==============================
Versions of relevant libraries
==============================
[pip3] flashinfer-python==0.6.4
[pip3] numpy==2.2.6
[pip3] nvidia-cublas==13.1.0.3
[pip3] nvidia-cuda-cupti==13.0.85
[pip3] nvidia-cuda-nvrtc==13.0.88
[pip3] nvidia-cuda-runtime==13.0.96
[pip3] nvidia-cudnn-cu13==9.15.1.9
[pip3] nvidia-cudnn-frontend==1.18.0
[pip3] nvidia-cufft==12.0.0.61
[pip3] nvidia-cufile==1.15.1.6
[pip3] nvidia-curand==10.4.0.35
[pip3] nvidia-cusolver==12.0.4.66
[pip3] nvidia-cusparse==12.6.3.3
[pip3] nvidia-cusparselt-cu13==0.8.0
[pip3] nvidia-cutlass-dsl==4.4.1
[pip3] nvidia-cutlass-dsl-libs-base==4.4.1
[pip3] nvidia-ml-py==13.590.48
[pip3] nvidia-nccl-cu13==2.28.9
[pip3] nvidia-nvjitlink==13.0.88
[pip3] nvidia-nvshmem-cu13==3.4.5
[pip3] nvidia-nvtx==13.0.85
[pip3] pyzmq==27.1.0
[pip3] torch==2.10.0+cu130
[pip3] torch_c_dlpack_ext==0.1.5
[pip3] torchaudio==2.10.0+cu130
[pip3] torchvision==0.25.0+cu130
[pip3] transformers==4.57.6
[pip3] triton==3.6.0
[conda] Could not collect

==============================
         vLLM Info
==============================
ROCM Version                 : Could not collect
vLLM Version                 : 0.17.0
vLLM Build Flags:
  CUDA Archs: 7.0 7.5 8.0 8.9 9.0 10.0 12.0; ROCm: Disabled
GPU Topology:
  	GPU0	CPU Affinity	NUMA Affinity	GPU NUMA ID
GPU0	 X 	0-95	0		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

==============================
     Environment Variables
==============================
VLLM_USE_FLASHINFER_MOE_FP4=1
VLLM_ENABLE_CUDA_COMPATIBILITY=0
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/local/nvidia/lib64:/usr/local/cuda/lib64
VLLM_LOGGING_LEVEL=INFO
VLLM_USE_FLASHINFER_MOE_MXFP4_MXFP8=1
CUDA_VERSION=13.0.1
TORCH_CUDA_ARCH_LIST=7.0 7.5 8.0 8.9 9.0 10.0 12.0
NVIDIA_REQUIRE_CUDA=cuda>=13.0 brand=unknown,driver>=535,driver<536 brand=grid,driver>=535,driver<536 brand=tesla,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=vapps,driver>=535,driver<536 brand=vpc,driver>=535,driver<536 brand=vcs,driver>=535,driver<536 brand=vws,driver>=535,driver<536 brand=cloudgaming,driver>=535,driver<536 brand=unknown,driver>=550,driver<551 brand=grid,driver>=550,driver<551 brand=tesla,driver>=550,driver<551 brand=nvidia,driver>=550,driver<551 brand=quadro,driver>=550,driver<551 brand=quadrortx,driver>=550,driver<551 brand=nvidiartx,driver>=550,driver<551 brand=vapps,driver>=550,driver<551 brand=vpc,driver>=550,driver<551 brand=vcs,driver>=550,driver<551 brand=vws,driver>=550,driver<551 brand=cloudgaming,driver>=550,driver<551 brand=unknown,driver>=565,driver<566 brand=grid,driver>=565,driver<566 brand=tesla,driver>=565,driver<566 brand=nvidia,driver>=565,driver<566 brand=quadro,driver>=565,driver<566 brand=quadrortx,driver>=565,driver<566 brand=nvidiartx,driver>=565,driver<566 brand=vapps,driver>=565,driver<566 brand=vpc,driver>=565,driver<566 brand=vcs,driver>=565,driver<566 brand=vws,driver>=565,driver<566 brand=cloudgaming,driver>=565,driver<566 brand=unknown,driver>=570,driver<571 brand=grid,driver>=570,driver<571 brand=tesla,driver>=570,driver<571 brand=nvidia,driver>=570,driver<571 brand=quadro,driver>=570,driver<571 brand=quadrortx,driver>=570,driver<571 brand=nvidiartx,driver>=570,driver<571 brand=vapps,driver>=570,driver<571 brand=vpc,driver>=570,driver<571 brand=vcs,driver>=570,driver<571 brand=vws,driver>=570,driver<571 brand=cloudgaming,driver>=570,driver<571 brand=unknown,driver>=575,driver<576 brand=grid,driver>=575,driver<576 brand=tesla,driver>=575,driver<576 brand=nvidia,driver>=575,driver<576 brand=quadro,driver>=575,driver<576 brand=quadrortx,driver>=575,driver<576 brand=nvidiartx,driver>=575,driver<576 brand=vapps,driver>=575,driver<576 brand=vpc,driver>=575,driver<576 brand=vcs,driver>=575,driver<576 brand=vws,driver>=575,driver<576 brand=cloudgaming,driver>=575,driver<576
NVIDIA_DRIVER_CAPABILITIES=compute,utility
VLLM_FLASHINFER_ALLREDUCE_FUSION_THRESHOLDS_MB={"2":32,"4":32,"8":8}
PYTORCH_ALLOC_CONF=expandable_segments:True,max_split_size_mb:512
VLLM_USAGE_SOURCE=production-docker-image
OMP_NUM_THREADS=4
NVIDIA_VISIBLE_DEVICES=GPU-f191e8de-cbbd-be35-55b6-bd65e9ce1839
PYTORCH_NVML_BASED_CUDA_CHECK=1
TORCHINDUCTOR_COMPILE_THREADS=1
TORCHINDUCTOR_CACHE_DIR=/tmp/torchinductor_root
</details>

🐛 Describe the bug

Summary

When serving openai/gpt-oss-120b on one RTX6000 with our old baseline (no problems, stable) with speculative decoding (p-eagle drafter amazon/gpt-oss-120b-p-eagle which is a new approach (see vllm blog)) via vLLM OpenAI chat endpoint, I get repeated openai_harmony.HarmonyError during streaming and major mixed-workload latency/throughput regressions.

Related https://github.com/vllm-project/vllm/issues/27626 and https://github.com/vllm-project/vllm/issues/22519

Baseline (stable and no HarmonyParser errors)

Args (key):

  • --max-model-len 131072
  • --max-num-batched-tokens 8192
  • --max-num-seqs 128
  • --long-prefill-token-threshold 100
  • --gpu-memory-utilization 0.95
  • --tool-call-parser openai
  • --enable-auto-tool-choice
  • --compilation-config {"pass_config":{"fuse_allreduce_rms":true,"eliminate_noops":true,"fuse_norm_quant":true,"fuse_act_quant":true,"enable_sp":true,"fuse_gemm_comms":true},"custom_ops":["+rms_norm"],"cudagraph_mode":"FULL_AND_PIECEWISE"}

Failing config (combined)

Same as baseline + speculative:

  • --speculative-config {"method":"eagle3","model":"amazon/gpt-oss-120b-p-eagle","num_speculative_tokens":2,"parallel_drafting":true}

(also tested num_speculative_tokens=4, similar/bad for mixed chat)

Reproduction

  1. Start vLLM with baseline args above and confirm chat works.
  2. Add speculative config above (everything else unchanged).
  3. Run mixed scenarios with vllm bench serve (OpenAI chat backend, random datasets; includes short+medium+decode+prefill mixes).
  4. Observe repeated parser errors and degraded TTFT/throughput.

Error logs

(APIServer pid=1) ERROR ... Error in chat completion stream generator.
(APIServer pid=1) ERROR ... openai_harmony.HarmonyError: Unexpected token 200002 while expecting start token 200006

Stack points to:

- vllm/entrypoints/openai/chat_completion/serving.py (stream generator)
- openai_harmony/__init__.py parser process(token)

## Impact (A/B result highlights)

Fresh A/B in same cluster/time window:

- recipe_2048_512:
    - baseline: total_tok/s=12830, p99_ttft=5646ms
    - speculative(2): total_tok/s=3888, p99_ttft=46487ms
- thr_1k_512_c12:
    - baseline: 5373 tok/s
    - speculative(2): 4729 tok/s
- decode_256_2048_c4:
    - baseline: 744 tok/s
    - speculative(2): 521 tok/s

No OOM in this specific A/B run; failures are parser/stream related.

## Expected behavior

Speculative decoding should not emit invalid token sequences for OpenAI Harmony parser, and should not cause severe chat streaming regression in mixed workloads.

Any help is appreciated!

### Before submitting a new issue...

- [x] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the [documentation page](https://docs.vllm.ai/en/latest/), which can answer lots of frequently asked questions.

extent analysis

Fix Plan

To address the openai_harmony.HarmonyError and mixed-workload latency/throughput regressions, we will:

  • Update the speculative decoding configuration to ensure compatibility with OpenAI Harmony parser
  • Implement token sequence validation to prevent invalid tokens from being emitted
  • Optimize the chat completion stream generator for better performance in mixed workloads

Step-by-Step Solution

  1. Update speculative decoding configuration:
    • Set num_speculative_tokens to 1 to reduce the likelihood of invalid token sequences
    • Disable parallel_drafting to prevent concurrent token generation

speculative_config = { "method": "eagle3", "model": "amazon/gpt-oss-120b-p-eagle", "num_speculative_tokens": 1, "parallel_drafting": False }

2. **Implement token sequence validation**:
   * Add a validation check to ensure that the generated token sequence starts with the expected start token (200006)
   * Use a try-except block to catch and handle any `openai_harmony.HarmonyError` exceptions
   ```python
def validate_token_sequence(token_sequence):
    if token_sequence[0] != 200006:
        raise openai_harmony.HarmonyError("Invalid token sequence")
    return token_sequence

try:
    token_sequence = generate_token_sequence()
    validate_token_sequence(token_sequence)
except openai_harmony.HarmonyError as e:
    print(f"Error: {e}")
  1. Optimize chat completion stream generator:
    • Use a more efficient data structure, such as a queue, to store and process token sequences
    • Implement a caching mechanism to reduce the number of redundant computations

from collections import deque

class ChatCompletionStreamGenerator: def init(self): self.token_queue = deque()

def generate_token_sequence(self):
    # Generate token sequence and add it to the queue
    token_sequence = []
    # ...
    self.token_queue.append(token_sequence)

def get_token_sequence(self):
    # Get the next token sequence from the queue
    return self.token_queue.popleft()

### Verification
To verify that the fix worked, run the mixed scenarios with `vllm bench serve` and monitor the performance metrics (TTFT, throughput, etc.). The `openai_harmony.HarmonyError` exceptions should be reduced or eliminated, and the performance regressions should be mitigated.

### Extra Tips
* Regularly update the speculative decoding configuration to ensure compatibility with the latest OpenAI Harmony parser versions
* Monitor the performance metrics and adjust the optimization strategies as needed to maintain optimal performance in mixed workloads.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING