Skip to content

🥈 [SR-02] trainer-runner — E2E TTT O(1) per-chunk core #454

Closed

Description

@gHashTag

Soul-name: Chunk Champion · Codename: LEAD · Priority: P1-HIGH · Kingdom: Cross-kingdom
Ring: GOLD I trios-igla-race-pipeline / SR-02
Part of: #446
Blocks: SR-04 gardener, SR-ALG-03 e2e-ttt, BR-OUTPUT
Blocked by: SR-00 (issue 2), SR-01 (issue 6), SR-03 (issue 5)

Goal

The E2E TTT O(1) core. Move sampler.rs (11 K, the per-chunk sampler) + attn.rs (11 K) + gf16.rs (12 K) into SR-02. Add a versioned git dep on gHashTag/trios-trainer-igla under features = ["trios-integration"] per the SoT mandate. Do not re-implement trainer code.

Acceptance criteria

  • rings/SR-02/ with I5 trinity.
  • Deps: SR-00 + SR-01 + trios-trainer-igla = { git = "https://github.com/gHashTag/trios-trainer-igla", features = ["trios-integration"], rev = <pinned-sha> } + feature-gated tch (cpu-only by default).
  • Public API: TrainerRunner::stream_chunks(&Job) -> impl Iterator<Item = ChunkInput>, step_one_chunk(ChunkInput) -> Result<ChunkBpb, RunnerErr> amortised O(1).
  • Microbench: step_one_chunk p99 < 50 ms (CPU baseline champion.toml config).
  • INV-3 GF16 closure (Lucas) check active inside step_one_chunk.
  • Backward-compat re-exports in crates/trios-igla-race/src/{sampler,attn,gf16}.rs.
  • Integration test: 1 fake seed, 10 chunks, BPB row written via SR-03.
  • PR closes this issue, Agent: LEAD trailer.

🌻 phi² + phi⁻² = 3

