Skip to content

Consolidate benchmark setup and preserve full measurement durations - #917

Closed
Gajesh2007 wants to merge 2 commits into
masterfrom
refactor/benchmark-measurements
Closed

Gajesh2007 wants to merge 2 commits into
masterfrom
refactor/benchmark-measurements

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

The standard darkbloom benchmark discarded whole seconds when converting first-token and total durations: 2.25 seconds became 250 ms, corrupting reported decode throughput too. Both timings now use the complete duration conversion already used by the MTP runner. Arrival, scheduler-policy, MTP, and throughput reports share the existing two-middle-sample median; model and scheduler means share the same ordered arithmetic. The standard runner builds its MLX message and generation settings directly instead of constructing an unused HTTP request envelope. Seven benchmark entry points also share local LLM/VLM loading with the same factory selection and tokenizer, retaining their own integrity checks and serving-model resolution. Production code is 73 lines smaller.

Measurement boundaries, token/decode denominators, model defaults, backend selection, evidence validation, report schemas, and JSON encoding remain unchanged. MTP still rejects empty repetitions before aggregation. The only intended numeric change is the standard benchmark retaining whole seconds.

Validation: the combined final source 93c4caa5c6abb73ef9c882c1deae7eee31eef125 passed a dedicated M5 release build and 1,243 Swift Testing cases across 132 suites plus 48 XCTest cases, with no skipped tests. The run includes the real Gemma QAT tokenizer/constraint fixture and packaged runtime smoke. All 5,093 staged source files and compiled runtime hashes were checked before and after. Provider SHA256: 45c33b44c58228f67a362c7239eda081877c846d568a73bda026e010512af060; metallib SHA256: 20972c37e53fe6db3b3191a0434f6604c4ffc4f5ac62b370574f9922585b0fdb.

The run combines #897, #904, #916, #917, #920 and #923 at their current source heads. Model-generation/live benchmark suites were explicitly excluded; this evidence does not claim MTP speed or live HTTP cache qualification. The QAT fixture contains verified tokenizer/config/template files only, and its temporary scanner entry was removed after validation.

Pure cases cover exact/multi-second, negative and fractional durations, median behavior, invalid numbers, empty reports and token averages. Throughput/MTP/scheduler helpers are included; no model performance benchmark was run.

Before

flowchart LR
  P[Standard benchmark prompt] --> H[ChatCompletionRequest wrapper then MLX message]
  H --> T[Generation timed by ContinuousClock]
  T --> D[Only attoseconds converted to milliseconds]
  D --> R[Whole seconds lost in TTFT total and derived TPS]
  L[Seven benchmark entry points] --> F[Repeated local LLM or VLM factory choice]
  A[Arrival scheduler MTP sweep samples] --> C[Four median implementations]
  C --> J[Report]
Loading

After

flowchart LR
  P[Same standard benchmark prompt] --> H[Direct MLX message and same generation settings]
  H --> T[Same ContinuousClock measurement boundaries]
  T --> D[BenchmarkMeasurements includes seconds and attoseconds]
  D --> R[Full TTFT total and correctly derived TPS]
  L[Same seven benchmark entry points] --> F[BenchmarkModelLoader uses same local factories]
  A[Same arrival scheduler MTP sweep samples] --> C[Shared median with same ordered arithmetic]
  C --> J[Same report schema and values]
Loading

@vercel

vercel Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 11, 2026 11:28pm UTC
d-inference-console-ui-dev Ready Ready Preview Sep 11, 2026 11:28pm UTC
d-inference-landing Ready Ready Preview Sep 11, 2026 11:28pm UTC

Request Review

@Gajesh2007 Gajesh2007 changed the title Preserve full benchmark durations and share aggregation arithmetic Consolidate benchmark setup and preserve full measurement durations Sep 11, 2026
@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T00:23:39.528826Z af39994 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: bd443ae686

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: af39994803

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1096, the combined tooling, benchmark and E2E refactor PR. Your latest head af3999480323ca0d39ac0f0ee4afd47326f547d2 is preserved in aggregate 9d2160bb370e8a0dbf3810e61a5e48fe66345651, along with the relevant review fixes. Continue review and merge at #1096 (after provider #1094 and web #1095). Closing this duplicate merge path; the source branch and review history are retained.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference-console-ui-dev — af399948 Deployed Sep 11, 2026 by vercel[bot]
Preview – d-inference — af399948 Deployed Sep 11, 2026 by vercel[bot]
Preview – d-inference-landing — af399948 Deployed Sep 11, 2026 by vercel[bot]
benchmarks — af399948 Deployed Sep 11, 2026 by Gajesh2007 via E2E Benchmarks #956
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