Skip to content

Design: warm-session daemon - #4

Closed
sshin23 wants to merge 1 commit into
mainfrom
design/daemon
Closed

Design: warm-session daemon#4
sshin23 wants to merge 1 commit into
mainfrom
design/daemon

Conversation

@sshin23

@sshin23 sshin23 commented Aug 18, 2026

Copy link
Copy Markdown
Member

A design document only — no implementation. Motivated by measured cold-start costs on the group's GPU box (244–308 s to a first GPU solution vs 0.4–0.7 s warm; breakdown and scripts included in design/daemon-measurements/).

The proposal: a persistent examodels session that user scripts dispatch to automatically, by shipping the recorded model (never the script) as a new WARM tier in the existing Model(core) resolve ladder between the compiled-library HIT and the boot-Julia MISS. The record already exists, already fingerprints, and verifiably pickles without Julia in the process.

Review requests, in order of leverage:

  1. The ship-the-model decision and the dispatch rules (Core records when a daemon is reachable; byte-identical behavior when not — the unmodified test suite is the acceptance test).
  2. The four open questions at the end (opt-in vs opt-out dispatch, --detach, memory budget default, per-device daemons).
  3. The two pre-work items: the device set_parameters bug (reproduced; mechanism traced to copyto! into a device view from a PyArray) and moving the recorder's CPU-only guard into the cache consumer.

🤖 Generated with Claude Code

Motivation measured on the group's GV100 box: a cold GPU run costs 244-308 s
of which ~60 s is stack load and the rest first-solve JIT, against 0.4-0.7 s
for the same solve warm. The design adds a WARM tier to the existing
Model(core) resolve ladder: the client records (pure Python, verified to
pickle round-trip), the daemon replays and keeps live instances keyed by the
digests the cache already computes. Includes the measurement scripts, two
pre-work items surfaced by them (device set_parameters bug, recording's
backend guard in the wrong layer), phase plan with acceptance tests, risks,
and open questions for review.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sshin23

sshin23 commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

Keeping the design doc on the working branch rather than merging it; implementation proceeds on #6.

@sshin23 sshin23 closed this Aug 18, 2026
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