Download invact_backup/DEVLOG.md.orig from Infatoshi/mcsr-speedrun-artifacts: direct link, hf CLI and curl.
- Browser
- Download file 175 kB
-
https://huggingface.co/datasets/Infatoshi/mcsr-speedrun-artifacts/resolve/main/invact_backup/DEVLOG.md.orig
- Command line
-
hf download hf://datasets/Infatoshi/mcsr-speedrun-artifacts/invact_backup/DEVLOG.md.orig
-
curl -L -o DEVLOG.md.orig https://huggingface.co/datasets/Infatoshi/mcsr-speedrun-artifacts/resolve/main/invact_backup/DEVLOG.md.orig
175 kB
| # DEVLOG | |
| ## 2026-09-25 - project start (tetra) | |
| Context: prior research session (macbook, ab24103e) sized MCSR Ranked data: top-50 players' last 100 matches = | |
| 1,172 winning runs with the winner's VOD, 187 h. Plan was VPT-IDM pseudo-labels + BC + segment RL. | |
| Data pipeline | |
| - API: `date` in a match is the match END time; run start = date - result.time/1000. Verified on frames: countdown | |
| at start-5 s, in-game timer 00:16 at start+15 s (~1 s slop). VOD offset = start - vod.startsAt. | |
| - Index after ~1 h: 733 players (leaderboard + opponents >= 1500 elo), 21k candidate VOD runs (3.7k h, many gone). | |
| ~40% of the oldest VODs already deleted. 16% of downloaded VODs had no transcodes (1080p60 source): re-encoded. | |
| - Replays: `replay.mcsrranked.com/{matches|archives}/{id}.rrf`, ~1.2 MB, ~3-day retention (replayExists=1). | |
| 17k ranked matches/day overall (avg elo 1152); we archive any-player >= 1500 elo, VOD-paired matches first. | |
| CDN 429s above ~5/min; archiver adapts (Retry-After honored). | |
| - Replay format (decompiled mod 5.8.26 with Vineflower): meta.symmetricKey = RSA(PKCS1 type 1) with the mod's | |
| public key -> AES key; replay.rpd = [len][AES-ECB] chunks, Snappy, then per player uuid + TimeLinePackages | |
| (int8 type, int32 tick, fixed layout). Rotations int16 centi-degrees. Decoding approved by Elliot (private use). | |
| - Replay stats on one match: yaw change per tick p99 37-41 deg, max 180; OpenAI IDM camera bins cap at 10 deg. | |
| - VOD<->replay alignment: phase correlation underestimates big turns (90th pct 1.5 px vs ~18 px expected); Farneback | |
| median flow and frame-difference energy both lock (corr ~0.2-0.35, sharp single peak). Lag is constant within a | |
| run to +-1-2 frames across dimensions; typical 25-60 frames; can be negative (VOD startsAt error) -> search -150..250. | |
| OpenAI VPT IDM (4x_idm, 482M) as baseline labeler | |
| - 22 fps on CPU, ~300-640 fps on one RTX PRO 6000 (fp32/TF32; bf16 autocast breaks its fp32 recurrent state). | |
| - On a crafting/inventory sequence it predicts camera turns and sneak where the player is clicking in a GUI; | |
| never predicts sprint (FOV effects off). Not good enough as a label source (Elliot's prior confirmed). | |
| Training perf (179M model, T=256, batch 8 seq/GPU = 2048 frames/GPU/step) | |
| - measured bf16 GEMM ceiling (8192^3 torch.matmul): 394-400 TFLOPS per RTX PRO 6000. | |
| - eager 1 GPU: 5,016 fps (30.5% MFU). torch.compile: 7,031 fps (43%). | |
| - profiler (compiled, 1 GPU): Triton elementwise/norm 50% of GPU time, GEMM 36%, FlashAttention-2 12.7%. | |
| GEMMs are cuBLAS `cutlass_80_tensorop_bf16_s16816gemm` (mma.sync m16n8k16 - the right family on sm_120, which has | |
| no wgmma/tcgen05); ncu: tensor pipe 70-88% on the big ones. Attention is pytorch_flash fwd/bwd (not math/efficient). | |
| - ncu on the Triton norm/SwiGLU kernels: 83-92% of memory SOL at ~1.5 TB/s -> efficient kernels moving too many bytes. | |
| Cause: under autocast the residual stream was fp32 (bf16 matmul outputs + fp32 pos params). | |
| - bf16 residual: 7,692 fps (+9%), 44.8 GB. cuDNN SDPA = FA2 (7,610, noise). max-autotune: 7,640 (no gain, slow). | |
| - 4 GPU DDP synthetic: 30,190 fps (98% scaling). Real data: 22-25k fps, loader-bound (prep ffmpeg ate ~64 cores); | |
| renice daemons + 10 workers -> 27.9k; profile showed fp32 all-reduce (RING_LL, 720 MB/step over PCIe) and H2D on | |
| the compute stream (12% compute idle). bf16_compress_hook + 64 MB buckets + side-stream prefetch -> 30,032 fps real. | |
| - Decode: PyAV rgb24 conversion ~500 fps (sws) vs yuv420p planes 29k fps -> model eats packed yuv420p directly. | |
| Incidents | |
| - 16:23 OOM kill (4 ranks x 10 workers x prefetch 4 + co-tenant jobs on 60 GB) killed the login scope and every | |
| tmux daemon. Daemons now run as systemd user services with MemoryMax; trainer prefetch 2. | |
| ## 2026-09-25 evening - IDM ground truth, baselines, overnight loop | |
| - VPT IDM vs replay truth (6 pairs, 62,746 aligned frames; mcsr/eval_idm.py): yaw MAE 2.03 deg, pitch 1.35, | |
| yaw sign acc 84% on turns > 2 deg, 7.2% of true turns exceed its +-10 deg range; key F1 forward 0.78, left 0.41, | |
| right 0.45, jump 0.28, sprint 0.21, sneak 0.08, mine 0.31, place 0.07. Zero predictor: yaw 2.70, pitch 1.61. | |
| So VPT is only 25% / 16% better than predicting no camera motion. (Key labels are motion-derived proxies, so key | |
| F1 mixes model error with label-definition mismatch; camera MAE is the clean number.) | |
| - Alignment verified by eye: for isolated +26/+30/+59 deg replay turns at frame f, frames f-1 and f match and the | |
| rotation appears between f and f+1 (targets are "action during tick t -> t+1"). Exact +-90 deg single-tick snaps | |
| on dark/menu screens are not mouse motion (0.013% of frames) and are masked in new pairs. | |
| - Our-IDM labeler (idm_label_ours.py): np.stack of ~12k decoded frames took 19 s under memory pressure; decode into | |
| a preallocated buffer, 4 decode workers per GPU, whole run pinned and sliced on the GPU -> ~2.2k fps/GPU | |
| (inference alone is 16k fps/GPU eager bf16; the rest is decode and worker->main transfer; fine for now). | |
| - mcsr/waves.py (systemd unit mcsr-waves): when train pairs grow 1.5x (first at 5 h) and >= 1 val pair exists and all | |
| GPUs are free: 8-epoch IDM on 4 GPUs -> eval ours vs VPT on val pairs -> if ours has lower yaw MAE, relabel all | |
| prepped VODs with ours and train the causal policy 3 epochs on "mixed" (replay truth + our IDM labels). | |
| Results in logs/waves.jsonl. Held-out pairs: none among the first 55 paired matches (6% chance at 5%); waits. | |
| - Re-render spike (M4): portablemc installed Fabric 1.16.1 (loader 0.19.5, Mojang Java 8) in data/mc (618 MB); | |
| with mcsrranked-5.8.26.jar in data/mc/mods the client boots headless on Xvfb/llvmpipe (scripts/mc_headless.sh, | |
| 25 mods) and stops at the mod's Privacy Policy / Guidelines consent screen. Not accepted: that is Elliot's call. | |
| Mod facts for this path: bundles Lithium + Fabric API modules + SpeedRunIGT; has file/mod hash verifiers | |
| (anticheat/file/verifiers/ModVerifier); world gen differs from vanilla via seedseparation (per-dimension seeds), | |
| standardrng (structure/loot RNG) and vanillafix mixins, so a faithful re-render should run their world gen. | |
| - Wave 0 (per-frame encoder, 1037 steps, 14.8 h / 93 pairs) FAILED on held-out pairs: yaw MAE 3.04 (VPT 2.12), | |
| yaw sign acc 4.7%, strafe/jump F1 ~0; val camera CE 1.758. It learned speed cues (sprint F1 0.42 vs VPT 0.15) but | |
| not turning. Cause: each frame is squeezed to 4 readout tokens before any cross-frame mixing, so pixel motion | |
| (the IDM's signal) is gone. VPT's IDM opens with a temporal 3D conv for this reason. | |
| - Fix: tubelet patch embedding (Config.tubelet; IDM (-1,0,1), policy (-2,-1,0), past-only asserted). Same 1037 | |
| steps, same 5 val pairs (61,413 frames): yaw MAE 2.11 (VPT 2.12), pitch 1.29 (VPT 1.45), sign acc 62% (VPT 86%), | |
| F1 forward 0.81 / sprint 0.65 / sneak 0.18 / jump 0.31 / mine 0.31 / strafe 0.03-0.04 (VPT strafe 0.40). | |
| Val camera CE 1.372 vs train ~1.4: underfit, so waves now train 16 epochs. | |
| - Loader contention: each systemd unit is its own cgroup, so nice 15 did not demote the prep encoders (60 cores) | |
| against training (11 cores, load avg 277). Fix: CPUWeight 20 for prep/pairs/replay-arrays, 1000 for training. | |
| PyAV auto threading (1 thread per core per worker) oversubscribes with 24+ workers; thread_count=2 per worker. | |
| ## 2026-09-25 18:00-18:40 - stopped idm-tub-long, profiled, resumed | |
| - idm-tub-long (fresh 4000-step tubelet IDM) ran at ~570 ms/step vs ~280 synthetic; Elliot had it stopped at step | |
| 2280. It had no intermediate checkpoint (ckpt-every 4000), so progress was lost. Now: checkpoints every 500 steps | |
| with optimizer state + global step; `--resume CKPT`. | |
| - Profile findings (4 GPU, tubelet IDM): tubelet costs no GPU time (1-GPU synthetic 443.6 vs 440.3 ms/step kernel | |
| time). Real vs synthetic kernels identical except +4 ms/step H2D. Real-data compute stream idle 21.4% with 62-67 ms | |
| gaps vs 1.5% synthetic: rank processes were CPU-starved by their own 32 loader workers. Loader workers now run at | |
| nice +10 (worker_init_fn): idle 2.4%, largest gap 6 ms. (Earlier profiler totals double counted Inductor launcher | |
| ops; summary now uses self device time. Data wait is now reported for the slowest rank.) | |
| - Resumed from idm-tub-ab/step1037.pt (weights only; fresh AdamW, warmup 100) as idm-tub-resume, 3000 steps. | |
| It is loader-bound at ~16-17k fps: box has a co-tenant (nv2.slice, ~42 cores, ~9 GB), swap full, 21% sys time. | |
| Standalone: one worker makes 1.9k fps (decode 3.2k), 8 workers with pinning 7.3k fps; in the 4-rank run ~4k/rank. | |
| Background daemons capped at runtime (download 800%, prep 800%, pairs 400%, replay-arrays 200% CPUQuota). | |
| - NVDEC via PyNvVideoCodec 2.2.3: bit-exact vs PyAV after NV12->planar, but 382 fps sequential and ~700 ms per | |
| 256-frame random window (per-frame overhead on tiny frames; measured while training used the GPU). Not adopted. | |
| ## 2026-09-25 19:00 - full kernel audit (one IDM training step, 822 kernels, ncu, base clocks) | |
| scripts/kernel_audit.py prof/ncu/full_step_idm.ncu-rep (tubelet IDM, batch 8 x 256 frames, 1 GPU): | |
| - GEMM 53.8% of step at 84.2% tensor-pipe (cuBLAS cutlass_80 s16816 bf16 = mma.sync m16n8k16, the only bf16 tensor | |
| path on sm_120: no wgmma/tcgen05 on GB202). Recoverable at 85% target: 2.5% of step. | |
| - Triton fused norm/SwiGLU/residual 27.1% at 86.1% memory SOL; recoverable 1.3%. Outlier: tubelet gather+cast | |
| kernel 2.2 ms at 26% SOL (0.8% of step). | |
| - Attention 17.2% at 30.1% tensor-pipe; FA2 backward dq_dk_dv 34%, plus dot_do_o (8.8 ms) and convert_dq (5.7 ms) | |
| helper passes. Encoder sequence is 148 tokens (144 patches + 4 readouts), padded to 2x128-row tiles. | |
| - Isolated attention fwd+bwd, [2048 frames x 8 heads x L x 64]: L=148 flash 7.86 / cudnn 7.08 / efficient 7.10 / | |
| compiled bmm+softmax 9.68 ms; L=128 flash 6.26 / cudnn 6.09 / efficient 4.55 ms. Memory floor ~2.1 ms/layer, so all | |
| library kernels are overhead-bound at this length. Whole step: flash 271.3, cudnn 275.2, efficient 277.6 ms/step | |
| (non-contiguous q/k/v views erase the isolated gain) -> keep FA2. | |
| - Levers, not yet taken: (1) encoder at exactly 128 tokens (e.g. 256x128 input with attention-pooled readouts) + | |
| efficient kernel: ~42% less attention time, ~9% of step; do it for the policy (not trained yet) rather than | |
| resetting the IDM. (2) FP8 GEMMs (sm_120 FP8 mma is 2x bf16) on the 54% GEMM share: experiment, quality risk. | |
| ## 2026-09-25 19:20-19:45 - NVFP4 training (NVIDIA arXiv 2509.25149v2) on sm_120 | |
| Paper recipe (12B Nemotron-H, 10T tokens, MMLU-Pro 62.58 vs FP8 62.62): NVFP4 = E2M1 values, 16-element blocks | |
| with E4M3 decode scales, plus an FP32 per-tensor scale (s_enc = 6*448/amax). All linear-layer GEMMs (Fprop, Dgrad, | |
| Wgrad) in NVFP4; ~15% of linears in BF16 (first 2 + last 8 blocks for 12B; the last blocks matter most); | |
| attention (QK^T, softmax, SV), norms, embeddings, output head in BF16; master weights, grads, and Adam states FP32. | |
| 16x16 2D block scales for weights (same quantized W in fwd and bwd); 1x16 for activations/grads. 16x16 random | |
| Hadamard transform on Wgrad inputs only (one fixed random sign vector). Stochastic rounding on gradients only | |
| (Dgrad and Wgrad inputs); RNE elsewhere (SR on activations/weights diverges). Optional: switch the forward pass | |
| to BF16 for the last ~18% (LR decay) to recover most of the ~1.5% loss gap. NVFP4 beat MXFP4 (which needed | |
| 36% more tokens to match). | |
| What sm_120 (RTX PRO 6000) has, verified on tetra: | |
| - NVFP4 GEMM via cuBLASLt (torch F.scaled_mm, BlockWise1x16 e4m3 + TensorWise fp32): correct (1.7e-3 vs | |
| dequantized reference). 8192^3: bf16 375 TF/s, NVFP4 1242 TF/s (3.3x). Our encoder-layer GEMMs (K or N = 512): | |
| 2.0x GEMM-only; 512x512-output wgrad GEMMs are slower in FP4 (0.59x). (scripts/bench_nvfp4_gemm.py) | |
| - ptxas (CUDA 13.3): cvt.rn...e2m1x2 OK on sm_120a; cvt.rs (hardware stochastic rounding) only sm_100a/103a. | |
| - Transformer Engine 2.19 (transformer_engine_torch built from sdist for sm_120 in a scratch venv): check_nvfp4_support | |
| True on 12.0, MXFP8 refused on 12.0+. SR uses a software fallback on sm_120; RHT+cast fusion is SM100-only | |
| (eligibility requires sm 100-110), so sm_120 runs a separate Hadamard pass. Gotcha: TE caches quantizers per | |
| module, so switching recipe objects on the same modules silently keeps the first recipe; build fresh modules. | |
| - te.Linear x4 (one encoder layer: qkv/proj/up/down), fwd+bwd, 303,104 tokens, d=512: bf16 17.96 ms, FP8 current | |
| 20.80, NVFP4 paper recipe 26.13, NVFP4 no-SR 26.11, NVFP4 no-RHT 16.10. d=2048/HID 5504, 65,536 tokens: bf16 56.42, | |
| FP8 39.11, NVFP4 paper 32.50, NVFP4 no-RHT 24.32. (scripts/bench_te_nvfp4.py, M/D/HID env vars) | |
| - Verdict for the current 179M model: NVFP4 does not pay (thin d=512 GEMMs, memory-bound quantization, unfused RHT on | |
| sm_120, GEMMs only ~54% of step, and training is loader-bound anyway). It pays at d>=2048 (1.7x with the full recipe). | |
| - Incident: building TE with MAX_JOBS=8 on the 60 GB box triggered a global OOM kill of IDM wave 1 at 19:24 | |
| (lost <500 steps; resumed from step9537). Build nothing heavy on tetra while training runs. | |
| ## 2026-09-25 19:40-20:05 - NVFP4 GEMM ceiling on RTX PRO 6000 Workstation (600 W), cuBLAS vs Colfax CuTe DSL | |
| - Sustained 10 s of 8192^3 NVFP4 GEMMs (cuBLAS 13.1): 1177 TF/s at 600 W, SM clock 1811 MHz mean, throttle | |
| 0x4 (SW power cap). Dense FP4 peak at that clock = 188 SMs x 4096 FLOP/clk x 1.81 GHz = 1394 TF/s, so cuBLAS | |
| sustains 84% of the power-limited peak. The 2000 TF spec needs ~2.6 GHz, which dense FP4 cannot hold within | |
| 600 W. Short bursts run faster (clock not yet pulled down). | |
| - Bursts, 8192^3 (TF/s): cuBLAS 13.1 (torch cu130 wheel) 1310 warm / 1313 cold-L2; cuBLAS 13.8.0.4 1180; | |
| Colfax CuTe DSL (github ColfaxResearch/cfx-article-src sm120_nvfp4_gemms, cutlass-dsl 4.8.0) v1 1498, v7 1545, | |
| CLC 1556 (cold L2). 16384^3: cuBLAS 1225 cold, Colfax v7 1539 / CLC 1555. Colfax is ~18-27% faster on big squares. | |
| - Our encoder shapes (cold L2): Colfax is slower than cuBLAS on all but proj fprop (e.g. up fprop 412 vs 665, | |
| qkv wgrad 352 vs 497). Weight-gradient GEMMs with a 512x512 output and K=303k reach only 117-168 TF/s (16 | |
| output tiles on 188 SMs): these need split-K / stream-K, which neither provides for NVFP4 on sm_120 here. | |
| - Scratch envs (not project deps): kern-env (torch 2.14 + nvidia-cublas 13.8.0.4 + nvidia-cutlass-dsl 4.8.0), | |
| te-env (TE 2.19). Gotcha: zsh does not word-split $VAR, so shell loops passing flag strings must run in bash. | |
| ## 2026-09-25 19:50 - encoder A/B setup; policy stage held | |
| - Where the time goes: wave 1 real-data 4-GPU: 27.2k fps, 302 ms/step, slowest-rank data wait ~15 ms (~5%); | |
| synthetic ceiling ~28.5-29.6k. GPU time: GEMM 54% (84% tensor-pipe), fused elementwise 27% (86% mem SOL), | |
| attention 17% (30%). Per-frame encoder = ~96% of inference FLOPs; temporal core (1 token/frame) ~4%. | |
| - Hypothesis: a conv encoder (no in-frame attention) is cheaper and at least as accurate in this data regime | |
| (tens-hundreds of hours of correlated 20 Hz frames), and motion is naturally early-fused by stacking frames as | |
| channels (VPT's IDM used a 3D conv + ResNet). Config.encoder="conv": stride-4 4x4 stem over [Y, U, V] x 3 frames, | |
| 4 stages (64,128,256,512) x 2 pre-GroupNorm residual 3x3 blocks, stride-2 between stages, flatten 8x5x512 -> d_t. | |
| Measured (FlopCounterMode): conv 10.3 train GFLOP/frame vs ViT 23.5; encoder params 35.1M vs 27.7M. | |
| - scripts/encoder_ab.sh (unit mcsr-encoder-ab): after wave 1's record lands, pause mcsr-waves, train both from | |
| scratch at the same time on 2 GPUs each (3000 steps, batch 8 x 256, same data snapshot), score both on held-out | |
| pairs, append to logs/encoder_ab.txt, restart mcsr-waves. data/HOLD_POLICY blocks the policy stage until decided. | |
| - Second OOM (19:51): a 1-minute conv smoke test (torch + Inductor compile workers) while wave 1 held ~32 GB killed | |
| the wave. Inductor spawns ~cpu_count compile workers per rank; launchers now set TORCHINDUCTOR_COMPILE_THREADS=4. | |
| ## 2026-09-25 20:45-21:10 - replay re-rendering on anvil (M4 spike) | |
| - Elliot approved accepting the MCSR Ranked Privacy/Guidelines screen; accepted on anvil (headless client, XTEST). | |
| - Blockers in the ranked client: (1) its menus (incl. replay viewer) require a signed-in Minecraft account | |
| ("Player authentication data couldn't be loaded"); (2) its anticheat refuses to start with any non-whitelisted | |
| mod ("Incompatible mod set found"). Not bypassed: a whitelist bypass is exactly a cheating tool for ranked. | |
| - Own renderer instead: anvil:~/dev/mcsr-render (Fabric 1.16.1 + our mod, no ranked mod at runtime). Toolchain is | |
| user-local: tools/jdk25 (Loom 1.18.2 needs Java 25), tools/jdk21, tools/gradle-9.8.0; build `bash build.sh` | |
| pattern (sources staged from tetra scratch). World: vanilla gen via MinecraftClient.method_29607 with MCSR-style | |
| seed separation reimplemented: nether/end DimensionOptions from DimensionType.method_28517(netherSeed/endSeed), | |
| ServerWorld constructor seed arg and getSeed() overridden per dimension (2 mixins). Ranked's standardrng mixins | |
| (loot, drops, spawners, lava lakes, springs, fossils) are not replicated: terrain and structures match, some | |
| decorations may not. | |
| - Camera: spectator; per sample: server-side cross-dimension teleport, client refreshPositionAndAngles, capture | |
| via ScreenshotUtils once WorldRenderer.isTerrainRenderComplete. [Corrected 2026-09-26 00:30: under Xvfb the | |
| clients load libGLX_mesa + libgallium, i.e. llvmpipe software GL, not the RTX 3090; see that entry.] | |
| - Validation, match 13599322 / bd276bdd, 6 ticks vs the streamer's VOD: village door at t793 (VOD: crafting in a | |
| village house), same tree at t1521, and at t7660 the render earned "A Terrible Fortress" on arrival, so the nether | |
| fortress sits where the replay says. Gaps: nether far darker (speedrunners use max gamma), chat/toasts on screen, | |
| riding (boat) pose at t2248 looks straight at water. Whole 6-sample job: world in 6 s, 9 s total. | |
| - Renderer v0.3 (continuous): one frame per replay tick, advanced per rendered frame, piped to ffmpeg as 256x144 @ 20 | |
| fps H.264 (same encode as prep), replay block edits applied (UPDATE_V2 = raw state id; BREAK/REMOVE = air; | |
| PROGRESS = crack overlay), gamma 1.0, HUD/chat hidden, toasts cancelled, time of day = tick. Job maker: | |
| mcsr/render_job.py. Match 13599322 / bd276bdd ticks 1400-2000: 601 frames in 15.7 s (38 fps, 1.9x real time, | |
| one client, RTX 3090 GL). Side by side with the aligned VOD: same tree with the chopped logs missing, the | |
| player's placed crafting table on the same riverbank, same river bend, mining cracks. Not reproducible from | |
| replays: inventory/crafting screens (VOD shows the GUI, render shows the world); todo: swim/sneak eye height | |
| (t1420 underwater in VOD), riding, HUD/hotbar/hand, mobs/items. | |
| ## 2026-09-25 21:50 - IDM wave 1 beats OpenAI VPT IDM on held-out real VODs | |
| - Wave 1 (tubelet ViT IDM, warm-started chain ~25k steps total, 93.6 h / 577 train pairs): held-out camera CE 3.01 | |
| (train 0.03: overconfident), yet on 36 held-out pairs (414,070 frames, mcsr.eval_idm) vs VPT 4x IDM: | |
| yaw MAE 1.60 vs 2.12 deg, pitch MAE 0.96 vs 1.48, yaw sign acc 90.6% vs 84.8%, F1 forward 0.90 vs 0.80, | |
| sprint 0.83 vs 0.20, jump 0.76 vs 0.33, left 0.70 vs 0.40. CE is a poor model-selection metric here (confident | |
| wrong bins); pick checkpoints by held-out yaw MAE. Trainer now has --val-every with best.pt (by camera CE). | |
| - Rendering fleet on anvil (4 clients, queue mode, overnight-compute lease agent mcsr-render on gpu0): renderer | |
| per-frame cost was the 120 fps window limiter (setting options.maxFps does not reach Window.setFramerateLimit); | |
| real work ~0.54 ms/frame static. One client: 652 fps on a full 9.4-min run (33x real time); 4 clients sharing | |
| anvil with a co-tenant: ~740-1220 fps combined. Tetra services mcsr-render-jobs / mcsr-render-sync push jobs and | |
| pull videos + labels (data/renders/, table renders). ~2.8k player-runs queued. | |
| ## 2026-09-25 22:45 - encoder A/B, 1-GPU sweep queue, render FOV gap, first closed-loop policy | |
| - Encoder A/B (IDM, 3000 steps, 2 GPUs each, same data): conv 27.3k fps vs ViT 13.3k, val camera CE 0.992 vs 1.217; | |
| conv held-out yaw/pitch MAE 1.417/0.878 deg (wave-1 ViT 1.596/0.963, VPT 2.121/1.481). Conv is the encoder. | |
| - Sweeps now run one experiment per GPU: scripts/sweep.py (spec logs/sweep_spec.json, re-read live; results | |
| logs/sweep.jsonl; per-run logs/sweep/<name>.out + .eval.out). Every IDM run: --before snapshot (identical data), | |
| --val-labels replay (checkpoint selection on real VOD pairs), then eval_idm on the fixed 37 held-out pairs with | |
| cam_ce / act_bce over every valid frame (new; the scaling metric). Model sizes: model.SIZES xs/s/m/base/l = | |
| 5.4/27.5/76/187/532M. Data caps: --pair-hours (nested subsets), --render-hours, --min-fov. | |
| - argparse gotcha: `--tubelet -2,-1,0,1,2` is parsed as a flag; use `--tubelet=-2,-1,0,1,2`. | |
| - Round 1 held-out cam_ce (4000 steps, 1 GPU, 143 h pairs): xs 1.200, s 1.179, base 1.163; s on pairs+renders | |
| (12 h, FOV 70) 1.110; s on renders only 1.849 (train loss 0.70: renders alone do not transfer to VOD pixels). | |
| - Why: FOV. Zoom-matching render frames to the same ticks of the streamer's VOD (74 overlapping runs) peaks at | |
| scale ~0.55 for 14/16 streamers (one at 0.78, one at 0.93); re-rendering bd276bdd at FOV 90/100/110 gives | |
| 0.825/0.975/1.2, so most streamers play at FOV ~100 vs our 70. Also: VODs carry HUD, hand, facecams, input | |
| overlays, captions; some are brighter (gamma); one streamer plays in third person. Phase correlation on VODs is | |
| useless (static overlays lock the peak at 0). | |
| - Fix: job field "fov" (mod: options.fov), per run from render_job.job_fov: 75% N(100,4) clipped 90-110, 25% | |
| U(70,95); renders.fov column (NULL/70 = old renders). Fleet restarted with the FOV jar at ~22:50; queued jobs | |
| rewritten with fov (apply script also touched *.json.rendered files: harmless). Renders done before this are FOV 70. | |
| - Closed loop: mod logs player state every 10 ticks to <out>.state.jsonl; mcsr/play_eval.py make (8 val-split | |
| seeds, data/play_jobs) / score (path, net displacement, items, death, vs both humans' first 60 s on the same | |
| seed); anvil ~/dev/mcsr-render/play_eval.sh TAG CKPT runs the episodes. Gotcha: a stale policy server on :5555 | |
| silently served the first run (random-init weights) - the driver now aborts unless its own server starts. | |
| - 60 s episodes, 8 held-out seeds: random-init path 40.3 m / net 7.4 m; pol-shake (policy, prev-action input, base | |
| size, 2000 steps = 4 min on 2 GPUs) path 86.7 / net 37.7, died 5/8 (drowning: walks into water, never swims up; | |
| also long stretches staring at the sky); humans 131.3 / 48.7. | |
| - 23:10 update. Encoder frame window (tubelet) is the biggest IDM lever so far: held-out cam_ce 1.179 (3 frames) | |
| -> 1.124 (5) -> 1.052 (7), size s, 4000 steps. Model size barely matters at this budget (xs 1.200, s 1.179, | |
| m 1.155, base 1.163, l 1.289: l is undertrained); all sizes' val curves are still falling when the cosine LR ends | |
| (compute-bound, not capacity-bound). T=64 context with 4x batch: 1.147. Floors: label prior 1.935. | |
| - Render speed on anvil collapsed from ~160-220 fps per client (22:39) to ~21-37 fps: not FOV (same segment at FOV 70 | |
| and 100 both 72 s) but CPU load (co-tenant test_snapshots ~14 cores, load 60-88 on 32 threads, plus two | |
| closed-loop clients). Expect ~4-5 h of rendered footage per hour while that lasts. | |
| - Closed loop at FOV 100 (8 held-out seeds, 60 s): random-init path 39.4 m / net 7.3 / died 2/8; pol-m-prev (76M, | |
| prev-action input, 4000 steps 1 GPU) 104.1 / 35.7 / died 3/8; humans 131.3 / 48.7. | |
| - VPT eval process grows to ~89 GB of GPU memory (allocator cache); give it its own GPU. | |
| - 23:35 update. Seed noise is large: r1-P-s seed 0 held-out cam_ce 1.179, seed 1 1.079 (same config, 4000 steps, | |
| batch 8 sequences). Single-run differences under ~0.1 are not significant; use >=3 seeds for claims. Tubelet trend | |
| (3/5/7/11/15 frames: 1.179/1.124/1.052/1.058/1.035) is monotone enough to act on. Data grid at 4000 steps | |
| saturates by 18-36 h of pairs (s: 9h 1.282, 18h 1.176, 36h 1.149; base: 9h 1.269, 18h 1.158): compute-bound. | |
| - Policy closed loop (8 seeds, FOV 100): prev-action 104.1 m path / 35.7 net / died 3/8 beats frames-only | |
| 89.1 / 30.6 / 5/8. Look-back 7 frames vs 3: same val loss (1.1457 vs 1.1431). Pitch sign verified: frames-only | |
| median pitch 35 deg down vs humans 32; prev-action random-walks pitch (14% of time > 45 deg up, sky staring). | |
| - pol-final: base 187M, policy source (renders + pairs + IDM-labeled VODs; --refresh-every 2500 picks up new renders | |
| and labels), prev-action, tubelet -2..0, 120k steps, GPUs 0,3 (21.4k fps), ckpt every 5000 -> mcsr.play_watch | |
| plays each checkpoint on anvil (logs/play_curve.jsonl). idm-final: m, tubelet -7..7, pairs + all renders, 16k steps. | |
| - scripts/sweep_release.sh frees a GPU from a single-GPU runner at a run boundary (re-queues a just-started run). | |
| ## 2026-09-26 00:30 - render fleet is CPU-bound llvmpipe; closed-loop notes | |
| - Fleet clients under Xvfb render with Mesa llvmpipe (/proc/PID/maps: libGLX_mesa, libgallium; nvidia-smi lists no | |
| java). The earlier "NVIDIA GL under Xvfb" note was wrong. llvmpipe spawns one raster thread per CPU per client, so 4 | |
| clients + a co-tenant on 32 threads collapsed to ~22 fps/client. Same 1501-frame segment: LP_NUM_THREADS 2 / 4 / 8 | |
| / default = 39.0 / 41.6 / 51.4 / 72.5 s. Fleet restarted 00:32 with K=6, LP=2 (run_fleet.sh LP env; run_play.sh | |
| uses LP=4). Hardware GL would need a real X server with the NVIDIA driver (root) or VirtualGL (not installed); | |
| not using the desktop session's Xwayland. | |
| - Render-data effect with error bars (IDM size s, 4000 steps, held-out cam_ce, 3 seeds): pairs only 1.179/1.079/1.140 | |
| (mean 1.133); pairs + 12 h FOV-70 renders 1.110/1.120/1.138 (mean 1.123). Off-FOV renders: no significant gain. | |
| - Closed loop: HUD on vs off (pol-m-prev) 92.3 m / 3 deaths vs 104.1 / 3: no gain, keep HUD hidden. Deaths are | |
| drowning (hp -2 per 10 ticks while y sinks to 38-46): speedrunners on these ocean-adjacent ranked seeds dive for | |
| treasure/shipwrecks right after spawn (human renders show it), the policy imitates the dive but cannot see its air | |
| (HUD hidden) and does not hold jump to resurface. | |
| - Human first-60 s renders of the 8 held-out seeds (FOV 100): data/play/human-fov100 (scripts/versus.py pairs them | |
| with a policy's episodes). 24-seed job set for final evals: data/play_jobs_24 (anvil play_jobs_24, JOBS= env). | |
| - 00:45 idm-final (m, 15-frame window, pairs + all renders, 16k steps, 1 GPU, 64 min): held-out (fixed 37 pairs, | |
| 422,811 frames) cam_ce 0.889, yaw MAE 1.32 / pitch 0.79 deg (VPT 2.12 / 1.48), yaw sign 0.873 (VPT 0.848), | |
| F1 forward 0.91 (0.79), sprint 0.85 (0.20), jump 0.77 (0.33), left 0.75 (0.40), right 0.74 (0.38), back 0.69 | |
| (0.39), sneak 0.72 (0.17), mine 0.55 (0.34), place 0.03 (0.09). Relabeling 1170 unpaired VODs (219 h) with it: | |
| logs/relabel.log (GPUs 1,2 shared with sweeps, 1 decode worker/GPU: 2 workers/GPU pushed tetra to 5 GB free). | |
| - train.py: --continue (with --resume: LR at the global step, stop at --steps total; before, a resume restarted | |
| warmup + cosine) and --ema DECAY (rank-0 fp32 EMA saved as ck["ema"]; play_watch plays EMA weights). pol-final | |
| restarted 00:48 from step25000 with --continue --ema 0.9995 (data now 294.7 h). Closed loop so far (non-EMA, | |
| LR near peak): step5000 45.5 m / died 6-7 of 8, step10000 86.5 / 4, step15000 47.0 / 4. | |
| - Pairs + 38 h FOV-70 renders, seed 0: 1.166 (vs 12 h 1.123 mean, pairs-only 1.133): more off-FOV renders do not help. | |
| - 01:15 closed loop: pol-final step25000 (last non-EMA ckpt) 102.1 m path / 42.4 net / died 4/8 (humans 131.3 / | |
| 48.7). Copycat check: step20000 with argmax keys (+ camera T=0.7) never moves (0.0 m on all 8 seeds): it starts | |
| with no keys, its previous-action input says idle, and it copies that. Sampling keys (T=1) breaks the symmetry; | |
| keep sampling. play_eval.sh ARGMAX=1 exists for this test only. | |
| - Relabel OOM: 2 GPU processes + 1 decode worker each exceeded an 8 GB cap in 22 s (whole decoded runs buffered). | |
| --workers 0 (decode in the GPU process, one run in RAM per GPU) runs at 5.2 GB. | |
| ## 2026-09-26 01:20-01:45 - B300 box (verda-b300-1x-04, Finland) for overnight training | |
| - Reserved for Elliot until Sat Sep 26 3:14 pm MT; task name mcsr: /mnt/data/mcsr (code, .venv, uvcache, data, | |
| logs), tmux session mcsr on the box. Nothing under /root. Cleanup list = /mnt/data/mcsr + tmux session mcsr. | |
| - Link from tetra: RTT 200 ms direct (Tailscale, no relay). Upload 2.8 MB/s per stream, 5.0 (4), 6.7 (8), 9.1 (16); | |
| 16 rsync streams sustained ~16 MB/s. Download from the box 0.8 MB/s per stream, 3.3 (8) while the push runs. | |
| The box's own internet is fast (56 MB/s from GitHub): packages come from the internet, data comes from tetra. | |
| - B300 SXM6 AC (sm_103; torch 2.14 cu130 runs its sm_100 kernels): torch.matmul bf16 8192^3 1719 TFLOPS (4.3x an | |
| RTX PRO 6000). Synthetic policy training: base 187M 50.1k fps (b8) / 51.1k (b32), MFU 0.30-0.31; l 532M 24.2k | |
| (b8) / 25.4k (b24), MFU 0.34-0.35. Decode (PyAV, 256-frame windows): 8/16/24 procs = 31.5k/60.7k/82.6k fps. | |
| - Data: scripts/b300_push.sh (16 rsync streams, priority renders > pairs > IDM-labeled VODs, 56 GB), then | |
| scripts/b300_sync.py every 30 min (new files + slim DB with paths rewritten to /mnt/data/mcsr/code/). | |
| data.index now drops rows whose video/labels are not on disk (data still arriving). | |
| - pol-l-b300 (01:45): 532M policy, batch 16 x 256, 120k steps (same frames as tetra's 187M pol-final), lr 2.5e-4, | |
| EMA 0.9995, refresh every 2000 steps, ckpt every 10k: 25.5k fps, 160 ms/step, ETA ~07:00. | |
| - Push bug: round-robin over a list that alternates video, label put every video in the even lists (16 streams -> | |
| 8 carrying video, 8 done in seconds). Rebalanced by bytes (greedy, priority order kept): 19 MB/s sustained. | |
| - B300 checkpoints come home via scripts/b300_pull.py (export EMA weights as bf16 on the box, ~1 GB for 532M, pull | |
| in 8 byte ranges) into data/ckpt/pol-l-b300/, then mcsr.play_watch pol-l-b300 --slots 2 plays them on anvil. | |
| - IDM step scaling (s, 7-frame, pairs only): 4k steps 1.052 -> 8k 0.959 held-out cam_ce. | |
| ## 2026-09-26 02:25-03:15 - anvil GPU hang, move to tetra, closed-loop profile, lockstep | |
| - anvil: at 02:25 a USB mouse was attached; at 02:29 steamwebhelper blocked in nvkms_close (nvidia_modeset) and the | |
| NVIDIA resource-manager lock stayed held: nvidia-smi and every new CUDA context hang, killed policy servers stuck | |
| as zombies in os_acquire_rwlock_write. Not caused by our jobs. Elliot then moved all our work to tetra: fleet and | |
| play stopped, lease released, ~/dev/mcsr-render copied to tetra (6.1 GB, 11,165 files, rsync dry-run diff 0; | |
| inst/ skipped), random_policy.pt -> data/ckpt/; deleted on anvil: ~/dev/mcsr-render, ~/dev/mcsr-play (its .venv and | |
| ckpt re-exports), /tmp/{apply_fov.py,fix_fov.py,fov_map.json,mcsr-modsrc,restart_fleet*.sh}. | |
| - Global OOM on tetra 02:47 killed pol-final rank 0: I had started extra policy servers (~3.4 GB each) without | |
| checking headroom. Resumed 03:00 from step55000 (--continue, EMA restored, 5 workers/rank, MemoryMax 22G), data | |
| now 498.5 h (IDM-labeled VODs landed). Budget rule: one Minecraft client + policy server (~7 GB) at a time while a | |
| policy trains. | |
| - Closed-loop profile (policy server timers; 532M policy, RTX PRO 6000): per 50 ms tick yuv 1.1 ms, encoder ~4, | |
| temporal ~9-10 (full recompute over <=256 cached frames), sample ~2.5, then ~35 ms idle waiting for the game's next | |
| 20 Hz tick. Episode: JVM + launcher 6 s, resources 7 s, world gen + spawn 7 s, 1200 ticks >= 60 s, exit 2 s. | |
| First 200 ticks of a fresh server ran at 9 ticks/s (kernel warm-up): server now runs 20 warm-up steps at start. | |
| - Lockstep mod (mcsr-render-lockstep.jar, job "lockstep": true): RenderTickCounter returns one tick per frame; | |
| MinecraftServer.tick waits for a permit released after each applied action; method_16208 deadline moved to now so | |
| the server does not sleep 50 ms. Queue mode for control jobs: one client plays every seed (ControlLoop resets per | |
| episode). 1200 ticks: 29-35 s (desert seed), 42-56 s (ocean seed) vs >= 60 s; the client frame (MC main-thread | |
| render under llvmpipe, 10-35 ms) is now the bottleneck (LP_NUM_THREADS 16 vs 4: no change); the policy uses | |
| ~12 ms/tick. 8 seeds: ~6 min vs ~15 min. play_eval.sh LOCKSTEP=1; play_watch uses it. | |
| - tetra display numbers :99-:106 belong to someone else: play slots use :120+k, fleet clients :130+i. | |
| - 03:35 results. Render transfer with seeds (IDM s, 4000 steps, held-out cam_ce): pairs + 12 h FOV-matched renders | |
| 1.189/1.085/1.111 (mean 1.128; pairs only 1.133; + FOV-70 1.123); renders only FOV-matched 1.919/1.893, + stream | |
| overlay augmentation (data.stream_overlay, --overlay-aug 0.8) 1.815/1.831 (prior 1.935). Neither FOV nor static | |
| overlays close the gap. Remaining suspect: temporal aliasing (renders show exact per-tick camera deltas; stream | |
| frames blend sub-tick mouse motion) plus HUD/hand/entities/lighting. | |
| - Policy data A/B in closed loop (lockstep, 8 seeds, same 76M / 4000 steps / snapshot): mixed (renders + pairs + | |
| IDM VODs, ~150 h) 117.0 m path / 47.6 net / died 2/8 vs renders only (12 h) 75.6 / 29.1 / 1/8; humans 131.3 / | |
| 48.7. VOD frames do help the policy (confounded with 12x more data). Same checkpoint real-time vs lockstep: | |
| 104.1 / 35.7 vs 117.0 / 47.6 (lockstep gives an action every tick, as in training). | |
| ## 2026-09-26 03:55-04:30 - B300 end-to-end profile of the 532M policy (batch 16 x 256, bf16, compiled) | |
| - Stopped pol-l-b300 right after step50000 for an exclusive GPU. torch.profiler (4 steps, real loader vs synthetic): | |
| data wait 0.7 vs 0.1 ms/step; GPU busy 99.0% of the window (largest gap 1.7 ms, one compute stream) -> not host- | |
| or loader-bound. Kernel time: cuDNN convs 59%, Triton fused elementwise/GroupNorm 31%, cuBLAS GEMMs 4.6%, copies | |
| 2.6%, optimizer 2.0%, attention 0.4%. The conv encoder is ~87% of FLOPs; the transformer is a small part. | |
| - ncu, one full step (890 kernels, 141.8 ms at the locked ~1.84 GHz; scripts/kernel_audit_sm100.py, report on the | |
| box /mnt/data/mcsr/prof/step_l.ncu-rep): convs 59.8% at 74% tensor pipe (fprop/dgrad weight-stationary kernels 92%, | |
| wgrad implicit-GEMM kernels for the high-resolution stages 40-61%); Triton GroupNorm 13.5% at 66% memory SOL; | |
| Triton elementwise 12.8% at 59%; GEMMs (nvjet_sm103) 5.8% at 74%; cuDNN nhwcAddPadding of the 9-channel stem input | |
| 4.6%; optimizer 2.3% at 83%; attention 0.6% at 19%. Recoverable at 80% tensor / 85% memory targets: 19.9%. | |
| - Ceilings (scratchpad ceilings.py): 148 SMs; bf16 GEMM 8192^3 sustained 10 s 1,094 TFLOPS at 1,519 MHz, ~1 kW | |
| (power cap 1,100 W; bursts 1,719 TF; published dense 2.25 PF); model GEMMs 1.1-1.7 PF isolated; HBM copy 6.61 TB/s | |
| (spec 8); causal SDPA [16,24,256,64] fwd+bwd cuDNN 99.8 us vs FA2 180 us; stem conv 9->96 4x4/4 only 29 TF (~13x | |
| slower than its memory bound), stage 1-4 3x3 convs 451/746/1037/1276 TF fwd; eager channels_last GroupNorm | |
| 0.44-0.48 TB/s. Training itself runs at the power cap (1,069 W, SM 1,485 of 2,032 MHz). | |
| - Synthetic A/B (ms/step): base 163.6; + cudnn.benchmark 147.8 (+10.7%); + cuDNN attention 147.5; + stem input | |
| zero-padded to 16 channels (Config.conv_in_pad, --conv-in-pad) 141.5 (+15.6% total). No change from | |
| TORCHINDUCTOR_FORCE_LAYOUT_OPT=1 (141.4) or cudnn benchmark_limit=0 (141.4); max-autotune not measured (stopped). | |
| - pol-l-b300 resumed 04:25 from step50000 converted by scripts/pad_stem_ckpt.py (stem, EMA and AdamW moments | |
| zero-padded, function unchanged) with --cudnn-benchmark --attn cudnn, --steps 100000: 28.6k fps, 143 ms/step, MFU | |
| 0.40 (was 0.345). New runs: add --cudnn-benchmark --attn cudnn --conv-in-pad. | |
| - Research (subagent, sourced): TE 2.19 supports MXFP8 and NVFP4 training on sm_100/103 (published B300 speedups | |
| 1.4-2.0x on large-GEMM LLMs), but our linears are ~12% of FLOPs with small GEMMs: torchao MXFP8 estimated 1-4%. | |
| Larger levers: fused NHWC GroupNorm+GELU(+residual) Triton kernel (est. 5-15%), better wgrad kernels for stage-1 | |
| shapes (CUTLASS example 76_blackwell_conv; days), or reducing stage-1 work in the model (stride-8 stem, fewer | |
| stage-1 blocks, channel LayerNorm), which beats all kernel work. | |
| ## 2026-09-26 06:10-07:30 - final results, report | |
| - pol-final (187M) finished 06:10 (100k steps, 410M frames, data 250 -> 500 h); pol-l-b300 (532M) finished 06:26 | |
| (100k steps, 410M frames, data 32 -> 570 h on the B300 as the copy arrived; loss dips to ~0.5 then rises when the | |
| data nearly doubles in the last fifth: memorization of the small early set, so the size comparison is confounded). | |
| - Final closed loop, 24 held-out seeds, lockstep, T=1 (scripts/final_eval.sh; data/play/final-*): | |
| untrained 41.6 m path / 5.3 net / 2 deaths / heading -0.25 / 23% looking up; 76M 10-min policy 80.8 / 37.8 / 11 / | |
| -0.08 / 13%; 187M 69.3 / 34.3 / 7 / +0.18 / 5%; 532M 38.5 / 19.0 / 7 / +0.03 / 2% (only one breaking blocks: dirt, | |
| wheat, 5 seeds); speedrunners on the same seeds 148.5 / 49.5 / - / 1 / 5.4%. 24-seed learning curves | |
| (logs/play_curve.jsonl) are flat within noise (19-35 m net). Distance in 60 s is too coarse a score; progress | |
| needs GUI actions (crafting) and an RL objective. | |
| - IDM compute scaling finished on the B300 (merged into logs/sweep.jsonl, host b300): s 7-frame 4k/8k/16k steps = | |
| 1.052/0.959/0.910 held-out cam_ce; base 16k 0.892; final IDM 0.889. | |
| - Report (private artifact): https://claude.ai/artifact/XYPCaz9kY6Tv4pVXp2xFGd ; sources: scratchpad report/index.html, | |
| charts scripts/plots.py -> data/report/*.png, videos scripts/make_videos.sh (montage + versus from final-187m). | |
| ## 2026-09-26 12:20-13:10 - GPU rendering without root, data inventory, download bump, B300 cleanup | |
| - GPU OpenGL on tetra with no root and no X server on the GPU: VirtualGL 3.1.5 (unpacked from the release .deb into | |
| ~/dev/mcsr-render/tools/virtualgl) with VGL_DISPLAY=egl under Xvfb gives the client "NVIDIA RTX PRO 6000 ... 4.6.0 | |
| NVIDIA 615.71.09" (EGL device platform). zink under Xvfb fails (no swapchain); NVIDIA EGL on an Xvfb display falls | |
| back to Mesa swrast. Per-GPU selection via VGL_DISPLAY=/dev/dri/cardN fails (init3D); egl = GPU 0, which is enough. | |
| - Fixed the render gate that the GPU exposed: the terrain wait was counted in frames (40 small move / 2000 after a | |
| teleport), ~1 s / ~40 s under llvmpipe but milliseconds on a GPU, so GPU renders captured empty sky after the nether | |
| teleport and missing block edits. Now: wait for loaded chunks AND WorldRenderer.isTerrainRenderComplete, wall-clock | |
| timeout 1 s / 60 s, and done.json counts "forced" (timeout) captures. Jar: mcsr-render-gpu.jar (lockstep + this). | |
| - Same 1501-frame segment, idle box: GPU 5.9 s (254 fps, 0 forced), frames match llvmpipe's (same nether cave, lava); | |
| llvmpipe 8 threads 65.4 s with the strict gate (27.5 s with the old lax gate). Real queued runs, 4 GPU clients: | |
| 261-283 fps each (a 21.8-min run in 95.6 s, 0 forced), ~1,080 fps = ~54 h of footage per hour vs ~5 h/h for the | |
| llvmpipe fleet over the night. Limit is RAM: 8 JVMs = 32.4 GB RSS and left 2 GB available on the 60 GB box; GPU 0 | |
| at 28%. run_fleet.sh VGL=1 and play_eval.sh VGL=1 switch to it. Fleet not restarted (stopped on request earlier). | |
| - Closed loop, lockstep, 187M, 2 seeds, under heavy CPU load (download/prep bump): GPU 20.1 ticks/s (policy ~26 ms = | |
| yuv 3.4 + encode 8.2 + temporal 12.9 + sample 1.8; game wait 20.5 ms); llvmpipe 4.4 ticks/s (game wait 190-243 ms). | |
| With GPU frames the policy server is the bottleneck: the temporal core recomputes all <=256 frames every tick. | |
| - Data inventory (index.sqlite, 13:00): 170k ranked matches since 2026-08-30; 35k player-runs with a Twitch VOD | |
| (792 streamers, 6,373 h): 789 h downloaded, 5,475 h pending, 110 h gone. Replays: 5,060 matches decoded (9,925 | |
| player-runs, 1,700 h), 3,425 pending. Pairs 3,413 runs / 596 h; IDM-labeled 1,129 runs / 204 h; renders 90 h done, | |
| 9,272 jobs / 1,587 h queued. | |
| - Pending VODs are expiring: sample of 80 pending VODs checked with yt-dlp: age 0-7 d 24/24 live, 7-14 d 14/19, 14-21 | |
| d 7/19, 21-28 d 6/18; 77% of pending hours still live (~4,200 h). Downloader was ~30 h/h at 8 workers (source-only | |
| VODs spend 300-430 s in the 1080p60 -> 360p re-encode); now 24 workers (and prep 24 procs): ~250 h/h in the first | |
| 15 min. At 0.35 GB/h raw + ~0.15 GB/h prepped, disk (1.1 TB free) reaches the downloader's 150 GB guard in ~10 h. | |
| Only mcsr/label.py (VPT labeler) reads raw VODs after prep. | |
| - speedrun.com (API, Any% Glitchless, verified): >= 13,934 random-seed 1.16.1 runs with video (6,697 h of run time, | |
| 5,618 runners, p10/p50/p90 12/23/50 min; 8.2k YouTube links in the newest 10k). The API stops at offset 10,000 | |
| from each end, so 2022 is missing: a lower bound. Unedited full runs (verification requires it), same version. | |
| - Netherite (~/dev/netherite, netherite-v2) is not a render farm for this: v1 is 1.11.2, v2 is 1.7.10; neither | |
| generates 1.16.1 worlds from these seeds or draws 1.16 blocks/textures. MacBook: M4 Max, 14 CPU / 32 GPU cores, | |
| 36 GB, on battery; 1.16.1 needs arm64 LWJGL (portablemc --lwjgl) or x86 Java 8 under Rosetta. Not set up. | |
| - B300 cleanup done 12:50: pulled logs/b300/prof (step_l.ncu-rep sha256 20e60ea3... matches), logs/b300/{sweep,train}; | |
| killed tmux mcsr; removed /mnt/data/mcsr (222 GB; /mnt/data was 100% full, now 216 GB free), 12 /tmp/pymp-* dirs | |
| from the profile run, /tmp/uv-6b3dcf65b122cddc.lock, one /root/.triton/cache entry. /mnt/w (tmpfs, not ours) left | |
| mounted. GPU idle, no processes. Tetra units mcsr-b300-sync, mcsr-b300-pull, mcsr-play-watch-l stopped. | |
| ## 2026-09-26 13:10-14:15 - Twitch download from HLS segments at 160p; 160p vs 360p for the IDM; HF datasets | |
| - What Twitch serves (yt-dlp -J + usher master playlist): per rendition a media playlist of 10 s segments on a | |
| CloudFront host with no token (N.ts / N-muted.ts, or fMP4 N.mp4 + #EXT-X-MAP init on some newer VODs), so segment | |
| N covers [10N, 10N+10) s. One 10 s segment (VOD 2863014991): 160p30 586 KB = video 269 (46%) + audio 210 (36%, | |
| 168 kbps AAC at every rendition, muxed, cannot be skipped) + TS overhead 18%; 360p30 1,000 KB; 480p30 1.7 MB; | |
| 720p60 5.0 MB; 1080p60 source 10.3 MB. GOP 2 s, B-frames on. Training needs 256x144 @ 20 fps, no audio. | |
| - Pending live VODs (51 sampled): 16 source-only (no transcodes), 19% of run hours but ~70% of downloaded bytes | |
| (3.4-3.7 GB per hour of gameplay vs 0.36 at 360p). Link: tetra's port is 1 Gb/s; the yt-dlp downloader at 24 | |
| workers used 78 MB/s. Parallel fetch (16 connections): 12 min of 160p in 2.0 s. | |
| - 160p vs 360p for idm-final, 8 held-out pairs (1.21 h), 160p segments frame-matched to the existing 360p download | |
| and prepped identically (scratchpad twitch/res_test.py): yaw MAE 1.131 -> 1.142 (+1.0%), pitch 0.726 -> 0.736 | |
| (+1.3%), cam_ce 0.842 -> 0.852, act_bce +0.001, F1 forward/sprint/jump/mine -0.2/-0.8/-0.2/+0.3%. The IDM never | |
| saw 160p in training. 8 of 16 pairs did not align (no frame match within 25 s even with the reference 5 s into the old download; | |
| cause not found); excluded. | |
| - mcsr/download.py rewritten: yt-dlp only for the token + master playlist; lowest rendition >= 144 px; only the | |
| segments covering the run, 16 at a time; cut at the keyframe before the run start (stream copy), video only. | |
| Source-only VODs are marked vods.status='src' and re-encoded to 284x160@30 by --src-workers (8 of 24) so they do | |
| not hold cheap workers. Runs past the end of a finished VOD (#EXT-X-ENDLIST) keep the part >= 60 s (yt-dlp did the | |
| same); a VOD still streaming gets a 30 min cooldown. Per-VOD errors are caught (a playlist timeout killed threads | |
| in the first deploy). NVDEC for the source re-encode was slower (131 s vs 28 s wall for 5 min of 1080p60: frames | |
| copied back for the CPU scaler); CPU path costs ~1.1 core-hours per hour of 1080p60 gameplay. | |
| - Result (first 13 min after 13:57): 160p lane 848 h of gameplay per hour (yt-dlp: ~30 h/h at 8 workers, ~250 at 24), | |
| 2-3 s per 10-min run, fetched 0.14 GB and kept 0.085 GB per hour of gameplay (was 0.35 kept); source lane 18 h/h. | |
| Downloaded 1,355 h at 14:10 (789 h at 12:20). Prep (24 procs) now the slower stage at ~500-590 h/h. | |
| - Hugging Face: no MCSR / Minecraft speedrun dataset (searches mcsr, speedrun, minecraft speedrun, rsg). Closest: | |
| OpenAI VPT contractor data mirrors with true keyboard+mouse actions incl. GUI/crafting cursor, Minecraft 1.16: | |
| open-world-agents/vpt-owamcap (5.1 TB, full release), reactor-team/minecraft-vpt-mp4 (1.08 TB ArrayRecord), | |
| H1yori233/VPT_parquet (0.89 TB), Infatoshi/pan-2-vpt (1,625 episodes, 113.3 h, raw 640x360@20 mp4 + jsonl, 2.05 | |
| GB/h; the 64x64 episodes are on tetra at /data/legacy-9100-S7ZSNJ0Y304175T/vpt). At 2.05 GB/h the 5.1 TB mirror is | |
| ~2,500 h (estimate). Also GameWAM (Yunncheng/gamewam-minecraft, 492 GB, LeRobot, 22-D kb/mouse + GUI state), | |
| JARVIS-VLA SFT (CraftJarvis/minecraft-vla-sft, 106 GB). None are speedruns. | |
| ## 2026-09-26 14:25-14:45 - CPU vs GPU for prep and for the source-only re-encode | |
| - Short benchmark (scratchpad twitch/bench_prep.py; 6 x 60 s snippets, 1 and 6 concurrent streams, load ~200; | |
| quality = PSNR/SSIM vs a lossless CPU fps+area reference; GPUs 0/2/3). | |
| prep (160p raw -> 256x144@20): CPU as deployed 257 h of gameplay/h at 6 streams, 170 CPU s per hour of gameplay, | |
| 41.82 dB; NVDEC + CPU scale + x264 73 h/h, 251 CPU s (slower: per-frame driver/sync/PCIe cost exceeds a 284x160 | |
| CPU decode); CPU + NVENC (cq 20) 144 h/h, 125 CPU s, 38.33 dB at half the bytes; all-GPU 56 h/h and 74 CPU s on | |
| one stream, failed at 6 streams ("Could not open encoder before EOF", not pursued). Prep stays on the CPU. | |
| source (1080p60 -> 284x160@30): CPU 23 h/h, 5,361 CPU s/h, 30.75 dB; NVDEC + hwdownload of full frames + CPU scale | |
| 13 h/h; NVDEC + scale_cuda one bilinear step 71 h/h, 469 CPU s, 26.18 dB (aliasing); NVDEC + scale_cuda two exact | |
| 2x halvings + bilinear to 284x160 + x264 71 h/h, 515 CPU s, 30.05 dB. | |
| - Deployed the last one in download.py (gpu_scale; MCSR_NVDEC_GPUS default 0,2,3; CPU fallback). First 4 min after | |
| 14:38: download service 53.5 -> 12 cores, prep 25 -> 50 cores (took the freed CPU), source lane 18 -> 49 h/h, | |
| load 200 -> 132, NVDEC 7-9%, ~0.7-1.5 GB GPU memory per GPU. Prep now ~1,020 h/h, faster than downloads. | |
| - Backlog 14:45: 1,806 h downloaded (1,661 prepped, 134 h waiting ~8 min), 1,736 h found expired. Pending: 1,297 h | |
| from VODs 0-7 days old, 1,422 h 7-14 d, 146 h 14-21 d (121 source-only), 42 h older. With the age sample's live | |
| rates (100/81/55/51%) ~2,500 h still to come: ~3-4 h at ~600-850 h/h (estimate), source lane ~2-3 h. | |
| ## 2026-09-26 14:45-15:05 - where prep time goes; GPU video-engine ceilings at 284x160 | |
| - perf, one 60 s 160p snippet, single-threaded prep: 0.98 CPU s (59 CPU s per hour of gameplay): libx264 61%, | |
| libavcodec h264 decode 23%, swscale 5%, rest loader/alloc. Decode alone 0.35 s, decode+fps+scale 0.58 s. | |
| - nsys, all-GPU ffmpeg (NVDEC + scale_cuda + NVENC) on the same snippet: CUDA kernels 5.9 ms total (Convert_PL2BL, | |
| ConvertNV12BLtoNV12, Subsample_Bilinear) + 2.2 ms D2D copies per minute of video; host: cuCtxCreate 386 ms + | |
| cuCtxDestroy 210 ms + module load/unload 99 ms + decoder/encoder create/destroy ~300 ms per process; per frame | |
| cuvidDecodePicture 0.06 ms, cuvidMapVideoFrame 0.05 ms, nvEncEncodePicture 0.12 ms, 6,648 cuLaunchKernel and | |
| 1,786 cuEventSynchronize per minute. The arithmetic is ~0.01% of the job; the rest is codec engines + driver calls. | |
| - NVDEC ceiling at 284x160 on GPU 0 (full 160p runs, 5.6 h): ffmpeg processes 1/8/32 streams 4.6k/15.0k/20.2k | |
| frames/s (decoder 29/36/42%); long-lived PyNvVideoCodec process (scratchpad twitch/nvdec_pool.py), frames kept in | |
| VRAM: 1 thread 9.2k fps, 8 threads 25.4k fps (decoder 41%, ~2.8 cores: GIL), 32 threads 17.5k; 4x4 and 8x2 | |
| processes 15.9k/17.3k, 8x2 with GPU fps-select + area resize 21.0k; 12-23 CPU s of host work per hour of gameplay. | |
| CPU h264 decode of the same files: ~4,800 fps per core, 21 CPU s per hour. At this frame size driving the engine | |
| costs about what decoding in software does; GPU decode would save at most part of the 23% decode share. | |
| - prep.py now -threads 1 per file, --procs 48: 969 h/h at 37 cores, 138 CPU s per hour of gameplay under load ~131 | |
| (170 with 2+2 threads). Faster than downloads (~600-850 h/h), so it is not on the critical path. | |
| ## 2026-09-26 15:20 - summary: the data pipeline stage by stage on tetra (12:20 -> 15:20) | |
| Hardware: 128 cores, 60 GB RAM (the binding limit for anything with a JVM or whole-run buffers), 4x RTX PRO 6000 | |
| 96 GB (GPUs 1-3 in use by slippi-ai this afternoon; ours on GPU 0), NVMe, 1 Gb/s port (~117 MB/s usable). | |
| Training consumes ~1,070 h of footage per hour (187M, 2 GPUs) to ~2,100 (4 GPUs), so supply was the bottleneck. | |
| | stage | before | after | what fixed it | limit now | | |
| |---|---|---|---|---| | |
| | render replays | ~5 h/h (llvmpipe fleet) | ~54 h/h, 4 clients | VirtualGL EGL on GPU; wall-clock terrain wait | RAM (~4 GB/client) | | |
| | download 160p lane | ~30 h/h (yt-dlp, 8 w) | ~600-950 h/h | HLS segments direct, 160p, video only, 16 conns | link 83/117 MB/s | | |
| | download source-only | inside the above | 18 -> 49-61 h/h | own lane; NVDEC + scale_cuda halvings | link (3.4 GB/h) | | |
| | prep to 256x144@20 | ~130-300 h/h | ~970 h/h | CPU freed by NVDEC; -threads 1, 48 procs | faster than download | | |
| | IDM labels | ~950 fps/GPU | ~3,650 fps/GPU, 4 GPUs ~730 h/h | AUTO threads, decode into VRAM, overlapped | GPU (71-76% SM) | | |
| | replays | ~4/min | same | Cloudflare rate limit, expire ~3 days | external | | |
| | disk kept | 0.35 GB/h | 0.085 GB/h raw | 160p video only | 1 TB free, fine | | |
| Lessons: a frame-count timeout is a wall-clock timeout only on the renderer it was tuned on; slice threading does | |
| nothing on one-slice x264 files; at 284x160 driving NVDEC/NVENC through the driver costs about what software decode | |
| does, so GPU video helps only where pixels are many (1080p60 sources) and frames stay on the GPU; the arithmetic in | |
| ffmpeg's GPU path is 5.9 ms per minute of video, the codec engines and driver calls are the rest; measure 160p vs | |
| 360p on the downstream model (IDM +1% camera error) rather than on pixels. | |
| State at 15:20: 2,067 h of ranked VODs downloaded (2,033 prepped), 2,477 h pending of which ~2,200 h expected live | |
| (age sample), 1,912 h already expired; new ranked runs with VODs arrive at ~272 h/day. 651 h have exact replay labels | |
| (3,732 pairs); 1,370 h wait for IDM labels (mcsr-label on GPU 0, resumable; ~9 h at ~3,000 fps on one GPU, ~2.5 h | |
| on four). Renders 90 h done, 1,930 h of decoded replays renderable (fleet stopped). Not yet pulled: speedrun.com | |
| verified 1.16.1 RSG runs (>= 6,700 h, YouTube); VPT contractor data (~2,500 h est., GUI actions, not speedruns). | |
| Also fixed today in download.py: runs past the VOD end, still-streaming VODs (30 min cooldown), fMP4 init segments, | |
| audio-only VODs (marked gone), per-VOD exceptions no longer kill worker threads. | |
| ## 2026-09-26 15:20-15:40 - IDM labeling on all 4 GPUs, decoded runs staged in VRAM | |
| - slippi-ai freed GPUs 1-3. Host RAM was the limit for more labelers: one GPU worker held 4.74 GB (two whole-run | |
| host buffers), and mcsr-download held 9.9 GB anon (each run's segments kept until the write; ~0.9 GB for a | |
| 15-min 1080p60 run x 8 source workers). | |
| - idm_label_ours.prefetch now decodes straight into VRAM: two pinned 512-frame staging chunks on the host, chunk | |
| copies on a side stream into one of two VRAM run slots, overlapped with decoding and the previous run's labeling. | |
| Frames byte-identical to the old decode (2 runs checked). download.py writes each segment as its turn comes. | |
| - Result: labeler 7.2 GB host for 4 GPUs (5.3 GB for 1 before), download anon 3.9 GB, available RAM 14 -> 20 GB. | |
| 4 GPUs: 14,600 labeled frames/s (~3,650 per GPU, ~730 h of gameplay per hour), SM 71-76% (rest: per-forward .cpu() | |
| syncs and the per-run npz write). Service mcsr-label re-scans every 5 min (launch_data.sh: LABEL_GPUS=0,1,2,3). | |
| Backlog at 15:36: 8,827 runs (~1,500 h), ~2 h; then it keeps up with downloads (~600-650 h/h). | |
| ## 2026-09-26 16:15-16:40 - B300 again (Vision reservation) vs tetra, measured on our training config | |
| - Vision (vision.infinity.inc, procedure in ~/dev/infinity-relay/metarepo/.agents/skills/vision-hardware/SKILL.md): | |
| verda-b300-1x-04 unreserved and idle (30 CPUs, 250 GB RAM, /mnt/data 232 GB free); also unreserved: verda-b300-1x-03 | |
| (850 GB free on /data) and verda-b300-8x (8 GPUs, 3.9 TB free; tetra has no ssh host key for it). 01/02/05 held | |
| by colleagues. Reserved 04's GPU (resv_a80b1a23-523b-447d-8e82-ddb00c5f107f, dev_47a64129-ccc6-4342-8ea5-b78c90817b6e) | |
| 16:22 MT until 2026-09-27 04:22 MT. Task dir /mnt/data/mcsr (code + uv venv), tmux mcsr. Cleanup = release the | |
| reservation + delete /mnt/data/mcsr + tmux mcsr. | |
| - scripts/b300_stage.py: frozen, byte-capped snapshot (190 GB: renders 90 h, replay-truth pairs 659 h, IDM-labeled | |
| 536 h = 1,285 h), 32 byte-balanced rsync streams: 13.2 MB/s (16 streams did 19 MB/s last night), ETA ~20:25. | |
| - Same config (policy, conv encoder, size l 532M, batch 16x256, T 256, cudnn benchmark, cuDNN attention, stem | |
| padded, bf16, compiled), train GFLOP/frame 24.1: | |
| B300: 28,209 fps real = 680 TFLOPS achieved (0.40 of its 1,710 measured matmul burst; power-capped ~1,094 sustained). | |
| RTX PRO 6000 x1 (synthetic): 9,598 fps = 231 TFLOPS (0.57 of its 408 measured), 51.7 GB. B300 = 2.94x one PRO 6000. | |
| RTX PRO 6000 x3 DDP (GPUs 0-2): 20,043 fps, 70% scaling (613 vs 427 ms/step): 532M params = 1.06 GB of bf16 | |
| gradients per step over PCIe through the host bridge (topology NODE, no NVLink), ~186 ms not hidden. | |
| 4 GPUs projected ~25-26k fps (~0.9x one B300) at that efficiency; gradient accumulation (one all-reduce per k | |
| micro-batches) is the fix for scaling, not yet in train.py. | |
| - mcsr-label crashed on "database is locked" (60 s timeout, shared index DB): insert now retries up to 5 min; | |
| restarted 16:36 on GPUs 0-2 (nv2-lanes gpugen holds GPU 3 at 93% SM). Backlog 1,726 h, ~4 h on 3 GPUs. | |
| ## 2026-09-26 16:45-17:30 - sm_120 training profile, cuDNN vs CUTLASS implicit GEMM, clean DDP scaling | |
| Config: 532M policy (conv encoder, size l), batch 16 x 256, cudnn.benchmark, cuDNN attention requested, stem padded, | |
| bf16, compiled; one RTX PRO 6000 unless noted. | |
| - GPU kernel time per step (torch.profiler, 4 steps, Triton rows de-duplicated: the table in train.py --profile lists | |
| each Triton kernel twice): 419 ms = cuDNN convs 263.9 (63%), Triton GroupNorm 51.9 (12.4%), Triton elementwise | |
| (GELU/add/cast/input prep) 50.6 (12.1%), GEMMs 35.5 (8.5%), optimizer 14.8, attention 1.5 (FA2 flash_fwd on | |
| sm_120, not cuDNN). | |
| - cuDNN 9.24 picks, on sm_120, Ampere-generation kernels for every conv: sm80_xmma fprop/dgrad/wgrad implicit GEMM | |
| and CUTLASS 2.x (cutlass__5x_cudnn, s16816 = mma.sync m16n8k16). mma.sync is the full-rate bf16 tensor path on | |
| sm_120 (no tcgen05); measured issue peak ~548 TFLOPS (cuda-build-blackwell notes); cuBLAS 8192^3 ~408. | |
| - scripts/conv_shapes.py (cuDNN per shape, 4096 frames): stage1 (96 ch, 64x36) 239-270 TFLOPS; stage2 284-310; | |
| stage3 351-372; stage4 359-408; stem 4x4/4 memory-bound 109-114 (input 4.8 GB/step after padding 9->16 ch). | |
| Same-M/N/K dense cuBLAS GEMMs are slower than cuDNN on these tall-skinny shapes (not a ceiling). | |
| - kernels/conv_bench.cu (CUTLASS 4.8, 2.x implicit GEMM, kOptimized iterators, Sm80 mma.sync, exact check vs host | |
| reference, 4096 frames): best tile per shape beats cuDNN by 4.6-11.3% on 9 of 11 fprop/dgrad shapes (stage3 fprop | |
| 3.85 vs 4.34 ms, 128x128x64 s3; stage4 fprop 4.14 vs 4.65, 128x256x32), loses 2-5% on down2/down3; fprop+dgrad | |
| 164.9 -> 151.8 ms/step (13 ms). Best kernels top out at ~425 TFLOPS = 78% of mma.sync peak. 96-wide tiles | |
| (128x96, 256x96) compile but give wrong results (MISMATCH) with the default smem iterators. wgrad not yet tested | |
| (stage1 wgrad reduces over 9.4M with a 96x864 output: needs split-K). | |
| - ncu (one step, 11 metrics) was OOM-killed at 293/~900 kernels: kernel replay backs up the 52 GB of device memory | |
| in host RAM (60 GB box). Partial audit (forward + early backward, base clocks): sm80_xmma fprop 89.6% tensor-pipe, | |
| cutlass__5x_cudnn 74.7%, Triton elementwise/norm 86% memory SOL; recoverable at 85%/90% targets ~5%. | |
| Next capture: --replay-mode application or a smaller batch. | |
| - DDP correction: the 16:30 3-GPU run (20,043 fps, 70% scaling, "186 ms all-reduce") shared GPU 0 with nv2-lanes | |
| gpugen. Clean GPUs 0,2,3: 26,475 fps = 92% scaling (464 ms/step). Gradient accumulation with no_sync hits a DDP | |
| internal assert under static_graph and "unused parameters" without it; reverted, not needed at 92%. | |
| - 4 GPUs measured with co-tenants (GPU 1: cuda-song gen.py/score.py 23 GB; GPU 0: our download NVDEC ffmpegs at | |
| 87% SM): 532M 27,813 fps, 187M 68,057 fps (B300: 532M 28,209 real; 187M 50.1k synthetic before fixes). Clean 4-GPU | |
| projection for 532M ~35k fps. | |
| - Where the next per-GPU time is: GroupNorm + elementwise = 102 ms/step (24%), memory-bound at ~86% SOL; fusing | |
| norm-apply + GELU into the conv operand load (CUTLASS mainloop fusion, cf. examples 25/26) and group stats into | |
| the previous conv's epilogue removes whole activation passes (forward and backward) - the control cuDNN via torch | |
| does not give. CUTLASS tile selection alone: ~5% of the step. | |
| - Download backlog 17:26: 927 h pending, of which 674 h (3,515 runs) source-only 1080p60 at ~50-60 h/h (link-bound): | |
| ~11-14 h, and its NVDEC work holds GPU 0 at ~87% SM. Labels: 1,907 h waiting (labeler on GPUs 2,3). | |
| - 17:30 CUTLASS wgrad (serial split-K, fp32 dW, exact vs host reference): stage1 6.33 ms (split 48) vs cuDNN 6.54; | |
| stage2 6.01 vs 5.50 (cuDNN wins); stage3 4.27 vs 4.46; stage4 4.39 vs 4.85. Best-of CUTLASS/cuDNN per shape over | |
| fprop+dgrad+wgrad saves ~16.5 ms of the 419 ms step (~4%). Kernel selection is not where the time is. | |
| ## 2026-09-26 17:40-19:25 - ConvBlock kernel campaign (flywheel + optimizer subagent) | |
| - kernels/convblock/: BRIEF.md, locked harness/ (common.py contract, validate.py quick|full vs fp32 truth with a | |
| 2x-of-bf16-training-path tolerance on y and all 5 grads, benchmark.py quick|stride|full timing fwd+bwd at 4096 | |
| frames against the compiled training path in the same process and refusing a shared GPU, ncu_profile.py for | |
| ncu --replay-mode application), experiments/ record (summary.md, LESSONS.md, profile.md, exp_N/), target/ = its | |
| own git repo (pristine e5f7ec6 = the training path). harness_rev 701769a873bf. | |
| - Pristine on GPU 1: quick 174.6 ms, full 490.8 ms per training step of ConvBlocks (fwd+bwd, 8 shapes x 2 blocks), | |
| speedup 0.999 (noise ~0.5%). 532M (l) blocks: 325 ms/step vs ~182 ms of conv FLOPs at 425 TFLOPS; l/stage1 56.7 | |
| ms/block vs a 22.1 ms conv floor (norm/GELU/cast passes dominate at 96 ch, 36x64). | |
| - Optimizer subagent (Opus 5.5) launched 19:25 on GPU 1 only, stop at full-tier 1.6x, 30 experiments, 6 h, or a | |
| diagnosed plateau. Labeler on GPUs 2,3; download NVDEC on GPU 0. | |
| - Harness gotchas fixed before locking: dynamo recompile limit (8) made later shapes' baseline eager; a harness file | |
| named profile.py shadowed the stdlib module torch.compile imports. | |
| - 19:37: cuda-song (gen.py + score.py, another project) took GPU 1 again; the campaign moved to GPU 3 (subagent told to | |
| re-measure pristine there), the IDM labeler to GPU 2 only (1,748 h left, ~4,100 fps on one GPU). | |
| ## 2026-09-26 19:45-20:15 - IDM labeler 4x: padded stem, torch.compile, less window overlap, parallel decode | |
| - Profile of labeling one run (eager, idle GPU 2, scratchpad idm_bench.py): GPU 99% busy but 82% of kernel time | |
| elementwise/copy, convs 14%: cuDNN nhwcAddPaddingKernel alone 21% (the 15-frame tubelet makes a 45-channel stem | |
| input; cuDNN pads it to 48 every forward), then the eager tubelet gather/cat, casts, add. | |
| - 3 runs, 35,661 frames, idle GPU: current 6,977 fps; + cudnn.benchmark + inference_mode + no per-forward .cpu | |
| 6,894 (not the bottleneck); + torch.compile 9,320; compiled + stem weights zero-padded 45->48 (conv_in_pad, | |
| pad fused into Inductor's input kernel) + 16 windows 18,661 (2.7x); + stride 3T/4 (keep the middle 192 of 256) | |
| 11,429 vs 9,320 at T/2 in the same compiled setup. | |
| - Accuracy on 24 held-out pairs (302,198 frames, replay truth): current yaw/pitch MAE 1.2538/0.7378; compiled+padded | |
| 1.2541/0.7374; + stride 3T/4 1.2546/0.7389; + 7T/8 1.2570/0.7388; key F1s within +-0.004. Camera-bin agreement | |
| with the current labels: compile 99.46% (bf16 rounding), 3T/4 97.7%. | |
| - idm_label_ours.py: load_idm (pad stem, compile, cudnn.benchmark), label_video keep=192 bs=16 fixed-shape batches, | |
| outputs on GPU until one copy per run, inference_mode; N decode producer threads per worker sharing the run list. | |
| Live, one process, GPU 2: ~14,300 fps steady (was ~4,100); 6 decode threads 9,800 (GIL/CPU contention, GPU idle | |
| between bursts); two processes on GPU 2 (--gpu-ids 2,2): 17,309 fps, GPU SM 57%: decode-bound. Next lever: NVDEC. | |
| - Deployed 20:13: mcsr-label --gpu-ids 2,2 --decode-threads 3. Labels from earlier runs (old path) are kept. | |
| ## 2026-09-26 20:15-20:30 - the index DB was the labeler's (and every daemon's) bottleneck | |
| - After the session restart the live labeler ran at ~4,600 fps (17,300 in the isolated test). Workers idle at ~35% | |
| CPU, 319 Python threads in futex waits. Cause: SQLite write-lock waits of 5-52 s (`begin immediate; rollback;` | |
| timed 5x). The /home NVMe was I/O-saturated (PSI io full avg60 27.5%, avg300 33.9%; 120-133 requests in flight) | |
| and synchronous=FULL (default) made every commit of ~30 writers (download workers, prep, pairs, labeler) wait | |
| for an fsync in that queue. /proc/locks: write locks held by prep and download in turn. | |
| - Fix: mcsr/db.py connect() sets PRAGMA synchronous=NORMAL (WAL: no fsync per commit; safe against process | |
| crashes, loses at most the last commits on power loss); idm_label_ours.py writes npz + batched index rows from a | |
| writer thread (own connection, NORMAL) so the GPU loop never waits on the disk. Restarted download, prep, pairs, | |
| replays, replay-arrays, scrape, label at 20:25. | |
| - After: write-lock acquire 0-0.8 s; labeler 21,830 fps from two processes on GPU 2 (4.7x the stalled rate, 5.3x the | |
| 4,100 fps of this afternoon), GPU 2 SM 71%. Backlog 1,703 h -> ~1.6 h. | |
| - ConvBlock campaign: the optimizer subagent stopped with the session after exp_3 (a551535: GELU, residual and GELU' | |
| fused into CUTLASS conv epilogues; stride 296.740 ms, 1.092x; exp_1 Triton scaffold 1.019x, exp_2 CUTLASS | |
| per-shape tiles incl. 96-wide fprop with a 1-element epilogue 1.029x). Not resumed. | |
| ## 2026-09-26 21:30-21:45 - B300 released; IDM next on tetra | |
| - B300 IDM throughput before cleanup (synthetic, batch 16x256, 15-frame tubelet, stem padded, cudnn.benchmark, cuDNN | |
| attention): m (76.5M, 6.1 GFLOP/frame) 61,319 fps, MFU 0.218; base (187M, 10.9) 50,797 fps, MFU 0.325. idm-final | |
| (m, same window) trained at 10,260 fps on one RTX PRO 6000 without those flags (MFU 0.153). | |
| - data.py decode_window: FRAME threading x2 instead of SLICE x2 (one slice per frame = one thread): ~4,700 fps per | |
| loader process on busy tetra. | |
| - Cleanup (Elliot needs the box): killed tmux mcsr, removed /mnt/data/mcsr (192 GB: code, venv, uv cache, 177 GB | |
| staged snapshot), /tmp/uv-6b3dcf65b122cddc.lock, stale /tmp/tmux-0/default (no tmux server left). /mnt/w not | |
| touched (not ours). Box after: / 26 GB free, /mnt/data 216 GB free, 81 GB RAM free, B300 idle, no processes. | |
| Lease watchdog on tetra stopped; Vision reservation resv_a80b1a23 released 21:43 (allowed=false, no holds listed). | |
| ## 2026-09-26 21:45-22:10 - IDM on tetra: full profile (torch.profiler, nsys, ncu), FP8, delegation | |
| IDM m (76.5M, 15-frame tubelet, 6.1 GFLOP/frame), one RTX PRO 6000, batch 16x256: | |
| - Throughput, real data, 160 steps: old flags (idm-final: batch 8, no stem pad, no cudnn.benchmark) 10,048 fps, | |
| MFU 0.151; new (batch 16, --conv-in-pad, --cudnn-benchmark, --attn cudnn) 22,700 fps (180 ms/step, data wait | |
| <1 ms) for ~120 steps, then 11.7-12.3k fps with data wait 26-31 ms. | |
| - torch.profiler (dedup): 226 ms GPU kernel time/step = cuDNN convs 139.8 (62%), Triton input prep + elementwise 42.2 | |
| (18.6%; the single biggest kernel 15.5 ms: uint8 -> 15-frame stack -> scale -> pad 48 -> bf16 channels_last, | |
| ~14.5 GB written), GroupNorm 26.0 (11.5%), H2D copies 8.0 (overlapped), GEMMs 6.6 (2.9%), optimizer 3.0, | |
| attention 0.6. Data wait 7.8 ms/step during the profile. | |
| - nsys (25 s capture after 120 s warmup, CPU sampling): data wait 206-222 ms of a 400-420 ms step; GPU busy 37.3% of | |
| 23.6 s, 102 idle gaps > 10 ms (61% of the window, median 32 ms, max 2.9 s). The nsight-systems skill's bundled | |
| Python is missing on tetra; used nsys stats directly. | |
| - Loader (CPU-only benchmark, trainer's exact DataLoader): 7 workers 9,161 fps (I/O pressure full ~30%) and 14,478 | |
| fps a minute later (7%); 14 workers 6,025. One worker: 202 ms per 256-frame window = decode ~118 ms, av.open ~30 | |
| ms (reopened per window), ~40 ms of file reads (labels/index re-read), per-frame hstack in to_ndarray; collate ~15 | |
| ms per window. The loader, not the GPU, bounds IDM training on this box. | |
| - ncu, kernel replay at batch 4 (application replay fails: cudnn.benchmark picks differ per process; the report was | |
| never written): 634 kernels; cuDNN CUTLASS 2.x conv kernels 66% tensor SOL time-weighted (some wgrad grids too | |
| small at batch 4); input-prep kernel 80% of DRAM SOL (only removable, not tunable); GroupNorm 78-86% memory SOL. | |
| - FP8 on sm_120 (exclusive GPU 1, torch._scaled_mm e4m3 vs bf16 matmul): 8192^3 784 vs 403 TFLOPS (1.94x); | |
| 16384x1536x1536 650 vs 339 (1.92x); 65536x768x3072 642 vs 363 (1.77x); 65536x3072x768 557 vs 320 (1.74x). A first | |
| run on a GPU shared with two labeler processes gave 0.58x at 8192^3 (discarded). FP8 on the IDM's GEMMs (2.9% of | |
| the step) is worth ~1.5%; the 2x would need FP8 implicit-GEMM convs (62% of the step), custom on sm_120. | |
| - Delegated 22:07 (two Opus 5.5 subagents, campaign layout per the kernel-campaign skill): kernels/loader/ (target = | |
| copy of mcsr/data.py, goal >= 40k fps delivered per process, bit-identical batches; CPU + GPU 2 for NVDEC | |
| experiments) and kernels/convblock/ + new kernels/stem/ (IDM m shapes added to the ConvBlock harness, fused | |
| 15-frame uint8 stem fwd + weight grad; GPU 1). Labeler moved to GPU 0 (1 process, trickle of new runs). | |
| ## 2026-09-26 23:00-23:40 - fused kernels integrated: IDM step 1.52x (3.4x vs idm-final's config) | |
| - Kernel subagent result (5 experiments, ~45 min of runs, 2 h 45 min wall): kernels/stem b066c81 (fused uint8 | |
| 15-frame stem: fwd fp16 mma reading frames directly, chroma 2x2 weight folding, wgrad with an smem frame ring; | |
| full tier 5.332 vs 88.443 ms = 16.59x; m 18.42x, base 15.12x; errors below the bf16 training path's) and | |
| kernels/convblock c9d7f65 (harness rev adds the IDM m shapes; per-shape tile table, per-image fused GroupNorm | |
| fwd/bwd in Triton, direct C=48 conv/wgrad kernels for m/stage1: m tier 86.663 vs 121.535 ms = 1.408x, 12 shapes | |
| 516.711 vs 621.198 = 1.202x). Did not pay: GroupNorm/GELU applied in the conv operand load (+0.6 ms per wgrad); | |
| FP8 failed the tolerance. | |
| - Vendored into mcsr/fused/{convblock,stem} at those commits (relative imports; extensions JIT-build under | |
| .cache/torch_ext, ~70 s for both on first use with MAX_JOBS=4). Config.fused / train.py --fused: ConvBlock.forward | |
| calls conv_block (autocast off, bf16 channels_last), VideoActionModel.encode runs the fused stem for the 15-frame | |
| tubelet with 48/64 stem channels, then ConvFrameEncoder.after_stem. | |
| - Numerics (idm-final weights, real 2x256 batch, vs fp32 truth): outputs 2.32e-3 (training path 2.87e-3); grads median | |
| 1.28e-2 (1.80e-2), worst 2.73e-2 (3.38e-2); per-parameter error ratio fused/training-path median 0.78, max 1.32, | |
| 0 of 97 above 2x. Camera/key argmax agree with the unfused model on 99.1/99.2% of frames. | |
| - Speed, synthetic IDM m, batch 16x256, one RTX PRO 6000 (GPU 1 exclusive): new flags 22,681 fps (180.6 ms/step); | |
| + --fused 34,444 fps (118.9 ms/step) = 1.52x; idm-final's config was 10,048. MFU printed under --fused is wrong | |
| (the FLOP counter does not see the custom kernels). torch.compile graph-breaks at each fused call (custom | |
| autograd Functions); registering them via torch.library.custom_op is the known next step. | |
| ## 2026-09-26 23:45 - new loader integrated; IDM v2 training (base, fused, 2 GPUs) | |
| - Loader subagent result (5 experiments, ~1 h): kernels/loader 4c3461d, same-session A/B 7 workers each: median | |
| 114,754 vs 19,228 fps (rounds 88.7k/114.8k/118.4k vs 20.8k/13.3k/19.2k), byte-identical batches (full validate: 296 | |
| windows, 7 configs incl. pairs, renders, rank 1, T=128 unpinned, overlay, EOF/missing-file faults). Steps: own mp4 | |
| sample-table parser + bare h264 context (no av.open/seek/to_ndarray); whole batches per worker, thread-pool decode | |
| into a shared-memory batch; ring of batch buffers allocated before fork; catalog of every run's sample table + | |
| labels loaded once (1.1 GB, 10-22 s first batch), one pread per window. 20-27 cores, 8.2-9.7 GB PSS per process. | |
| Did not pay: more parallel IO (per-window latency 301 -> 978 ms); IO-stage split alone (0.71x). | |
| - Integrated: mcsr/data.py = target 4c3461d (old API kept + make_loader/Batches/RingLoader/loader_worker_init); | |
| train.py make_batches uses make_loader; train.py's duplicate loader_worker_init removed (same nice 10 + 1 thread). | |
| - End to end, real data, IDM m, --fused, one GPU: 34,568-34,960 fps, data wait 0.8 ms flat over 400 steps | |
| (idm-final's config 10,048; yesterday's flags loader-bound ~12k sustained). | |
| - DDP + --fused crashed in Dynamo's DDPOptimizer ("'int' object has no attribute 'meta'" splitting graphs around the | |
| custom autograd Functions): train.py sets torch._dynamo.config.optimize_ddp = False when ddp and fused. m on GPUs | |
| 1,2: 42.3-47.5k fps with data wait 75-104 ms (two 7-worker loaders compete for CPU/IO). | |
| - base IDM (187M) fused, synthetic, one GPU: 22,317 fps. Two GPUs: GPU-bound, matched to the two loaders. | |
| - 23:23 mcsr-train-idm2 (systemd, GPUs 1,2): base, 15-frame tubelet, replay+render (775.9 h, 4,481 runs), data | |
| frozen --before 1790486597 (logs/idm2_before.txt), batch 16x256 per GPU, 40k steps, warmup 1000, val every 2000, | |
| ckpt every 5000, fused + new loader. Step 700: 42,400 fps, 193 ms/step, data wait 2.4 ms; ETA ~01:35. RAM: 8 GB | |
| available while training (OOMScoreAdjust -200 on the trainer). Next: eval_idm --before 1790395538 (fixed 37 | |
| held-out pairs; idm-final cam_ce 0.889, yaw MAE 1.32) and relabel if better. | |
| - 23:35: IDM v2 slowed from 42.4k to ~34-36k fps after warming up: GPUs 1,2 at the 600 W software power cap (throttle | |
| reason 0x4), 83 C, SM clocks 2227-2310 MHz. RAM fell to 2 GB available: the downloader (only source-only 1080p60 | |
| VODs left, all 24 workers on them, 19 NVDEC ffmpegs, 13.5 GB, GPU 0 at 92%) while the link was saturated (122 MB/s) | |
| with 58 h left. Restarted it with 8 workers: 5.3 GB, 12 GB available, link ramping. ETA ~01:55. | |
| - scripts/idm2_eval_watch.sh (unit mcsr-idm2-eval, GPU 0): scores step5000..40000 + best.pt on the fixed 37 held-out | |
| pairs as they land -> logs/idm2_eval.log. | |
| - 23:50 GPU allocation change (Elliot): this project gets GPUs 1, 2, 3; GPU 0 goes to the other project (nv2-lanes, which | |
| moves most work to NvBuild). Moved download NVDEC (MCSR_NVDEC_GPUS=3, launch_data.sh default now 3), the IDM labeler | |
| and the idm2 eval watcher to GPU 3 (nv2's s6batch still there until it moves). New fans near the box; at 23:45 | |
| GPU 1 was 89 C and GPU 2 84 C at the 600 W cap. IDM v2 step 5400 at 36.9k fps. | |
| - 23:55 IDM v2 val (211 val runs, camera CE): step 2000 0.962, 4000 0.894, 6000 0.862. Elliot: switch to 3 GPUs with a | |
| larger batch. GPU 3 still has nv2's s6batch (other project), which would gate DDP, so scripts/idm2_switch3.sh (unit | |
| mcsr-idm2-switch) waits until GPU 3 has no other project's processes and the next checkpoint lands, then stops the | |
| labeler and eval watcher, moves download decode to the CPU (MCSR_NVDEC_GPUS empty -> CPU fallback) and resumes on | |
| GPUs 1,2,3 (--resume stepK --continue, global batch 48 sequences, 5 loader workers per rank for RAM, --steps | |
| K + (328M - K*8192)/12288 to keep the planned frames). Log: logs/idm2_switch.log. | |
| - 00:02 GPU 0 idle (0%, 2 MiB); the other project's s6_sweep.sh (CUDA_VISIBLE_DEVICES=3, ~233 recordings, 24 done in | |
| 24 min, projected ~3 h more) holds GPU 3. IDM v2 had ~1.8 h left on 2 GPUs, so waiting for GPU 3 would never pay: | |
| idm2_switch3.sh now takes GPU 3 if it frees up or GPU 0 if idle first, profiles one fused step on that GPU while | |
| waiting for the checkpoint, and keeps download NVDEC on GPU 3 when it took GPU 0. | |
| - Fused base IDM step profile (GPU 0, one GPU, synthetic, torch profiler; logs/idm2_fused_profile.txt, | |
| prof/prof-idm2-fused/trace.json): GPU busy 99.5% of the time on one stream (the graph breaks around the fused ops cost no GPU | |
| idle time); ~178 ms of kernels per step (the trace holds ~5.5 steps, not 4: an earlier 243.8 ms/step divided by 4). Kernel split: convs 67.5%, the fused block's GroupNorm fwd/bwd Triton kernels 15.0%, | |
| GEMMs 6.6%, other Triton 4.4%, optimizer 3.1%, stem 1.6%. (The profiler's "_ConvBlockBackward" row is a GPU | |
| annotation spanning kernels, not a kernel.) 187M params -> 748 MB fp32 gradient allreduce per step over PCIe (no | |
| NVLink, topology NODE); with optimize_ddp off it runs after backward with no overlap. | |
| - 00:20 resumed step15000 on GPUs 0,1,2 (--steps 31666). Steps 60-100: 59.1-61.3k fps, 200-208 ms/step at 12,288 | |
| frames/step (2 GPUs: 37.9k). MFU (10.9 GFLOP/frame nominal): 656 TFLOPS, 219/GPU = 54.6% of measured cuBLAS peak. | |
| Labeler and eval watcher stopped (RAM: 10 GB available); rerun evals after training. ETA ~01:20. | |
| - 00:45 Elliot: hill-climb the conv kernels on GPU 0 with an agent, and a second agent on GroupNorm. Launched two Opus | |
| agents: kernels/convblock phase 2 (BRIEF.md "Phase 2": base shapes first, exp_8+) and a new kernels/groupnorm | |
| campaign (BRIEF.md; target = clone of convblock/target at c9d7f65, own extension cache). Harness revision | |
| 518aa31066d5 adds `benchmark.py --mode base` and base/stage1 + base/stage4 to quick validation. Both share GPU 0 | |
| through kernels/gpu0.sh (flock + waits for GPU 0 to be empty, so they start timing after IDM v2 ends ~01:20). | |
| mcsr/fused/convblock/__init__.py: MCSR_CONVBLOCK_REPO=<tree> runs the model on a candidate tree (end-to-end A/B). | |
| - 01:30 IDM v2 done (global step 31666, 328M frames). Val camera CE (211 val runs): best 0.7966 at step 19000 | |
| (best.pt), then 0.837 at 27000 and 0.8486 at the end (train loss 0.60): overfits after ~19k at batch 48. 3-GPU | |
| throughput 62-65k fps for the first ~2,400 steps, 57k from ~00:29, falling to 50k from ~01:02 (data wait 0.5 ms | |
| throughout; at 01:06 the GPUs drew 410-440 W at 2.54-2.66 GHz, i.e. not power-capped, so something outside the GPU | |
| kernels stalled them; the kernel agents' nvcc builds started ~00:45, cause not isolated). Held-out eval so far: | |
| step5000 cam_ce 0.898 / yaw MAE 1.319, step10000 0.856 / 1.26 (idm-final 0.889 / 1.32). Evals of best, 15000-31666 | |
| running on GPUs 1, 2. | |
| - Audit of the two kernel agents at 01:04: harness untouched (rev 518aa31066d5), all GPU runs queued through | |
| gpu0.sh, no identity caching / N-dependent paths / side streams. Closed two harness gaps in validate.py (benchmark | |
| unchanged): full mode adds base shapes at N=4096 (the size the benchmark times; before, only N=8/256 were checked), | |
| both modes add a reuse check (same tensors, values overwritten in place, called again). New rev 950b493e6ce8. | |
| - 02:17 Hardened validator (rev 950b493e6ce8) passes on c9d7f65 in full mode, including base N=4096 and all 12 reuse | |
| checks (errors 3-5e-3 vs limits 7-10e-3); both kernel agents told to use it. | |
| - IDM v2 held-out eval (fixed 37 pairs, 422,811 frames), cam_ce / yaw MAE / pitch MAE deg: step5000 0.898 / 1.319 / | |
| 0.794, 10000 0.856 / 1.260 / 0.751, 15000 0.826 / 1.249 / 0.729, best.pt (step 19000) 0.804 / 1.182 / 0.702, 20000 | |
| 0.821 / 1.216 / 0.730, 25000 0.863 / 1.235 / 0.730, 30000 0.863 / 1.226 / 0.725, 31666 0.861 / 1.228 / 0.727. | |
| best.pt vs idm-final (0.889 / 1.32 / 0.79): F1 forward 0.933 (0.91), jump 0.815 (0.77), mine 0.725 (0.55), sneak | |
| 0.868 (0.72), place 0.139 (0.03), drop 0.373. Held-out agrees with val: best at ~19k, camera worse after while | |
| action F1 keeps creeping up. Relabel checkpoint: best.pt. | |
| - 02:18 mcsr-label restarted: idm_label_ours --ckpt data/ckpt/idm2-base/best.pt --gpu-ids 1,2 (19,770 runs, npz | |
| overwritten in place). 02:22: ~13.7k fps per GPU cumulative and rising, ~100 runs per 42 s: ~2-2.5 h (projection). | |
| GPU 3 left to the other project (GPU 0 is now our kernel agents'). | |
| ## 2026-09-27 03:00- overnight autopilot (Elliot: flywheel overnight, profile what is slow, HTML demo on the MacBook) | |
| - 03:00 kernel agents resumed after the session restart (conv: exp_9 conv64 -4.0%, exp_10 wgrad64 -2.9%, exp_11 | |
| wgradt -1.9% pending; GroupNorm: exp_2 register-resident GN -3.0%, exp_3 side stream discarded, exp_4 glue). | |
| - Relabel profile: GPU SM use alternated 100% / 2% (dmon), CPU 89% idle, and 8 decode threads per process gave the | |
| same 50 runs / 38 s as 3: each labeler process is capped by its GIL (per-frame Python in the PyAV loop: to_ndarray, | |
| np.copyto, frame objects), not by decode cores. 3 processes per GPU (--gpu-ids 1,1,1,2,2,2): GPUs at ~100%, 154 -> | |
| 280 runs/min (1.8x). 03:33 Elliot: all 4 tetra GPUs are ours (the other agent moved to anvil) -> relabel on | |
| 1,1,1,2,2,2,3,3,3. | |
| - Policy launch armed (scripts/pol2_after_relabel.sh, unit mcsr-pol2-after): pol2-base = 187M policy, GPUs 1-3, | |
| batch 16/GPU, 48k steps (590M frames), EMA 0.9995, closed-loop watcher every 2nd checkpoint (llvmpipe client, policy | |
| server on GPU 3). Synthetic single-GPU policy rate with --fused: 21.2k fps (GPU 3, 03:23). | |
| - Closed loop with VirtualGL on GPU 0, lockstep, pol-final export: 69 ticks/s (policy ms/tick: yuv 0.9, encode 2.0, | |
| temporal 4.2, sample 0.4, wait for frame 5.3), 1200-tick episode in 17.4 s. scripts/pol2_final.sh (unit | |
| mcsr-pol2-final): after training, 24 seeds on 3 VGL clients, montage + versus videos, scripts/demo_page.py -> | |
| data/demo/, rsync to macbook:~/Desktop/mcsr-demo/. | |
| - Demo assets: data/demo/overlay_v1.mp4 / overlay_v2.mp4 (mcsr.overlay, held-out match 13605378 c06d492c, frames | |
| 6477-7376, the most action-dense 45 s). | |
| - 03:49 relabel done: 19,842 runs labeled by idm2-base/best.pt (9 labeler processes on GPUs 1-3 from 03:33: all 3 GPUs | |
| at 100% SM, ~360 runs/min, GPU-bound now). 03:50 pol2-base OOM-killed in 46 s by its own 36G cap: the loader | |
| catalog (labels ~17 B/frame + mp4 sample tables ~8 B/frame) of all ~4.3k h per rank x 3 ranks, doubled during the | |
| concatenate. train.py --shard-runs: each DDP rank samples its own items[rank::world] (catalog / world). 04:00 | |
| relaunched (rank 0 shard 7,795 runs, 1,423 h): 59.2k fps (19.7k/GPU = 93% of 3x the 21.2k single GPU), data wait | |
| 0.6 ms, GPUs at the 600 W cap (2.16-2.46 GHz). Cgroup: anon 22.0 GB + shmem (batch rings) 15.8 GB against 38.7 GB, | |
| no reclaimable cache: raised live to MemoryMax=42G. ETA ~06:50. | |
| - 04:10-04:15 both kernel agents stopped by their rule. conv 6c33a34 (+2588333 docs): base tier 1.355x vs compiled | |
| path (c9d7f65 1.21x), e2e +10.6%; the hardened full validate caught a conv64 bug (staged epilogue overwrote the | |
| halo's zero padding: wrong at base/stage1 once a CTA runs a 2nd tile, N > ~10; exp_9-16 affected, fixed in exp_18 | |
| at no cost). GroupNorm deaaab0: GN per step 26.5 -> 17.4 ms (at the bandwidth floor), e2e +7.2%; two optional mcsr | |
| patches (head gn_gelu_flatten, stem eager) +1.2% more, not applied. | |
| - Merged tree kernels/merged/target ddc47f7 (conv 2588333 + GN deaaab0, 2 docstring/bwd conflicts resolved): full | |
| validate 40/40 (rev 950b493e6ce8), base tier 118.8 ms = 1.406x vs compiled path (167.1), e2e base IDM synthetic 1 GPU | |
| interleaved: vendored 21,290 / 20,907 vs merged 24,269 / 24,054 fps = +14.5%. scripts/pol2_switch_kernels.sh (unit | |
| mcsr-pol2-switch) resumes pol2-base from step15000 with MCSR_CONVBLOCK_REPO=kernels/merged/target (real-data check). | |
| - pol2-base throughput 59.5k -> 56.3k fps within the first 1,500 steps: GPUs at the 600 W cap, 83-89 C, GPU 3 slowest | |
| (2.18 GHz), DDP paced by it. The 62k -> 50k IDM slowdown and a 59.2k -> 55.6k dip during my nvcc build point at CPU | |
| contention too (the step has Python-launched segments; data wait stays 0.6 ms). | |
| - Closed-loop watcher moved to GPU 0 with VirtualGL (play_watch passes VGL from its environment; unit -E VGL=1, | |
| --gpus 0, --every 1): 24 seeds in 8.5 min vs ~20 min on llvmpipe. pol2-base step5000 (61M frames) 21.8 m path / | |
| 17.1 net / 3 deaths; step10000 (123M frames) 65.7 / 36.8 / 10 deaths: already above pol-final's final (34.3 net at | |
| 410M frames; its step100000 36.5). | |
| - 04:55 pol2-base resumed from step15000 on the merged kernels (MCSR_CONVBLOCK_REPO=kernels/merged/target): loss | |
| continuous (0.96 before; 0.79-1.04 after, batch noise), steady 64.8k fps vs 55.7-56.2k before at the same power | |
| cap and temperatures = +15.6% in real training (synthetic A/B +14.5%). ETA ~06:40. | |
| - SigLIP2 so400m-patch14-384 (Elliot's backbone idea), measured on GPU 0 (bf16, SDPA, batch 64, forward only, sharing | |
| GPU 0 with an eval client): vision tower 428M params; 384 px (729 tokens) 309 frames/s = ~193 TFLOPS; 224 px (256 | |
| tokens, interpolated pos-emb) 928 frames/s. Our IDM v2 labels ~30k frames/s per GPU (whole model). One labeling pass | |
| over the 3.7k h (266M frames) at 224 px: ~20 h on 4 GPUs (60 h at 384); fine-tuning ~3x slower per frame. Weights | |
| were cached under .cache/hf_siglip_tmp and deleted (HF_HOME=/data/hf is root-owned). | |
| - Disk: /home 97% used, 138 GB free, falling ~1.3 GB/h (downloads + prep): ~100 h of headroom; data/ckpt holds 241 GB | |
| (old checkpoints are the first thing to prune). | |
| - pol2-base closed loop (24 seeds, net m / path m / deaths): step15000 37.8 / 84.1 / ?, step20000 36.0 / 77.1 / 11. | |
| Val camera CE 0.934 (10k) -> 0.916 (15k) -> 0.902 (20k). Distance plateaus at ~36-38 m net like yesterday's flat | |
| curve. Deaths: all 11 at step20000 (and all 7 of yesterday's final-187m) are gradual HP loss below sea level (y | |
| 30-61) = drowning after imitating the speedrunners' shipwreck dives without resurfacing; tonight's policy dives more. | |
| - Closed loop vs val loss, pol2-base (net m / path m / deaths per 24 eps; val loss): 25k 44.5 / 92.0 / 10, 0.945; | |
| 30k 29.7 / 75.5 / 7, 0.936; 35k 22.3 / 60.4 / 6, 0.929; 40k 18.6 / 51.1 / 4, 0.925. Val loss falls monotonically | |
| through the 04:55 kernel switch (kernels train fine); the game score peaks mid-run. Mechanism check from the state | |
| logs: time to first move stays 2-4 s (not the copycat idle start), but time standing still (<0.2 m per 10 ticks) | |
| rises 46% (20-25k) -> 61-63% (35-40k); yesterday's final 54%; humans on the same 24 seeds 34% (48 replays). The | |
| policy learns when speedrunners stop (to craft / manage inventory) without having GUI actions, so the stops are | |
| dead time: imitation loss is not the objective; GUI actions and RL next. Final eval now also plays step25000 | |
| (optimistic: picked on these seeds). | |
| - 06:45 pol2-base done (48k steps, 590M frames; final val loss 0.9225, camera CE 0.871). Per-checkpoint closed loop | |
| (1 VGL client, 24 eps): 45k 28.5 net / 4 deaths, 48k 30.4 / 3. | |
| - scripts/pol2_final.sh (06:45-07:09): 3 VGL clients in parallel, 2 samples per seed: pol2 final 20.5 +- 4.2 net | |
| (9 deaths / 48), yesterday's final re-run 27.3 +- 5.8 (16), pol2 step25000 34.9 +- 6.8 (15); montage/versus/page | |
| copied to the MacBook 07:09. But the 3-parallel setup is biased: the same step48000 weights scored 18.0 / 23.0 net | |
| in the parallel passes vs 30.4 (watcher) and 34.6 (single client, slot 0, 08:31) with similar path length (51-71 vs | |
| 64): 3 clients sharing GPU 0 lose 10-15 m of net displacement (suspect frame timing / stale frames under VGL with | |
| several clients; not isolated). Final numbers are re-measured single-client only (y187-single, s25-single). | |
| - A Minecraft client hung at world load ("Preparing spawn area: 87%") after 12 of 24 episodes (08:44); SIGTERM did not | |
| stop the JVM, kill -9 did. play_eval.sh's client timeout is 1 h; a per-episode watchdog would bound this. | |
| - Vendored the merged tree as mcsr/fused/convblock_next (relative imports, extensions renamed cb_conv_ext_m1 / | |
| cb_gn_ext_m1 so they never collide with the old cb_conv_ext build): built in 39 s, harness full validation of the | |
| vendored package on GPU 1: 40/40 (incl. base N=4096 and reuse). Swap into mcsr/fused/convblock after the evals. | |
| - Single-client finals (1 VGL client, lockstep, T=1, 24 held-out seeds; mean net m +- 95% CI / path m / deaths): | |
| tonight's final (EMA step48000; watcher run + 08:31 run, 48 eps) 32.5 +- 8.8 / 63.8 / 9; yesterday's final-187m | |
| (y187-single, 24 eps) 29.1 +- 9.4 / 71.3 / 4; tonight's step25000 (s25-single, 24 eps; picked on these seeds) | |
| 33.2 +- 11.2 / 90.3 / 8. Per-episode sd ~30 m: no measurable difference in 60-s distance from 5x more labeled | |
| footage, while val loss improved throughout. Demo videos regenerated from pol2-final-single. | |
| - 09:15 merged kernels vendored as the default: mcsr/fused/convblock = kernels/merged/target ddc47f7 (relative imports, | |
| cb_conv_ext_m1 + cb_gn_ext_m1). Smoke: base IDM synthetic, GPU 1, no MCSR_CONVBLOCK_REPO: 26.1k fps (c9d7f65 was | |
| ~21-22k). Demo: data/demo/ (scripts/demo_page.py) -> macbook:~/Desktop/mcsr-demo/index.html. | |
| ## 2026-09-27 13:40- macro actions (Elliot: "get the macro actions working"; no GUI actions in the policy) | |
| - Fabric mod (~/dev/mcsr-render/mod, Macros.java): the policy reply's reserved 4th int is a macro code (Macros.NAMES: | |
| loot, planks, crafting_table, stick, wooden/stone/iron_pickaxe, furnace, smelt); job.macros = off | policy | auto | |
| (rule scheduler: loot anything within 4 blocks, then one craft/smelt per 5 ticks along logs -> planks -> table -> | |
| sticks -> wooden -> stone -> furnace/smelt -> iron pickaxe); best tool for the targeted block is swapped into the | |
| hand while attacking. Relaxations: 3x3 recipes/smelting need the table/furnace in the inventory or within 4 blocks; | |
| smelting is instant with real fuel; looting needs no line of sight. Events -> <out>.macros.jsonl. Test hooks | |
| job.testKit / job.testChest. play_eval.sh: MACROS=, TICKS=, TESTKIT=, TESTCHEST=, MINELOCK=1 (jar | |
| mcsr-render-macros.jar). scripts/macro_report.py summarizes a run. | |
| - Functional test (kit 4 oak logs + 3 iron ingots, shipwreck_treasure chest): looted the rolled chest, then planks, | |
| table, sticks, wooden pickaxe, iron pickaxe by tick 35. (First try lost the log: a server task queued after the | |
| episode's end reopened it; Macros.begin/end + an active flag fixed it.) | |
| - No retraining, pol2-final, 24 seeds, auto macros: 60 s: 0 logs, 0 crafts, 1 chest (village: wheat, cactus, bread); | |
| 180 s: 0 logs, 1 chest looted at 27 s on seed 13616939 (buried treasure: 9 iron ingots, 7 gold, 2 diamonds, heart of | |
| the sea) and no wood, so no pickaxe. The blocker is raw materials, not menus. | |
| - Why no logs: the policy holds attack 5.8% of ticks in 3,403 streaks, median 1 tick, none >= 40 (a log by hand is | |
| ~60 consecutive ticks; releasing resets). Its own p(mine) stays > 0.3 for at most 11 consecutive ticks: better key | |
| sampling alone cannot fix it. Mine lock v1 (aim only) was useless for the same reason (stopped). v2 (ControlLoop | |
| job.mineLock): on any attack at a block breakable with what it holds (hardness <= 3.5, tool if required), the mod | |
| aims, holds attack and holds position until it breaks (10 s cap). | |
| - Mine lock v2 + auto macros, pol2-final, 24 seeds, 180 s: 1/24 got a log (crafting table + sticks at 142 s), 1 chest | |
| looted (shipwreck supply: wheat, carrots, coal, leather armor, TNT), no pickaxe in any episode. The mechanics work; | |
| the imitation policy rarely aims at a tree at all. Next: RL with item rewards on top of the macro action space | |
| (macros + mine lock remove the menu and hold-to-mine barriers); a learned macro head adds little while the auto | |
| scheduler already crafts whenever it can. | |
| ## 2026-09-27 15:00 - disk | |
| - tetra storage ~6.8 TB: nvme4n1 3.6 TB /home (+ /mnt/crucial bind), /data LVM 1.8 TB (nvme0n1 + nvme1n1, 161 GB free), | |
| / 914 GB (734 GB free), nvme3n1 480 GB "optane-models" (ext4, ~390 GB used, unmounted since 2026-09-05: not free). | |
| - /home was 98% full (102 GB free). This project was 1.6 TB of its 3.3 TB (data/vods 682 GB raw, data/train 572 GB | |
| prepped, data/ckpt 261 GB); other projects ~1.7 TB (kernels/ 395 GB incl. DeepSeek-V4-Flash NVFP4 164 GB and demon | |
| 174 GB, nlanes 190 GB, dev/mariokart-wt 172 GB, dev/nw 80, luminite 73, melee 66, dsv4-engine 65, cuda-song 57, | |
| netherite 87, ~/.local + .cache + .grok 140). | |
| - Deleted 22,925 raw VODs of prepped train-split runs (693 GB; paths in logs/raw_vods_deleted.txt); kept the 1,270 | |
| val-split raws (the VPT baseline in eval_idm reads runs.path). The downloader only fetches status='pending' runs, so | |
| nothing re-downloads. /home: 747 GB free (79%). prep.py now deletes a train-split raw right after its prep row | |
| commits (mcsr-prep restarted). Prepped footage grows ~52 GB/day at ~400 new VOD hours/day. | |
| - Deleted ~/kernels/DeepSeek-V4-Flash-0731-NVFP4 (164 GB of NVFP4 weights, 48 shards, unused, no other copy) on Elliot's request. | |
| - Not done (needs Elliot's OK): pruning intermediate checkpoints (keep each run's best.pt + last step + tonight's | |
| eval checkpoints) frees 204 GB (idm-wave-1 91, pol-final 53, pol2-base 24, idm2-base 13, ...). | |
| ## 2026-09-27 15:10-19:20 - speedrun.com footage + VOD pipeline restart (Elliot: "start downloading and converting") | |
| - mcsr-download restarted with 16 workers and NVDEC on GPUs 1-3 (was 8 workers, CPU decode). Ranked VOD backlog: 319 h | |
| pending, ~400 new VOD hours/day (205 -> 471 h/day over the last week); 2,274 h of indexed VODs expired before download. | |
| - mcsr/src_scrape.py: speedrun.com /runs for Minecraft Java Any% Glitchless (mkeyl926), Random Seed (r8rg67rn = | |
| 21d4zvp1), 1.16.1 (jlzkwql2 = mln68v0q), verified, with a video: date/submitted/verify-date x asc/desc passes -> | |
| 14,243 runs, 6,849 h run time (YouTube 12,527 / 5,726 h; Twitch 1,445 / 988 h; other 272); 2022 unreachable by | |
| offset (API caps at 10,000 per end), recovered by paging each verifier (--verifiers-only; 404 on some verifier | |
| ids = empty page). | |
| - mcsr/src_download.py (unit mcsr-src): yt-dlp itag 160 (256x144 H.264 30 fps, ~107 kbps) -> prep.encode (20 fps) -> | |
| /srv/mcsr/src (created with sudo on the system drive, 734 GB free; spills to data/train/src under 40 GB), raw deleted, | |
| prep row per run. yt-dlp 2026.07.04 got HTTP 403 on every stream; `yt-dlp -U` -> 2026.08.19 fixed most (1 of 3 | |
| test streams still 403, retried after 10 min). 16 workers: 196 runs / 88 h of footage in 6.4 min (~830 h/h); | |
| 24 workers from 19:10: ~1,370 h/h, no bot checks so far; failures ~10% (half gone/unavailable, half transient 403). | |
| Video footage runs ~23% longer than the official run times (setup/post-run): ~8,900 h of footage pending -> ~6.5 h. | |
| - mcsr-label restarted as a daemon (idm2-base/best.pt, GPUs 1,1,2,2, every 5 min) so new VODs and src runs get labels. | |
| - Self-kill again: `kill $(pgrep -f mcsr.src_scrape)` inside a Bash call whose command line contained the pattern | |
| killed the calling shell (exit 144) before the rest of the command ran. Use saved PIDs. | |
| - 19:17-23:55 speedrun.com download stalled: one age-restricted video (ydpk0evy, "Sign in to confirm your age") matched | |
| the bot-check pattern, so every retry froze all 24 workers for 15 min, and bot failures did not use up a try, so it | |
| was reclaimed first after every pause (~40 runs/h instead of ~1,300 h/h). Fix: "confirm your age" / members-only -> | |
| status 'login' (skipped; retry later only with cookies); only "not a bot" / 429 pause everything; every failure | |
| uses a try. After the 23:56 restart: 158 runs / 63.9 h in 3 min, 0 pauses. State 23:59: 715 + runs done (~376 h), | |
| ~16.5k pending (7,913 h run time, ~9.7k h of footage incl. the 2022 runs the verifier pass added: 17,412 runs, | |
| 8,161 h total). Ranked VODs caught up: 4,886 h done, 1 pending, 2,347 h expired. | |
| - 2026-09-28 00:40:49 global OOM (60 GB box): ~00:38 a kernels/demon job started on tetra (demon.rollout.loop, vLLM | |
| EngineCore; 27.8 GB on GPU 0 at 00:50, plus host RAM) while mcsr-src (24 workers, 10 GB cap), mcsr-label (2 procs | |
| on GPUs 1-2) and the data daemons ran. The kernel killed processes in mcsr-label and mcsr-src; both units were gone | |
| (not restarted) until the 00:50 hourly check. Earlier (00:17-00:38) every labeler cycle died of CUDA OOM on GPU 1: | |
| our own labeler process held 42.7 GB, because idm_label_ours decodes a whole run into VRAM and some speedrun.com | |
| videos are stream archives (84 of 2,080 = 4% of videos, 151 h of video for 24 h of runs, up to 5.5 h each; | |
| the rest are 1.13x their run time). Restarted 00:50: mcsr-src MemoryMax 12G, OOMPolicy=continue, OOMScoreAdjust=500 | |
| (dies before other projects' jobs); mcsr-label on GPUs 2,2,3,3 (GPU 0 = demon). Hourly watcher: cron job 236323e1 | |
| (:07 each hour, this Claude session only). | |
| - 01:00-01:15 (Elliot: "you now have all four GPUs, keep them fed"). demon gone from GPU 0. The 00:40 global OOM had | |
| also killed mcsr-download, prep, replays, pairs, replay-arrays, scrape (and a non-mcsr omp-auth-broker); none | |
| restarted (transient units, OOMPolicy=stop). Relaunched them 01:13 smaller, OOMPolicy=continue, OOMScoreAdjust 400 | |
| (replays 0, scrape 100): download 8 workers NVDEC GPU 0, prep 8 procs, pairs/replay-arrays 4 procs. | |
| - Labeler: every 2-procs-per-GPU cycle died of CUDA OOM on long src videos (a run is decoded whole into VRAM; stream | |
| archives up to 5.5 h = ~22 GB per slot) and the fixed row order re-hit the same runs every cycle. Now 1 proc on | |
| GPU 0, 2 decode threads (worst case ~3 slots x 22 GB), 2-min pause between cycles. TODO: chunk long runs. | |
| - pol3-l (the pre-training run): 532M "l" policy on GPUs 1-3, --labels policy (renders + pairs + IDM-labeled VODs + | |
| speedrun.com), --shard-runs, batch 16/GPU, 160k steps (1.97B frames, ~2 passes over the ~14k h corpus), lr 2.5e-4, | |
| warmup 2000, EMA 0.9995, ckpt/val every 10k, merged kernels (default). First launch 01:00 (--workers 4, | |
| --refresh-every 5000) sat at its 40G cap (anon 26.9 + shmem 12.9 GB) with an index refresh due at step 5000: | |
| relaunched 01:12 with --workers 3 and no in-run refresh (anon 27.2 + shmem 9.8 GB, cap 42G); 29.1k fps, data wait | |
| 0.5 ms. It will be resumed from a checkpoint once the speedrun.com backlog is labeled, to pick up that data. | |
| ## 2026-09-28 01:25 - the mine label was a pulse, not a hold (fix + overnight retrain) | |
| - Elliot asked whether scale (~3x pol2's data) would make the agent useful. Evidence says data is not the main | |
| blocker: 500 -> 4,300 h lowered val loss 0.97 -> 0.92 with no closed-loop change, and the "mine" key was wrong. | |
| replay_arrays "mining" = a BLOCK_PROGRESS event this tick, and the mod logs one only when a block's crack stage | |
| changes (stages 1..8, then BLOCK_BREAK): 1-tick pulses ~6 ticks apart while the key is held for the whole ~60 ticks | |
| a log takes. Truth labels: attack on 4.7% of ticks, 1,428 presses/h, median press 2 ticks, none >= 40; IDM v2 | |
| labels: 4.3%, 626/h, median 5, none >= 40. The policy learned to tap (median 1 tick) and cannot break a log. | |
| - Fix: replay_arrays.mine_holds -> new array mine_hold (events carry block position and stage): a hold = consecutive | |
| stage events on one block with non-decreasing stage (gap <= 40 ticks); starts (stage0 + 1) stage intervals before | |
| its first event, ends at that block's break (or half an interval after the last event); single-block BLOCK_BREAKs | |
| with no stages (instant blocks) are 1-tick holds; holds < 7 ticks apart are joined (5-tick break cooldown while the | |
| key stays down). BLOCK_REMOVE is not counted on its own (40k of them in 30 replays, never with crack stages). | |
| pairs.targets_for_ticks uses mine_hold when present. Truth now (400 replays): 13.6% of ticks, median hold 16, p90 | |
| 78, 22.5% of holds >= 40 ticks holding 64% of attack time. Example: two logs mined back to back = one 128-tick hold. | |
| - 01:39-01:43 `python -m mcsr.replay_arrays --backfill` rewrote all 11,380 replays' npz (atomic tmp+replace), then | |
| `python -m mcsr.pairs --retarget` recomputed 6,382 pair/render target files from their stored frame->tick map. | |
| replay-arrays and pairs daemons restarted on the new code. | |
| - Overnight chain scripts/holdfix_pipeline.sh (unit mcsr-holdfix-pipeline, logs/holdfix_pipeline.log): pol3-l | |
| stopped (old labels, no checkpoint yet); IDM v3 (idm3-hold) = idm2-base/best.pt fine-tuned on hold labels, GPUs 1-3, | |
| 8k steps (98M frames, lr 1.5e-4, 70k fps); held-out eval of v2 and v3; relabel pol2-base's run set (prep.updated <= | |
| 1790502600, new idm_label_ours --before/--after, data.index policy now applies --before to IDM-labeled VODs) on | |
| GPUs 1-3; pol3-hold = pol2-base's recipe exactly (187M, 48k steps, EMA, same data snapshot), only the labels | |
| differ; mcsr-label (v3) labels the newer runs on GPU 0. Milestone evals: scripts/eval180.sh (24 seeds, 180 s, | |
| auto macros, no mine lock, one VGL client, flock-serialized), baselines pol2-final and pol2-s25 x 2 passes, then | |
| pol3-hold checkpoints 10k-48k. Page: scripts/holdfix_page.py -> data/demo/holdfix -> macbook:~/Desktop/mcsr-mining-fix/. | |
| - 02:35 hourly check: speedrun.com 4,932 runs / 2,461 h converted (726 h in the last hour), 12,217 pending (6,158 h | |
| run time, ~7.5k h of footage, ETA ~1 pm), 258 gone, 2 login. /srv/mcsr/src holds 221 GB (~90 MB per footage hour): | |
| / has 470 GB free, so the rest (~675 GB) spills to data/train/src on /home (740 GB free) near the end. Fixes | |
| (mcsr-src restarted 02:35): the bot pattern "429" matched a partial-download byte count ("5864295") and froze all | |
| workers 15 min at 02:07 -> now "HTTP Error 429"; source-only Twitch VODs (21-23 GB raws, 1080p60) timed out in the | |
| single-thread encode and their raws stayed on disk -> prep.encode(threads, timeout), raws > 2 GB encode with 8 | |
| threads / 4 h, a run's raw is deleted after its last try. Real YouTube bot checks ("Sign in to confirm you're not a | |
| bot") at 02:30 and 02:35: watch the rate; fewer workers if they repeat. Labeling: IDM v3 on GPU 0 for runs prepped | |
| after pol2's cut (60 src runs / 24 h so far; 351 src runs / 647 h > 1 h are skipped by --max-frames). | |
| - 03:10 global OOM (pol3-hold had started 03:06: 41 GB incl. 15 GB batch-ring shmem, swap full) killed the eval's | |
| Minecraft client: m180-pol2-final-b kept 23 complete episodes + 1 cut at 136 s (copied by hand; the page skips | |
| episodes under 3,500 ticks), m180-pol2-s25-b never ran (rerun 03:15, unit mcsr-eval-base, OOMScoreAdjust -100). | |
| Paused until the evals finish (scripts/resume_daemons.sh, unit mcsr-resume-daemons, restarts them on "final evals | |
| done"): mcsr-download (ranked VODs caught up), pairs, replay-arrays, and the IDM v3 labeler on GPU 0. mcsr-src cut | |
| to 12 workers, MemoryMax 8G, OOMScoreAdjust 700 (dies first). RAM with pol3-hold + an eval client: ~5 GB available. | |
| - 03:14 hourly: speedrun.com 5,137 runs / 2,571 h converted, 11,974 pending; only 249 h in the last hour: YouTube bot | |
| checks at 02:30, 02:35 (my restart re-triggered them) and 02:51, each a 15-min pause for all workers. mcsr-src now | |
| skips videos over 1 h (yt-dlp --match-filter "duration <=? 3600" -> status 'toolong'): stream archives the labeler | |
| skips anyway (zg1o28vz / z5nrjxez were 6.6 h / 8 h, 21-23 GB, for 7-14 min runs; raws deleted). | |
| - IDM v3 (idm3-hold step27000) held-out, 37 pairs scored against the hold labels: mine F1 0.909 (v2 0.508); forward | |
| 0.935 (0.933), jump 0.817 (0.815), place 0.157 (0.139), cam_ce 0.814 (0.804), yaw MAE 1.19 (1.18). Its labels on | |
| 400 of pol2's runs: attack 12.3% of frames, 333 presses/h, median hold 13, p90 68, 19.6% >= 40 ticks, 63% of attack | |
| time in holds >= 40 (truth 13.6% / 317 / 16 / 78 / 22.5% / 64%; v2 4.3% / 626 / 5 / 9 / 0 / 0). | |
| - 03:06 relabel of pol2's run set done (19,685 runs / 3,635 h by v3; 113 h with old labels are runs paired after the | |
| cut, excluded from both truth and IDM rows by --before). pol3-hold rank shard 7,740 runs / 1,414 h (pol2 7,795 / | |
| 1,423 h). 60k fps measured by step deltas (the logged fps is a running mean dragged by the slow start). | |
| - Milestone baselines (180 s, auto macros, 24 seeds x 2): pol2 final 0/47 logs (one episode cut by the OOM), | |
| pol2 step25k 0/48; 0.3 blocks mined per episode. pol3-hold step10000 (one pass): 0/24 logs, but the attack key | |
| now behaves like the humans': on 13.4% of ticks (pol2 5.2-5.9%), 78 holds >= 40 ticks, longest 383 (pol2: none | |
| above 10); 0.9 blocks mined per episode (sand, cactus, dirt). Deaths: 26/47 and 31/48 for pol2, 17/24 for pol3-hold | |
| s10000, every one below y 62 (drowning after speedrunner-style dives to shipwrecks), median at 52-82 s: over half | |
| the episodes end before 90 s, which caps every milestone for old and new policies alike. | |
| - 04:11 hourly: speedrun.com 6,120 runs / 2,978 h converted, 10,866 pending (5,635 h run time), 83 skipped as over | |
| 1 h, 452 h in the last hour on 8 workers (1 bot pause); ETA ~7 pm at this rate (raise workers once the evals end | |
| and RAM frees). No OOM kills since 03:24. Replays 2,702 pending (~150/h done, CDN 429s; 2 gone so far). | |
| - 05:11 hourly: speedrun.com 6,467 runs / 3,112 h converted, 10,463 pending, 118 skipped as over 1 h, only 134 h in | |
| the last hour: YouTube's bot check ("Sign in to confirm you're not a bot") fired on every wake-up of the 15-min | |
| global pause (04:30, 04:45, 05:00). mcsr-src (restarted 05:12): only YouTube pauses, doubling 15 -> 120 min, reset | |
| by a YouTube success; Twitch (1,401 pending) / bilibili / Drive keep downloading; a bot-blocked run gets its try back | |
| (7 runs that had used all 3 tries on bot checks reset). If YouTube stays blocked for hours, the fix is cookies from | |
| a logged-in browser (Elliot's call: it ties bulk downloads to an account). | |
| - pol3-hold closed loop (one pass each; logs counted from planks crafts too, since the macro crafts a fresh log within | |
| the 10-tick state sampling): step 20k 3/24 logs, 3/24 crafting tables, 1/24 wooden pickaxe (13609728: walks into a | |
| birch forest, holds attack on the trunk until it breaks, table + sticks + pickaxe by 105 s; checked on video); | |
| 25k 1/24 log + table; 30k 2/24 tables. pol2: 0 of 95 episodes for any of these. | |
| - 05:45 pol3-hold done (48k steps; final val loss 0.9165, camera 0.866 vs pol2 0.871). Closed loop per checkpoint | |
| (one pass): 40k 1/24 log + table, 48k 1/24; blocks mined per episode 0.92 (10k) -> 1.9 (40-48k), deaths 17 -> 12-13 | |
| of 24. Steps 20k-48k together: 8/120 episodes with a log and a crafting table vs pol2 0/95 (Fisher p ~ 0.01). | |
| - 05:45-06:08 scripts/after_holdfix.sh (edited while it waited, 05:15): v3 labeled the remaining 4,937 runs on GPUs | |
| 1-3 in 22 min (v3-labeled VODs now 6,357 h); 06:07 pol4-l (532M, pol3-l's recipe, --label-ckpt v3) on GPUs 1-3: | |
| rank shard 10,581 runs / 2,376 h (~7.1k h total incl. truth), 28.3k fps -> 160k steps ~19 h (~1 am 09-29). | |
| pol4-l cgroup 42.3 GB (anon 31 GB): with an eval client RAM is ~3.5 GB available; mcsr-src stopped 06:08 until the | |
| last evals end (scripts/resume_daemons.sh restarts it at 16 workers and the GPU 0 labeler once pol4-l is up). | |
| - 06:11 hourly: speedrun.com 6,564 runs / 3,156 h, 10,332 pending; 44 h in the last hour: YouTube bot-blocked | |
| continuously since ~04:15 (pauses 15/30 min, one success in between), Twitch/others downloading. 05:34 a global OOM | |
| killed mcsr-src (score 700, as designed). | |
| - 06:42 final milestone evals (48 episodes each, 180 s, auto macros, no mine lock): pol2 final 0/47 logs, pol2 step25k | |
| 0/48; pol3-hold final 3/48 logs = 3/48 crafting tables, step25k 1/48 (+ one iron pickaxe looted from a ruined-portal | |
| chest, not crafted). Pooled pol3-hold steps 20k-48k: 10/168 logs (every one became a crafting table via the macros, | |
| one a wooden pickaxe at step 20k) vs 0/95, Fisher p = 0.015. Blocks mined per episode 1.57 vs 0.28 (any block: | |
| 50/96 vs 21/95 episodes); attack holds >= 40 ticks 274 vs 0. Deaths unchanged (59/96 vs 57/95, all drowning). | |
| Net distance at 60 s mixed (20.7 / 37.0 vs 27.0 / 38.3 m). Verdict: the label fix changed the behavior it targeted | |
| on the same data and recipe (unlike the 8.6x data step); absolute rates stay low because most episodes end drowned | |
| at 50-80 s and the policy rarely heads for trees. | |
| - Page: scripts/holdfix_page.py (notes in data/demo/holdfix/notes.json) -> data/demo/holdfix -> macbook:~/Desktop/ | |
| mcsr-mining-fix/index.html (06:45), with 6 clips of the new policy chopping (checked on contact sheets). | |
| - 06:42 scripts/resume_daemons.sh restarted download, pairs, replay-arrays, mcsr-src (16 workers) and the v3 labeler on | |
| GPU 0. 06:47 scripts/pol4_eval_watch.sh (unit mcsr-pol4-eval, GPU 0): eval180 of each pol4-l checkpoint (every 10k | |
| steps, ~1.2 h) -> logs/pol4_eval_watch.log. | |
| - 07:11 hourly: YouTube block eased: 844 runs / 363 h in the last hour on 16 workers (one 15-min YouTube pause at | |
| 07:00). speedrun.com 7,407 runs / 3,518 h converted, 9,253 pending (5,009 h run time), 237 skipped as over 1 h, | |
| 497 gone. Since the 06:42 restart mcsr-src logs to logs/src.log (resume_daemons.sh names logs after the unit). | |
| v3 labeler on GPU 0 keeping up (74 h unlabeled). / 408 GB free (-39 GB/h while downloading), /home 691 GB. | |
| - 07:21 pol4-l died at step 10000: its in-run validation (val loader workers fork the ranks' catalogs) pushed the | |
| cgroup past its 42G cap (anon 31 GB + shmem 10 GB before val); the step-10000 checkpoint is saved after val, so | |
| nothing was kept, and GPUs 1-3 sat idle until the 08:11 hourly check (missed: my eval watcher only logged "stopped"). | |
| 08:12 relaunched from scratch: --val-every 0 (closed-loop evals are the metric), --ckpt-every 5000, MemoryMax 44G -> | |
| 48G live (anon 34.2 + shmem 9.8 GB at start: the index grew to rank shard 11,322 runs / 2,659 h, ~8k h total), | |
| 29.8k fps, done ~9:30 am 09-29. A global OOM now takes mcsr-src (700), labeler (600), data daemons (400) first. | |
| - 08:11 hourly: speedrun.com 8,578 runs / 4,009 h converted (490 h in the last hour, one YouTube pause 07:28), | |
| 7,831 pending (4,462 h run time), 359 over 1 h skipped, 625 gone. Labeler caught up (22 h waiting). / 376 GB free. | |
| - 08:14-09:06 global OOMs every 5-7 min (MemoryMax 48G let pol4-l grow to 46.8 GB: anon 35 + shmem 9.8), each killing | |
| mcsr-src; under that pressure `systemctl is-active` timed out and pol4_eval_watch.sh exited (fixed: it now stops only | |
| on an explicit inactive/failed ActiveState); pol4-l slowed to 24k fps. 09:12 pol4-l resumed from step5000 | |
| (--continue) with --workers 2 (shmem 9.8 -> 6.8 GB), MemoryMax 44G: 29k fps, data wait 0.4 ms, rank shard 11,689 | |
| runs / 2,817 h (~8.4k h), ETA ~03:40 09-29. Paused mcsr-download (ranked VODs keep 7-60 days), pairs, | |
| replay-arrays until pol4-l ends (scripts/after_pol4.sh, unit mcsr-after-pol4); mcsr-src, replays, prep and the | |
| GPU 0 labeler keep running. | |
| - 09:11 hourly: speedrun.com 9,724 runs / 4,503 h converted (494 h in the last hour), 6,434 pending (3,842 h run | |
| time), 477 over 1 h skipped, 757 gone. / 333 GB free, /home 677 GB. Replays 2,713 pending. | |
| - 09:54 the pol4-l step10000 eval recorded 0 episodes: a global OOM killed mcsr-src and then the Minecraft client | |
| (play_eval.sh sets the client and policy server to oom_score_adj 600, same as the labeler). pol4_eval_watch.sh now | |
| stops mcsr-src and mcsr-label for each ~20 min pass and restarts them after (same unit settings as | |
| resume_daemons.sh); step10000 rerun from 10:14. RAM during a pass: ~3 GB available. | |
| - pol4-l checkpoints are 7.9 GB each every 5k steps (~250 GB by step 160k on /home, 665 GB free; the speedrun.com | |
| spill needs ~150 GB more): fits, no pruning needed. | |
| - 10:11 hourly: speedrun.com 10,591 runs / 4,892 h converted (389 h in the last hour, 0 YouTube pauses), 5,363 | |
| pending (3,349 h run time), 556 over 1 h skipped, 881 gone. Labeler caught up (45 h waiting). / 295 GB, /home | |
| 665 GB. Replays 2,744 pending. pol4-l step ~12.7k (resumed at 5k), 27-29k fps. | |
| - 11:11 hourly: speedrun.com 11,160 runs / 5,157 h converted (265 h in the last hour incl. a 20-min eval pause, 0 | |
| YouTube pauses), 4,589 pending (2,883 h run time), 633 over 1 h skipped, 1,008 gone. Labeler 52 h behind. / 269 GB, | |
| /home 647 GB. No OOM kills since 10:15. Replays 2,765 pending (arrivals ~= CDN-limited downloads; 4 gone). pol4-l | |
| global step ~20.9k; step10000 eval 0/24 logs (pol3-hold was 0/24 at 10k too). | |
| - Training data size (index 'policy', --label-ckpt v3, 11:00): train 36,359 runs, 9,002 h, 648M frames = 1,055 GB of | |
| 256x144 H.264 + 14.4 GB labels (72 TB as raw pixels); val 1,853 runs / 440 h / 53 GB. pol4-l's 09:12 snapshot | |
| ~8.4k h; its 160k steps = 1.97B frames ~ 3 passes. Proposed to Elliot 10:55: stop pol4-l (confounds data and | |
| params, un-annealed until 3:45 am) for a 187M 48k-step run on the full 9k h; waiting on his go. | |
| - 11:40 Elliot: go on stopping pol4-l. Its closed loop at matched frames was worse than pol3-hold (187M, 4.4k h) on | |
| every count: step10k / step20k vs pol3-hold step20k: logs 0 / 0 vs 3 of 24, blocks mined per episode 0.71 / 0.25 | |
| vs 1.50, holds >= 40 ticks 28 / 11 vs 85, attack 4.6% / 2.4% vs 15.7% of ticks, standing still 85% / 88% vs 68%, | |
| net distance at 60 s 12 m vs 31 m (deaths 10/24: it rarely reaches water). Suspect: speedrun.com footage (~40% of | |
| its data) is 38.6% idle frames (no keys, no turn) vs 29.0% for ranked VODs (150 runs each), mine 9.4% vs 12.9% | |
| (setup, post-run, loading screens). pol4-l stopped at global step ~25k (checkpoints kept: step5000-25000). | |
| - 11:42 pol5-base = pol3-hold's recipe (187M, 48k steps, EMA) on all v3-labeled data (--label-ckpt, no --before): | |
| rank shard 12,246 runs / 3,064 h (~9.2k h). First launch OOM'd at its 44G cap loading the catalog; relaunched | |
| --workers 2, MemoryMax 50G with mcsr-src and the labeler stopped for startup: peak 50 GB, then anon 37.7 + shmem | |
| 6.3 GB; 65.7k fps, data wait 0.5 ms; ETA ~14:15. Evals: scripts/eval_watch.sh (generic replacement for | |
| pol4_eval_watch.sh; unit mcsr-eval-pol5, RUN=pol5-base, steps 10k-48k + second passes of 48k and 25k) -> | |
| logs/eval_watch_pol5-base.log. If pol5-base idles like pol4-l, the speedrun.com footage needs trimming. | |
| - Throughput question (Elliot, 12:00: "what limits it to 65k fps; e2e under 1 h; fp8?"). The logged MFU was wrong: | |
| FlopCounterMode cannot see the fused CUTLASS conv blocks, so train.py reported 2.1 GFLOP/frame; counted through | |
| the unfused path the base policy is 10.4 GFLOP/frame train (forward 3.48, of which the conv encoder 3.18: 16 3x3 | |
| convs at ~0.17 GFLOP each, equal cost per stage). model.measured_flops_per_frame now counts them (new runs). | |
| Real rate: 21.9k fps/GPU x 10.4 = 228 TFLOPS/GPU = 58% of the measured 396 TFLOPS bf16 GEMM peak, at the 600 W | |
| power cap (2.15-2.44 GHz): compute-bound on bf16 tensor cores in the encoder (profile split, IDM base: convs 67.5%, | |
| GroupNorm 15%, GEMMs 6.6%, other Triton 4.4%, optimizer 3.1%, stem 1.6%) plus ~10% unoverlapped PCIe allreduce. | |
| Under 1 h: (1) 246M frames (20k steps; closed loop peaked there) on 4 GPUs ~50 min; (2) 1 conv block per stage | |
| halves encoder FLOPs (~1.7x, needs a closed-loop A/B); (3) FP8 convs: 2x tensor peak on sm_120 but conv time only | |
| 67.5%, fwd/dgrad rewrite of the fused kernels + quality risk, ~1.25-1.35x realistic. | |
| - 12:05 Elliot: stop training; go for all three levers with 3 Opus subagents in parallel: kernels on one GPU with the | |
| fq CLI (Infinity's GPU job queue, macbook:~/dev/infinity/fq), training profile on a second, progress on the other | |
| two at ~half speed. pol5-base stopped at step ~9k (step5000.pt kept). fq on tetra: ~/dev/fq (copy; patched: FQ_GPU | |
| pins a daemon to one GPU (foreign-process check and CUDA_VISIBLE_DEVICES), ncu.sh exports PYTHONNOUSERSITE=1 (a | |
| ~/.local .pth crashed ncu's Python: "unknown encoding: utf-8-sig")). Lanes: units mcsr-fq-{daemon,reaper}-gpu{0,1}, | |
| CLI ~/dev/fq/fq-gpu N ..., state ~/dev/fq/state/gpuN. GPU 1 = kernel agent (FP8 convs), GPU 0 = training-profile | |
| agent + closed-loop evals (both as fq jobs), GPUs 2,3 = progress agent (20k-step recipe, --conv-blocks 1 A/B). | |
| New flag train.py --conv-blocks (default 2). mcsr-label paused (GPU 0 lane), mcsr-src 8 workers / 3G. | |
| - 12:20 Elliot: GPU 0 needed for a KernelBench run -> this project on GPUs 1-3 only. fq lane 0 stopped (units | |
| mcsr-fq-*-gpu0; its cancelled jobs: trainprof tp-ab-stem, progress eval-pol5-base-s5000-a). Training-profile agent | |
| moved to lane 1, shared with the kernel agent. Progress agent evals run outside fq on GPU 3 next to its training: | |
| play_eval.sh takes VGL_DEVICE=eglN (tested with glxgears: egl1/egl2/egl3 render on GPUs 1-3; /dev/dri/cardN fails: | |
| not in the video group). Bug fixed: fq jobs run inside the daemon's systemd unit, which I had capped at 1 GB, so the | |
| first evals and two profile jobs were OOM-killed (rc=daemon-restart); lane caps now 24 GB. GPU 0: no processes. | |
| ## 2026-09-28 1:40 pm MT - kernel agent (FP8 convs) | |
| - Verdict: FP8 pays. Base policy training step, one GPU, synthetic, same-session interleaved A B C / C B A / A B C on | |
| fq GPU 1: merged bf16 tree 23,173 fps (176.8 ms/step) -> FP8 tree 29,595 fps (138.4 ms/step) = 1.277x; real data | |
| (training A/B) 22.9k -> 28.9k fps = 1.26x. Clocks 2.37-2.40 GHz at the 600 W cap in every arm. Training quality | |
| intact: real-data A/B, one GPU, 2000 steps, seed 0: final held-out val loss bf16 1.2026 vs FP8 1.1930 (bf16 seed 1: | |
| 1.1977, so seed-to-seed 0.005); late 200-step train-loss windows FP8 - bf16 -0.008..-0.018, inside the +-0.04 | |
| seed-to-seed spread. One seed pair, 2000 steps: not a long-run guarantee. | |
| - Hardware first (kernels/fp8conv/micro): mma.sync e4m3 m16n8k32 1082 TFLOPS vs bf16 m16n8k16 541 at 2.81 GHz, exactly | |
| 2x (fp16 accumulate and block-scaled mxf8f6f4 no faster); cuBLASLt fp8/bf16 at the encoder's im2col GEMM shapes | |
| 1.79-1.84x. | |
| - Built (kernels/fp8conv/target, own git, head 3696418; extension csrc8/ + gn_csrc/ changes): convt8 = the persistent | |
| TMA direct conv with e4m3 operands (a 64-byte smem row holds 64 fp8 channels, one m16n8k32 per 32-byte half row, | |
| ldmatrix addressing unchanged), fused GELU/aux, residual and GELU' epilogues with fp8 outputs + amax; it replaces | |
| conv64 at stage 1 too. wgradt8 = the TMA weight gradient in e4m3: K (pixels) transposed in registers by | |
| ldmatrix.trans.b16 + prmt with the same pixel permutation in A and B. GroupNorm fwd writes xn in fp8; block 2's | |
| GroupNorm bwd writes block 1's fp8 output gradient (no quantization pass); prep8.cu quantizes filters and updates | |
| scales in one launch each. Scaling: filters per output channel (amax -> 448) each call; activations/gradients per | |
| tensor, power-of-two delayed scales from the producing kernel's amax (headroom 8-16x); first call per block runs | |
| bf16 to calibrate. All e4m3: 8x-stale gradient scales in either direction did not change the error, e5m2 not needed. | |
| - Per conv, N=4096, ms fp8 vs bf16 merged tree, stages 1/2/3/4: fprop plain 1.50/1.15/1.06/1.10 vs 2.30/1.98/1.91/1.98; | |
| residual epilogue 2.06/1.39/1.19/1.16 vs 2.42/2.12/1.83/1.86; GELU' epilogue 2.02/1.51/1.26/1.19 vs 2.71/2.25/2.04/2.08; | |
| wgrad 1.18/1.14/1.35/1.31 vs 1.97/1.87/1.91/2.20. What moved them after the first cut: epilogue-source prefetch into | |
| registers at stage 1 (residual 2.81 -> 2.06), batched source loads on the 255-register tiles (ncu: long_scoreboard; | |
| stage 2 residual 1.72 -> 1.39), one-image stage-3 wgrad tiles with a half k-step (1.53 -> 1.35), and a compile-time | |
| tile parity in wgradt8 (first build 11.6 ms: accumulators had gone to local memory). | |
| - Numerics (kernels/fp8conv/validate_fp8.py, own criterion; the locked bf16 harness cannot pass FP8): each fp8 kernel is | |
| 3.75-3.79% rel L2 vs fp32 on random data and matches an fp32 conv of its dequantized operands to 1e-3 (conv) / 1e-6 | |
| (wgrad), so the error is the format's (e4m3 unit roundoff 2^-4), not the kernels'. Block outputs 4.0-6.7% (bf16 path | |
| 0.3-0.4%); accepted bound 0.08 = up to three e4m3 roundings; two chained blocks <= 8.9%, chained fp8 gradient | |
| bit-identical to the quantization pass. | |
| - Opt-in, measured but not training-tested: MCSR_FP8_H8=1 (GELU pre-activation in fp8) + MCSR_FP8_D8=1 (dxn in fp8 into | |
| the GroupNorm backward): 29,957 fps = 1.293x (+1.2% over the default), block errors up to 7.6%. | |
| - How to use: MCSR_CONVBLOCK_REPO=$PWD/kernels/fp8conv/target TORCH_EXTENSIONS_DIR=$PWD/kernels/fp8conv/cache/torch_ext | |
| on any --fused run (DDP untested; eval/no-grad forwards use the bf16 kernels; checkpoints unchanged). Not vendored | |
| into mcsr/fused. Record: kernels/fp8conv/experiments.txt and out/ (A/B logs, validation JSON, e2e runs, profiles). | |
| - Where the FP8 step goes now (torch.profiler, prof/k-prof-fp8v6): fp8 block convs 64 ms (42%, ~61% of the | |
| clock-adjusted e4m3 peak), Triton elementwise 25 ms (incl. ~8 ms uint8 -> bf16 input preprocessing), cuDNN stride-2 | |
| downsample convs + stem 19 ms (13%, model code, outside the tree), GroupNorm 17 ms (at the DRAM roofline), GEMMs 13 ms. | |
| Next: FP8 strided downsample convs (needs mcsr/model.py), a longer / multi-seed quality check before vendoring. | |
| - Gotchas: fq submit --env takes one flag with several K=V values; a repeated --env keeps only the last. Editing | |
| train_ab.sh while an fq job ran it broke the job's post-run lines (training and logs were intact). I briefly set the | |
| GPU 1 lane's MemoryMax to 8G before the coordinator's 24 GB fix. | |
| ## 2026-09-28 2:30 pm MT - training-profile agent | |
| - Recommended fast recipe (today's model; nothing changes numerically beyond bf16 rounding): add `--stem triton | |
| --ema-every 4 --clip-in-opt --compact-catalog --ring-direct --free-compile-workers --workers 3` to the policy launch | |
| (`--shard-runs` on 4 GPUs; `--optimize-ddp` once a multi-GPU A/B confirms it). One GPU, synthetic, same session (fq | |
| GPU 1, warm-up run + 2 interleaved rounds): 177.9 -> 164.6 ms/step = 23.0k -> 24.9k fps (1.081x). Real data, same | |
| seed and batches: 300 steps 177.6 -> 164.8 ms (1.078x), data wait 5.0/3.5 -> 0.4 ms, mean loss of 15 log points | |
| 1.7481 (A) / 1.7500 (A again) / 1.7475 (fast); 1000 steps held-out val loss 1.0183 (A) vs 1.0153 (fast), inside the | |
| ~0.005 seed-to-seed spread. torchrun DDP, 1 rank on exactly one rank's shard of a 4-GPU full-data run | |
| (--emulate-shard 4: 9,266 runs, 2,347 h): 25.0-25.5k fps, host RAM 6.3 GB steady (anon 4.3 + shmem 2.0), 8.3 GB | |
| peak (final checkpoint + validation). Projected 4 GPUs (x0.9 scaling, not measured): ~90k fps = 246M frames in ~46 | |
| min, ~25 GB RAM for 4 ranks (today's flags: ~42 GB steady on the same data, which does not fit next to an eval). | |
| Stacks with the kernel agent's FP8 ConvBlock tree (MCSR_CONVBLOCK_REPO=kernels/fp8conv/target), same session: | |
| today's flags 175.2 ms (23.4k fps) | FP8 138.5 (1.265x) | fast 162.9 (1.075x) | fast + FP8 125.1 ms, 32.8k fps | |
| (1.40x) | fast + --conv-blocks 1 102.3 (1.71x) | fast + cb1 + FP8 83.8 ms, 48.9k fps (2.09x). Projected 4 GPUs | |
| (x0.9): fast + FP8 ~118k fps = 246M frames in ~35 min; with cb1 ~176k fps, ~23 min. All of it composes under | |
| torchrun DDP (1 rank, real data, one 4-GPU rank shard, 3 workers): fast + FP8 33.0k fps, + cb1 48.6k fps, data wait | |
| 0.4-0.6 ms, RAM peak 7.9-8.1 GB. | |
| - Profile (base policy, synthetic, torch.profiler; kernels/trainprof/trace_split.py splits kernels by launching op): | |
| 171 ms of kernels/step, GPU busy 99.7% (0.5 ms idle: the graph breaks at the fused blocks cost nothing, CUDA graphs | |
| have nothing to win). ConvBlocks 116 ms (68%); stem path 13.9 ms (8%: uint8 tubelet gather 1.7 + convert/pad to a | |
| 4.8 GB bf16 16-ch image 4.6 + cuDNN stem fprop 3.8 + wgrad 3.7); stride-2 downsample convs 14 ms (8%: fprop 3.4, | |
| dgrad 4.8 (down1 143 TFLOPS), wgrad 3.5, bias add 1.5 + bias grad 0.9); transformer GEMMs + attention ~13 ms; fused | |
| AdamW 3.6; EMA lerp 1.5; grad clip 1.4 (its scale multiply 1.0); loss, heads, prev-action embedding < 0.1 ms. | |
| With the fast flags + cb1 (101 ms): blocks 59%, downsample convs 14%, transformer 13%, optimizer 4%, stem 3%. | |
| - DDP (1-rank torchrun traces, kernels/trainprof/ddp_timing.py): the "no overlap" in the 2026-09-27 00:20 entry was | |
| wrong. With optimize_ddp off, 9 of 10 buckets (173M of 187M grads) launch right after the transformer backward, ~64 | |
| ms into a ~160 ms step, and the ~90 ms encoder backward hides them; only the last bucket (encoder convs, 28 MB | |
| bf16) is exposed. 1-rank DDP costs 1.5% (reducer grad copies + bf16 hook casts). --optimize-ddp (new): Dynamo's | |
| DDPOptimizer now works with the fused blocks (torch 2.14, 1 rank): buckets launch from 54.8 ms instead of 63.3 ms | |
| (8.5 ms more overlap) at the same kernel time (159.8 vs 159.7 ms). P2P reads/writes are OK between all 4 GPUs. | |
| - Changes (flags default off; model.stem_impl and Block.fp8 are not saved: a --stem triton checkpoint loads into | |
| today's model and policy server): | |
| - --stem gemm|triton (model.ConvFrameEncoder.stem_gemm / stem_triton): nearest 2x chroma upsampling + 4x4/4 conv = | |
| 2x2 conv on native chroma with block-summed weights, and tubelet stacking = patch concat, so the stem is one GEMM | |
| on 72 inputs per pixel; triton = kernels/trainprof/stem_triton.py (custom ops: gathers the uint8 frames in the | |
| GEMM operand load, recomputes them in the weight-gradient kernel, bias as a constant-1 K slot). Isolated stem | |
| fwd+bwd 27.3 (conv) / 8.7 (gemm) / 3.8 ms (triton); rel err vs fp32 2.7e-3 (bf16 gemm 3.8e-3); fp64 CPU test of | |
| the algebra exact. Step: gemm 1.043x, triton 1.072x. | |
| - --ema-every K (lerp with 1 - d^K every K steps), --clip-in-opt (clip scale as the fused AdamW's grad_scale): +0.8% | |
| together; CPU tests: params 2e-8 apart after 20 clipped steps; EMA-4 vs EMA-1 2.4e-5 vs the EMA's own lag 2.6e-2. | |
| - --compact-catalog (data._Catalog compact): act/valid bit-packed (_Bits), sample sizes uint16, 8 load threads (32 | |
| thread arenas kept +0.2 GB/1000 h), malloc_trim: arrays 21.2 -> 6.4 B/frame, RSS 2.76 -> 0.45 GB per 1,000 h | |
| (CPU, 600 / 1,174 / 2,347 h subsets); one 4-GPU rank shard ~6.5 GB (projected) -> 1.08 GB measured (build 17.8 s, | |
| transient peak 2.6 GB). Batches byte-identical (kernels/trainprof/test_catalog.py, test_batches.py). | |
| - --ring-direct (data._Ring.register): cudaHostRegister the shared-memory batch ring, S+1 slots per worker, and the | |
| trainer waits for the H2D copy of a worker's previous batch before taking its next: no pinned copy per batch and | |
| no pinned pool (shmem 1.87 -> 1.29 GB/rank at 2 workers). test_ring_direct.py: 24/24 batches identical with copies | |
| delayed 0.1 s on the copy stream; control without the wait: 22/24 corrupted. Survives --refresh-every. | |
| - --free-compile-workers (shut Inductor's compile pool after step 10), --optimize-ddp, --conv-widths, --fovea; for | |
| measurements --emulate-shard N (one rank's --shard-runs share on one GPU) and --skip-final-val. | |
| - --fp8-linear (kernels/trainprof/fp8_linear.py): the transformer's 48 linears as torch._scaled_mm e4m3 GEMMs (fwd, | |
| dgrad, wgrad), per-tensor dynamic scales, 3.8% rel error per GEMM. 1.023x (cb2), 1.033x (cb1), but 1000-step val | |
| loss 1.0315 vs 1.0153 (act 0.080 vs 0.069): not recommended as is (next try: rowwise scales or bf16 wgrad). | |
| - Lever 2 (fast flags, synthetic, same session; train GFLOP/frame by FlopCounterMode): cb2 162.8 ms 25.2k fps (10.44) | |
| | --conv-blocks 1 101.9 ms 40.2k, 1.60x (6.25) | --conv-widths 48,96,192,384 126.7 ms 32.3k, 1.28x (6.34) | widths | |
| + cb1 81.7 ms 50.2k, 1.99x (3.98) | --fovea 96 114.6 ms 35.8k, 1.42x (5.74) | --fovea 128x72 118.5 ms 34.6k, 1.37x | |
| (6.00) | fovea 96 + cb1 74.7 ms 54.8k, 2.18x (3.59) | fovea 128x72 + cb1 77.4 ms 52.9k, 2.10x (3.74). Real data, | |
| cb1: 2 workers 102.7 ms with 3.3 ms data wait, 3 workers 102.5 ms / 0.9 ms (the loader keeps up at 40k fps per | |
| rank); DDP 1 rank, cb1, 4-GPU shard, 3 workers: 40.0k fps, data wait 0.4-0.6 ms, peak 8.1 GB. | |
| - --fovea C|WxH (Config.fovea, ConvFrameEncoder.forward_fovea): full-resolution centre crop + the whole frame at half | |
| resolution (luma 2x2 mean, chroma native), shared stem (GEMMs on 4x4 patches) and stages, per-view final | |
| GroupNorm + GELU, maps concatenated into the d_t linear (96: 3x3 + 3x4 positions). The fused blocks run its 8 new | |
| shapes correctly (fused-vs-unfused error equal to today's shapes) but at ~76% of the tuned per-FLOP rate (blocks | |
| 76.5 ms for ~0.5x the FLOPs of today's 117 ms): tile tuning for those shapes is kernel work if it wins in game. | |
| - Batch per GPU (fast flags): 12 / 16 / 24 = 0.985 / 1 / 1.010 (cb2), 0.973 / 1 / 1.009 (cb1). Compile mode | |
| max-autotune-no-cudagraphs 1.015x after a ~100 s one-time autotune (cached per shape); CUDNN_BENCHMARK_LIMIT=0 | |
| 0.993x. | |
| - Needs a multi-GPU A/B: --optimize-ddp; --compact-catalog --ring-direct under --shard-runs at 4 ranks (RAM, data | |
| wait); batch 12 vs 16 at 4 GPUs; NCCL_MAX_NCHANNELS=4 (fewer SMs for NCCL during the overlapped all-reduce). If | |
| --optimize-ddp holds, AGENTS.md's "--fused + DDP needs optimize_ddp = False" is outdated. | |
| - Left: stride-2 downsample convs are 14% of the cb1 step (down1 dgrad 143 TFLOPS; the kernel agent's next item); | |
| fovea shape tuning; rowwise FP8 linears. fq lane jobs ran inside the daemon's 1 GB unit (the coordinator raised | |
| it); kernels/trainprof/job.sh puts each job in its own scope (12G cap, oom_score_adj 900, in-process compile). | |
| Code, tests, results JSON: kernels/trainprof/. | |
| - 13:30 orchestrator: kernel agent and training-profile agent finished (their entries above). Combined, one GPU: FP8 | |
| convs (MCSR_CONVBLOCK_REPO=kernels/fp8conv/target) + --stem triton --ema-every 4 --clip-in-opt 1.40x (32.8k fps); | |
| + --conv-blocks 1 2.09x (48.9k); --fovea 96 + --conv-blocks 1 2.18x before FP8. GPU 1 now runs a gate A/B through | |
| fq: gate8k-A (today's math) vs gate8k-B (recipe flags + FP8), --before 1790502600 (4.2k h), 8,000 steps, seed 0, | |
| val every 2,000 (logs/gate8k-{A,B}.out). The progress agent was told to use the flags (+FP8) for fast-C. | |
| - 15:50 gate8k-A hit its 3,600 s fq timeout at step 6,600 of 8,000 (my timeout was too tight): ~24k fps between two | |
| long stalls (steps ~20-800 and ~5,500; host RAM pressure from the progress agent's trainer + evals, not isolated). | |
| Its val losses (seed 0, --before 1790502600) stand: step 2000 1.1145, 4000 1.0853, 6000 1.0679. gate8k-B (flags + | |
| FP8, same seed/schedule) queued alone at 15:52 with a 7,200 s timeout; compare at 2k/4k/6k. | |
| - Progress-agent evals so far (one pass unless noted): fast-A (20k steps, 2 GPUs = 164M frames, full ~9k h) s10000 | |
| 0/24 logs, 0.79 mined/ep; s20000 1/13 episodes (passes a/b incomplete, rerun going). Control: pol3-hold s20000 | |
| re-evaluated on GPU 3 next to training: 2/24 logs, 0.50 mined/ep, 22 deaths vs 3/24, 1.50, 17 on GPU 0 earlier: | |
| co-located evals may be biased (or noise); the progress agent owns this comparison. | |
| - 16:12 gate8k-B (new flags + FP8 convs, seed 0, same snapshot) val loss 2000/4000/6000/8000: 1.1225 / 1.0880 / | |
| 1.0706 / 1.0644 vs gate8k-A (today's settings) 1.1145 / 1.0853 / 1.0679 / (cut off): +0.008 / +0.003 / +0.003, | |
| inside the ~0.005 seed spread and narrowing. 34.1k vs ~24.5k fps (1.39x), 8,000 steps in 19 min, no stalls. | |
| FP8 + flags pass the gate (one seed). 16:15 architecture agent (Opus, GPU 1 via fq): DINOv3 ConvNeXt-Tiny encoder | |
| option, fine-tuned and frozen arms on the same gate8k benchmark, until ~19:30. | |
| ## 2026-09-28 17:30 MT - progress agent | |
| - Question: do 20k-step training (246M frames, 2.4x fewer than pol3-hold's 590M) and 1 conv block per stage keep | |
| closed-loop quality? All runs: 187M-family conv policy, v3 hold labels, batch 24/GPU x T256 on GPUs 2,3 (= pol3-hold's | |
| global batch 48), 20k steps, warmup 1000, cosine to 20k, EMA 0.9995. (fast-A is 246M frames, not 164M: a first | |
| launch at batch 16 was stopped at step 420.) | |
| - fast-A: all v3-labeled data (rank shard 18,531 runs / 4,657 h, ~9.3k h), 2 blocks, bf16, 12:09-14:03. Resumed at | |
| step 5000 with --compact-catalog --seed 1: trainer anon 33.5 -> 10.7 GB, so eval clients fit. 265-300 ms/step alone | |
| (41-46k fps; GPU 3 at its 600 W cap, 2.34 GHz), 336 ms next to eval clients (36.5k fps). | |
| - fast-Br: ranked only (--before 1790502600: 11,602 runs / 2,111 h per rank = pol3-hold's 4.2k h), --conv-blocks 1 | |
| (180.8M params, 6.3 vs 10.5 GFLOP/frame), bf16, 14:03-16:04, 215-222 ms/step next to evals (55-57k fps, 1.5x). | |
| Died 15:25 at step ~10.8k: NCCL allreduce timeout (600 s) after a rank stalled in host-RAM thrash; resumed from | |
| step10000 (--seed 1 --ring-direct). Val (pol3-hold's 1,279 val runs) 0.9689 / camera 0.9148; pol3-hold 0.9491 at | |
| step 20k, 0.9165 final. | |
| - fast-C: fast-Br + FP8 convs (MCSR_CONVBLOCK_REPO=kernels/fp8conv/target) + --compact-catalog --ring-direct --stem | |
| triton --ema-every 4 --clip-in-opt --free-compile-workers, TORCH_NCCL_ASYNC_ERROR_HANDLING=0; 16:04-17:02 (58 min | |
| incl. startup). ~173 ms/step (71k fps) next to evals, loader-bound (data wait 20-90 ms at 2 workers/rank). Val | |
| 0.9688 / 0.9146 = fast-Br (FP8 + flags neutral). 1 block and ranked data instead of the coordinator's "fast-A recipe" | |
| (2 blocks, full data): fast-A's step 10k was weaker, and 2 blocks would not have trained + evaluated by 18:00. | |
| - fast-C2 (running): fast-C with 2 blocks = the adopt candidate and the clean lever-2 control. 17:21, 187 ms/step | |
| alone (65.6k fps, data wait 0.4 ms), ETA ~18:25; mcsr-fastwatch-fast-C2 then runs its final passes a+b by itself | |
| (data/play/m180-fast-C2-s20000-{a,b}, ~18:50). | |
| - Evals: fq jobs ran inside the GPU 0 daemon's 1 GB cgroup (a client OOM-killed the daemon twice); from 12:20 on GPUs | |
| 2/3 next to a training rank. scripts/eval_slot.sh = eval180 settings, slot 0 GPU 3 / slot 1 GPU 2, one client per GPU, | |
| ~110 s per 180 s episode (38 s alone), training ~10% slower; JOBS= reruns a seed subset. scripts/fast_watch.sh | |
| (EMA export + pass units), scripts/fast_compare.py (table below). Controls next to a trainer: pol3-hold s20000 0.50 | |
| mined/ep, 22 deaths (unshared 1.50, 17); final 1.96, 11 (unshared 1.79, 25/48): no consistent bias, so the | |
| reference is pol3-hold pooled, 96 episodes. Other jobs' RAM spikes OOM-killed 6 eval clients (12:21-16:33: | |
| KernelBench nvcc builds of 10-14 GB and a 9 GB process on GPU 0, gate8k and kernels.arch.bench_dw on GPU 1); cut | |
| passes were finished with seed-subset reruns (*rest, *r dirs; fast-A and fast-Br finals have 37 and 38 episodes). | |
| - Closed loop, 180 s, 24 held-out seeds, auto macros (sh = next to a training rank): | |
| policy eps log table mined/ep any-mined holds>=40 attack deaths still net60 m | |
| pol2 final 47 0 0 0.30 11 0 4.8% 26 69.8% 27.0 | |
| pol3 s20k 24 3 3 1.50 11 85 15.7% 17 67.7% 31.0 | |
| pol3 final 48 3 3 1.79 28 135 11.9% 25 73.7% 20.7 | |
| pol3 sh 48 2 2 1.23 24 136 13.0% 33 73.7% 27.5 | |
| pol4-l s20k 24 0 0 0.25 2 11 2.4% 10 87.6% 12.4 | |
| pol5 s5k sh 14 0 0 0.00 0 2 0.4% 4 94.5% 7.9 | |
| fast-A s10k 24 0 0 0.79 9 44 6.8% 16 76.9% 16.9 | |
| fast-A s20k 37 1 1 1.16 13 94 9.9% 28 71.7% 31.4 | |
| fast-Br s10k 20 1 1 1.30 8 80 16.5% 14 69.5% 28.7 | |
| fast-Br s20k 38 1 1 0.84 15 185 20.0% 27 67.4% 28.9 | |
| fast-C s20k 48 3 3 1.29 21 234 21.1% 33 67.4% 25.9 | |
| vs pol3-hold pooled (96; permutation test on means, Fisher on counts): fast-C mined 1.29 vs 1.51 p=0.61, logs 3/48 vs | |
| 5/96 p=1.0, attack 21.1 vs 12.4% p<0.001, holds >= 40 per episode 4.9 vs 2.8 p<0.001, still 67 vs 74% p=0.03. | |
| fast-Br + fast-C (86): mined 1.09 p=0.20, logs 4/86. fast-A: mined 1.16 p=0.43, attack 9.9% p=0.07, still 71.7% | |
| p=0.52. pol2 on the same tests: p<0.001 on mined, attack and holds, so the tests can see a pol2-sized gap. | |
| - Verdict. Lever 1 (20k steps): no measurable loss; fast-C matches pol3-hold's final on logs and crafting tables (3/48 | |
| each) with mined/ep inside the noise, trained in 58 min on 2 GPUs. Lever 2 (1 block): no closed-loop loss detected | |
| (more attack holding, less standing still, mined/ep a non-significant 0.4 lower), but held-out loss is worse (0.969 vs | |
| 0.949 at the same 20k steps); fast-C2 is the same-settings A/B. Full data: fast-A did not idle (still 71.7% vs pol4-l's | |
| 87.6%) but attacked less (9.9%) and gained nothing over ranked-only; early full-data checkpoints do idle (fast-A | |
| step 10k attack 6.8%, pol5-base step 5000 94.5% still) and annealing recovers them. Absolute rates stay low (final | |
| checkpoints reach a log in <= 6% of episodes; 52-76% die, mostly drowning). | |
| - Next: read fast-C2 (lever 2 at identical settings); train on ranked data (or trim idle speedrun.com frames) at 20k | |
| steps with FP8 + flags and 3-4 loader workers per rank (fast-C was loader-bound; --compact-catalog frees the RAM); | |
| spend the saved time on drowning (the cap on every milestone) and on evals that other jobs' RAM spikes cannot kill. | |
| - 17:45 orchestrator: progress agent done (its entry above). Verified: fast-C (1 conv block + FP8 + new flags, | |
| ranked-only 4.2k h, global batch 48, 20k steps = 246M frames) ran 58 min 13 s wall on GPUs 2,3 (unit start 16:04:21 | |
| to 17:02:33, 24.1 GB peak, data wait 24 ms at 2 workers: loader-bound) and matched pol3-hold in the game (3/48 logs | |
| and tables). fast-C2 (2 blocks, same recipe) step ~5.9k at 62k fps, ETA ~18:30; its watcher starts both eval passes; | |
| I watch it. Eval clients were OOM-killed 6 times this afternoon by other jobs' memory spikes (KernelBench compiles | |
| 10-14 GB on GPU 0, a 9-10 GB benchmark job on GPU 1). | |
| - 18:00 Evals made resumable (Elliot: KernelBench memory spikes must not cost whole passes). scripts/eval_slot.sh now | |
| loops up to MAX_ATTEMPTS (6): each attempt plays only seeds without <mid>.mp4.done.json (the mod claims queue jobs in | |
| sorted order), waits for NEED_MB free RAM first, logs actions to actions.rK.jsonl with the seed order in | |
| seeds.rK.txt; play_eval.sh takes ACTLOG=. A killed client now costs the episode in flight (~40 s alone, ~110 s next | |
| to a trainer). Bug found: policy_server opens its action log with "w", so this afternoon's seed re-runs into the | |
| same TAG truncated actions.jsonl: attack stats (holds >= 40, attack %) for the re-run passes (fast-A s20000, | |
| fast-Br s20000) may be misaligned; milestones/mined/deaths come from state files and are fine. | |
| scripts/holdfix_page.py episodes() maps actions.rK.jsonl to seeds via seeds.rK.txt (falls back to actions.jsonl). | |
| - 18:46 fast-C2 (2 blocks, FP8 + flags, ranked 4.2k h, 20k steps; 67 min on GPUs 2,3, val 0.959 vs fast-C 0.9688): | |
| 48 eps (first resumable eval_slot passes, 0 kills): 1 log, 1.54 mined/ep, 181 holds >= 40, 34 deaths, still 69.6%, | |
| net60 34.5 m vs fast-C (1 block) 3 / 1.29 / 234 / 33 / 67.4% / 25.9 and pol3-hold final 3 / 1.79 / 135 / 25 / | |
| 73.7% / 20.7. No detectable game difference between 1 and 2 blocks: adopt 1 block. Deaths 33-34 in all | |
| shared-GPU evals vs 25 for pol3 on GPU 0 alone (pol3 shared 33): possible eval bias, unresolved. | |
| - 18:45 fast-D = fast-C's recipe (1 block, FP8, flags, ranked data, global batch 48, 20k steps) with --workers 4, | |
| seed 1, GPUs 2,3: 94.3k fps (47k/GPU), data wait 3.6 ms (fast-C: 71.9k at 2 workers, 24 ms) -> ~45 min for 246M | |
| frames on 2 GPUs. Its watcher (unit mcsr-fastwatch-fast-D) starts both eval passes at step 20000. | |
| ## 2026-09-28 7:05 pm MT - architecture agent (DINOv3 encoder) | |
| - Question (Elliot): pretrained vision encoder instead of our from-scratch conv encoder? Built `--encoder dinov3` | |
| (DINOv3 ConvNeXt-Tiny, LVD-1689M) and ran it on the gate8k benchmark: one GPU (fq lane 1), seed 0 (same batch at | |
| every step as A/B), --before 1790502600, the 8,000-step cosine schedule stopped at step 4,000 (--stop-at; at 3.1k fps | |
| 8,000 steps would take ~3 h). Verdict: at equal steps the fine-tuned DINOv3 encoder beats ours: val 1.0696 vs A | |
| 1.0853 / B 1.0880 at step 4,000 (-0.016/-0.018, ~3x seed noise; camera 1.004 vs 1.019, act equal), about where ours | |
| is at step 6,000. But it costs 10.1x per frame (3.14k vs B's 31.7k fps), so per GPU hour ours wins by far. Frozen | |
| (current frame only) trails and closes: +0.056 at step 2,000, +0.011 (vs B) at 4,000; 2.3x slower than B as is. | |
| Val loss is not game performance; no closed-loop eval of these checkpoints. | |
| - Held-out val loss total (camera / act); one-GPU fps = median of 20-step intervals, training only | |
| (kernels/arch/collect.py -> kernels/arch/results.json): | |
| run val@1000 val@2000 val@3000 val@4000 fps | |
| A ours, today's flags - 1.1145 (1.0446/0.0700) - 1.0853 (1.0189/0.0664) 23.2k | |
| B ours, flags + FP8 - 1.1225 (1.0515/0.0711) - 1.0880 (1.0214/0.0666) 31.7k | |
| DINOv3 fine-tuned 1.1718 (1.0923/0.0795) 1.1135 (1.0427/0.0708) 1.0865 (1.0188/0.0676) 1.0696 (1.0037/0.0659) 3.14k | |
| DINOv3 frozen 1.3772 (1.2391/0.1381) 1.1787 (1.0931/0.0856) 1.1294 (1.0565/0.0729) 1.0990 (1.0307/0.0683) 13.7k | |
| DINOv3 ft, naive 1.2914 (1.1717/0.1196) cancelled at step 1,060 (no feat_scale, see below) 3.14k | |
| B continues: 6000 1.0706, 8000 1.0644 (A 6000 1.0679); seed-to-seed noise ~0.005. Paired train loss (same batch per | |
| step, window means of the logged steps; A vs B differ by 0.003-0.008), A / B / ft / frozen: steps 101-1000 1.449 / | |
| 1.502 / 1.359 / 1.589; 1001-2000 1.078 / 1.085 / 1.081 / 1.191; 2001-4000 1.015 / 1.019 / 1.007 / 1.047. So the | |
| fine-tuned lead is early, gone by 1,000-2,000, and back by 2,000-4,000. First logged step with act loss < 0.1: A 580, | |
| B 700, ft 580, naive ft 980, frozen 1380 (frozen has no motion in the encoder; ours sees the 3-frame tubelet). | |
| - Speed: train GFLOP/frame 21.1 vs 10.5 (ConvNeXt-T at 256x144 is ~6.4 GFLOP forward vs our 3.2). Fine-tuned: 42 GB | |
| GPU with activation checkpointing in every block (stages 3-4 without it: 80 GB and slower, 2.93k fps synthetic); | |
| frozen: 15 GB. Where it goes (kernels/arch/bench_dw.py, 4096 frames, one compiled block fwd+bwd, no recompute): | |
| 123.7 / 80.9 / 45.7 / 38.6 ms per block at stages 1-4 x (3, 3, 9, 3) blocks = 1.14 s; the 7x7 depthwise conv is 12% | |
| of it (channels_last cuDNN; NCHW 4-5x slower), the rest is the 4x inverted-bottleneck MLP + LayerNorm + GELU, | |
| memory-bound at 64x36 (34 TFLOPS at stage 1, 120 at stage 4). No custom kernels; with 2x our FLOPs it stays >= 2x | |
| slower even at our MFU. | |
| - Build (model.DinoConvNeXtEncoder; flags default off): ConvNeXt with timm parameter names; weights in | |
| data/models/dinov3/convnext_tiny.dinov3_lvd1689m (timm/convnext_tiny.dinov3_lvd1689m via `uvx --from huggingface_hub | |
| hf download`; torch.load of its pytorch_model.bin, no new project dependency). BT.601 limited YUV -> RGB -> ImageNet | |
| mean/std is affine, so it is folded into the stem weights (no clamp) and the stem runs on kernels/trainprof/ | |
| stem_triton (uint8 frames read in the GEMM). Tubelet (-2,-1,0): pretrained stem on frame 0, a separate | |
| zero-initialised stem_prev (full LR) for frames -2,-1, so step 0 is exactly the pretrained per-frame model. Head | |
| (keeps the layout: crosshair cell, hotbar row): stage 3's 9x16 map gets one zero row (ceil) -> 5x8x768, pretrained | |
| final LayerNorm per position, x feat_scale, flattened into Linear(30720, 1024), as ours (5x8x512 -> 1024). Flags: | |
| --encoder dinov3 --convnext tiny|small|base --pretrained PATH --enc-frozen (current frame only, backbone under | |
| no_grad) --enc-lr-mult (fine-tuned arm 0.1: encoder peak LR 3e-5, new parameters 3e-4, wd 0.05 on matrices) | |
| --enc-ckpt N (per-block activation checkpointing in the first N stages, default 4), --stop-at N (stop at step N of | |
| the --steps schedule). Config.convnext / enc_frozen and the feat_scale buffer are in the checkpoint; the frozen | |
| best.pt loads strictly through Config(**ck["config"]) as policy_server does (CPU forward checked, no closed loop). | |
| - Checks (kernels/arch/test_dinov3.py): vs timm convnext_tiny with the same weights on explicitly converted RGB (fp32): | |
| 2.2e-6 rel L2; Triton stem vs fp32 conv 3.0e-3 (bf16); zero stem_prev: no leak from earlier frames; frozen = | |
| unfrozen at init; gradients reach stem_prev and nothing in the frozen backbone. | |
| - feat_scale: the pretrained final LayerNorm's affine has RMS 3.4 (max 13.6), so unscaled the flattened features are | |
| ~5x ours. The naive fine-tuned run (logs/arch-dino-ft-naive.out) kept per-100-step grad norms at 11-43 until ~step | |
| 800 (A/B 2-5) and its act drop came at 980. feat_scale = 0.65 / RMS(LayerNorm out) = 0.191 (0.65 = RMS of | |
| GELU(N(0,1)), our features' scale); the rerun started at similar grad norms (37-47) but was at ~2 by step 500 and | |
| dropped at 580. One run each, and A/B (same model) drop at 580/700, so the size of this effect is not pinned down. | |
| - Ops: the first two launches of the fixed fine-tuned run were OOM-killed in their 14 GB scope while compiling from | |
| scratch with the loader up (14-15 GB); the naive run likely hit the Inductor cache the synthetic smoke test had | |
| filled. A 12-step --synthetic run first (same graph, no loader) fixed it: 8.8 GB at startup, 13.5 GB peak over the | |
| run (close to the cap). Frozen run 8.9 GB. OOM logs kept as logs/arch-dino-ft2-oom{,2}.out. | |
| - Next: (1) keep our encoder and get the prior by distillation: a 1x1 head on our final map regressing the frozen | |
| DINOv3 5x8x768 features on a subsample of frames (e.g. 1 in 8: ~31 ms/step of teacher forward next to B's 124 ms, | |
| projection); (2) if a pretrained encoder is wanted directly, DINOv3 ViT-S/16 (16x9 = 144 tokens at 256x144, dense | |
| GEMMs + flash attention) should run much closer to peak than ConvNeXt's memory-bound MLPs; measure synthetic fps | |
| before training; (3) cached frozen features need channel reduction (the bf16 map is 61 KB/frame = 18.7 TB for this | |
| 304M-frame snapshot; PCA to 64 channels in fp8 ~0.75 TB) and some motion input; (4) before any play decision, a | |
| closed-loop eval of data/ckpt/arch-dino-ft2/step4000.pt against a B checkpoint at 4,000 steps (B saved none). A | |
| larger DINOv3 (ConvNeXt-S doubles stage 3) is not worth it at this cost; action chunking and foveation are | |
| orthogonal and cheaper per GPU hour. | |
| - Files: mcsr/model.py (CONVNEXT, DinoConvNeXtEncoder, Config.convnext / enc_frozen), mcsr/train.py (flags above, | |
| lr_mult param groups), kernels/arch/{test_dinov3,bench_dw,collect}.py + results.json, logs/arch-*.out, checkpoints | |
| data/ckpt/arch-dino-{ft2,frozen2}/ (best.pt; step4000.pt with optimizer state for --resume --continue, which | |
| restarts the loader at epoch 0, so steps 4001+ would not see A/B's batches). | |
| - 19:05 architecture agent done (its entry above): DINOv3 ConvNeXt-Tiny fine-tuned beats our encoder at equal steps | |
| (val @4000 1.0696 vs 1.0853/1.0880, camera only) at 3.1k vs 31.7k fps; frozen 1.0990 @4000 at 13.7k fps, closing. | |
| Not worth it per GPU hour; distillation or ViT-S/16 are its suggested follow-ups. | |
| - 19:10 fast-F on GPU 1 alone: fovea 96 + 1 block (bf16 merged kernels: the FP8 tree has no fovea shapes), batch 48 | |
| on one GPU (global batch 48 like fast-C/D), same flags/data/schedule, seed 0: 57.4k fps on ONE GPU (fast-D: 46k/GPU | |
| with FP8, no fovea) -> ~71 min; watcher starts both eval passes at step 20000 (~20:25). | |
| - 19:33 fast-D done: 46 min 5 s wall on GPUs 2,3 (18:46:56-19:33:01) for 246M frames; val 0.974 (fast-C 0.9688). | |
| Evals 48/48, 0 kills (resumable eval_slot). fast-D 2/48 logs, 1.12 mined/ep, 38 deaths; pooled fast-C+D 5/96 logs | |
| (5.2%), 1.21 mined/ep, 71/96 deaths vs pol3-hold final 3/48, 1.79, 25/48. GPUs 2,3 then idle 19:50-20:15 (missed). | |
| - 20:15 fast-E = adopted recipe (1 block, FP8, flags, 4 workers) on all v3-labeled data (no --before: rank shard | |
| 4,657 h, ~9.3k h): data-scale retest on the fast recipe, 95k fps, ETA ~21:05, evals via its watcher. | |
| - 20:25 Swim-up macro (drowning = the top cap on milestones): mod ControlLoop.surface, job flag "surface" (play_eval.sh | |
| SURFACE=1): under water with < 40% air -> jump + sprint-swim forward with pitch easing to -60 until the head is | |
| out, then jump held (afloat) until air >= 90%; events "surface start/end" in <out>.macros.jsonl; state logs now | |
| carry "air". Built (BUILD_OK) and installed as mcsr-render-macros.jar (previous build kept as | |
| mcsr-render-macros.prev.jar; identical behavior with SURFACE unset). First test: fast-D s20000 with SURFACE=1, one | |
| pass on GPU 1 (VGL egl1, slot 2) -> data/play/m180-fast-D-s20000-surf-a (baseline without: 38/48 deaths). | |
| - 20:41 Swim-up macro works: fast-D s20000 with SURFACE=1 (24 eps, GPU 1 alone): 0 deaths (without: 38/48), standing | |
| still 35.0% (72.3%; humans 34%: most "idle" was time spent dead), 2.50 blocks mined/ep (1.12), logs 2/24 (2/48), | |
| net60 39.3 m (25.7). 202 surface events (~8 per episode: it keeps diving). scripts/eval_gpu.sh (resumable serial | |
| passes on one GPU/slot, env passes through): unit mcsr-eval-surf runs fast-D-surf-b, pol3-hold-final-surf-a/b, | |
| fast-C-surf-a/b on GPU 1 slot 2 (~90 min). | |
| - 21:20 fast-F (fovea 96 + 1 block, bf16, 1 GPU, 71 min; val 0.949) 48 eps without surface: 1/48 logs, 1.31 mined/ep, | |
| 33 deaths, still 68.2% vs fast-C+D 5/96, 1.21, 71/96: no detectable loss from foveation. With SURFACE=1: fast-D 48 | |
| eps 3/48 logs, 2.38 mined/ep, 0 deaths, still 34.2%, net60 35.9; pol3-hold final 24 eps 3/24, 2.88, 0 deaths. | |
| fast-E (adopted recipe, full ~9.3k h, val 0.8632 on the full-data val set) evals running. Queued SURFACE=1 passes of | |
| fast-E and fast-F on GPUs 2/3 (slots 3/4, after fast-E's plain evals); GPU 1 queue continues. | |
| - 21:40 Why no iron (Elliot asked): (1) humans on the 24 eval seeds get iron from chests, not ore: story.smelt_iron at | |
| median 22 s (47/48), diamonds from buried-treasure loot 26 s (15/48), 90% open a chest in the first 60 s (1.4 opens), | |
| table 51 s, iron pickaxe 55 s, nether 116 s; the policies loot 3 chests in 48 episodes (iron 1/48 with SURFACE=1). | |
| (2) What humans see and the policy does not: 20 random first-minute VOD frames: 6 GUI/menu screens (crafting, chest, | |
| pause), 4 with the F3 debug text incl. the pie chart (used to find chests), chunk borders (F3+G, buried treasure is | |
| at a fixed chunk offset), hitboxes, a held treasure map, HUD/hand/hotbar/chat/subtitles on nearly all, facecams; | |
| eval frames are clean (hudHidden, no hand). (3) Data mix (400 replays, 70 h): overworld before the first nether | |
| and <= 180 s = 19.5% of frames; nether 60.2%, end 6.6%, later overworld 13.7%. (4) Action space: no right-click | |
| "use" (chests, maps), no hotbar slot choice, GUI time labeled as no-op. (5) 12.8 s context. Queued: fast-D s20000 | |
| with HUD=1 + SURFACE=1 (mcsr-eval-hud, GPU 1 after the surf queue). | |
| - 21:55 Drowning mechanism (Elliot's boat hypothesis): humans on the eval seeds ride anything in 8% of runs (0.4% of | |
| the first minute): boats are not the story. They do dive: 77% of runs spend > 5% of the first minute below sea | |
| level (mean 23.5%), 69% go below y 55; 75 chests opened in the first 120 s on 23/24 seeds, 65% of them below sea | |
| level (median y 54: shipwrecks, buried treasure under the sea floor), nearest one a median 35 blocks from the eval | |
| spawn. The agent's 63 drownings (fast-D, pol3-hold finals, no surface macro) are a median 46 blocks from the nearest | |
| human chest (17% within 16 blocks) and its heading from spawn is unrelated to the chest direction (cosine median | |
| -0.11; > 0.7 in 37%, chance ~25%): it copies "dive" without the target. It also cannot see its air: the air bubbles | |
| are HUD, hidden in evals (humans see them). | |
| - 22:10 Elliot: run the next threads; a friend recommends GRPO/PPO. Three Opus agents until ~08:00 09-29, each | |
| appending DEVLOG entries: interpretability (GPU 1 via fq lane 1, slots 13-14: linear probes on the policy's | |
| residual stream -> SAE -> closed-loop ablation of dive features), goal-conditioning (GPU 2, slots 5-6: hindsight | |
| "next chest" destination input, mod sends the nearest loot chest at play time behind a job flag; it alone edits the | |
| Java mod), RL (GPU 3, slots 7-12: env throughput first, then GRPO with KL to the imitation policy, training seeds | |
| only, held-out eval vs fast-D). GPU 0 stays off-limits (KernelBench / netherite reservation). netherite (anvil, | |
| 1.7.10 engine rebuild) is not usable for this 1.16.1 policy yet. | |
| ## 2026-09-28 10:35 pm MT - RL agent (stopped) | |
| - Stopped at ~10:32 pm on the coordinator's instruction (Elliot defers RL until the netherite fast simulator is ready), | |
| about 20 min after starting. Nothing was launched or written: no units, clients, policy servers or fq jobs; no | |
| mcsr/rl/ or kernels/rl/; mcsr/policy_server.py and play_eval.sh untouched. GPU 3 empty, slots 7-12 unused. | |
| - Env throughput, observed (not a controlled benchmark) on the orchestrator's eval m180-fast-D-s20000-hudsurf-a (GPU 1, | |
| slot 2, one lockstep VirtualGL client alone, SURFACE=1, auto macros): 109-110 ticks/s. Per tick: policy server 5.2 ms | |
| (yuv 0.8, encode 1.3, temporal 2.9, sample 0.2) + client 3.4 ms (the server's wait_for_frame); lockstep runs them in | |
| series. A 3,600-tick episode took 30.1 s; the next world was connected 8 s later (~3 s of that is fixed mod waits: the | |
| 1 s queue poll and 40 start ticks, the rest world creation). RAM: client JVM RSS 5.26 GB (5.07 GB anon) at -Xmx3G, | |
| policy server 2.06 GB, the eval unit 8.1 GB in total. Clients per GPU not measured. | |
| - Sizing for a netherite comparison (projections from those numbers, not measured): a ~20 GB budget holds 2-3 clients | |
| at today's heap. 60 s episodes would spend ~8 s creating the world per ~11 s of play (~40% overhead). With a | |
| batched server, the ceiling is ~110 ticks/s per client, i.e. ~300 ticks/s from 3 clients. That is ~15 x 60 s | |
| episodes per minute before world overhead, or ~2-3 min per GRPO iteration of 32 episodes. | |
| - Design notes for whoever picks this up: | |
| (1) The policy reruns the 12-layer temporal core over the whole 256-frame sliding window every tick. That costs 2.9 | |
| of the 5.2 ms. It also means per-tick contexts cannot be recomputed cheaply for PPO ratios. A block-aligned context | |
| (the start moves in 128-tick steps, so 128-255 frames) makes the learner's recomputation exact with 2 chunk forwards | |
| per 128 ticks (~64x fewer tokens than per-tick windows). It also allows a KV cache at rollout. RoPE is relative, so | |
| those positions match training clips. | |
| (2) Freeze the encoder and store per-tick embeddings (2 KB/tick in bf16) at rollout. The learner then trains only the | |
| temporal core and heads, needs no frames, and a 32-episode iteration is ~74k tokens (seconds of GPU). | |
| (3) Rewards can come from <out>.state.jsonl (every 10 ticks) and <out>.macros.jsonl. Auto macros craft a log into | |
| planks within 5 ticks, so count logs as the log-count change plus planks-craft events. Mask ticks under the | |
| surface macro, because it overrides the movement keys. | |
| - 22:25 Elliot: RL and goal-conditioned play wait for netherite; interpretability continues. Goal and RL agents told | |
| to stop cleanly (their DEVLOG entries follow). Policy inference, one GPU (fast-D, eager bf16): 51.5k frames/s on | |
| full sequences (= per-tick rate with a KV cache); today's server step (encode + temporal over 256 cached frames) | |
| 1.8-2.3k env steps/s batched (B 64-1024). SPEC.md: new "Deferred until netherite" section with these numbers and | |
| the 1.7.10 transfer risks. | |
| ## 2026-09-29 10:34 pm MT (Sep 28) - goal-conditioning agent (stopped) | |
| - Stopped by the coordinator at 10:33 pm (play-time destination work deferred until the netherite fast simulator is | |
| ready). Nothing launched: no units, no fq jobs, GPU 2 never used. Untouched: the Java mod, mcsr-render-macros.jar | |
| (md5 1d0260cd...), play_eval.sh, model.py, train.py, policy_server.py. | |
| - Built: hindsight chest labels. scripts/goal_labels.py -> data/goal/goal_H60.npz (245 MB, 74 s on 8 procs): for every | |
| replay-backed run (525 renders + 6,208 VOD pairs incl. 'weak', 1,178 h), per video frame, the next chest the player | |
| opens for the first time (CHEST_ANIMATION open=1 of that player; double-chest halves on one tick = one open) within | |
| H = 60 s, only if the player stays in the chest's dimension until the open. Stored as int8 [N,3] = forward/right/up | |
| blocks in the player's yaw frame (pairs.targets_for_ticks convention), signed log1p scale clipped at 512 blocks; | |
| -128 in column 0 = no chest within H (also unaligned VOD frames). Keys: paths (targets npz path per run), offsets, q, H. | |
| - Measured: 29,637 first chest opens (25.2 per hour of play); 17.6% of replay-backed frames carry a goal at H = 60 | |
| (H 15/30/45: 7.6/11.9/15.1%); goal distance median 18.3 blocks (p90 77.5); time to open median 18.5 s; distance when a | |
| goal first appears (60 s ahead) median 32 blocks, p75 49, p90 142. Chest opens are 1.4-5 blocks from the player (spot | |
| check). Replay-backed runs are ~20% of the --before 1790502600 policy data, so ~3.5% of training frames have a goal. | |
| - mcsr/data.py (additive, unused by default paths): GOAL_* constants, goal_relative, goal_quantize, goal_state, | |
| GoalStore(path).window(lpath, start, T) -> int8 [T,4] (state 0 unknown / 1 none / 2 goal, qf, qr, qu); runs not in | |
| the store (IDM-labeled VODs) = unknown. | |
| - Resume plan (not built): loader puts GoalStore windows in prev["goal"] (current frame, not shifted) when | |
| --goal-input; model adds a zero-init MLP embedding of (state one-hot, q/126, unit direction, log distance) to each | |
| frame token, with per-window dropout to "unknown" so that has-goal = 0 at play time is the unconditional policy, not | |
| "no chest coming" (a plain has-goal bit would teach that); mod sends the nearest unopened loot chest (lootTableId != | |
| null via an accessor mixin, found on the server thread every ~10 ticks) as extra floats only with job "goal", else | |
| the protocol is unchanged; policy server reads them behind a flag and logs them (heading agreement). Consider | |
| up-weighting replay-backed runs: goal frames are only ~3.5% of the mix. | |
| - 22:40 Both deferred agents stopped cleanly (their entries above): RL built nothing yet (measured from the HUD eval: | |
| one lockstep client alone 109-110 ticks/s = 5.2 ms policy + 3.4 ms client per tick, 30 s per 3,600-tick episode, | |
| +8 s per world; client 5.26 GB + server 2.06 GB); the goal agent left hindsight chest labels data/goal/goal_H60.npz | |
| (6,733 replay-backed runs, 1,178 h; 17.6% of their frames carry a goal; median 18 blocks / 18.5 s ahead) and an | |
| unused GoalStore in mcsr/data.py. GPUs 2-3 handed to the interpretability agent (RAM budget 20 GB). | |
| - 22:45 All with SURFACE=1 (48 eps each unless noted; logs / blocks mined per ep / deaths / still / chests / iron): | |
| pol3-hold final 5 / 2.54 / 1 / 54.4% / 3 / 0; fast-C 3 / 1.56 / 5 / 47.6% / 3 / 1; fast-D 3 / 2.38 / 0 / 34.2% / | |
| 3 / 1; fast-E (full ~9.3k h incl. speedrun.com) 1 / 1.15 / 1 / 46.9% / 2 / 0; fast-F (fovea) 4 / 1.73 / 2 / 36.7% / | |
| 1 / 0; fast-D + HUD (24 eps so far) 0 / 1.29 / 2 / 47.7% / 1 / 0, surface takeovers 174 vs 202 per 24 eps without | |
| HUD. Without drowning every recipe lands at 1-5 logs per 48 episodes and ~1-3 chests; full data is the weakest | |
| (trim speedrun.com idle frames before using it); showing the HUD does not help so far. | |
| - 22:55 Elliot: stay on interpretability until he says netherite is ready. New GOAL.md holds the parked RL plan: | |
| no privileged observations (the chest position as an input is cheating), privileged rewards allowed (progress toward | |
| the nearest seed-reconstructed chest), GRPO from the imitation policy, and the throughput budget (policy ~50k | |
| steps/s/GPU once KV-cached vs millions of sim ticks/s: the policy becomes the bottleneck). | |
| ## 2026-09-28 10:45 pm MT - interpretability agent | |
| - Question (Elliot): what does the policy represent, and does its diving know where the loot is? Tools in mcsr/interp/ | |
| (extract, labels, probe, sae, sae_report, steer, fidelity), results in kernels/interp/, activations in data/interp/fastD. | |
| - Activations: fast-D-s20000 teacher-forced on 4.92M frames in 266 s on GPU 3 (18.5k fps): 525 human renders (first | |
| 6,000 frames each; clean frames like the evals, frame i = replay tick i) + 504 closed-loop episodes (21 m180-* pass | |
| dirs of fast-C/C2/D/E/F/pol3-hold on the 24 eval seeds, previous actions from their action logs). Windows of 256 | |
| advancing by 64 (>= 192 frames of context). Fidelity vs the server's own logged key probabilities | |
| (kernels/interp/fidelity.json): mean abs diff 0.003-0.005 at frame offset 0 vs 0.015-0.025 at +-1 (aligned); exact | |
| per-tick server emulation vs the windowed pass 0.0003-0.0004. Residual = mp4 recompression + the mine/hit, | |
| place/throw bits the action log merges. | |
| - Linear probes (ridge, 5-fold grouped by world seed, layers enc/in/L1-L12; kernels/interp/probes.txt): overworld, | |
| head below sea level, swimming, submerged: AUROC 0.94-0.99 at every layer (18x32 pixel baseline 0.88-0.97). Depth | |
| y R^2 0.78 human / 0.44 agent. Dive within 5 s: 0.92-0.94 (pixels 0.86-0.90: mostly visible water). Air while | |
| submerged (agent, HUD hidden): R^2 0.56 at L2-L6 vs 0.25 at the frame encoder and 0.07 from pixels: the causal | |
| core keeps a time-under-water state it cannot see (partly depth). | |
| - Loot: nearest human-opened chest on the seed, bearing relative to view: agent rollouts R^2 -0.006..0.000 at every | |
| layer, median angle error 84-88 deg (constant predictor 83), left/right AUROC 0.47-0.51; within 24 blocks of the | |
| chest still R^2 <= 0, left/right 0.45; distance to it R^2 ~0. Human renders: next-chest bearing R^2 0.04-0.13, median | |
| error 27-28 deg = the constant "straight ahead" predictor's 28.6 (63% of human frames face within 45 deg of the next | |
| chest), nearest-chest R^2 0.07 (0.13 within 24 blocks): what is decodable follows where the human is heading | |
| (future-position bearing R^2 0.17). The policy does not linearly represent where the loot is. | |
| - What a dive is (1,421 agent dive onsets = air starts falling after >= 2 s without): the agent floats at the surface | |
| (feet y 62.4-62.9), looks level (pitch -20 -> 0), holds forward (p 0.6), rarely jump (p_jump 0.044 while submerged | |
| vs 0.065 elsewhere) and sinks ~0.5 blocks/s: passive sinking, not a steered dive. Under teacher forcing on human | |
| frames its p_jump matches humans (0.140 vs 0.142 below sea level at y >= 50): the imitation is calibrated on human | |
| states, and humans in water are mostly going down to loot. | |
| - Running: SAE on L6 (top-k 32, 16k features, 60M tokens, GPU 3), fast-D baseline passes m180-interp-base-a/b | |
| (SURFACE=1, GPU 1 slot 13) for the causal tests. | |
| ## 2026-09-28 11:00 pm MT - interpretability agent | |
| - SAE on L6 (top-k 32, 16,384 features, 60M tokens = 14,648 steps of 4,096, 4.5 min on GPU 3, AuxK after 2M tokens | |
| without firing): held-out FVU 0.084, 1 dead feature, 29 fire on > 10% of frames, median firing rate 3.5e-4; 574 | |
| features fire only on human renders, 79 only on agent rollouts (data/interp/fastD/sae_L6_16384_k32b.pt, | |
| kernels/interp/sae_L6_16384_k32b_{features.json,dive.txt}; image grids kernels/interp/feat_*.png, frames -1 s/0/+1 s). | |
| - Dive features, from event-triggered averages over 1,421 agent dives and 430 human ocean dives (swimming-pose onset | |
| near the surface going >= 3 blocks down in 10 s; the pose alone also marks crawling in tunnels): | |
| - agent, before its dives: 15093 looking straight up at the sky while floating (1.18 before agent dives, 0.001 | |
| before human dives), 13377 / 3929 view skimming the waterline in shallow water, 13260 / 14898 head half under | |
| (sea floor through the surface, horizon at the top); under water 10751 deep open blue water. | |
| - human, before its dives: 13480 looking straight down at the water from above (4.47 before human dives, 0.77 | |
| before agent dives), 445 looking down at the surface then dark deep water 1 s later (head-first dive), 1903 / | |
| 12374 (0.75 / 1.10 vs 0.003 / 0.04). Humans look down and sprint-swim down; the agent floats looking level or up | |
| and sinks. Two different internal states. | |
| - loot scenes exist as perception: 781 = desert-temple loot room (chests around the TNT pressure plate), fires 20x | |
| more within 8 blocks of the chest a human opens next; on agent rollouts it fires in the agent's own sand pits | |
| (a lookalike). 13223 = digging a pit in dark stone under water (buried-treasure dig). They fire when the scene is | |
| on screen; nothing encodes where an unseen chest is (probes above). | |
| - Open-loop screens (teacher-forced on 400 agent dive windows, 300 land windows, 228 human windows; kernels/interp/ | |
| screen{,2,3,4}.txt): zero-ablating the 10 agent pre-dive SAE features moves p(jump) before a dive by +0.002 and | |
| p(forward) by -0.004 (random frequency-matched features: <= 0.001): the SAE features are readable but individually | |
| not load-bearing. Directions (difference of means on the sparse rows): "water" (agent submerged vs above sea) and | |
| "dive" (at sea level, dives in 5 s vs not; cos 0.73-0.80 with water, and mostly "hold forward": subtracting it | |
| stops forward on land too). Mean-ablating the one water direction at L10: in water p(forward) -0.145, pitch +0.095 | |
| deg/tick (down), on land p(forward) -0.03, human training loss +0.009. A gated "swim-up" edit (add the direction | |
| that separates human in-water frames with jump held from not, scaled by the model's own water reading, 0 at the | |
| above-sea mean and 1 at the submerged mean) at L6: p(jump) 0.069 -> 0.295 before dives and 0.051 -> 0.535 under | |
| water, land 0.069 -> 0.108, human loss +0.022. Random-direction ablation: no change (<= 0.003). | |
| - Closed loop (SURFACE=1, fast-D, 24 seeds x 2 passes, mcsr.policy_server env MCSR_STEER=<spec>, off by default): | |
| baseline m180-interp-base (GPU 1 slot 13) then gated swim-up m180-interp-gjump6, then SAE pre-dive ablation | |
| m180-interp-sae10; GPU 2 slot 5: water ablation m180-interp-wabl10, water +2 at L10 m180-interp-wadd10, random- | |
| direction ablation m180-interp-rabl10. Units mcsr-interp-{base,c1,q1,q2}; specs in data/interp/fastD/specs/. | |
| ## 2026-09-28 11:50 pm MT - interpretability agent | |
| - Closed loop, fast-D + SURFACE=1, 24 eval seeds x 2 passes each, one client per GPU (GPU 1 slot 13 / GPU 2 slot 5), | |
| vs the unedited baseline m180-interp-base (48); permutation p on episode means (mcsr.interp.closed_loop): | |
| metric (per episode) base water-ablate L10 gated swim-up L6 (v1) | |
| dives 6.08 6.33 (p=0.84) 1.46 (p<0.001) | |
| time submerged 29.6% 32.4% (p=0.60) 9.1% (p<0.001) | |
| surface-macro rescues 3.96 4.67 (p=0.37) 0.33 (p<0.001) | |
| blocks mined 2.40 1.17 (p=0.09) 0.33 (p<0.001) | |
| logs 0.125 0.062 0.000 | |
| net distance 60 / 180 s 44/64 23/33 (p<=0.001) 77/133 (p<0.001) | |
| died 1/48 2/48 14/48 (p<0.001) | |
| standing still 35.5% 57.9% (p<0.001) 31.0% | |
| Water ablation: no change in diving; the agent walks less (the water direction also carries locomotion). | |
| Swim-up edit: dives -76%, time under water -69%, but the agent now spends ~75% of its time floating at the surface | |
| holding jump (78% of ticks) and forward (90%) at pitch ~72 (looking down), crosses 2x the distance, mines 7x less, | |
| and 13 more episodes die (14/48 vs 1/48): 5 of the 6 deaths in pass a are sudden 26-30 block plunges from the surface to y 32-36 | |
| followed by 15 s of held jump at the same depth, whirlpool particles on screen (downward bubble columns over | |
| magma, which the swim-up macro did not fire for). kernels/interp/traces_interp-gjump6.png (feet y over time). | |
| Mechanism of the side effects: the edit direction (human in-water frames with jump held vs not) also carries | |
| "look down" (+0.1-0.2 deg/tick open loop), and in closed loop a small pitch bias integrates to pitch ~70, while | |
| the previous-action input locks jump on (teacher-forcing "jump held" alone lifts p(jump) to 0.52 at the surface, | |
| 0.72 under water, 0.37 on land). | |
| - Running: pitch-neutral swim-up edit (jump direction stratified by pitch x forward, minus a camera-pitch direction | |
| tuned so the open-loop pitch change under water is ~0; beta 1.5: p(jump) +0.34 at the surface / +0.62 under water, | |
| land +0.065, forward -0.02) as m180-interp-pjump6 (SURFACE=1) then m180-interp-nspjump6 (no macro) on GPU 2; SAE | |
| pre-dive ablation m180-interp-sae10 then no-macro baseline m180-interp-nsbase on GPU 1. | |
| - Also measured: SAE splice at L6 keeps 99.8% of the human training loss (1.045 -> 1.050; mean-ablating L6 -> 3.997); | |
| MLP probes (1024-256-2) for the chest bearing on agent frames R^2 -0.14/-0.12, left/right AUROC 0.50 (humans 0.06- | |
| 0.07); air while submerged R^2 0.56 from L6 vs 0.12 from depth alone (0.57 with both): a time-under-water state | |
| that does not move behavior (p(jump) 0.037-0.049 at every air level); inventory (log2 item count R^2 <= 0.03) and | |
| health (hurt AUROC 0.65 vs pixels 0.61) are not represented. Human ocean dives start within 16 blocks of a chest | |
| 30% of the time vs 16% for random human sea-level frames; agent dives 7.7% vs 6.1%. | |
| ## 2026-09-29 12:20 am MT - interpretability agent | |
| - Closed loop (48 episodes each, SURFACE=1, vs m180-interp-base 48; base pass a vs pass b differ by nothing | |
| significant: dives 6.5 vs 5.7 p=0.64, mined 2.2 vs 2.6): | |
| metric base SAE pre-dive ablation pitch-neutral swim-up (beta 1.5) | |
| dives 6.08 6.58 (p=0.65) 2.40 (p<0.001) | |
| time submerged 29.6% 31.2% 4.9% (p<0.001) | |
| rescues 3.96 4.13 0.33 (p<0.001) | |
| blocks mined 2.40 1.65 (p=0.32) 0.23 (p<0.001) | |
| net 180 s 64 m 68 m 38 m (p=0.003) | |
| died 1/48 4/48 (p=0.36) 3/48 (p=0.62) | |
| standing still 35.5% 39.0% 66.3% (p<0.001) | |
| Zero-ablating the 10 SAE features that rise before the agent's dives (sky-while-floating, waterline, half-under) | |
| changes nothing measurable, as the open-loop screen predicted (+0.002 p(jump)): the features describe the state | |
| but the decision is carried redundantly. The pitch-neutral swim-up edit keeps the dive reduction without the | |
| deep-water deaths of v1 (3/48 vs 14/48) but the agent now bobs in place at the surface (76% of its time floating, | |
| jump 73%, forward 19% vs 65%, pitch still ~54 in closed loop) and stops doing anything useful: the edit fixes | |
| sinking and exposes that the policy has no "swim back to land" behavior to fall into. | |
| - Replication on another training run: the same extraction and probes on pol3-hold-final (2 conv blocks, 590M | |
| frames; kernels/interp/probes_pol3.txt): water/submerged AUROC 0.94-0.99, dive-within-5 s 0.92-0.95, air R^2 0.58 | |
| (L2-L12), nearest-chest bearing on agent frames R^2 -0.007..0.000 at every layer, human next-chest bearing | |
| 0.05-0.14. Same picture. | |
| - Queued: no-macro baseline and no-macro pitch-neutral edit (drownings as the metric), random-direction ablation | |
| control, air-clock swim-up (the swim-up vector gated by the model's own time-under-water readout, only when it | |
| reads air < ~0.7), and a gated write of the human dive features (13480 + 445) to test the opposite direction. | |
| ## 2026-09-29 12:55 am MT - interpretability agent | |
| - Without the swim-up macro (SURFACE=0, 48 vs 48): unedited fast-D dies in 35/48 episodes (73%, drowning; time | |
| submerged 39% of alive time); with the pitch-neutral swim-up edit 3/48 (6%, p<0.001), time submerged 4.7%, net | |
| distance 30 -> 46 m; blocks mined 1.15 -> 0.31 (p=0.009). The edit does the macro's job from inside the network, | |
| with the same bob-in-place cost. | |
| - Why the policy never surfaces on its own (kernels/interp/jump_vs_time.png, jump_vs_time.json): on 500 human ocean | |
| dives the humans' jump rate climbs 0.01 -> 0.13 over 12 s under water and the policy, teacher-forced on those | |
| frames, reproduces it (0.002 -> 0.127). On its own 391 dives (no macro within 15 s) p(jump) peaks at 0.11 after | |
| 3-5 s and falls to 0.04-0.06; the agent hovers 1-3 blocks under the surface (feet y 61 -> 59) while humans are at | |
| y 37 by 12 s. The learned surfacing is tied to the human dive context (looking down, deep, sprint-swimming); the | |
| agent's passive sinking near the surface is a state humans are rarely in, so nothing the policy learned applies, | |
| even though its time-under-water readout (R^2 0.56) is present in those frames too. | |
| - pol3-hold-final gets the same edit built from its own activations (data/interp/pol3e, screens *_pol3e.txt: water | |
| gate, stratified human jump direction, pitch compensation; open loop p(jump) +0.21 before / +0.32 under water, land | |
| +0.09); closed-loop replication queued after the air-clock / human-dive-write / random-control runs. | |
| - 01:15 Elliot: netherite needs tetra resources; this project restricts to GPUs 1-2 (GPUs 0, 3 for netherite), one | |
| game client per GPU, careful with RAM. Interpretability agent told to finish only the random-direction control, | |
| drop the air-clock / human-dive-write / pol3 closed-loop runs (next steps), write SUMMARY.txt + a DEVLOG entry, and | |
| free its units by ~03:15. | |
| ## 2026-09-29 1:30 am MT - interpretability agent (final) | |
| - Controls finished (SURFACE=1, 48 vs base 48): random-direction ablation at L10 dives 5.25 vs 6.08 (p=0.44), time | |
| submerged 25.8% vs 29.6% (p=0.45), mined 1.96 vs 2.40 (p=0.58): no effect, so the swim-up edit's dive cut (pjump6: | |
| submerged 4.9%, p<0.001) is not a generic perturbation effect. Air-clock swim-up (41 eps; pass b stopped at 17 when | |
| the budget shrank): dives 5.88 (p=0.85), rescues 3.96 -> 1.44 (p<0.001), below sea 26% -> 16% (p=0.03), still 46% | |
| (p=0.002): it shortens dives instead of preventing them. | |
| - Verdict: the policy represents water, depth, dive onset and a hidden time-under-water clock; it does not represent | |
| loot direction, inventory or health. Its dives are passive sinking at the waterline, a state humans rarely occupy, so | |
| its learned human surfacing never fires. A gated swim-up direction at L6 stops the sinking (drownings without the macro | |
| 35/48 -> 3/48) but the agent then bobs in place (mined 2.4 -> 0.2). SAE-feature and water-direction ablations do not | |
| change diving. | |
| - Results: kernels/interp/SUMMARY.txt (probe table, SAE stats, all closed-loop tables with p-values). Dropped on the | |
| coordinator's budget cut (next steps): pol3-hold-final closed-loop replication (specs in data/interp/pol3e/specs), | |
| human-dive feature write, water +2 at L10, stronger air-clock. All interp units stopped; GPUs 0-3 hold none of my | |
| processes. data/interp is 45 GB (fastD 31 GB + pol3e); delete when done with it. | |
| ## 2026-09-30 7:30 pm MT - netherite lane/rlbind: the policy in netherite, GRPO | |
| What changed in this repository (netherite lane/rlbind; the C side is netherite's out/runtime/libnwrl.so; backups of | |
| every rewritten file in data/rlbind_backup/): | |
| - mcsr/kvstep.py: netherite lane/rlsplit's KV-cached batched step (block-aligned context T 256, S 128), the version | |
| edit as an option (Stepper(..., edits=kvstep.EDITS) = data/interp/versionprior/best.pt through | |
| mcsr/interp/vp_hook.py, a copy of versionprior's work/vp_hook.py), a per-step frame embedding (e_out) for the | |
| learner, each Stepper's own capture stream (a second card's graph capture failed on torch's shared default). | |
| Gate scripts/kvstep_check.py --mode graph --compile default [--edits version]: PASS (camera 99.57%, keys 99.92%). | |
| scripts/kvstep_bench.py. | |
| - mcsr/policy_server.py: Policy is the KV step at B = 1 (2.08 ms a tick, was 5.2); --sliding keeps the old per-tick | |
| recompute (and MCSR_STEER); --edits version. Its context is block aligned (129..256 frames after the first 256). | |
| - mcsr/nwrl.py (netherite's pipeline in this process: Env, structure_chests, seed_chests; import it before torch), | |
| mcsr/nwrl_gate.py (the binding's gate, run by netherite's make -C native/runtime rl-gate). | |
| - mcsr/rl/: actmap (policy keys and mu-law camera to netherite acts), macros (the render mod's auto macros as a | |
| person's inputs: surface, loot through the chest screen, mine lock, crafting through the inventory and a placed | |
| table), nav (a block path planner for tests), reward (engine-state reward: logs / loot / full), rollout (closed | |
| loop over sim and policy cards), grpo (the learner). | |
| - scripts/nw_eval.py (closed-loop eval in netherite), nw_grpo.py, nw_learner_bench.py, nw_macro_test.py, nw_curve.py. | |
| - scripts/nw_values_test.py and mcsr/rl/reward.py's values(): item values derived from the 1.7.10 recipes (Elliot, | |
| 7:25 pm): 0 of 304 recipes lose value; a one-time bonus per milestone item (pickaxes, furnace, iron ingot, bucket, | |
| flint and steel, obsidian, blaze rod and powder, ender pearl, eye of ender). | |
| Results (data/nw_eval, data/nw_grpo; netherite DEVLOG 2026-09-30 lane/rlbind has the full account): | |
| - Closed loop in netherite, fast-D, 128 x 180 s from seed 1's spawn: no edit 16.8 m net, 72.6% still, 2.66 logs, | |
| 62 blocks mined, 2 deaths; version edit 16.9 m, 70.1% still (p 0.011), 2.74 logs, 70.5 mined (p 0.009), 0 deaths. | |
| Against this repo's real-client evals (fast-D SURFACE=1: 64 m, 34% still, 3 logs per 48 episodes) the agent moves | |
| a quarter as far and stands still twice as much in netherite (a third of its steps under the mine lock; no 2D HUD | |
| in netherite's frames yet), and gets far more logs (a forest spawn). | |
| - GRPO logs2 (seed 1, 128 x 60 s an iteration, 100 iterations, 40 min): 1.68 -> 3.96 logs an episode, KL 0.047, | |
| 6,344 env-steps/s with learning; the trained policy (data/nw_grpo/logs2/policy.pt) at 180 s: 7.05 logs (2.74), | |
| net 26.8 m (16.9). logs1 (token-level loss, mine-lock start masked) fell after rising: see netherite's DEVLOG. | |
| - GRPO loot2 (seed 110, a village blacksmith 30 blocks from spawn; chests objective): chests opened 0.31% -> 1.38% of | |
| episodes over 110 iterations; loot1 (item value in the reward) learned logs instead and stopped opening chests. | |
| - Learner placement: an update of 128 x 1,200 steps is 1.80 s on an RTX PRO 6000 and 8.80 s on anvil's 3090 (plus | |
| 5.4 s over the 1 Gb/s link): the learner shares the first policy card. | |