{"record":{"id":"9aa30e009de3915a","repo":"sgl-project/sglang","slug":"sglang-srt-layers-attention-nsa-nsa-backend-mtp-pr","errorCode":null,"errorMessage":"sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute is deprecated; use sglang.srt.layers.attention.dsa.dsa_backend_mtp_precompute instead.","messagePattern":"sglang\\.srt\\.layers\\.attention\\.nsa\\.nsa_backend_mtp_precompute is deprecated; use sglang\\.srt\\.layers\\.attention\\.dsa\\.dsa_backend_mtp_precompute instead\\.","errorType":"console","errorClass":"DeprecationWarning","httpStatus":null,"severity":"warning","filePath":"python/sglang/srt/layers/attention/nsa/nsa_backend_mtp_precompute.py","lineNumber":4,"sourceCode":"# [Deprecated] Re-export shim for backward compatibility. Use dsa.dsa_backend_mtp_precompute instead.\nimport warnings\n\nwarnings.warn(\n    \"sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute is deprecated; \"\n    \"use sglang.srt.layers.attention.dsa.dsa_backend_mtp_precompute instead.\",\n    DeprecationWarning,\n    stacklevel=2,\n)\nfrom sglang.srt.layers.attention.dsa.dsa_backend_mtp_precompute import *  # noqa: F401, F403\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/sgl-project/sglang/blob/0132848349585cfe6aae51c4941cbae872505f8a/python/sglang/srt/layers/attention/nsa/nsa_backend_mtp_precompute.py#L1-L11","documentation":"DeprecationWarning raised on import of the old nsa_backend_mtp_precompute shim; the module now lives at sglang.srt.layers.attention.dsa.dsa_backend_mtp_precompute. The old file star-re-exports the new one, so functionality is identical until removal.","triggerScenarios":"`import sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute` or importing its symbols (MTP precompute helpers) via the nsa package.","commonSituations":"MTP (multi-token prediction) precompute code written before the NSA→DSA rename; upgrading SGLang with local patches referencing the old module.","solutions":["Import from sglang.srt.layers.attention.dsa.dsa_backend_mtp_precompute","Rename any local modules that re-export the old path","Use python -W error to find all import sites in tests"],"exampleFix":"# before\nfrom sglang.srt.layers.attention.nsa.nsa_backend_mtp_precompute import *\n# after\nfrom sglang.srt.layers.attention.dsa.dsa_backend_mtp_precompute import *","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use dsa.dsa_backend_mtp_precompute in MTP precompute code","Keep a migration note when the NSA→DSA rename lands"],"tags":["deprecation","sglang","mtp","import"],"backgroundTag":"deprecation-warning","analyzedSha":"0132848349585cfe6aae51c4941cbae872505f8a","analyzedAt":"2026-08-28T05:10:05.995Z","schemaVersion":2},"datasetVersion":"2026-08-28T06:17:29.519Z"}