Skip to content

Living Weights on the dense Qwen3.8-27B on Metal: the pocket and the native trainer (#1568) - #2023

Closed
ashhart wants to merge 9 commits into
mainfrom
lead/1568-q27-living-metal
Closed

ashhart wants to merge 9 commits into
mainfrom
lead/1568-q27-living-metal

Conversation

@ashhart

@ashhart ashhart commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Part of #1568. The dense 27B on Metal gains the Living Weights pocket and native trainer, reusing the shared family and save gate. Five original commits, rebased, plus one commit per review change, including original packed widths and views through the actual path, pending-save reopen, F32 scalar widening and per-stream dispatch.

Without --slide, serving is main's path: the refusal admits only the dense 27B, and other families are still refused by name. Reviewed independently twice. The Mac runs (off against main, and a taught lesson's keep and recall) come before it lands.

Use serving forward captures and full-fp32 input gradients with Metal GDN and attention gate policies. Bind the shared lesson gate, reserve trainer memory and invalidate weight-dependent prompt reuse. Add bounded numerical and native fixtures; real-checkpoint qualification remains pending.
Poison skipped prompt-head storage and retain strict identity on every answer logit. Compare every final hidden row, including prompt rows, and pin the stale prompt-head read with a host red/green regression.
Preserve the pending save guard, original scalar dtypes and untouched base groups. Exercise actual portable shard I/O and per-stream dispatch on the host, and provide owned-process device receipts with exact drafts, delete, rollback, restart and two-way portability gates. Keep full-model numerical and performance qualification explicit.
@ashhart

ashhart commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Mac check, off against main (M5 Ultra, Qwen3.8-27B-MLX-4bit, no --slide, fresh servers, warm then base-new-new-base): GREEN, with tokens equal and every cell level. The taught-lesson keep and recall run on the same Mac is next.

@ashhart

ashhart commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner Author

Pushed 093c4d0: the review's two small asks. A dense config whose mixer kinds disagree with a given full_attention_interval is now refused, and the native --slide refusal names both config keys. The fixture comment also names its source, TensorFold/Qwen3.8-27B-MLX-4bit at 70ae7fac. The taught-lesson run on an M5 Ultra is on the previous head, 56ab8e1, which differs only by this config check; its result will be posted here.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Taught-lesson run on an M5 Ultra on this head (093c4d068), Qwen3.8-27B MLX 4-bit at revision 70ae7fac, one fact: not qualified yet, though it's close.

  • Learning works: the fact was learned in 3 steps and recalled 3 of 3, both right after the lesson and after a reopen from disk. Saved recall equals live recall, and the original checkpoint files are unchanged.
  • The gap: 19 of 20 untaught keep prompts are byte-equal after the lesson and after the reopen. Prompt 7 is not: it first differs at token 57 (3529 → 3050), the same both times. Before the lesson, all 20 matched main.
  • Cost: the one lesson took 3.7 hours on the M5 Ultra.

Next: find which learned neurons fire on prompt 7. --audit from #1980 answers exactly that. Then decide whether the lesson's placement or the keep check needs to change. This stays unlanded until all 20 hold.

@ashhart

ashhart commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

What changed keep prompt 7, read with the pocket audit from #1980 on the same learned state, without re-teaching: it's a tie. At reply token 57, token 3050's logit rises from 22.875 to 23.0 and ties the original 3529. The existing lowest-id tie rule then picks 3050, and the replies diverge from there. The learned neurons in layers 12, 13, 20 and 24 fire above the prompt floor on prompt 7. The first hidden change appears at layer 13's input, and the first head change at row 21. Leaving out any single placement still flips it, while leaving out layer 12 or 26 costs one or two of the fact's three answers. So the lesson nudges one near-tie by a BF16 step, rather than doing something wrong.

Our rule for the keep set stays as it is: untaught replies must not change. The next step is the lesson's own check. The tie rule makes a nudge of one step on a near-tie risky, so the learner should test its keep prompts during the lesson and refuse a placement that moves one. This stays unlanded until all 20 hold.

@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Status on the keep check during a lesson, run on an M5 Ultra with this PR rebased onto main (34d42fcc8): the check works, and it shows this lesson can't be placed yet.

  • Before teaching: main and the empty-pocket branch give the same 20 keep replies, byte for byte (ids, content, reasoning and finish). None of main's three answers to the fact's questions contains the fact.
  • The lesson: the learner runs the 20 keep prompts against each candidate placement and refuses any placement that changes a reply token. It tried three placements, and every one moved keep prompt 5:
    • placements 1 and 2 at reply token 26 (3447 to 6040);
    • placement 3 at reply token 13 (1690 to 8618).
  • After teaching and after reopening: 20 of 20 keeps unchanged, as the check requires. The fact's answers are 0 of 3, because no placement was kept.
  • The lesson took 4 hours (14,290 s) for the three attempts. The original checkpoint is unchanged.

So this isn't qualified, and it stays a draft. Trying more placements at this cost isn't the next step. Next we'll measure keep prompt 5's margin on main at tokens 13 and 26. If those are near-ties, any change at those layers flips them, and the placement needs to come from somewhere the keep prompts don't read rather than from more attempts.

@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

/atc exchange 8e3efa1b6cabd57f9106de520daa76f7333da156f54bdcb2b0713052f64881f6

@ashhart

ashhart commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Closing until a lesson placement qualifies. Every placement tried so far moved keep prompt 5 of 20, so the rebase (29 rejected hunks) only pays off once one keeps all 20 keep prompts and still recalls the fact. The measurements stay here for reference.

  • Synthena (Ash's Agent)

@ashhart ashhart closed this Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant