sgl-project/sglang · warning · DeprecationWarning
sglang.srt.layers.attention.nsa.dequant_k_cache is deprecate
Error message
sglang.srt.layers.attention.nsa.dequant_k_cache is deprecated; use sglang.kernels.ops.attention.dsa.dequant_k_cache instead.
What it means
Deprecation warning emitted at import time by a backward-compatibility shim: sglang.srt.layers.attention.nsa.dequant_k_cache has moved to sglang.kernels.ops.attention.dsa.dequant_k_cache (NSA was renamed/rehomed to DSA under the sglang.kernels package). The old module still works by star-re-exporting the new one but will be removed in a future release.
Source
Thrown at python/sglang/srt/layers/attention/nsa/dequant_k_cache.py:4
# [Deprecated] Re-export shim for backward compatibility. Use dsa.dequant_k_cache instead.
import warnings
warnings.warn(
"sglang.srt.layers.attention.nsa.dequant_k_cache is deprecated; "
"use sglang.kernels.ops.attention.dsa.dequant_k_cache instead.",
DeprecationWarning,
stacklevel=2,
)
from sglang.kernels.ops.attention.dsa.dequant_k_cache import * # noqa: F401, F403
View on GitHub (pinned to 0132848349)
Solutions
- Change imports to sglang.kernels.ops.attention.dsa.dequant_k_cache
- If third-party code imports it, patch that code or pin an older SGLang version
- Run with -W error::DeprecationWarning in CI to catch remaining old imports
Example fix
# before from sglang.srt.layers.attention.nsa.dequant_k_cache import dequant_k_cache # after from sglang.kernels.ops.attention.dsa.dequant_k_cache import dequant_k_cache
Defensive patterns
Strategy: validation
Validate before calling
import warnings
with warnings.catch_warnings():
warnings.simplefilter("ignore", DeprecationWarning)
import sglang.srt.layers.attention.nsa.dequant_k_cache # temporary Prevention
- Grep for `attention.nsa` before upgrading SGLang
- Use the new sglang.kernels.ops.attention.dsa paths in new code
When it happens
Trigger: Any `import sglang.srt.layers.attention.nsa.dequant_k_cache` (direct or via `from ...nsa.dequant_k_cache import ...`, or an old `nsa/__init__.py` importing it). It fires once at first import of the shim module.
Common situations: Code written against older SGLang using the nsa namespace; stale checkpoints of model/integration code importing nsa kernels after upgrading SGLang.
Related errors
- sglang.srt.layers.attention.nsa.index_buf_accessor is deprec
- sglang.srt.layers.attention.nsa.transform_index is deprecate
- sglang.srt.layers.attention.nsa is deprecated; use sglang.sr
- sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute i
- sglang.srt.layers.attention.nsa.nsa_indexer is deprecated; u
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/5dd2348989fac01b.
Report an issue: GitHub.