Skip to content

feat(inference): add tokens per Calorie and Big Mac metrics / 新增每卡路里和每个 Big Mac 的 token 数指标 - #790

Closed
cquil11 wants to merge 5 commits into
masterfrom
feat/tokens-per-calorie
Closed

feat(inference): add tokens per Calorie and Big Mac metrics / 新增每卡路里和每个 Big Mac 的 token 数指标#790
cquil11 wants to merge 5 commits into
masterfrom
feat/tokens-per-calorie

Conversation

@cquil11

@cquil11 cquil11 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add total, input, and output Tokens per Calorie Y-axis metrics
  • add total, input, and output Tokens per Big Mac Y-axis metrics
  • derive all six from all-in provisioned power using 1 food Calorie = 4,184 J and 580 Cal per U.S. Big Mac
  • add bilingual Human Output Speed reference guides to the two output-only food-energy charts
  • support inference charts, Pareto rooflines, tables/CSV paths, and historical trend interpolation
  • add English and Simplified Chinese labels plus visible source notes

Unofficial run support

Works for both official runs and ?unofficialrun= overlays through the shared transformBenchmarkRowscreateChartDataPoint path. Preview verification was intentionally skipped for this quick meme PR.

Validation

  • JSON configuration validation passed
  • formatting check passed
  • tests intentionally omitted per request
  • full typecheck and lint were not completed because the shared local dependency install is stale relative to master (unrelated workspace export errors and an older oxlint ruleset)

Sources

中文说明

  • 新增每卡路里对应的总 token、输入 token 和输出 token 三个 Y 轴指标
  • 新增每个 Big Mac 对应的总 token、输入 token 和输出 token 三个 Y 轴指标
  • 六个指标均按全电源配置功耗换算:1 食物卡路里 = 4,184 J,美国 Big Mac 按 580 Cal 计算
  • 在两个仅统计输出 token 的食物能量图表中新增双语“人类输出速度”参考线
  • 支持推理图表、Pareto 前沿、表格/CSV 数据路径和历史趋势插值
  • 补充英文与简体中文标签,并在图表中展示计算假设的来源

非官方运行支持

官方运行与 ?unofficialrun= 非官方运行覆盖均通过共享的 transformBenchmarkRowscreateChartDataPoint 数据路径获得这六个指标。本次为快速 meme PR,按要求未等待 Preview 并进行手动验证。

验证

  • JSON 配置校验通过
  • 格式检查通过
  • 按要求未添加或运行测试
  • 由于共享的本地依赖安装落后于 master,完整 typecheck 与 lint 未完成;当前报错为无关的 workspace 导出缺失及旧版 oxlint 规则集问题

来源


Note

Low Risk
Additive display metrics and chart overlays on existing power/throughput data; no auth, persistence, or API contract changes.

Overview
Adds six food-energy Y-axis metrics (total / input / output tokens per food Calorie and per U.S. Big Mac) derived from all-in provisioned GPU power: 4,184 J per Calorie and 580 Cal per Big Mac.

Wires the fields through chart data points, Pareto rooflines, bilingual chart config, the Food Energy control group, and historical trend interpolation. Output-only calorie/Big Mac charts draw a dashed human output speed reference (3 tok/s) and expand the Y domain to include it. Captions cite NIST and McDonald’s nutrition sources.

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

Add bilingual tokens-per-Calorie and tokens-per-Big-Mac Y-axis metrics, including historical trends, rooflines, unofficial-run overlays, and source-backed assumptions.\n\n中文:新增双语的每卡路里和每个 Big Mac 的 token 数 Y 轴指标,并接入历史趋势、Pareto 前沿、非官方运行覆盖及带来源的计算假设。
@vercel

vercel Bot commented Aug 20, 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 Aug 20, 2026 4:37pm

Request Review

Extend the Calorie and Big Mac axes with separate input-token and output-token variants across charts and historical trends.\n\n中文:为卡路里与 Big Mac 指标新增输入 token 和输出 token 变体,并接入推理图表与历史趋势。
Add labeled human output-speed guides to the output tokens per Calorie and output tokens per Big Mac charts. Keep the labels localized and aligned during chart zooms.\n\n中文:为每卡路里输出 token 数和每个 Big Mac 输出 token 数图表添加带标签的人类输出速度参考线,并确保标签支持中英文且在图表缩放时保持对齐。
@cquil11
cquil11 marked this pull request as ready for review August 20, 2026 16:27
@cquil11
cquil11 requested a review from adibarra as a code owner August 20, 2026 16:27

@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 using default effort and found 1 potential issue.

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 34b9b9c. Configure here.

const xScaleConfig = useStableValue(xScaleConfigRaw, isSameScaleConfig);

const yScaleConfigRaw = useMemo(() => {
const ext =

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

TTFT charts skip input scale logic

Medium Severity

y_inputTokensPerCalorie and y_inputTokensPerBigMac override the x-axis to P90 TTFT, and ChartControls already treats any “Input” title as an input metric (x-axis scale selector included). ScatterGraph still gates TTFT log/auto scaling and the y-log toggle on y_inputTputPerGpu only, so those new charts keep a linear x domain from 0 and ignore the scale control.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 34b9b9c. Configure here.

Keep the roofline and scatter layers at their original indices so tooltip hover continues to target scatter points. Render the human output guide later and lower it visually instead.\n\n中文:保持 roofline 和 scatter 图层的原始索引,使 tooltip 悬停继续正确绑定散点;人类输出参考线仍在后续渲染,并通过 SVG 层级置于数据后方。
Label both human output reference lines with the assumed average output rate from the discussion.\n\n中文:在两条人类输出参考线上标明讨论中采用的人类平均输出速度假设。
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