Explore the research collection
3 entries · Follow this search
- Paper
SageAttention: Accurate 8-Bit Attention for Plug-and-play Inference Acceleration
PTQ attention: subtract the token-mean of K to smooth channel outliers so QK can be INT8, and keep PV in FP16 with an FP16 accumulator (INT8 PV is too noisy on some layers). Triton kernels on RTX4090/3090; peak ~341 TOPS at headdim 64/128 vs FlashAttention2 ~165. ~2.1× FA2 and ~2.7× xformers. Plug-and-play: Llama2-7B WikiText 5.824 vs FP 5.823, MMLU 0.46=FP; CogVideoX/Unidiffuser/UltraPixel/TIMM/Llava1.6 near-parity. ICLR 2025. Code https://github.com/thu-ml/SageAttention.
- Paper
Disaggregated Quantization: Specializing LLM Prefill and Decode
Disaggregated quantization (DQ): separate computation formats, weights, and storage placement specialized to prefill vs decode -- low-precision arithmetic accelerates prompt processing, compact weights reduce memory traffic during generation. Removing activation quantization on decode improves accuracy on decode-heavy tasks without added inference cost (Qwen 3, Gemma 3). Separate compute-native prefill weights accelerate prompt processing vs weight-only inference while matching/exceeding its accuracy at 2-3-bit decode. Training an NVFP4 prefiller improves 1-bit accuracy by 32.5 points on MMLU-Pro and 35.3 on MMMU-Pro without modifying the decode checkpoint (Qwen3.8-27B GGUF decoder). "Offloaded disaggregated prefill" (ODP) streams the extra prefill checkpoint from SSD, amortizing loading over prompt length: 1.78x time-to-first-token speedup over the weight-only baseline at 8K prompt length in llama.cpp. Accuracy evaluated under disaggregated serving in vLLM; shared-weight format disaggregation validated via PTQ on models up to 2.8T parameters.
- Paper
Context Language Models
Introduces Context Language Models (CLMs): language models that natively manage their own context by treating the context as a file and allowing unrestricted updates to it, letting the model learn what is most important to maintain in context and naturally extending to multi-agent systems where multiple agent contexts coexist as files. Building CLMs zero-shot with existing models outperforms SOTA context-management strategies: 11.4% higher accuracy with 21.5% fewer FLOPs on BrowseComp-Plus, 5% higher scores with 59% fewer FLOPs on 12-hour EdgeBench, and 65% greater improvement with the same compute on a 24-hour multi-repository agent-swarm task. Shifting context management from external harness control to intrinsic model behavior enables both in-context and parametric learning of context-management strategies: steering CLMs with natural-language instructions evolved through a skill-optimization loop improves held-out accuracy by up to 35.9 points while reducing compute. An online RL method for CLMs improves Qwen3.5-9B on BrowseComp-Plus by 47.6% while using 12% fewer FLOPs. Co-designed Suffix Cache Reuse for CLM serving further cuts server-side compute by 35% relative to standard SGLang at matched performance.