From d3944be1bef59278e0bf0f6c9e594fb8f817bd83 Mon Sep 17 00:00:00 2001 From: pewdiepie-archdaemon Date: Sun, 14 Jun 2026 08:51:57 +0900 Subject: [PATCH] Cookbook: detect DeepSeek V4+ as MoE so Expert Parallel + Spec show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DeepSeek branch in _detectModelOptimizations matched only V3 and R1 literally. DeepSeek-V4-Flash (and future Vx / Rx) didn't hit any branch, so the Expert Parallel checkbox + Speculative defaults never surfaced in the Run panel. Widened to a regex that catches v3/v3.1/v4/v5/v10+ and r1/r2/… for both the expert-parallel flag and the MTP speculative defaults. --- static/js/cookbook.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/static/js/cookbook.js b/static/js/cookbook.js index 229e1bc83..8df4027e8 100644 --- a/static/js/cookbook.js +++ b/static/js/cookbook.js @@ -247,8 +247,10 @@ function _detectModelOptimizations(modelName) { opts.flags.push('--enable-expert-parallel'); opts.tips.push('MoE optimizations: expert parallel'); } - // DeepSeek MoE - else if (n.includes('deepseek') && (n.includes('v3') || n.includes('r1'))) { + // DeepSeek MoE — V3 / V3.1 / V4 (and future Vx), R1 / R2 reasoning. + // Anything v-{integer} or r-{integer} family from DeepSeek is MoE in + // current architectures. + else if (n.includes('deepseek') && /\b(v[3-9]|v\d{2,}|r[1-9])\b/.test(n)) { opts.flags.push('--enable-expert-parallel'); opts.tips.push('MoE expert parallel for DeepSeek'); } @@ -268,7 +270,7 @@ function _detectModelOptimizations(modelName) { if (n.includes('qwen3-next') || (n.includes('qwen3.5') && (n.includes('a10b') || n.includes('a22b')))) { specDefault = { method: 'qwen3_next_mtp', tokens: 2 }; } else if ( - (n.includes('deepseek') && (n.includes('v3') || n.includes('v3.1') || n.includes('r1'))) || + (n.includes('deepseek') && /\b(v[3-9]|v\d{2,}|r[1-9])\b/.test(n)) || n.includes('kimi-k2') || n.includes('kimi_k2') || n.includes('glm-4.5') || n.includes('glm4.5') || n.includes('minimax-m1') || n.includes('minimax_m1')