From ac08ebed6510ae600e50c77ffd5484601f264c3f Mon Sep 17 00:00:00 2001 From: ChangLiu0709 Date: Tue, 21 Apr 2026 02:17:11 +0100 Subject: [PATCH] [AMD] Resolve Qwen3.5 MTP (speculative decoding) radix cache conflict. (#22908) --- python/sglang/srt/server_args.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index 984e3f63c..0d4fd94a7 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -2328,10 +2328,20 @@ class ServerArgs: self.disable_overlap_schedule = False else: if not self.disable_radix_cache: - raise ValueError( - f"Speculative decoding for {model_arch} is not compatible with radix cache when using --mamba-scheduler-strategy no_buffer." - "To use radix cache with speculative decoding, please use --mamba-scheduler-strategy extra_buffer and set SGLANG_ENABLE_SPEC_V2=1." - ) + if is_hip(): + # On ROCm, extra_buffer is unsupported. + # Automatically disable radix cache instead. + logger.warning( + f"Speculative decoding for {model_arch} is not compatible " + "with radix cache on ROCm devices. " + "Automatically disabling radix cache." + ) + self.disable_radix_cache = True + else: + raise ValueError( + f"Speculative decoding for {model_arch} is not compatible with radix cache when using --mamba-scheduler-strategy no_buffer." + "To use radix cache with speculative decoding, please use --mamba-scheduler-strategy extra_buffer and set SGLANG_ENABLE_SPEC_V2=1." + ) def _handle_sampling_backend(self): if self.sampling_backend is None: