sgl-project/sglang · warning · DeprecationWarning
attention-backend='nsa' is deprecated; use 'dsa' instead. Th
Error message
attention-backend='nsa' is deprecated; use 'dsa' instead. The alias will be removed in a future release.
What it means
The attention backend name 'nsa' (native sparse attention) is a deprecated alias for what is now called 'dsa'. Selecting it via --attention-backend nsa or AttentionBackendEnum.NSA still works — it creates the DSA backend — but the alias will be removed.
Source
Thrown at python/sglang/srt/layers/attention/attention_registry.py:142
@register_attention_backend("ascend")
def create_ascend_backend(runner):
from sglang.srt.hardware_backend.npu.attention.ascend_backend import (
AscendAttnBackend,
)
return AscendAttnBackend(runner)
@register_attention_backend("dsa")
def create_dsa_backend(runner):
from sglang.srt.layers.attention.dsa_backend import DeepseekSparseAttnBackend
return DeepseekSparseAttnBackend(runner)
@register_attention_backend("nsa")
def _create_nsa_compat(runner):
warnings.warn(
"attention-backend='nsa' is deprecated; use 'dsa' instead. "
"The alias will be removed in a future release.",
DeprecationWarning,
stacklevel=2,
)
return create_dsa_backend(runner)
@register_attention_backend("dsv4")
def create_dsv4_backend(runner):
if _is_npu:
from sglang.srt.hardware_backend.npu.attention.ascend_dsv4_backend import (
DeepseekV4AscendAttnBackend,
)
return DeepseekV4AscendAttnBackend(runner)
elif _is_hip:
from sglang.srt.layers.attention.deepseek_v4_backend_hip_radix import (View on GitHub (pinned to 0132848349)
Solutions
- Change --attention-backend nsa to --attention-backend dsa in launch commands
- Update any programmatic registry lookups from 'nsa' to 'dsa'
- Watch release notes for the removal and migrate before upgrading past it
Example fix
# before sglang serve --model-path deepseek-ai/DeepSeek-V3 --attention-backend nsa # after sglang serve --model-path deepseek-ai/DeepSeek-V3 --attention-backend dsa
Defensive patterns
Strategy: validation
Validate before calling
assert server_args.attention_backend != "nsa", "use 'dsa'"
Prevention
- Update launch flags on every major upgrade
- Track deprecation notices in release notes for model-specific backends
When it happens
Trigger: Launching the server with --attention-backend nsa, or setting the attention backend registry key 'nsa' in code, on a DeepSeek-style sparse attention model.
Common situations: Old launch commands/model configs from when the backend was named NSA; scripts pinned to previous sglang versions after upgrading.
Related errors
- sglang.srt.layers.attention.nsa is deprecated; use sglang.sr
- HiSparse supports DSA {label} backend(s) {sorted(allowed_bac
- 'python -m sglang.launch_server' is still supported, but 'sg
- 'data_parallel_rank' is deprecated, use 'routed_dp_rank' ins
- 'data_parallel_rank' is deprecated, use 'routed_dp_rank' ins
AI-assisted analysis of sgl-project/sglang@0132848349 (2026-08-28).
Data as JSON: /api/errors/36aed54d025fc3b2.
Report an issue: GitHub.