From 85774b0ba84a6a811145e8f8bdaccb6ea1f3a019 Mon Sep 17 00:00:00 2001 From: Wenyao Gao Date: Wed, 29 Jul 2026 17:40:12 -0700 Subject: [PATCH] fix(overview): clarify speculative decode labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 中文:fix(overview):明确标注推测解码方法 --- packages/app/cypress/e2e/overview.cy.ts | 22 +++++++---- .../overview/overview-scorecard.tsx | 37 ++++++++++++++----- 2 files changed, 42 insertions(+), 17 deletions(-) diff --git a/packages/app/cypress/e2e/overview.cy.ts b/packages/app/cypress/e2e/overview.cy.ts index ee8391201..c7859b14e 100644 --- a/packages/app/cypress/e2e/overview.cy.ts +++ b/packages/app/cypress/e2e/overview.cy.ts @@ -151,7 +151,7 @@ describe('Overview page', () => { }); desktopModel('DeepSeek-V4-Pro').within(() => { - cy.contains('MTP').should('exist'); + cy.contains('Spec decode (MTP)').should('exist'); platform('gb300').within(() => { cy.get('[data-testid="overview-pair-value"][data-hardware="gb300"]') .should('have.attr', 'title', 'Estimated from validated benchmark runs.') @@ -165,6 +165,9 @@ describe('Overview page', () => { cy.get('[data-testid="overview-pair-missing"]').should('not.exist'); }); }); + desktopModel('MiniMax-M3').within(() => { + platform('gb300').should('contain.text', 'Spec decode (M3 EAGLE)'); + }); cy.contains( 'Priority: speculative FP4 → speculative FP8 → standard FP4 → standard FP8.', ).should('exist'); @@ -553,13 +556,15 @@ describe('Overview page', () => { }); cy.get('[data-testid="overview-pair-value"][data-hardware="mi355x"]').then(([value]) => { - cy.contains('div', 'SGLang · FP8 · MTP').then(([metadata]) => { - const valueRect = textRect(value); - const metadataRect = textRect(metadata); + cy.contains('div', 'SGLang · FP8') + .should('contain.text', 'Spec decode (MTP)') + .then(([metadata]) => { + const valueRect = textRect(value); + const metadataRect = textRect(metadata); - expect(metadataRect.top).to.be.at.least(valueRect.bottom); - expect(getComputedStyle(metadata).fontSize).to.equal('11px'); - }); + expect(metadataRect.top).to.be.at.least(valueRect.bottom); + expect(getComputedStyle(metadata).fontSize).to.equal('11px'); + }); }); }); }); @@ -640,6 +645,9 @@ describe('Overview page', () => { platform('b200').should('contain.text', '标准解码'); platform('b200').find('[data-testid="overview-cost-delta"]').should('not.exist'); }); + desktopModel('DeepSeek-V4-Pro').within(() => { + platform('b200').should('contain.text', '推测解码(MTP)'); + }); desktopModel('GLM-5.2').within(() => { cy.get('[data-testid="overview-model-scenario"]').should('have.text', 'AgentX'); cy.get('[data-testid="overview-pair-missing"]').should('have.length', 5); diff --git a/packages/app/src/components/overview/overview-scorecard.tsx b/packages/app/src/components/overview/overview-scorecard.tsx index 1c5a3c1c7..6796c1240 100644 --- a/packages/app/src/components/overview/overview-scorecard.tsx +++ b/packages/app/src/components/overview/overview-scorecard.tsx @@ -54,6 +54,7 @@ export const OVERVIEW_STRINGS = { cannot_reach_at_tier: `cannot reach @${tier}`, no_exact_at_tier: `no exact @${tier} result`, }), + speculativeDecodeLabel: (method: string) => `Spec decode (${method})`, standardDecodeLabel: 'Standard decode', methodologyNote: 'Priority: speculative FP4 → speculative FP8 → standard FP4 → standard FP8.', costNote: @@ -104,6 +105,7 @@ export const OVERVIEW_STRINGS = { cannot_reach_at_tier: `无法达到 @${tier}`, no_exact_at_tier: `无精确 @${tier} 结果`, }), + speculativeDecodeLabel: (method: string) => `推测解码(${method})`, standardDecodeLabel: '标准解码', methodologyNote: '优先顺序:推测解码 FP4 → 推测解码 FP8 → 标准解码 FP4 → 标准解码 FP8。', costNote: '成本 = 3 年期租赁 $/GPU/小时 ÷ 每张已部署 GPU 的输出 tok/s。所有百分比均相对 B200。', @@ -266,26 +268,32 @@ function CellValue({ return ; } const precisionLabel = config?.precision.toUpperCase() ?? member.precision?.toUpperCase() ?? null; - const specLabel = + const evidenceSpecLabel = config === null ? null : config.specMethod === 'none' || config.specMethod === '' ? strings.standardDecodeLabel : config.specLabel; - const stackBadge = - config === null || precisionLabel === null || specLabel === null + const decodeLabel = + config === null || evidenceSpecLabel === null + ? null + : config.specMethod === 'none' || config.specMethod === '' + ? evidenceSpecLabel + : strings.speculativeDecodeLabel(evidenceSpecLabel); + const stackPrefix = + config === null || precisionLabel === null ? null - : [config.frameworkLabel, precisionLabel, specLabel] - .filter((part): part is string => part !== null) - .join(' · '); + : [config.frameworkLabel, precisionLabel].join(' · '); + const stackBadge = + stackPrefix === null || decodeLabel === null ? null : [stackPrefix, decodeLabel].join(' · '); const stack = - config === null + config === null || evidenceSpecLabel === null ? null : [ member.hardwareLabel, config.frameworkLabel, config.precision.toUpperCase(), - specLabel, + evidenceSpecLabel, ].join(' · '); const evidenceDateLabel = evidenceDate === null ? '' : formatEvidenceDate(formatters, evidenceDate); @@ -358,7 +366,16 @@ function CellValue({ {member.precision === null ? null : (
- {config === null ? member.precision.toUpperCase() : stackBadge} + {config === null ? ( + member.precision.toUpperCase() + ) : phoneRow && stackPrefix !== null && decodeLabel !== null ? ( + <> + {stackPrefix} + {decodeLabel} + + ) : ( + stackBadge + )}
)} @@ -501,7 +518,7 @@ export function MobileOverviewList({ models, locale, formatters, strings }: Surf key={platform.hardware} data-testid="overview-mobile-platform-row" data-hardware={platform.hardware} - className="grid min-w-0 grid-cols-[4.25rem_minmax(0,1fr)] gap-x-3 border-b border-border/30 py-2.5 last:border-b-0" + className="grid min-w-0 grid-cols-[4.25rem_minmax(0,1fr)] gap-x-3 border-b border-border/30 py-1.5 last:border-b-0" >