mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-27 14:02:04 -04:00
docs(phase-23): T10.6 campaign result — 1297 banked, fleet 64.6%, ~92% ≤15 saturated (crash-graceful)
This commit is contained in:
@@ -89,4 +89,4 @@ The **whole-binary byte-gate** (`gate_stage`/`harvest_verify`, G3/P9) is the sol
|
||||
- 2026-06-30 (cont.): **Grinder per-binary fix (5-layer) — built + validated; reach≥2 fuel re-characterized.** The grinder/backlog were ov_SC01_077-hardcoded **5 layers deep** — fixed all: `gate_stage` records `binary`, `backlog.FIELDS` keeps it, `backlog.load_best`/`_open_stubs` fleet-aware (stuck-local fns surface via their overlay record), `p16_permute.setup` takes asm-subdir, `grinder` per-binary resolution + grouped gating + None-`nins` allow. Validated: the 3 fresh reach-134 close=1 ov_SC01_000 fns now surface + resolve + gate per-000. **FINDINGS (byte-evidenced):** (a) the reach≥2 close=1 fuel is **MODEL semantic-misses** (7B drafts empty `void f(void){}` for trivial `return 1`/setters), NOT permuter fuel — a corrected draft banks them (**+3 byte-identical** via the fixed gate, @commit:0326); (b) ×reach is **propagation-capped** (inline-matched in `ov_SC01_077_a.c` → dedup "nothing to propagate" → banked ×1). So the reach-134 ×134 payoff routes through **corpus-v3** (leaf variety) + the **dedup-collapse**, NOT the permuter. check-all 136/136 throughout. Details: `docs/gen2-mips-matching-model.md` (grinder fix). NEXT: corpus-v3 + dedup-collapse.
|
||||
- 2026-07-01 (**A: reach≥2 measurement + the macro-extern-injection lever — fleet 63.82%→64.16%, $0 LLM**): served v3 (`serve_local.py`, ~15s). **(1) Measured v3 on reach≥2** (`lora_grind --min-reach 2`, bounded): banked **6/15 in ov_SC01_005** (+1 in 006) — **v3 banks the reach≥2 band**, vs v2-pre-fix's 0/15 (T9). But the banks are mostly low-reach (the 005≡006 pair = ×2) and re-bank inline per overlay → the fleet-% needs the COLLAPSE. **(2) Scoped the dedup-collapse:** the broad-overlay inline banks are mostly already-propagated (8-hr sweeps) or reach-1; the real ×134 fuel is **29 reach-134 fns matched INLINE in ov_SC01_077 but `dedup_propagate`-skipped as "not self-contained"** (the §19/20 propagation cap; the Phase-20 backlog list). Diagnosed (R14): they fail `compiles_standalone` on **file-scope callee/data externs** (clean lever) or **local types** (fiddly). **(3) Built `tools/inject_capped_externs.py`** (the Phase-20-backlog "macro-extern-injection", never built): source each capped fn's externs from 077's OWN file-scope decls, inject block-scope → self-contained → liftable ×134. Byte-neutral (077 stays `d19c9580…`), fail-safe (only rewrites if then `compiles_standalone`). **Freed 8 (main .c) + 3 (`_a.c`) = 11 reach-134 fns**, propagated ×134, **9 new shared groups (1678→1687)**, fleet **63.82%→64.16%** (+0.34%, +1204 byte-identical), check-all **136/136**, dedup-check 0 failed, **$0 LLM**. cookbook **§28d** + SETUP inventory (R16/R21/R30). **(4) Type-walled subset (14 reach-134 fns) DEFERRED:** the §28b type-lift (`build_engine_types --strip`) is **collision-blocked** (`typedef vec differs between header and source`) — the inline-invented types (MATRIX/Buf/Vec3/Loc/vec/…) need manual name-collision reconciliation; low-ROI/fiddly, byte-gate+collision-guard correctly refused. The 14: `0x8014964C 0x8014A048 0x8014C8C8 0x801678F0 0x8016A8FC 0x801749C8 0x80177EA4` (main) + `0x8012A418 0x8012A464 0x8012C658 0x8012E778 0x8012EA90 0x80134310 0x801395D4` (_a). Blast radius of a lift = overlays ONLY (engine_types.h does NOT reach main/resident). **(5) Launched a bounded broad v3 harvest** (12 batches, propagate-every-4) for $0 corpus growth + incremental banks — running at write time. **NEXT:** verify+commit the harvest; then the strategic fork — (a) v3.1 flywheel retrain on the grown corpus (compounding, ~2h GPU), (b) the type-collision reconciliation (~+0.5%, fiddly), or (c) accept the automated ceiling and head to PhaseEnd. The injection lever now CLOSES the v3-reach≥2→×134 loop for future 077 banks (idempotent re-run). **(6) Saturation-campaign scoping (Drew's "10,000 small funcs" directive — exhaust ≤15 fleet-wide before bigger):** measured the real fuel — **~32,636 open ≤15-ins stub-instances / ~4,597 unique-by-name / 4,087 untried** (NOT saturated — my "saturated" claim from the SC01-only sample was an over-extrapolation Drew caught, R14; SC03 alone has 12,497). Sample shows ~all untried ≤15 are reach-1 (location-unique, ×1) — the shared band was matched/propagated in earlier phases. **THROUGHPUT WALL (the real blocker):** drafting is ~15–18s/func SERIAL (the real draft = full .s input + recovery pipeline), so exhausting ~4k unique funcs is ~a day and the full per-overlay set is multi-day; and the whole-overlay byte-gate (~1s warm) is fast but a big-overlay gate hung 11+ min once. **Fixes applied:** `lora_grind` runs `progress.py --fleet` only on propagate sweeps (was every batch = ~14s overhead dominating small batches); `--min-nins` (target a fresh band w/o re-grinding small failures); `api_draft` max_tokens 4096→512 (the model rambled to 4096 = ~80–130s on no-stop-token drafts). **ARCHITECTURE CONCLUSION (Drew's phase-separation idea = right):** the interleaved draft(GPU)→gate(CPU) per-batch design idles the GPU during every gate (the "low GPU usage" Drew saw). The path: **phase-separate** (bulk-draft GPU → bulk-gate parallel-across-cores CPU → dedupe once) + **pipeline** (draft N+1 while gating N) + **batched inference via vLLM** (the real GPU-saturation lever — Unsloth serve does ~18s/func serial; vLLM continuous-batching is 5–20×). This is a substantial focused build (the proper `bulk_harvest` + a vLLM serving swap) — deferred to a fresh focused effort (R30: capture findings now, the build is continuable). v3 bank-rate on the fresh location code = STILL UNMEASURED (the SC03 measurement hung on the slow gate); measure it first thing (it decides ~8k vs ~2k yield → whether the multi-day campaign is worth it).
|
||||
- 2026-06-30 (**8-hour autonomous run, Drew away**): prompt-fix + local serving + corpus-v3 + v3 + big batch. **LM Studio ejected** → built **`tools/serve_local.py`** (Unsloth GPU serving as an OpenAI endpoint; the prebuilt llama-cpp-python CUDA wheel SIGILLs on this no-AVX-512 CPU, so the Unsloth/torch path is the reliable one). **PROMPT FIX** (`api_draft.LEAN_SYS` + `format_finetune.SYS`, synced): "translate EVERY instruction, never an empty body" — the v2 empty-leaf overfit, small-leaf band **0/3→2/3**, banked 3 on a fresh ov_SC01_001 batch. **CORPUS-V3**: `export_pairs` now mines the **1623 engine_core.h `DEFINE_func` macros** (the shared setters/return-const the model was blind to — 96.6% of v2 was overlay-unique) + `format_finetune` inlines `engine_types.h` structs → corpus **1312→2891**, trainable **2534+291** (2.5× v2). **v3 trained** (Qwen2.5-Coder-7B QLoRA, loss 1.275→0.085, ~2h), held-out gate-true eval **MATCH 23/40 (57.5%)** (generalizing; v2's mixed-set rate was lower). Grinder concurrent during training = 0 banks (permuter tail exhausted, Phase-22 reality). **Big batch** (v3, broad rotation, 25 binaries, propagate-every-3, **$0 LLM**): banked **~352 fns inline + 45 new shared groups** (1633→1678) → fleet **63.67% → 63.82%** (+502 byte-identical), **136/136 byte-clean**, 25 auto-commits. v3 repeatedly banked the **empty-leaf/setter class v2 couldn't** (func_8012E27C=return 1, 8012AD64/BF4C=setters). **Pipeline validated end-to-end:** a free local fine-tuned model harvests the small/setter bulk at $0, gated identically (G3/P9). Details: `docs/gen2-mips-matching-model.md` ("Corpus-v3 ... 8-hour autonomous run"). **NEXT (fresh session):** (1) **shared/reach≥2 targeting** (`lora_grind --min-reach 2` with v3 — so the setter banks propagate ×134 instead of re-banking inline per binary — the fleet-% lever); (2) **dedup-collapse** the per-binary inline setters; (3) **corpus-v4** = struct-giant types; raise `--max-nins` as the band lifts. Serve: `tools/serve_local.py --adapter models/bfm-match-7b-v3` (R21 / SETUP §Tooling inventory).
|
||||
- 2026-07-01 (**T10 — the phase-separated + parallel-gate harvester, BUILT + MEASURED**): plan-mode Tier-1, harvester-first (Drew picked it over vLLM-first — the exploration showed parallel-gate is the bigger single lever, no install, and unblocks the measurement). **Built** `tools/bulk_harvest.py` (bulk-draft GPU → `ProcessPoolExecutor` byte-gate over DISTINCT binaries → dedupe-once + one commit; round-robin fuel spread) on back-compat `gate_stage`/`harvest_verify` params (T10.1 — `lock_path`/`verified_out`/`failed_out`/`compute_fleet`, all default to serial; `backlog` redirected per-worker via its module global, no edit). Tooling commit `commit:0379`. **Validated** (count=12/workers=4): 9/12 banked, 136/136 byte-identical, R23-clean commit `commit:0380`, dedup 0 failed. **MEASURED** (count=80/workers=8 fresh SC03 ≤15-ins, commit `commit:0381`): **bank-rate 52/80 = 65%**; gate **0.4s/fn amortized** (8 workers) vs lora_grind's ~30s/fn serial ≈ **75×**; draft **13.5s/fn serial = 97% of wall-clock** → the parallel gate moved the bottleneck ENTIRELY to drafting. Fleet 64.19→64.20% (61 tiny reach-1 banks barely move the byte-weighted % — the ≤15 campaign's value is bank COUNT + completeness, freeing the heavy model for giants; honest P9). check-all 136/136, dedup-check 1687→1715/0. **DECISIONS SETTLED:** (1) campaign is GO (65% over ~4,087 untried uniques ⇒ ~2,650 free banks); (2) drafting is now the only lever; (3) **vLLM is JUSTIFIED** (~15h serial → ~1–3h batched) — deferred to Drew-go (T10.5). Details: `docs/gen2-mips-matching-model.md` "T10 RESULT". Serve still up via `serve_local.py` (v3). NEXT: Drew's call — vLLM install (T10.5) now, or run the ≤15 campaign on the serial path in background chunks, then PhaseEnd (T11). **Drew chose B (serial campaign now, defer vLLM).** **T10.6 LAUNCHED (2026-07-01):** `bulk_harvest --binary-glob 'ov_*' --count 150 --cycles 40 --workers 8` on `serve_local` v3 — the full ≤15-ins overlay saturation ($0), self-terminating on dry fuel (~15h max), **per-cycle commits (crash-safe/resumable via `.run/auto/lora_grind_tried.json`), STOP-able** (`touch .run/auto/STOP`). Monitor: `.run/auto/bulk_harvest_{heartbeat,stats}.json` + `.run/bulk_campaign.log`. Region bank-rate varies (SC03 fresh ~65%, SC01 dregs ~40%). `--cycles` campaign mode is committed (`commit:0384`); the `run_cycle` loop was validated (2-cycle run, per-cycle commits `commit:0385`/`commit:0386`). If a fresh session finds the campaign stopped: re-launch the same command (resumes from `tried`), or `touch .run/auto/STOP` to halt. After the campaign: `make check-all` (R22) + T11 PhaseEnd_Phase23. **Drew's new direction (2026-07-01), the NEXT step after the campaign:** test a HUGE-parameter cloud model via **OpenRouter** (GLM-4.6 / the current big GLM Drew called "glm5.2" — confirm the exact id on OpenRouter at run time) as a DRAFTER — `api_draft.py` already speaks the OpenAI endpoint (OpenRouter is OpenAI-compatible: set `API_BASE`=OpenRouter + key, `MODEL`=the GLM id). A/B vs local v3 on a sample (bank-rate + $/match), focused on the harder band the 7B plateaus on (>15-ins / struct). Byte-gate keeps it correctness-safe (throughput/cost lever only). **PARKED at Drew's direction:** the batching levers — DIY static batching (~3–4×, VRAM-capped on 12 GB) and vLLM (5–20×, needs a separate venv + tighter quant) — both on HOLD; revisit after the OpenRouter test. "We can move forward after that" (Drew).
|
||||
- 2026-07-01 (**T10 — the phase-separated + parallel-gate harvester, BUILT + MEASURED**): plan-mode Tier-1, harvester-first (Drew picked it over vLLM-first — the exploration showed parallel-gate is the bigger single lever, no install, and unblocks the measurement). **Built** `tools/bulk_harvest.py` (bulk-draft GPU → `ProcessPoolExecutor` byte-gate over DISTINCT binaries → dedupe-once + one commit; round-robin fuel spread) on back-compat `gate_stage`/`harvest_verify` params (T10.1 — `lock_path`/`verified_out`/`failed_out`/`compute_fleet`, all default to serial; `backlog` redirected per-worker via its module global, no edit). Tooling commit `commit:0379`. **Validated** (count=12/workers=4): 9/12 banked, 136/136 byte-identical, R23-clean commit `commit:0380`, dedup 0 failed. **MEASURED** (count=80/workers=8 fresh SC03 ≤15-ins, commit `commit:0381`): **bank-rate 52/80 = 65%**; gate **0.4s/fn amortized** (8 workers) vs lora_grind's ~30s/fn serial ≈ **75×**; draft **13.5s/fn serial = 97% of wall-clock** → the parallel gate moved the bottleneck ENTIRELY to drafting. Fleet 64.19→64.20% (61 tiny reach-1 banks barely move the byte-weighted % — the ≤15 campaign's value is bank COUNT + completeness, freeing the heavy model for giants; honest P9). check-all 136/136, dedup-check 1687→1715/0. **DECISIONS SETTLED:** (1) campaign is GO (65% over ~4,087 untried uniques ⇒ ~2,650 free banks); (2) drafting is now the only lever; (3) **vLLM is JUSTIFIED** (~15h serial → ~1–3h batched) — deferred to Drew-go (T10.5). Details: `docs/gen2-mips-matching-model.md` "T10 RESULT". Serve still up via `serve_local.py` (v3). NEXT: Drew's call — vLLM install (T10.5) now, or run the ≤15 campaign on the serial path in background chunks, then PhaseEnd (T11). **Drew chose B (serial campaign now, defer vLLM).** **T10.6 LAUNCHED (2026-07-01):** `bulk_harvest --binary-glob 'ov_*' --count 150 --cycles 40 --workers 8` on `serve_local` v3 — the full ≤15-ins overlay saturation ($0), self-terminating on dry fuel (~15h max), **per-cycle commits (crash-safe/resumable via `.run/auto/lora_grind_tried.json`), STOP-able** (`touch .run/auto/STOP`). Monitor: `.run/auto/bulk_harvest_{heartbeat,stats}.json` + `.run/bulk_campaign.log`. Region bank-rate varies (SC03 fresh ~65%, SC01 dregs ~40%). `--cycles` campaign mode is committed (`commit:0384`); the `run_cycle` loop was validated (2-cycle run, per-cycle commits `commit:0385`/`commit:0386`). If a fresh session finds the campaign stopped: re-launch the same command (resumes from `tried`), or `touch .run/auto/STOP` to halt. After the campaign: `make check-all` (R22) + T11 PhaseEnd_Phase23. **Drew's new direction (2026-07-01), the NEXT step after the campaign:** test a HUGE-parameter cloud model via **OpenRouter** (GLM-4.6 / the current big GLM Drew called "glm5.2" — confirm the exact id on OpenRouter at run time) as a DRAFTER — `api_draft.py` already speaks the OpenAI endpoint (OpenRouter is OpenAI-compatible: set `API_BASE`=OpenRouter + key, `MODEL`=the GLM id). A/B vs local v3 on a sample (bank-rate + $/match), focused on the harder band the 7B plateaus on (>15-ins / struct). Byte-gate keeps it correctness-safe (throughput/cost lever only). **PARKED at Drew's direction:** the batching levers — DIY static batching (~3–4×, VRAM-capped on 12 GB) and vLLM (5–20×, needs a separate venv + tighter quant) — both on HOLD; revisit after the OpenRouter test. "We can move forward after that" (Drew). **T10.6 CAMPAIGN RESULT (2026-07-01):** ran **23 cycles → 1,297 fns banked ($0) + 52 propagated groups**, fleet 64.21→**64.6%** (+0.39%), tried 764→**4,214** (**~92% of the ~4,597 ≤15-ins unique fuel saturated**). **check-all 136/136 byte-identical**, dedup 0 failed. **Ended gracefully on a serve_local crash** (bitsandbytes `ops.cu:81` after ~14h continuous serving — the serial 4-bit server's long-run fragility, NOT a code bug; bulk_harvest's per-cycle endpoint-check caught the dead server, committed the partial cycle 23, and exited clean). Commits `commit:0387..commit:0410` + digests `commit:0411`. **Remaining ≤15 tail (resumable, low-value ~28% yield):** ~383 untried + ~132 skipped-marked-`tried` in the crashed cycle 23 (prune those from `.run/auto/lora_grind_tried.json` if resuming). To resume: restart `serve_local.py` then `bulk_harvest --binary-glob 'ov_*' --cycles N`. Wrapped up per Drew → **NEXT: T10.7 OpenRouter** (cloud, no local GPU). Serve_local is DOWN, GPU freed.
|
||||
|
||||
Reference in New Issue
Block a user