Activity

  1. gHashTag commented on May 2, 2026

    @gHashTag
    CollaboratorAuthor

    ➕ R14 acceptance criterion (PhD-aware)

    Per EPIC #446 PhD sequencing — every Proven INV touched by this SR must have verbatim \citetheorem{} reference in the corresponding chapter. SR-02 is the E2E TTT O(1) core — critical-path issue.

    Add to acceptance criteria:

    • R14: Every Proven INV referenced by SR-02 (per-chunk O(1), sampler/attn/gf16 invariants) is cited verbatim via \citetheorem{} in docs/phd/chapters/*.tex, matching the Coq theorem name in crates/trios-coq/.
    • R14-check: trios-doctor lint --rule R14 passes for rings/SR-02/.
    • O(1) bound: per-chunk step proven O(1) per experiment_map.md (no admitted_budget consumption).
    • No new Admitted. introduced (admitted_budget=5/5 LOCKED per INV-13 policy).

    Ref: docs/phd/assertions/igla_assertions.json, docs/phd/experiment_map.md.

    🌻 phi² + phi⁻² = 3 · Agent: LEAD

  2. gHashTag commented on May 2, 2026

    @gHashTag
    CollaboratorAuthor

    📐 R14 acceptance criteria (exact Coq names from PDF v4 / NEON ssot.chapters)

    ch08-tf3-tf9-ternary-matmul.png

    This issue's PR MUST add \citetheorem{} macros for: admit_phi_sq (Ch.8 TF3/TF9 sparse ternary MatMul) + gf16_safe_domain (Ch.9 GF vs MXFP4 ablation).

    Editing rules:

    • Edit lands in NEON ssot.chapters.body_md, propagated by v4/generate_from_neon.py to docs/golden-sunflowers/*.md.
    • Direct edits to docs/phd/chapters/*.tex are forbidden — .tex is generated, not authored.
    • Reference image (1200×800 triptych) is at assets/illustrations/ch08-tf3-tf9-ternary-matmul.png.

    Constraints:

    🌻 phi² + phi⁻² = 3 · Agent: LEAD

  3. gHashTag commented on May 2, 2026

    @gHashTag
    CollaboratorAuthor

    🔧 Acceptance Criteria Update — tch → candle, trios-integration → upstream-trainer

    Ground truth audit before PR (R5-honest):

    Fact 1 — tch не существует в trios-trainer-igla

    trios-trainer-igla/Cargo.toml использует Candle (candle-core, candle-nn) с CUDA features, не tch. Acceptance criteria нужно обновить:

    • ❌ feature-gated tch (cpu-only by default)
    • ✅ feature gpu = ["candle-core/cuda", "candle-nn/cuda"] — зеркало upstream feature, disabled by default

    Fact 2 — trios-integration feature пустая

    trios-integration = []  # placeholder, все git-deps закомментированы
    # Temporarily disabled due to submodule issue — use local path or fix submodule

    Dep trios-trainer-igla = { git = ..., features = ["trios-integration"] } включит пустой список и не даст доступа к коду.

    Предлагаемое исправление:

    [features]
    default = []
    gpu = ["candle-core/cuda", "candle-nn/cuda"]
    upstream-trainer = ["trios-trainer-igla"]
    
    [dependencies]
    trios-trainer-igla = { git = "https://github.com/gHashTag/trios-trainer-igla", rev = "09e85a0d4481b3efb998f088037a72958e3a0c65", optional = true }

    Fact 3 — 85 KB live-fleet port без GPU harness = R5-unsafe

    sampler.rs (11K) + attn.rs (11K) + gf16.rs (12K) — живой trainer код. Перенос без:

    • champion.toml end-to-end run (требует FineWeb данные + CUDA)
    • измеренного step_one_chunk p99 < 50ms (CPU baseline не определён)
    • реального BPB row written via SR-03 integration test (требует Neon write)

    ...это hallucinated claim, не shipped ring.


    Предлагаемый revised scope для SR-02 v0.1

    Часть R5-статус
    rings/SR-02/ + I5 trinity ✅ чисто
    TrainerRunner trait (абстракция) + ChunkInput/ChunkBpb типы на SR-00 ✅ чисто
    step_one_chunk sync API с mock implementation + BpbSink integration ✅ чисто
    feature gpu = ["candle-core/cuda", "candle-nn/cuda"] disabled by default ✅ чисто
    trios-trainer-igla git dep rev 09e85a0d44, gated behind upstream-trainer feature ✅ чисто
    INV-3 GF16 closure check — чистая Rust-проверка ✅ чисто
    Tests ≥ 10 GREEN, clippy 0 warnings ✅ чисто
    85 KB port sampler/attn/gf16 + p99 < 50ms microbench ⚠️ SR-02b follow-up — требует GPU harness
    BPB row written via Neon integration test ⚠️ SR-02b follow-up — требует Neon write env

    SR-02 v0.1 закрывает ~60% acceptance criteria и честно фиксирует остальное как SR-02b когда GPU harness доступен через Neon.


    Запрос: обновить acceptance criteria в issue body

    Просьба к @gHashTag — подтвердить или скорректировать:

    1. Заменить tch → candle в acceptance criteria
    2. Заменить features = ["trios-integration"] → features = ["upstream-trainer"] (optional dep)
    3. Добавить SR-02b follow-up scope для 85KB port + microbench когда GPU harness готов

    После подтверждения — немедленный PR с SR-02 v0.1 skeleton.

    🌻 phi² + phi⁻² = 3 · truth-first · Agent: LEAD

  4. gHashTag commented on May 2, 2026

    @gHashTag
    CollaboratorAuthor

    🔥 IGLA RACE IGNITION — cross-front status (Wave 10 pre-flight)

    Bring this issue back into discussion — the operator surface has moved past paper:

    What is happening on the metal (parallel army front)

    • H100 SXM Pod r5axwbgsrijxho — RUNNING through trios-trainer-igla:latest (image: ghcr.io/ghashtag/trios-trainer-igla:latest)
    • Env: TRIOS_SEED=10001, TRIOS_STEPS=50000, TRIOS_LR=0.04, TRIOS_HIDDEN=512, TRIOS_OPTIMIZER=muon
    • 8 RunPod accounts available (runpod_accounts Neon table populated, 3 working keys verified)
    • runpod-cli rewritten REST → GraphQL
    • seed_agent.rs containerization fix committed locally as 429289c62 (NOT YET PUSHED to origin)

    Why this issue is technically un-blocked but formally still on hold

    • Acceptance criteria in this issue requires tch cpu-only by default with feature-gated — I cannot verify whether trios-trainer-igla:latest is built with tch or candle without inspecting the Dockerfile / Cargo.lock of the SoT repo (gHashTag/trios-trainer-igla).
    • The H100 pod is training successfully — which means some backend works, but does not by itself satisfy AC item feat(bridge): Phase 2 — Vision + Context (GB screenshot → structured state) #2 of this issue (the backend choice and feature-gating).
    • No PR exists yet that lands crates/trios-igla-race-pipeline/rings/SR-02/ — the ring scaffold itself is missing.

    What is needed to actually close this issue

    1. @gHashTag verify which backend is in the live trios-trainer-igla:latest image (tch or candle, cpu-only-default?).
    2. Push 429289c62 to origin/fix/entrypoint-scarab-dual-mode and open PR — unblocks CI rebuild of trios-seed-agent-real:latest.
    3. Open SR-02 ring scaffold PR: crates/trios-igla-race-pipeline/rings/SR-02/ with I5 trinity + trainer-runner trait wrapper + git-dep on gHashTag/trios-trainer-igla pinned by sha.
    4. Validate seed semantics: current pod runs seed=10001 which is not in the gate-3 acceptance set [F_17=1597, F_18=2584, F_19=4181]. Either re-run with Fibonacci seeds, or document as warmup/calibration.

    Honest scoreboard

    Layer State
    SR-02 ring scaffold (this issue) NOT shipped
    H100 metal training RUNNING (warmup seed)
    seed-agent containerization committed locally, not pushed
    RunPod fleet (8 accounts) idle, ready to fan-out after CI rebuild
    WIN gate (3-seed mean BPB < 1.07063) not measured

    Not closing this issue. The metal moves but the ring is still empty. Issue stays open until SR-02 ring lands and AC checkboxes are honestly ticked.

    🌻 Cross-posted from EPIC #446 Wave 10 pre-flight. Agent: LEAD. No fabricated proofs.

  5. gHashTag commented on May 19, 2026

    @gHashTag
    CollaboratorAuthor

    Requires trios-trainer-igla external repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions