Skip to content

perf(prefill): segment long jobs for autoresearch - #192

Merged
FluffyAIcode merged 2 commits into
mainfrom
AgentMemory/prefill-autoresearch-segments-0717
Jul 17, 2026
Merged

perf(prefill): segment long jobs for autoresearch#192
FluffyAIcode merged 2 commits into
mainfrom
AgentMemory/prefill-autoresearch-segments-0717

Conversation

@FluffyAIcode

Copy link
Copy Markdown
Owner

Summary

  • decouple model compute segments from 64-token cache hash boundaries
  • default to 256-token segments, below the five-minute budget at measured allens throughput
  • report live tokens_computed / total, percentage, and ETA after every segment
  • retain one final snapshot export and complete semantic context
  • add Karpathy-style program.md / immutable prepare.py / agent-editable candidate.py
  • reject autoresearch candidates that exceed five-minute segments or violate full-context, recursive protocol, topology, no-fallback, or final-only constraints
  • record accepted/rejected experiment metrics in results.tsv

AutoResearch loop

The agent changes only candidate.py, deploys, clears caches, runs the fixed workload, evaluates with prepare.py, and keeps a candidate only when all hard constraints pass and cold Critic Prefill improves.

Tests

  • segmented MLX compute, progress callback lifecycle, heartbeat progress/ETA, launchd configuration, and autoresearch acceptance/rejection
  • targeted suite — 42 passed
  • full platform-neutral suite — 873 passed, 1 skipped
  • Python, shell, and diff checks pass

Made with Cursor

Split full-context model compute into observable sub-five-minute segments and add a Karpathy-style fixed harness for iterating on Prefill strategy without weakening semantic gates.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Keep failed and queued status doubles wire-compatible so progress accounting reaches the existing failure and timeout branches.

Co-authored-by: Cursor <cursoragent@cursor.com>
@FluffyAIcode
FluffyAIcode merged commit e463fda into main Jul 17, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant