{"record":{"id":"dd439522fb076823","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-quant-k-cache-is-d","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.quant_k_cache is deprecated; use sglang.kernels.ops.attention.dsa.quant_k_cache instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.quant_k_cache is deprecated; use sglang\\.kernels\\.ops\\.attention\\.dsa\\.quant_k_cache instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/quant_k_cache.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.quant_k_cache instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.quant_k_cache is deprecated; \"\n    \"use sglang.kernels.ops.attention.dsa.quant_k_cache instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.kernels.ops.attention.dsa.quant_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/quant_k_cache.py#L1-L11","documentation":"DeprecationWarning from a compat shim: nsa.quant_k_cache moved to sglang.kernels.ops.attention.dsa.quant_k_cache. Importing the old module re-exports the new kernel module and warns.","triggerScenarios":"`import sglang.srt.layers.attention.nsa.quant_k_cache` or from-imports of the quant_k_cache kernels via the nsa path.","commonSituations":"K-cache quantization helper code referencing the pre-rename NSA kernel location.","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"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.quant_k_cache import quant_k_cache\n# after\nfrom sglang.kernels.ops.attention.dsa.quant_k_cache import quant_k_cache","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Point k-cache quant helpers at sglang.kernels.ops.attention.dsa.quant_k_cache","Remove nsa shims from your own packages"],"tags":["deprecation","sglang","quantization","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}