mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-11-20 04:22:27 +00:00
Cake's requirements on the model and settings (an integer SwiGLU clamp, at most one shared expert) were asserts, which `python -O` strips: the layer would then build with a truncated clamp or a dropped shared expert. check_cake_config raises ValueError naming the nccl fallback, and also refuses a non-positive DEEPINFER_SM120_CAKE_CHUNK_TOKENS and experts that do not split evenly over the EP group. DeepseekMoE checks before converting the weights; CakeMoE checks again for direct use. expert_major_views notes why slicing L of L + 1 scale segments is right without a shared expert too: FlashInfer fills the shared segment with neutral scales then. Tests: tests/models/test_cake_moe_config.py (CPU). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>