sgl-project/sglang · warning · DeprecationWarning
sglang.srt.layers.attention.nsa.quant_k_cache is…
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
Deprecation warning: the module sglang.srt.layers.attention.nsa.quant_k_cache has moved; import sglang.kernels.ops.attention.dsa.quant_k_cache instead. The old path will be removed in a future release.
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_backend is deprecated; use…
- sglang.srt.layers.attention.nsa.dequant_k_cache is…
- sglang.srt.layers.attention.nsa.index_buf_accessor is…
- sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute…
- sglang.srt.layers.attention.nsa.nsa_indexer is deprecated…
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/dd439522fb076823.
Report an issue: GitHub.
Appendix: 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)