sgl-project/sglang · warning · DeprecationWarning
sglang.srt.layers.attention.nsa.quant_k_cache is deprecated;
Error message
sglang.srt.layers.attention.nsa.quant_k_cache is deprecated; use sglang.kernels.ops.attention.dsa.quant_k_cache instead.
What it means
DeprecationWarning from a compat shim: nsa.quant_k_cache moved to sglang.kernels.ops.attention.dsa.quant_k_cache. Importing the old module re-exports the new kernel module and warns.
Source
Thrown at python/sglang/srt/layers/attention/nsa/quant_k_cache.py:4
# [Deprecated] Re-export shim for backward compatibility. Use dsa.quant_k_cache instead.
import warnings
warnings.warn(
"sglang.srt.layers.attention.nsa.quant_k_cache is deprecated; "
"use sglang.kernels.ops.attention.dsa.quant_k_cache instead.",
DeprecationWarning,
stacklevel=2,
)
from sglang.kernels.ops.attention.dsa.quant_k_cache import * # noqa: F401, F403
View on GitHub (pinned to 0132848349)
Solutions
- Import from sglang.kernels.ops.attention.dsa.quant_k_cache
- Update any nsa/__init__.py re-exports in your own packages
- Silence with warnings.filterwarnings only as a temporary measure
Example fix
# before from sglang.srt.layers.attention.nsa.quant_k_cache import quant_k_cache # after from sglang.kernels.ops.attention.dsa.quant_k_cache import quant_k_cache
Defensive patterns
Strategy: validation
Prevention
- Point k-cache quant helpers at sglang.kernels.ops.attention.dsa.quant_k_cache
- Remove nsa shims from your own packages
When it happens
Trigger: `import sglang.srt.layers.attention.nsa.quant_k_cache` or from-imports of the quant_k_cache kernels via the nsa path.
Common situations: K-cache quantization helper code referencing the pre-rename NSA kernel location.
Related errors
- sglang.srt.layers.attention.nsa.dequant_k_cache is deprecate
- sglang.srt.layers.attention.nsa.index_buf_accessor is deprec
- sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute i
- sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; u
- sglang.srt.layers.attention.nsa.tilelang_kernel is deprecate
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/dd439522fb076823.
Report an issue: GitHub.