feat(cookbook): MTP --max-running-requests callout + skill sync (#28340)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
4c0457f440
commit
7221be2cec
@@ -128,6 +128,15 @@ export const Deployment = ({ config, benchmarks }) => {
|
||||
color: isDark ? "#e5e7eb" : "#374151",
|
||||
whiteSpace: "pre-wrap", overflowX: "auto", margin: 0,
|
||||
},
|
||||
// Amber callout under the command when speculative decoding (MTP) is on
|
||||
// but --max-running-requests isn't set (SGLang then caps it at 48).
|
||||
mtpWarn: {
|
||||
margin: "8px 0 0", padding: "8px 12px", borderRadius: "8px",
|
||||
fontSize: "12px", lineHeight: "1.45",
|
||||
background: isDark ? "#78350f" : "#fef3c7",
|
||||
color: isDark ? "#fde68a" : "#92400e",
|
||||
border: `1px solid ${isDark ? "#92400e" : "#fcd34d"}`,
|
||||
},
|
||||
badge: (verified) => ({
|
||||
display: "inline-flex", alignItems: "center", gap: "6px",
|
||||
padding: "2px 8px", borderRadius: "10px",
|
||||
@@ -904,6 +913,13 @@ export const Deployment = ({ config, benchmarks }) => {
|
||||
const s = makeStyles(isDark);
|
||||
const cell = findCell(config.cells, sel);
|
||||
const command = renderCommand(cell, sel, env, runMode);
|
||||
// MTP hint: fire on the actual command (speculative decoding ON) — NOT on
|
||||
// strategy=low-latency, since a low-latency cell may not enable MTP. SGLang
|
||||
// resets --max-running-requests to 48 when spec is on and it's unset.
|
||||
const mtpHint =
|
||||
!!cell &&
|
||||
(cell.flags || []).some((f) => f.split(/[\s=]/)[0] === "--speculative-algorithm") &&
|
||||
!(cell.flags || []).some((f) => f.split(/[\s=]/)[0] === "--max-running-requests");
|
||||
const modelName = resolveModelName(sel);
|
||||
const curlText = interpolate(config.curl || "", env, modelName);
|
||||
const hwGroups = buildHardwareGroups();
|
||||
@@ -1042,6 +1058,11 @@ export const Deployment = ({ config, benchmarks }) => {
|
||||
</div>
|
||||
</div>
|
||||
<pre style={s.commandPre}>{command}</pre>
|
||||
{mtpHint && (
|
||||
<div style={s.mtpWarn}>
|
||||
⚠️ Speculative decoding (MTP) is on — SGLang resets <code>--max-running-requests</code> to <strong>48</strong> when it isn't set. Add <code>--max-running-requests <N></code> sized for your target concurrency.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1306,6 +1306,16 @@ export const Playground = ({ config }) => {
|
||||
color: isDark ? "#e5e7eb" : "#374151",
|
||||
whiteSpace: "pre-wrap", overflowX: "auto", margin: 0,
|
||||
},
|
||||
// Amber callout under the playground command when the effective (post-
|
||||
// override) command turns speculative decoding on without setting
|
||||
// --max-running-requests (SGLang then caps it at 48).
|
||||
mtpWarn: {
|
||||
margin: "8px 0 0", padding: "8px 12px", borderRadius: "8px",
|
||||
fontSize: "12px", lineHeight: "1.45",
|
||||
background: isDark ? "#78350f" : "#fef3c7",
|
||||
color: isDark ? "#fde68a" : "#92400e",
|
||||
border: `1px solid ${isDark ? "#92400e" : "#fcd34d"}`,
|
||||
},
|
||||
diffLineUnchanged: { display: "block" },
|
||||
diffLineAdded: {
|
||||
display: "block",
|
||||
@@ -1652,6 +1662,12 @@ export const Playground = ({ config }) => {
|
||||
const playgroundVerified = !!(matchedCell && matchedCell.verified);
|
||||
const matchedSiblingCell = (matchedCell && matchedCell !== baseCell)
|
||||
? matchedCell : null;
|
||||
// MTP hint on the EFFECTIVE (post-override) command — fires when the user
|
||||
// toggles speculative decoding on without setting --max-running-requests
|
||||
// (NOT keyed on strategy). Mirrors the Deploy panel's hint.
|
||||
const pgMtpHint =
|
||||
pgFlagsLatest.some((f) => f.split(/[\s=]/)[0] === "--speculative-algorithm") &&
|
||||
!pgFlagsLatest.some((f) => f.split(/[\s=]/)[0] === "--max-running-requests");
|
||||
|
||||
// Submission snippets: proposed cell + existing cell at the same match.
|
||||
const proposedCellSnippet = baseCell
|
||||
@@ -1901,6 +1917,11 @@ export const Playground = ({ config }) => {
|
||||
</span>
|
||||
)) : "# No verified base cell at the current Deployment selection.\n# Pick a supported hardware/variant in the Deployment panel to populate the playground base."}
|
||||
</pre>
|
||||
{pgMtpHint && (
|
||||
<div style={s.mtpWarn}>
|
||||
⚠️ Speculative decoding (MTP) is on — SGLang resets <code>--max-running-requests</code> to <strong>48</strong> when it isn't set. Add <code>--max-running-requests <N></code> sized for your target concurrency.
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user