Skip to content

feat(inference): show vendor-aware precision in legend and tooltip#472

Open
Oseltamivir wants to merge 2 commits into
masterfrom
feat/precision-in-legend
Open

feat(inference): show vendor-aware precision in legend and tooltip#472
Oseltamivir wants to merge 2 commits into
masterfrom
feat/precision-in-legend

Conversation

@Oseltamivir

@Oseltamivir Oseltamivir commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Legend entries now show precision after a · separator — e.g. B300 (vLLM) · NVFP4, MI355X (vLLM) · FP8
  • FP4 mapped to vendor format (NVFP4 / MXFP4) via HW_REGISTRY vendor; FP8 stays generic (DB doesn't distinguish E4M3 vs MXFP8)
  • Multi-precision SKUs join with / — e.g. B200 (vLLM) · NVFP4 / FP8
  • Tooltip now shows a Precision: line
  • Works for both official runs and ?unofficialrun= overlays

Test plan

  • Unit tests for getPrecisionDisplayLabel — NVIDIA/AMD/unknown vendor × fp4/fp4fp8/fp8/bf16/int4/fallback (6 cases)
  • Verify legend labels on the inference tab show · <precision> suffix
  • Verify tooltip shows Precision: … on hover
  • Verify multi-precision selection shows · NVFP4 / FP8 in legend
  • Verify ?unofficialrun=<id> overlay legend entry includes precision suffix
  • Verify line labels use vendor format when multiple precisions selected

Note

Low Risk
UI-only labeling changes in inference charts with unit tests; no auth, data, or API behavior changes.

Overview
Inference charts now show vendor-specific FP4 names (NVFP4 on NVIDIA, MXFP4 on AMD) instead of generic FP4, via new getPrecisionDisplayLabel in constants.ts (uses HW_REGISTRY vendor; fp4fp8 becomes e.g. NVFP4+FP8; other precisions still go through getPrecisionLabel).

Legend entries for official hardware and unofficial-run overlays append active precisions after ·, sorted by PRECISION_OPTIONS and joined with / when multiple are selected. Line labels on rooflines use the same helper when more than one precision is visible.

Chart tooltip adds an optional Precision: row when the point payload includes precision. Unit tests cover NVIDIA/AMD/unknown vendors and main precision strings.

Reviewed by Cursor Bugbot for commit 792177c. Bugbot is set up for automated code reviews on this repo. Configure here.

…and tooltip

Legend entries now display precision after a · separator (e.g. "B300 (vLLM) · NVFP4",
"MI355X (vLLM) · FP8"). FP4 is mapped to NVFP4 (NVIDIA) / MXFP4 (AMD) based on the
GPU's vendor in HW_REGISTRY; FP8 stays generic since the DB doesn't distinguish E4M3
vs MXFP8. Multi-precision SKUs join with / (e.g. "· NVFP4 / FP8").

- Add getPrecisionDisplayLabel(precision, hwKey) to lib/constants.ts
- Update official + overlay legend labels in ScatterGraph.tsx
- Route line labels (lineLabelText, overlayLabelText) through vendor format
- Add precision line to ChartTooltip
- Add unit tests for the new helper
@Oseltamivir Oseltamivir requested a review from adibarra as a code owner June 19, 2026 06:53
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview, Comment Jun 19, 2026 6:57am

Request Review

<p>{`GPU: ${hardwareConfig[pointPayload.hwKey as keyof typeof hardwareConfig].gpu}`}</p>
{pointPayload.precision && (
<p>{`Precision: ${getPrecisionDisplayLabel(pointPayload.precision, String(pointPayload.hwKey ?? ''))}`}</p>
)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scatter tooltip still generic precision

Medium Severity

Vendor-aware precision was added in ChartTooltip, but the inference scatter chart does not render that component. Hovers still use generateTooltipContent, which uppercases the raw precision field, so legend entries can show labels like NVFP4 while the hover line still shows FP4 or FP4FP8.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8c0d233. Configure here.

(PRECISION_OPTIONS as readonly string[]).indexOf(b),
)
.map((p) => getPrecisionDisplayLabel(p, sampleHwKey))
.join(' / ')}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overlay legend wrong vendor label

Low Severity

Unofficial-run legend precision suffixes call getPrecisionDisplayLabel with a single sampleHwKey taken from the first matching overlay point. If one run includes multiple hardware keys, fp4/fp4fp8 labels for every precision use that one vendor, which can mislabel NVIDIA data as MXFP4 or the reverse.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8c0d233. Configure here.

@blacksmith-sh

blacksmith-sh Bot commented Jun 19, 2026

Copy link
Copy Markdown

Found 2 test failures on Blacksmith runners:

Failures

Test View Logs
Line Labels Toggle/
appends the precision to each line label when multiple precisions are selected
View Logs
Line Labels Toggle/
appends the precision to each line label when multiple precisions are selected
View Logs

Fix with Codesmith
Need help on this PR? Tag /codesmith with what you need.

precisionsPerHw was derived from filteredData (which excludes inactive
hw types), so toggled-off SKUs lost their precision suffix. Derive from
all data points filtered only by selectedPrecisions instead.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 3 total unresolved issues (including 2 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 792177c. Configure here.

: '';
return {
name: hwConfig.name,
label: `${baseLabel}${precSuffix}`,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hover tooltip precision not vendor-aware

Medium Severity

This commit adds vendor-aware precision suffixes to chart legend labels via getPrecisionDisplayLabel, but the inference scatter chart still builds hover tooltips through generateTooltipContent, which shows d.precision.toUpperCase() (e.g. FP4). Legend and point tooltip can disagree on the same chart after this change.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 792177c. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant