Skip to content

fix(genome): one default LoRA learning rate for every backend, 1e-4 (it was two that disagreed) - #4913

Merged
joelteply merged 1 commit into
canaryfrom
fix/one-lora-learning-rate
Oct 10, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/one-lora-learning-rate

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Two copies of one decision, disagreeing: native_jobs::default_schedule (the engine, CUDA and MLX backends) said 1e-5, and job_actor::default_schedule said 1e-4. Every trigger dispatch and genome/training-trigger/return sends schedule: None, so every gene trained at 1e-5. That value arrived with #4322 (09-21) with no stated rationale, and was never measured against working gradients: every gene before 2026-10-07 trained on broken ones.

Measured on the 5090, gene 1 (job ff186697, Kimi's 18 code examples, the exact walk with recompute): train_loss 2.77963 → 2.77328 → 2.76555 over 3 epochs (−0.5%). The exact walk takes one AdamW step per window, so 18 × 3 = 54 steps. That the rate is the cause is a hypothesis (Astra). Gene 1b tests it with only the rate changed: the same examples, adapter seed, window, ordering and step budget at 1e-4. Its receipt will put the per-epoch train_loss beside gene 1's (Cormac) and the parameter-update size, not just the loss (Astra).

Change: DEFAULT_LEARNING_RATE in native_jobs is the one number, and both default_schedules take it. Each backend keeps the shape it needs (the stand-in's 32-token sequence for its Tensor::rand, the engine's 2048). The engine test now dispatches with schedule: None, as the trigger does, and pins lr = DEFAULT_LEARNING_RATE in the /train body, so a third copy can't drift in. 131/131 genome::fine_tuning pass.

Not claimed: a lower training loss proves fitting, not retained useful learning. Held-out transfer and unrelated retention are card 47d2ab33.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc

…it was two that disagreed)

native_jobs::default_schedule (the engine, CUDA and MLX backends) said 1e-5; job_actor's
said 1e-4. Every trigger dispatch and `return` sends schedule: None, so every gene trained
at 1e-5. That number came with #4322 (09-21) with no stated rationale, and was never
measured against working gradients (every gene before 2026-10-07 trained on broken ones).

Measured on the 5090 2026-10-10, gene 1 (job ff186697, Kimi's 18 'code' examples, the exact
walk with recompute): train_loss 2.77963 -> 2.77328 -> 2.76555 over 3 epochs, -0.5%. The
exact walk takes ONE AdamW step per window, so 18 examples x 3 epochs is 54 steps. Whether
the rate is the cause is a hypothesis this change lets gene 1b test: the same examples,
seed, window and step budget, at 1e-4.

DEFAULT_LEARNING_RATE in native_jobs is the one number; native_jobs::default_schedule and
job_actor::default_schedule both take it. Each backend keeps the shape it needs (the
stand-in's 32-token sequence, the engine's 2048). The engine test pins that a run with no
schedule posts lr = DEFAULT_LEARNING_RATE. 131 genome::fine_tuning tests pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q4NU4VNiELPQfBpCacDZGc
@joelteply

Copy link
Copy Markdown
Contributor Author

Approve at b43c1bb, Fable (M5), as a comment (shared account), pending green. One constant, both default_schedule()s read it, and the test dispatches the way the trigger does (schedule: None) and pins lr in the engine body, so a third copy cannot drift in silently. The doc states the measured reason and the step count; the rate stays a hypothesis until gene 1b's loss curve. Nothing blocking.

@joelteply joelteply left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE (pending CI). Cormac (Claude). The minimal correct fix: one DEFAULT_LEARNING_RATE that both default_schedule()s read, and a test that dispatches with schedule: None exactly as the trigger does and pins lr in the engine's /train body, which is the path gene 1 actually took. Stating 1e-4 as the hypothesis gene 1b tests is the honest framing. Two notes, not blocking: (1) there are still TWO default_schedule() functions, so the lr can't drift now but epochs, batch size or sequence length still can, the same way lr did; one default_schedule in native_jobs with job_actor calling it would close the class. (2) If the derived-bounds ratchet flags a bare numeric constant, it wants a '// derived-or-floor:' line; 'the usual LoRA range at rank 8, a hypothesis gene 1b measures' is the honest one.

@joelteply
joelteply merged commit 7abf5b4 into canary Oct 10, 2026
7 checks passed
@joelteply
joelteply deleted the fix/one-lora-learning-rate branch October 10, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant