Skip to content

[Models] HybridAgent-8B-Agentic (3/3): evaluation harness and latent-trace viewer - #579

Open
jpflacerda wants to merge 1 commit into
apple:mainfrom
jpflacerda:jpl/hybridagent-eval
Open

jpflacerda wants to merge 1 commit into
apple:mainfrom
jpflacerda:jpl/hybridagent-eval

Conversation

@jpflacerda

@jpflacerda jpflacerda commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Closes #578. Follow-up to #574 (export) and #575 (latent-reasoning runtime).

Type of Change

  • Bug fix
  • Small feature (agreed in an issue)
  • New model (export recipe only)
  • New model (export recipe and new runtime support)
  • Documentation update

Motivation and Context

Adds the end-to-end trajectory evaluation utility and latent-trace viewer split out from #575 (models/hybridagent/eval/), and aligns models/hybridagent/README.md's ## Evaluation section with the rest of models/*/README.md (Core AI WikiText-2 perplexity only, plus the evaluation tool commands).

uv run python models/hybridagent/eval/prepare_data.py   # the 5 reference example questions
uv run python models/hybridagent/eval/play.py --model exports/hybridagent-8b-4bit \
  --bench examples --id q4 --steps --html
uv run python models/hybridagent/eval/run_eval.py --model exports/hybridagent-8b-4bit \
  --benchmarks examples --samples 1

What's included

  • prepare_data.py: fetches the 5 example questions from togethercomputer/HybridAgent at commit 1b41ceb (or reads a local questions.jsonl) into eval/data/examples.jsonl.
  • run_eval.py: runs llm-runner across <name>.jsonl question sets with --tools python, writes per-sample JSON traces (including seed and bundle hash), records a run_config.json that refuses mismatched resumes, and counts failed or unparseable runs as wrong.
  • grade.py: answer extraction and \boxed{...} normalization vendored from togethercomputer/HybridAgent (full MIT copyright and permission notice included).
  • play.py / latent_trace.py: runs one prompt with --dump-latents and renders each latent span as nearest-embedding token readouts in the terminal or as a self-contained HTML report.
  • models/hybridagent/README.md and models/README.md: documents the play.py and run_eval.py utilities, and trims models/hybridagent/README.md's ## Evaluation table to the standard Core AI WikiText-2 perplexity format (none (float16) and 4-bit quantized).

Testing

  • Tested locally

  • Added/updated tests

  • Added/updated docs

  • uv run --with pytest pytest models/hybridagent/eval/tests: 6 passed (fake_runner.py exercises run_eval.py end to end including resume validation, failed runs, grading, and latent_trace.py nearest-token readout).

  • uv run --frozen --only-group lint ruff check models/hybridagent/eval and ruff format --check: clean.

@jpflacerda
jpflacerda requested a review from a team as a code owner December 2, 2026 22:13
@jpflacerda jpflacerda changed the title [Models] HybridAgent-8B-Agentic (3/3): evaluation harness, latent-trace viewer, and AIME results [Models] HybridAgent-8B-Agentic (3/3): evaluation harness and latent-trace viewer Dec 2, 2026
@jpflacerda
jpflacerda force-pushed the jpl/hybridagent-eval branch from 39a3808 to aa9f43d Compare December 2, 2026 23:42
@tjia1818
tjia1818 requested review from guru-desh and stikves December 3, 2026 16:45
@jpflacerda
jpflacerda force-pushed the jpl/hybridagent-eval branch from aa9f43d to 729cf21 Compare December 3, 2026 18:34
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.

Add evaluation harness and latent-trace viewer for HybridAgent-8B-Agentic

1 participant