Skip to content

fix(teaching): train each passage for one pass instead of a fixed step count (F1) - #20

Merged
aien-spark merged 1 commit into
mainfrom
fix/teaching-steps-scale
Oct 16, 2026
Merged

aien-spark merged 1 commit into
mainfrom
fix/teaching-steps-scale

Conversation

@aien-spark

Copy link
Copy Markdown
Collaborator

Evidence

cargo test --workspace --verbose: every suite ok, 0 failed (oh-core 50 passed, 1 ignored; new teaching_steps test 2 passed, 1 ignored measurement printer).
cargo clippy --workspace --all-targets: no warnings from changed crates (the 3 existing warnings are in beacon-core and beacon-client, untouched).
cargo audit: 6 vulnerabilities, the same pre-existing set (bincode, h2, rustls, rustls-pemfile, rustls-webpki, yoke-derive).

Teaching batch Turings, LICENSE corpus, dim 32, seed 1, run steps 500, three hand-written passages (636, 499, 501 bytes), one batch per round through the real Coordinator:

Order Before (fixed 500 steps) After (one pass)
1, 2, 3 +6799.366 -123.917 -655.329 +4920.534 +2181.755 +233.960
3, 1, 2 +6720.464 -640.238 -45.295 +3668.047 +3067.363 +792.190
2, 3, 1 +7202.845 -938.601 -942.333 +3669.925 +2961.191 +587.442

Order 1 ends at 5.8813 held-out bits per byte after, 6.0368 before. Sweep of 1, 1.5, 2 and 3 passes is in docs/design/qwen-teacher-v0.md; one pass is the only setting with every batch positive in all three orders.

What changed

  • oh_core::teaching_steps(text_len, batch, max_steps): ceil((text_len - 1) / batch), capped at the run's step count; 0 for text under two bytes. Unit test included.
  • The coordinator uses it both when scoring a teaching batch and when applying it after the round.
  • crates/oh-coordinator/tests/teaching_steps.rs: pins the old overfit and the fix; --ignored prints the table.
  • Design and results docs updated; demo-teach.sh notes that STEPS is now a cap for teaching.

Not built

  • Rerun against the live Qwen server: it did not answer on 127.0.0.1:18091 when this was measured. Real Qwen passages are UNVERIFIED with the new rule.
  • One seed and one model size only; a real trainer needs its own pass count.

Zero secrets: none in this diff.

🤖 Generated with Claude Code

…p count

Teaching text trained for the run's 500 steps (about 8 passes over a
500 byte passage), so the second batch overfit and was rejected.
oh_core::teaching_steps gives ceil((bytes - 1) / batch) steps, capped at
the run's step count; the coordinator uses it for scoring and applying.

Measured in crates/oh-coordinator/tests/teaching_steps.rs (LICENSE corpus,
dim 32, seed 1, three passages, three orders): before, batches 2 and 3
scored -123.9 to -942.3; after, every batch scores positive
(+234.0 to +3067.4).

Co-authored-by: Drake Stapleton <drake@aien.org>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

⚖️ Sovereign Code Review & Alignment Gate

Greetings @aien-spark. I am AIEN, the automated review gate for the AIENOS project.

Your pull request #20 ("fix(teaching): train each passage for one pass instead of a fixed step count (F1)") has undergone automated auditing against the project standards.

✅ Doctrine Diff Audit: PASS

  • Telemetry Check: Clean (zero tracking or surveillance hooks detected).
  • Sovereign Voice & Formatting Check: Clean (zero em/en dashes, zero banned buzzwords).
  • Secrets & Credentials Check: Clean (zero plaintext secrets, hardware vault only).
  • Status: Project standards verified.

🌿 Sovereign Steward: Contributor Alignment Interview

Greetings @aien-spark. I am AIEN, the automated steward for the AIENOS project.

We welcome all contributors who share our commitment to open collaboration, global humanity, and disciplined systems craftsmanship. We build to expand computing capability, advance open-source intelligence, and share technology freely with the world.

Your pull request #20 ("fix(teaching): train each passage for one pass instead of a fixed step count (F1)") is ready for stewardship alignment.

Please respond directly to these four alignment inquiries:

  1. Long-Term Mission Alignment:
    This initiative is an enduring engineering commitment to open-source technology for humanity, not a vehicle for short-term hype, social media monetization, or get-rich-quick ventures. How does your contribution support global progress and the resilience of local communities?

  2. Telemetry & Integrity:
    Do you certify that this change introduces zero telemetry, zero surveillance, and zero artificial paywalls?

    "I certify that my contribution is submitted in service of human sovereignty and open collaboration. I affirm that this work maintains zero telemetry, contains no surveillance backdoors, and introduces no artificial barriers, and that I offer it under AGPL-3.0-or-later, the license that governs this project. I build so that intelligence is owned by the person who runs it, not rented."

  3. Downstream Heritage Preservation:
    Do you acknowledge and agree that any downstream branch, fork, or copy of this work remains under AGPL-3.0-or-later and retains the project's license and attribution notices, as the LICENSE file requires?

  4. Craftsmanship & Native Discipline:
    What architectural trade-offs did you make, and how did you verify that this code introduces zero regressions, zero unneeded dependencies, and complies with our pure native compiled standards?


Reply to this comment with your affirmation. Once verified against the project standards, I will grant the sovereign-interview-passed clearance. For direct sovereign coordination: Drake Stapleton (drake@aienos.com) and AIEN (aien@aienos.com)

@github-actions github-actions Bot added needs-testimony Contributor testimony required sovereign-audit-passed Constitutional diff audit passed labels Oct 16, 2026
@aien-spark
aien-spark merged commit abd0b68 into main Oct 16, 2026
3 checks passed
@aien-spark
aien-spark deleted the fix/teaching-steps-scale branch October 16, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-testimony Contributor testimony required sovereign-audit-passed Constitutional diff audit passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants