| |
| """Build the static Smoke24 dashboard from public aggregate data.""" |
|
|
| from __future__ import annotations |
|
|
| import argparse |
| import csv |
| import json |
| import shutil |
| from dataclasses import dataclass |
| from pathlib import Path |
| from typing import Any |
|
|
|
|
| ROOT = Path(__file__).resolve().parents[1] |
| DEFAULT_DERIVED_DIR = ROOT / "data/public/derived" |
| DEFAULT_REPORTS_DIR = ROOT / "reports/public" |
| DEFAULT_OUTPUT_DIR = ROOT / "site" |
| TEMPLATE_PATH = ROOT / "dashboard/templates/smoke24_dashboard.html" |
|
|
| REPORT_DATE = "2026-06-29" |
| CORPUS_ID = "tb20-coder-smoke24-fast-success-failure-20260616" |
| REFERENCE_MODEL_ID = "residency/vllm/qwen3.6-27b-gptq-pro-4bit" |
|
|
| LOCAL_3090_MODEL_IDS = { |
| REFERENCE_MODEL_ID, |
| "residency/vllm/qwopus3.6-27b-v2-gptq-pro-foem-4bit-g128-ns256-v2", |
| "residency/vllm/qwopus3.6-35b-a3b-v1-gptq-pro-foem-4bit-g128-ns256", |
| "residency/vllm/nex-n2-mini-gptq-pro", |
| "residency/vllm/qwopus3.6-27b-coder-gptq-pro-foem-4bit-g128-ns256", |
| "residency/vllm/qwopus3.6-35b-a3b-v1-gptq-pro-foem-4bit-g128-ns256-ctx262k", |
| "residency/vllm/nex-n2-mini-gptq-pro-ctx262k", |
| "residency/vllm/ornith-1.0-35b-gptq-pro-foem-4bit-g128-ns256-ctx262k", |
| "residency/vllm/qwythos-9b-claude-mythos-5-1m-awq-ctx512k", |
| } |
|
|
| MODEL_URLS = { |
| "residency/vllm/qwopus3.6-27b-v2-gptq-pro-foem-4bit-g128-ns256-v2": "https://huggingface.co/XReyRobert/Qwopus3.6-27B-v2-GPTQ-Pro-v1", |
| "residency/vllm/qwopus3.6-35b-a3b-v1-gptq-pro-foem-4bit-g128-ns256": "https://huggingface.co/XReyRobert/Qwopus3.6-35B-A3B-v1-GPTQ-Pro", |
| "residency/vllm/qwopus3.6-35b-a3b-v1-gptq-pro-foem-4bit-g128-ns256-ctx262k": "https://huggingface.co/XReyRobert/Qwopus3.6-35B-A3B-v1-GPTQ-Pro", |
| "residency/vllm/nex-n2-mini-gptq-pro": "https://huggingface.co/XReyRobert/Nex-N2-mini-GPTQ-Pro", |
| "residency/vllm/nex-n2-mini-gptq-pro-ctx262k": "https://huggingface.co/XReyRobert/Nex-N2-mini-GPTQ-Pro", |
| "residency/vllm/qwopus3.6-27b-coder-gptq-pro-foem-4bit-g128-ns256": "https://huggingface.co/XReyRobert/Qwopus3.6-27B-Coder-GPTQ-Pro", |
| "residency/vllm/ornith-1.0-35b-gptq-pro-foem-4bit-g128-ns256-ctx262k": "https://huggingface.co/XReyRobert/Ornith-1.0-35B-GPTQ-Pro-FOEM-4bit-g128-ns256", |
| "residency/vllm/qwythos-9b-claude-mythos-5-1m-awq-ctx512k": "https://huggingface.co/empero-ai/Qwythos-9B-Claude-Mythos-5-1M", |
| "residency/vllm/qwen3.6-27b-gptq-pro-4bit": "https://huggingface.co/groxaxo/Qwen3.6-27B-GPTQ-Pro-4bit", |
| } |
|
|
|
|
| @dataclass(frozen=True) |
| class AssetCopy: |
| source_name: str |
| target_name: str |
| title: str |
|
|
|
|
| IMAGE_ASSETS = [ |
| AssetCopy("model-lineage.png", "model-lineage.png", "Model lineage"), |
| AssetCopy("uncertainty-landscape.png", "uncertainty-landscape.png", "Uncertainty landscape"), |
| AssetCopy("score-token-efficiency.png", "score-token-efficiency.png", "Score vs generated tokens per success"), |
| AssetCopy("task-stability.png", "task-stability.png", "Task stability heatmap"), |
| AssetCopy("metric-variance.png", "metric-variance.png", "Metric variance bands"), |
| AssetCopy("external-public-success.png", "external-public-success.png", "External public success comparison"), |
| ] |
|
|
|
|
| def read_csv(path: Path) -> list[dict[str, str]]: |
| with path.open(newline="", encoding="utf-8") as handle: |
| return list(csv.DictReader(handle)) |
|
|
|
|
| def to_float(value: Any) -> float | None: |
| if value in (None, ""): |
| return None |
| try: |
| return float(value) |
| except (TypeError, ValueError): |
| return None |
|
|
|
|
| def to_int(value: Any) -> int: |
| number = to_float(value) |
| return int(number) if number is not None else 0 |
|
|
|
|
| def short_label(model_id: str) -> str: |
| mapping = { |
| REFERENCE_MODEL_ID: "Qwen3.6 27B GPTQ", |
| "residency/vllm/qwopus3.6-27b-v2-gptq-pro-foem-4bit-g128-ns256-v2": "Qwopus 27B v2", |
| "residency/vllm/qwopus3.6-35b-a3b-v1-gptq-pro-foem-4bit-g128-ns256": "Qwopus 35B A3B", |
| "residency/vllm/nex-n2-mini-gptq-pro": "Nex-N2 mini", |
| "residency/vllm/qwopus3.6-27b-coder-gptq-pro-foem-4bit-g128-ns256": "Qwopus 27B coder", |
| "residency/vllm/qwopus3.6-35b-a3b-v1-gptq-pro-foem-4bit-g128-ns256-ctx262k": "Qwopus 35B A3B 262K", |
| "residency/vllm/nex-n2-mini-gptq-pro-ctx262k": "Nex-N2 mini 262K", |
| "residency/vllm/ornith-1.0-35b-gptq-pro-foem-4bit-g128-ns256-ctx262k": "Ornith 35B GPTQ-Pro", |
| "residency/vllm/qwythos-9b-claude-mythos-5-1m-awq-ctx512k": "Qwythos 9B AWQ", |
| "external/tbench/terminus-2/claude-sonnet-4.5": "Claude Sonnet 4.5", |
| "external/tbench/terminus-2/claude-opus-4.6": "Claude Opus 4.6", |
| "external/tbench/terminus-2/gpt-5": "GPT-5", |
| "external/tbench/terminus-2/gpt-5.3-codex": "GPT-5.3-Codex", |
| } |
| return mapping.get(model_id, model_id.removeprefix("residency/vllm/")) |
|
|
|
|
| def family(model_id: str) -> str: |
| stripped = model_id.removeprefix("residency/vllm/").removeprefix("external/tbench/terminus-2/") |
| for suffix in ("-ctx512k", "-ctx262k", "-ctx96k"): |
| if stripped.endswith(suffix): |
| stripped = stripped[: -len(suffix)] |
| if stripped.startswith("qwopus3.6-27b-v2"): |
| return "qwopus27" |
| if stripped.startswith("qwopus3.6-27b-coder"): |
| return "coder" |
| if stripped.startswith("qwopus3.6-35b"): |
| return "qwopus35" |
| if stripped.startswith("nex-n2-mini"): |
| return "nex" |
| if stripped.startswith("ornith"): |
| return "ornith" |
| if stripped.startswith("qwythos"): |
| return "qwythos" |
| if stripped.startswith("qwen3.6"): |
| return "qwen" |
| if "claude" in stripped: |
| return "claude" |
| if "gpt" in stripped: |
| return "openai" |
| return "other" |
|
|
|
|
| def scope(model_id: str) -> str: |
| if model_id.startswith("external/"): |
| return "external-public" |
| if model_id == REFERENCE_MODEL_ID: |
| return "reference" |
| if model_id.endswith("-ctx512k"): |
| return "experimental" |
| if model_id.endswith("-ctx262k"): |
| return "long-context" |
| return "local-131k" |
|
|
|
|
| def model_rows(derived_dir: Path, reports_dir: Path) -> list[dict[str, Any]]: |
| combined = read_csv(derived_dir / "model_summary.csv") |
| speed_by_label = {row["label"]: row for row in read_csv(reports_dir / "speed_normalized_metrics.csv")} |
| efficiency_by_label = {row["label"]: row for row in read_csv(reports_dir / "local_efficiency_metrics.csv")} |
| hardware_by_label = {row["label"]: row for row in read_csv(reports_dir / "hardware_neutral_metrics.csv")} |
| out: list[dict[str, Any]] = [] |
| seen: set[str] = set() |
| for row in combined: |
| model_id = row["model_id"] |
| if model_id not in LOCAL_3090_MODEL_IDS and not model_id.startswith("external/"): |
| continue |
| if model_id in seen: |
| continue |
| seen.add(model_id) |
| speed = speed_by_label.get(model_id, {}) |
| efficiency = efficiency_by_label.get(model_id, {}) |
| hardware = hardware_by_label.get(model_id, {}) |
| trials = to_int(row.get("trials")) |
| score = to_float(row.get("score")) |
| success_rate = to_float(row.get("success_rate")) |
| equivalent_score = score / (trials / 24.0) if score is not None and trials else None |
| output_tokens = to_float(row.get("output_tokens")) |
| output_per_success = to_float(hardware.get("output_tokens_per_success")) |
| if output_per_success is None and output_tokens is not None and score: |
| output_per_success = output_tokens / score |
| out.append( |
| { |
| "model_id": model_id, |
| "label": short_label(model_id), |
| "display_order": to_int(row.get("display_order")), |
| "family": family(model_id), |
| "scope": scope(model_id), |
| "url": MODEL_URLS.get(model_id, row.get("detail_url") or ""), |
| "trials": trials, |
| "score": score, |
| "success_rate": success_rate, |
| "equivalent_score": equivalent_score, |
| "wall_min": to_float(row.get("wall_min")), |
| "input_tokens": to_float(row.get("input_tokens")), |
| "output_tokens": output_tokens, |
| "output_tokens_per_success": output_per_success, |
| "parser_warning_count": to_int(row.get("parser_warning_count")), |
| "parser_warning_trials": to_int(row.get("parser_warning_trials")), |
| "llm_api_min": to_float(speed.get("llm_api_min") or row.get("llm_api_min")), |
| "observed_tps": to_float(speed.get("observed_tps") or row.get("observed_tps")), |
| "llm_share_wall": to_float(speed.get("llm_share_wall") or row.get("llm_share_wall")), |
| "reasoning_share": to_float(speed.get("reasoning_share") or row.get("reasoning_share")), |
| "llm_min_per_success": to_float(efficiency.get("llm_min_per_success")), |
| "wall_min_per_success": to_float(efficiency.get("wall_min_per_success")), |
| "baseline_equiv_tokens_per_success": to_float(efficiency.get("baseline_equiv_tokens_per_success")), |
| "successes_per_llm_hour": to_float(efficiency.get("successes_per_llm_hour")), |
| "llm_efficiency_index": to_float(efficiency.get("llm_efficiency_index")), |
| "global_tb20_accuracy": to_float(row.get("global_tb20_accuracy")), |
| "global_tb20_stderr": to_float(row.get("global_tb20_stderr")), |
| "token_source": row.get("token_source") or "", |
| "run_ids": row.get("run_ids") or "", |
| "shape_id": row.get("shape_id") or "", |
| } |
| ) |
| return sorted(out, key=lambda item: item["display_order"]) |
|
|
|
|
| def task_rows(derived_dir: Path) -> list[dict[str, Any]]: |
| rows = read_csv(derived_dir / "task_outcomes.csv") |
| out = [] |
| for row in rows: |
| model_id = row["model_id"] |
| if model_id not in LOCAL_3090_MODEL_IDS and not model_id.startswith("external/"): |
| continue |
| out.append( |
| { |
| "model_id": model_id, |
| "label": short_label(model_id), |
| "scope": scope(model_id), |
| "task": row["task"], |
| "task_order": to_int(row.get("task_order")), |
| "attempts": to_int(row.get("attempts")), |
| "successes": to_int(row.get("successes")), |
| "success_rate": to_float(row.get("success_rate")), |
| "status": row.get("status") or "", |
| "wall_min": to_float(row.get("mean_wall_min")), |
| "input_tokens": to_float(row.get("input_tokens")), |
| "output_tokens": to_float(row.get("output_tokens")), |
| "parser_warning_count": to_int(row.get("parser_warning_count")), |
| } |
| ) |
| return sorted(out, key=lambda item: (item["task_order"], item["label"])) |
|
|
|
|
| def variance_rows(derived_dir: Path) -> list[dict[str, Any]]: |
| rows = read_csv(derived_dir / "model_variance.csv") |
| out = [] |
| for row in rows: |
| model_id = row["canonical_model_id"] |
| out.append( |
| { |
| "canonical_model_id": model_id, |
| "label": short_label("residency/vllm/" + model_id), |
| "context": row.get("context"), |
| "passes": to_int(row.get("smoke24_passes")), |
| "score_values": row.get("score_values"), |
| "score_mean": to_float(row.get("score_mean")), |
| "score_min": to_float(row.get("score_min")), |
| "score_max": to_float(row.get("score_max")), |
| "score_sample_std": to_float(row.get("score_sample_std")), |
| "output_tokens_min": to_float(row.get("output_tokens_min")), |
| "output_tokens_max": to_float(row.get("output_tokens_max")), |
| "llm_api_min_min": to_float(row.get("llm_api_min_min")), |
| "llm_api_min_max": to_float(row.get("llm_api_min_max")), |
| "parser_warning_count_min": to_float(row.get("parser_warning_count_min")), |
| "parser_warning_count_max": to_float(row.get("parser_warning_count_max")), |
| } |
| ) |
| return out |
|
|
|
|
| def image_assets(reports_dir: Path, output_dir: Path) -> list[dict[str, str]]: |
| target_dir = output_dir / "assets/img" |
| target_dir.mkdir(parents=True, exist_ok=True) |
| copied = [] |
| for asset in IMAGE_ASSETS: |
| source = reports_dir / "images" / asset.source_name |
| if not source.exists(): |
| continue |
| target = target_dir / asset.target_name |
| shutil.copy2(source, target) |
| copied.append({"path": f"assets/img/{asset.target_name}", "title": asset.title}) |
| return copied |
|
|
|
|
| def build_data(derived_dir: Path, reports_dir: Path, output_dir: Path) -> dict[str, Any]: |
| models = model_rows(derived_dir, reports_dir) |
| tasks = task_rows(derived_dir) |
| local_models = [row for row in models if row["scope"] in {"reference", "local-131k", "long-context"}] |
| best_local = max(local_models, key=lambda row: (row["success_rate"] or 0, -(row["output_tokens_per_success"] or 10**12))) |
| best_eff = min( |
| [row for row in local_models if row.get("llm_min_per_success") is not None], |
| key=lambda row: row["llm_min_per_success"], |
| ) |
| task_count = len({row["task"] for row in tasks}) |
| return { |
| "meta": { |
| "title": "GPTQ-Pro Smoke24 Agentic 3090 Dashboard", |
| "report_date": REPORT_DATE, |
| "corpus_id": CORPUS_ID, |
| "task_count": task_count, |
| "hardware_context": "Local vLLM / LiteLLM residency runs in the RTX 3090 deployment context", |
| "harness": "Terminal-Bench 2.0 Smoke24, Terminus-2, 30m task timeout, 32 CPU / 48 GiB sandbox", |
| "reference_model_id": REFERENCE_MODEL_ID, |
| "reference_label": short_label(REFERENCE_MODEL_ID), |
| "best_local_label": best_local["label"], |
| "best_local_score": best_local["score"], |
| "best_local_success_rate": best_local["success_rate"], |
| "best_efficiency_label": best_eff["label"], |
| "best_efficiency_llm_min_per_success": best_eff["llm_min_per_success"], |
| }, |
| "models": models, |
| "tasks": tasks, |
| "variance": variance_rows(derived_dir), |
| "assets": image_assets(reports_dir, output_dir), |
| "caveats": [ |
| "Default view focuses on local RTX 3090-class serving context and real agentic workload behavior.", |
| "External public Terminal-Bench rows are success-rate references only; timing and throughput are not hardware-comparable.", |
| "Long-context 262K rows are serving validation on the same Smoke24 corpus, not separate 131K leaderboard entries.", |
| "Qwythos AWQ is marked experimental. Ornith NVFP4 probe has been removed from active report views.", |
| "Smoke24 is intentionally small; variance views should be used when reading one-task deltas.", |
| ], |
| } |
|
|
|
|
| def write_json(output_dir: Path, data: dict[str, Any]) -> None: |
| data_dir = output_dir / "assets/data" |
| data_dir.mkdir(parents=True, exist_ok=True) |
| (data_dir / "report-data.json").write_text(json.dumps(data, indent=2, sort_keys=True) + "\n", encoding="utf-8") |
|
|
|
|
| def write_readme(output_dir: Path) -> None: |
| readme = """# GPTQ-Pro Smoke24 Agentic 3090 Dashboard |
| |
| Generated static dashboard. Rebuild from repository root with `make build`. |
| """ |
| (output_dir / "README.md").write_text(readme, encoding="utf-8") |
|
|
|
|
| def write_index(output_dir: Path, data: dict[str, Any]) -> None: |
| template = TEMPLATE_PATH.read_text(encoding="utf-8") |
| embedded = json.dumps(data, separators=(",", ":")).replace("</", "<\\/") |
| html = template.replace("__REPORT_DATA_JSON__", embedded) |
| (output_dir / "index.html").write_text(html, encoding="utf-8") |
|
|
|
|
| def main() -> None: |
| parser = argparse.ArgumentParser(description=__doc__) |
| parser.add_argument("--derived-dir", type=Path, default=DEFAULT_DERIVED_DIR) |
| parser.add_argument("--reports-dir", type=Path, default=DEFAULT_REPORTS_DIR) |
| parser.add_argument("--output-dir", type=Path, default=DEFAULT_OUTPUT_DIR) |
| args = parser.parse_args() |
|
|
| if args.output_dir.exists(): |
| shutil.rmtree(args.output_dir) |
| args.output_dir.mkdir(parents=True) |
| data = build_data(args.derived_dir, args.reports_dir, args.output_dir) |
| write_json(args.output_dir, data) |
| write_readme(args.output_dir) |
| write_index(args.output_dir, data) |
| print(f"site_dir={args.output_dir} models={len(data['models'])} tasks={data['meta']['task_count']}") |
|
|
|
|
| if __name__ == "__main__": |
| main() |
|
|