From 171b442ad3ac87139c60b807d45d7f7fec533505 Mon Sep 17 00:00:00 2001 From: "Ho-Ren (Jack) Chuang" Date: Fri, 12 Dec 2025 11:50:27 -0800 Subject: [PATCH] Add KV4-capable backend flashmla and update server args (#14989) Signed-off-by: Ho-Ren (Jack) Chuang --- docs/advanced_features/attention_backend.md | 2 +- python/sglang/srt/server_args.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/advanced_features/attention_backend.md b/docs/advanced_features/attention_backend.md index 3010b7463..7052b4bbd 100644 --- a/docs/advanced_features/attention_backend.md +++ b/docs/advanced_features/attention_backend.md @@ -36,7 +36,7 @@ The support matrix is split into two parts: MHA (standard attention) and MLA (mu | **Backend** | **Native Page Sizes** | **FP8 KV Cache** | **FP4 KV Cache** | **Chunked Prefix Cache** | **Spec topk=1** | **Spec topk>1** | |----------------------------|---------------------------|------------------|------------------|--------------------------|-----------------|-----------------| | **FlashInfer MLA** | 1 | ❌ | ✅ | ✅ | ✅ | ❌ | -| **FlashMLA** | 64 | ✅ | ❌ | ✅ | ✅ | ❌ | +| **FlashMLA** | 64 | ✅ | ✅ | ✅ | ✅ | ❌ | | **Cutlass MLA** | 128 | ✅ | ✅ | ✅ | ✅ | ❌ | | **TRTLLM MLA (Blackwell)** | 32 or 64 | ✅ | ✅ | ✅ | ✅ | ❌ | | **FA3 (FlashAttention 3)** | n/a | ❌ | ❌ | ✅ | ✅ | ⚠️ (page_size=1 only) | diff --git a/python/sglang/srt/server_args.py b/python/sglang/srt/server_args.py index f3942976a..231ceab54 100644 --- a/python/sglang/srt/server_args.py +++ b/python/sglang/srt/server_args.py @@ -1607,6 +1607,7 @@ class ServerArgs: "cutlass_mla", "flashinfer", "trtllm_mla", + "flashmla", ] assert ( self.attention_backend in KV4_ATTENTION_MLA_BACKEND_CHOICES