{"record":{"id":"5dd2348989fac01b","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-dequant-k-cache-is","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.dequant_k_cache is deprecated; use sglang.kernels.ops.attention.dsa.dequant_k_cache instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.dequant_k_cache is deprecated; use sglang\\.kernels\\.ops\\.attention\\.dsa\\.dequant_k_cache instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/dequant_k_cache.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.dequant_k_cache instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.dequant_k_cache is deprecated; \"\n    \"use sglang.kernels.ops.attention.dsa.dequant_k_cache instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.kernels.ops.attention.dsa.dequant_k_cache import *  # noqa: F401, F403\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa/dequant_k_cache.py#L1-L11","documentation":"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.","triggerScenarios":"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.","commonSituations":"Code written against older SGLang using the nsa namespace; stale checkpoints of model/integration code importing nsa kernels after upgrading SGLang.","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"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.dequant_k_cache import dequant_k_cache\n# after\nfrom sglang.kernels.ops.attention.dsa.dequant_k_cache import dequant_k_cache","handlingStrategy":"validation","validationCode":"import warnings\nwith warnings.catch_warnings():\n    warnings.simplefilter(\"ignore\", DeprecationWarning)\n    import sglang.srt.layers.attention.nsa.dequant_k_cache  # temporary","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Grep for `attention.nsa` before upgrading SGLang","Use the new sglang.kernels.ops.attention.dsa paths in new code"],"tags":["deprecation","sglang","nsa","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}