You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Please use English, otherwise it will be closed.
Motivation
Continue optimize CPU backend on SGLang after #2807, we target at providing optimal performance for intel Xeon with AMX support. For CPUs without AMX, we will only guarantee functionality but not performance.
Prefill Optimization: add thread blocking and cache blocking for gemm and moe modules, the current implementations exist duplicate reads for weights for large input M, will give 50~80% improvements for prefilling phase. @mingfeimaOptimize prefill performance on cpu backend #8750
FP4 Support: follow WoQ pattern to enable FP4 support and run GPU model weights OOBox.
FP8 KV Cache Support: enable usage of FP8 kv cache, fallback to compute with BF16. @shiyang-weng
FP8 Bmm Support: enable FP8 BMM in MLA weight absorb, the current BMM is computed with BF16. As CPU hardware doesn't support FP8 computation, prefer to use WoQ (A:BF16, B:FP8, C:BF16). @blzheng the improvement for decoding will only be marginal, estimated 1.5% top.
SplitK: GEMM with small OC (output channels, or N for GEMM) suffers from low performance since not be able to fully parallel, implement splitK for gate proj. @mingfeima The current gate proj only has ~50% memory bandwidth utilization.
(deploy with multi node CPU, each with 1/2/4 sockets)
Data Parallel MLA and Expert Parallel MoE: map DP-MLA and EPMoE from multi-GPUs to multi-CPUs @chunyuan-w@mingfeima@yanbing-j
Distributed Collectives: expand collectives, e.g. broadcast, all-reduce to multi node. Evaluate use of oneCCL implementation from DeepSeed. @yanbing-j@blzheng
Proxy Model: use smaller proxy model to enable model level test on SGLang to enhance product quality on prioritized models, with a balance for test time consumption in CIs. @yanbing-j@DiweiSun
Test on Non-AMX Machines: either use environment variables or provide new CI machines to test on non-AMX machines, to enhance product quality @DiweiSun
Profiler Argument Enabling: add an argument from sglang CLI, -- profile to enable torch.profile and generate trace and logs. This would be very helpful for performance tunning. @yanbing-j
Bug Tracking: actively track bugs from SGLang community @DiweiSun
Innovation
super long context prefill/decode performance optimization
Checklist
Motivation
Continue optimize CPU backend on SGLang after #2807, we target at providing optimal performance for intel Xeon with AMX support. For CPUs without AMX, we will only guarantee functionality but not performance.
Single Node CPU Optimization
(deploy with single node CPU, with 1/2/4 sockets)
torch.compile, to remove the python overhead. This roughly give extra 10% performance improvement for decoding, Add graph runner support with torch compile on CPU #7843.gate proj. @mingfeima The current gate proj only has ~50% memory bandwidth utilization.Multi Node CPU Optimization
(deploy with multi node CPU, each with 1/2/4 sockets)
broadcast,all-reduceto multi node. Evaluate use of oneCCL implementation from DeepSeed. @yanbing-j @blzhengHybrid MoE Offloading
(CPU handles MoE, GPU handles Attention, etc.)
Hybrid PD Disaggregation
(PoC stage)
User Experience and Testing Enhancement
-- profileto enabletorch.profileand generate trace and logs. This would be very helpful for performance tunning. @yanbing-jInnovation
Related resources
No response