sgl-project/sglang · warning · DeprecationWarning
sglang.srt.layers.attention.nsa.transform_index is deprecate
Error message
sglang.srt.layers.attention.nsa.transform_index is deprecated; use sglang.kernels.ops.attention.dsa.transform_index instead.
What it means
DeprecationWarning emitted when importing the old nsa.transform_index shim; the module now lives at sglang.kernels.ops.attention.dsa.transform_index and is re-exported for compatibility.
Source
Thrown at python/sglang/srt/layers/attention/nsa/transform_index.py:4
# [Deprecated] Re-export shim for backward compatibility. Use dsa.transform_index instead.
import warnings
warnings.warn(
"sglang.srt.layers.attention.nsa.transform_index is deprecated; "
"use sglang.kernels.ops.attention.dsa.transform_index instead.",
DeprecationWarning,
stacklevel=2,
)
from sglang.kernels.ops.attention.dsa.transform_index import * # noqa: F401, F403
View on GitHub (pinned to 0132848349)
Solutions
- Import from sglang.kernels.ops.attention.dsa.transform_index
- Audit imports with grep for `attention\.nsa`
- Pin an older SGLang release only if you cannot patch immediately
Example fix
# before from sglang.srt.layers.attention.nsa.transform_index import transform_index # after from sglang.kernels.ops.attention.dsa.transform_index import transform_index
Defensive patterns
Strategy: validation
Prevention
- Update transform_index imports to the dsa kernels path
- Run a repo-wide grep for `nsa.transform_index`
When it happens
Trigger: `from sglang.srt.layers.attention.nsa.transform_index import ...` or indirect import via the nsa package.
Common situations: Post-upgrade code that transforms sparse-attention indices using the pre-rename module path.
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 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/9d2a0bb3adfe5373.
Report an issue: GitHub.