Skip to content

Research prompt: sweep-by-workload-class stratification#387

Draft
Augustas11 wants to merge 1 commit into
mainfrom
feat/sweep-workload-class-stratification
Draft

Research prompt: sweep-by-workload-class stratification#387
Augustas11 wants to merge 1 commit into
mainfrom
feat/sweep-workload-class-stratification

Conversation

@Augustas11

Copy link
Copy Markdown
Owner

Status

DRAFT — RESEARCH PROMPT ONLY, NO IMPLEMENTATION. This PR contains only a Codex session prompt (specs/RESEARCH_SWEEP_WORKLOAD_CLASS_PROMPT.md) that stages the research + SPEC-drafting work. No code changes.

Why this exists

beta/workloads.py has 6 named workload classes; beta/report.py::summarize_per_workload and beta/DECISION_CRITERIA.md already require per-workload metrics. But the sweep grid is class-blind — 7 contexts × 4 concurrency = 28 cells, no class axis. Autotune winners today are one compromise config across all workload shapes.

Critical timing: SPEC-028 (chain speculative decoding, v0.2 audited on main) is landing now. Draft-token acceptance rate is workload-dependent — reasoning cells gain +49% while code/RAG/long-ctx prefer chain. Without class-aware sweep, SPEC-028 ships with a single --num-draft-tokens N chosen as compromise. Per-class sweep is the multiplier that makes SPEC-028 land at full strength.

What has to achieve to be considered implemented

Ordered gates from research through ship:

  1. Research session runs the prompt in this PR and produces:

    • docs/research/sweep-workload-class-2026-07.md — research memo answering questions §A–E with code citations.
    • specs/SPEC-XXX-sweep-workload-class-stratification.md v0.1-draft — normative FRs (search-space shape, winner-picking under SPEC-028, autotune-candidates.json extension, class-parameterized gates), non-goals, open questions, measurable acceptance criteria.
    • .omc/logs/sweep-workload-class-open-questions-2026-07.md — ≤5 items blocked on human decision.
  2. SPEC audit — SPEC v0.1-draft passes CODE + SECURITY + ARCHITECT audit lanes at 0-CRITICAL / 0-HIGH (mirrors the SPEC-015 v0.4 lock protocol).

  3. Implementation (separate PR, gated on locked SPEC):

    • Sweep search space extended with workload_class dimension (grid-multiplication OR class-filter — SPEC decides).
    • Per-class winners published to phase3-binary/dist/static/autotune-candidates.json (or class-partitioned sibling) with matching signature under the current or new static key.
    • beta/report.py surfaces per-class winner metadata alongside existing aggregate.
  4. Measurable acceptance (in the impl PR's tests):

    • Given a prompt from workload class W, provider is served with class-W-tuned knobs (routing mechanism deferred to a follow-up SPEC; this SPEC ships the DATA).
    • Sweep re-run on air5 produces per-class winners that outperform the baseline single-config winner on tok/s or TTFT-p95 for at least 3 of the 6 workload classes.
    • No regression on the classes where the baseline single-config already wins.

Do NOT (until gates 1+2 close)

  • Modify sweep code, harness, autotune runtime, or autotune-candidates.json.
  • Introduce a request-time workload classifier (called out as follow-up SPEC in the prompt).
  • Modify SPEC-013 (CLI autotune) or SPEC-028 (speculative decoding) — this is a companion.

Related

  • Companion to SPEC-028 (speculative decoding, merged v0.2 at a1be007).
  • Depends on: none.
  • Blocked by: none.
  • Blocks: none (this multiplier makes SPEC-028 stronger; not required for SPEC-028 to ship).

Stages a Codex session prompt that will produce a research memo + v0.1
SPEC draft for extending the sweep search space from
(context x concurrency) to (context x concurrency x workload_class),
so autotune produces per-class winners rather than one compromise
config across all workload shapes. Highest-impact perf/UX lever now
that SPEC-028 (speculative decoding) is landing, because draft-token
acceptance rate is workload-dependent.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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