suunny's picture
Private full trajectory and experiment artifact archive (part 13)
b1a18a7 verified
|
Raw History Blame Contribute Delete
8.83 kB

Terminal-agent RL

Prime RL owns training, asynchronous rollout collection, inference, and weight broadcast. This project supplies Modal launchers, pinned Harbor task packages, and three local harness patches.

Start here

Work Code and evidence
Final training modal_training.py::final_train, final_training.py, frozen calibration/final-b64-g8-u10-20261030-01-frozen.json
Held-out evaluation final_heldout_worker, final_only; saved final audits under .state/
Inference benchmarks steady, optimize, compare_rollouts; both long-prefill and shared-prefix long-output workloads retained
Task screening screen116, screen100; CPU package gates and immutable task manifests retained
Dataset export dataset/build.py, dataset/release/README.md
Runtime correctness bash_timeout.py, compaction_task.py, bash_recovery.py, test_runtime.py
Checkpoints checkpoint_probe.py, training_lifecycle.py, native evaluation audit in final_training.py
Task loading and image task_source.py, task-source.json, prepare.py, images/dependencies/
Historical policy experiment modal_policy_probe.py and its telemetry helpers remain reproducible

The completed final run used one H100 trainer and two inference H100s, ten updates, batch 64, group 8, and 128 concurrent episodes. Its frozen 80/23 split is authoritative. train.toml remains the earlier two-update smoke template; do not mistake it for the final configuration. Held-out evaluation recorded 91/184 base passes and 83/184 final passes. The actual base GPU was H200 and final GPU H100.

Local verification

.venv/bin/python -m unittest -v test_runtime
.venv/bin/python .state/test_bash_length_recovery.py --native
uv run --no-project --with zstandard --with datasets --python 3.12 python dataset/build.py

These commands do not launch cloud workers. GPU entrypoints require separate authorization. Existing account guards, immutable model/task pins, authentication, and submission receipts remain active.

What cleanup preserves

.state/ contains irreplaceable experiment evidence, not disposable cache. Keep its checkpoints, traces, receipts, billing records, native source snapshots, and task Git repository. Keep calibration/, plans/, runtime dependency pins, and benchmark configurations. Failed or superseded attempts remain separate from successful campaigns.

The launcher still contains historical experiments because the final training and evaluation paths share its worker and image definitions. Splitting that module without a dedicated compatibility review could break serialized Modal functions or saved runtime contracts. This cleanup does not change its behavior. Four unused utilities/snapshots moved to archive/2026-10-31/, with hashes and restoration paths. The previous README is archived there because several of its launch-status statements were stale.

Runtime details and historical commands

The following retained notes describe their original dates. Statements such as “not yet run” and “before launch” are historical, not current campaign status. Use the completed-run summary above and saved receipts for current results.

Explicit launch

Training and inference evaluation request 0.125 physical CPU cores and 128 MiB RAM per task sandbox through the native agent runtime config (memory = 0.125 is in GiB). Separate Harbor graders inherit these requests. These are scalar requests, without explicit CPU or RAM caps; bursting depends on available host capacity, and Modal bills the higher of requested and actual usage. Performance and eviction behavior at these smaller requests have not yet been measured. GPU-worker and controller resources are configured separately.

From this directory, after separately authorizing GPU execution:

.venv/bin/modal run --detach --profile rl-next modal_training.py::train --run-id UNIQUE_RUN_ID --max-steps 2 --rollout-concurrency 16

This allocates two H100 GPUs. It is a command reference, not permission to launch. Existing one/two-update and 16/32-concurrency bounds remain. Output is persisted to workspace-agent-training:/prime/UNIQUE_RUN_ID. Native configuration validation and task-content verification remain. Synthetic benchmark inputs, launch receipts and metrics remain under calibration/ and .state/steady-long-*.

The private task checkout is .state/task-registry-repo. Model revision and OCI release digest remain pinned. Modal task, model and output volumes and controller secrets are unchanged. No historical checkpoint path is hardcoded in the launcher.

The active project target is profile rl-next, workspace susindra-turtlelabs. Use the explicit profile flag; the machine's global default is not changed. Launch guards verify the authenticated workspace before submitting GPU functions. Historical run receipts and frozen configurations retain their original account metadata. New volumes start empty; earlier results and checkpoints remain in the previous workspace.

Modal is pinned to 1.6.3 locally and in the runtime: this official patch adds support for the new workspace's 2026.10 image builder. The other dependency pins, model revision and harness settings are unchanged. Account setup can be checked without any GPU or model calls using prepare_account.

Native evaluation is scheduled at step 2, skips startup, and requests one attempt on each of the four tasks. The launcher reuses the training task environment for evaluation. Training rollout reward grading still uses the original Harbor verifier. No standalone evaluation writer patch, benchmark/probe, or latency profile is active.

Fresh 116-task screening

screen116 uses four disjoint 29-task selections, eight fresh attempts per task, 64 concurrent episodes and vLLM sequences on each H100 (928 total attempts). It reuses the official Prime evaluation worker, with no trainer or adapter. The worker retains authentication/model-alias/generation readiness checks and process cleanup. Native schemas and shard coverage pass locally; the new four-worker path has not yet run on GPUs.

The CPU gate .state/validate-calibration-packages-cpu.py checks the 100 new packages with native isolated Harbor grading and the intended runtime requests. Its resumable report is .state/screening-new100-cpu-gate.json. The launch entrypoint refuses to submit unless that gate passes. Original source and grading contracts are unchanged. See .state/screening116-status.json for current blockers and durable job identifiers.

Superseded receipts, traces and plans were archived with per-file hashes under /Users/sunny/.codex/backups/prime-cleanup-20261028-214041/; the compact local pointer is .state/cleanup-archive.json. Earlier screening results remain separate from any fresh campaign.

Authorized final run (2026-10-30)

final_training.py freezes the existing 80 training tasks and the merged 23-task heldout cohort. final_train is the isolated launch entrypoint; historical smoke and benchmark bounds remain. The native CPU gate verifies all 103 task manifests and training plus four heldout evaluation dry-runs before submitting a single three-H100 training function: one trainer, inference DP2/TP1, 64 sequences per inference GPU, 128 active episodes globally, 10 updates, batch64/group8 and maximum staleness1. Native full checkpoints are retained at5 and10. The watchdog is9hours, with a separate550-minute function bound for cleanup; this is a bound, not an ETA.

Recovery is explicitly on in training and both heldout arms. All frozen sampling, model revision, runtime patch hashes, task manifests and split provenance are persisted before GPU submission. Training begins from the base model with fresh LoRA/optimizer state. train.toml continues to describe the older smoke run.

After successful training/checkpoint verification and process cleanup, a short CPU continuation waits for the training FunctionCall to return. Two one-H100 workers then evaluate disjoint11/12-task shards, each running base then step10, eight fresh attempts per task per arm (368 total). Native trace records are checked for exact task counts, unique attempt IDs and infrastructure errors. A successful CLI exit alone is not reported as successful grading.

The launch receipt, frozen configuration and CPU gate are under calibration/launch-RUN.json, calibration/RUN-frozen.json and workspace-agent-training:/prime/RUN-preflight/. Training evidence lives under /prime/RUN/; heldout call IDs and shard receipts live under /prime/RUN-heldout/. Existing receipt directories and submission intents prevent automatic duplicate launches. Interrupted or ambiguous submissions require inspection of saved call IDs rather than rerunning the entrypoint.