Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .agents/skills/fine-tuning/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Train language models with SFT, KTO, and GRPO locally or on supported cloud prov
| SFT training | `cd Trainers/sft && python train_sft.py --model-size 7b` |
| KTO training | `cd Trainers/kto && python train_kto.py --model-size 7b` |
| Modal conversation SFT host path | Existing `train --job-config <recipe> --plan --json`, explicit conversation format and compatible named candidate; CPU host proof, unqualified runtime; see `reference/conversation-preparation.md` |
| Public GRPO preparation and Modal runner | Explicit host-owned preparation ports and compatible named GRPO profile; normal execution/CPU qualification joined, live image/model qualification remains unproven; see `reference/grpo-training.md` |
| Public GRPO preparation and Modal runner | Explicit host-owned preparation ports and compatible named GRPO profile; bounded live Modal mechanics evidence is source-scoped, with broader ordinary runtime/lifecycle gates retained; see `reference/grpo-training.md` and the support matrix |
| Legacy GRPO training | `cd Trainers/grpo && python train_grpo.py` |
| Pivot-profile GRPO dataset | `cd Trainers/grpo && python train_grpo.py --config configs/pivot_config.yaml --pivot-profile-only` |
| GRPO with pivot filtering | `cd Trainers/grpo && python train_grpo.py --config configs/pivot_config.yaml` |
Expand Down Expand Up @@ -59,8 +59,8 @@ Train language models with SFT, KTO, and GRPO locally or on supported cloud prov
| Prepare representative native SFT subsets | Config-first `examples/training_qualification/native_sft_datasets/prepare.py {acquire,prepare}`; existing conversation publisher, explicit labels/splits, no training authority; see its README |
| Diagnose an offline SFT worker rejection | Read the exact retained `trainer.stderr.log`; closed phase/category/milestone labels locate a boundary, not a cause or retry authority; see `reference/sft-training.md` |
| Diagnose Torch import in a retained Docker image | `python scripts/diagnose_docker_torch_import.py --help` for bounded guarded, worker-context prefix, and worker-entry probes; each live command needs exact review; see `reference/sft-training.md` |
| Native MLX restricted host consumer | `python -B examples/training_qualification/native_host.py inspect <canonical-host-config.json>` is read-only; exact-run `start` requires an externally signed root admission and separately supplied public-key pin. The earlier raw attempt is consumed/uncertain; a fixed CPU guardian worker has a separate normal outcome. Fresh reviewed v2 capture and admission remain necessary; see `reference/native-local-training.md` |
| Native MLX GRPO source candidate | Same public native composition and restricted host consumer, separate named profile/54-package runtime closure, attributed on-policy objective and bounded rewards; CPU controls only until separately admitted Apple qualification. See `reference/native-local-training.md` and `reference/grpo-training.md` |
| Native MLX restricted host consumer | `python -B examples/training_qualification/native_host.py inspect <canonical-host-config.json>` is read-only; v1 `start` or v2 lifecycle `qualify` requires an exact externally signed single-use admission and separate public-key pin. Bounded M4 SFT/GRPO and public lifecycle qualification passed; every new attempt still requires reviewed source/runtime and fresh authority. See `reference/native-local-training.md` |
| Native MLX GRPO | Same public native composition and restricted host consumer, separate named profile/54-package runtime closure, attributed on-policy objective and bounded rewards. Bounded M4 mechanics and lifecycle evidence passed; ordinary qualification stays host-authenticated. See `reference/native-local-training.md` and `reference/grpo-training.md` |
| Diagnose a retained native GRPO failure | Read the exact authenticated process outcome with its admitted source. Closed numeric exits locate phases only; historical 122 remains unclassified. See `reference/native-local-training.md`; no replay or raw exception/traceback logging. |
| Native-only GRPO input preparation | `python -B examples/training_qualification/native_grpo_preparation/prepare.py {inspect,prepare} <reviewed-config.json>` — existing generic preparation service through a config-first Linux host wrapper, no Modal/runtime/ML effects; read the example README and `reference/grpo-training.md` |
| Native GRPO tokenizer-only profile | `python -B examples/training_qualification/native_grpo_preparation/prepare.py profile-tokenizer <reviewed-tokenizer-profile.json>` — Linux/Darwin host, exact shared prompt-ID contract and private bounded evidence; root reviews source/environment first, no MLX/model/training; see the example README. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ model:
runtime:
provider: modal
lock_path: tuner/execution/providers/modal/modal-runtime-v1.lock.json
expected_lock_sha256: 2d7dfb11f8c850bd33ab9ddfa452183acfa845b2d9fd3210f6373d4d12ad57a9
expected_lock_sha256: 64f9ca368de9478e7b6b8024641a328fd99910942f16aae059a742fc2c6db761
input:
jsonl_path: /replace/with/private/prepared-dataset.jsonl
mode: text
Expand Down
9 changes: 7 additions & 2 deletions .agents/skills/fine-tuning/reference/grpo-training.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ CLI commands below to that candidate or infer Mac qualification from Modal
evidence. Its attributed objective, bounded regex-V0 reward engine, strict public
control refusals and new private runtime require exact independent review and
fresh root admission before ML imports. The qualified SFT environment is not a
GRPO environment; no native public lifecycle capability is promoted.
GRPO environment. Separately authenticated versioned lifecycle selections have
bounded M4 progress/cancellation/caller-loss evidence through merged PR #279;
legacy synchronous selections retain those capability flags off. See
`docs/review/native-mlx-lifecycle-qualification.md` (repo root).

Native GRPO failure diagnosis uses the closed numeric phase exits documented in
`native-local-training.md`, interpreted with the exact admitted worker source and
Expand Down Expand Up @@ -644,7 +647,9 @@ env-GRPO smoke job and confirm the run does not raise a length/logprob mismatch.
## Platform Note

The legacy CUDA/TRL GRPO commands require **WSL/Linux**; native Windows is not
supported. The distinct native MLX candidate above remains hardware-unqualified.
supported. Native Apple-silicon MLX uses the separate host-integrated path above,
with exact bounded M4 mechanics/lifecycle qualification. This does not qualify
other models, rewards, runtimes or hardware combinations.


## Captured ordinary candidate configuration
Expand Down
43 changes: 30 additions & 13 deletions .agents/skills/fine-tuning/reference/native-local-training.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,30 @@ Canonical publication members remain sealed 0400. Native staging creates separat
byte-identical 0600 members under a new 0700 content-addressed directory, then
revalidates their identity; never chmod canonical originals to satisfy the reader.

## Current evidence — 2026-10-26
## Current evidence — 2026-10-28

The selected OSS engine/Mac integration merged in PR #279 at `e2e8cd4f` after
independent final evidence/package review and all 18 checks. Real bounded M4
SFT/GRPO attempts demonstrate two completions per method, public numeric progress,
confirmed cancellation, abrupt caller-loss/cold reconciliation, changed saved
adapters/reload and verified artifact delivery. Four normal runs reverified
after start expiry; all eight retained outcomes/progress streams matched with
one process claim each. See `docs/review/native-mlx-lifecycle-qualification.md`.
`1.1.0rc1` is a scoped engine preview, not broad stable/provider qualification.
Hosts authenticate their exact selection; no accepting default authority ships.
Actual-ML acknowledgement loss, optimizer resume, arbitrary model/OS support,
model quality and full desktop distribution are outside this evidence.

### Earlier SFT evidence — 2026-10-26

The M4 now has successful bounded raw-text and assistant-only prompt/completion
MLX SFT runs through the public `TrainingAPI` and `RunsAPI`, including native
verification and five-artifact delivery for each. See
`docs/review/native-mlx-sft-qualification.md` (repo root) for the
exact execution source, run, numeric adapter-change evidence and remaining
desktop integration gates. The preparation chronology below retains historical
blockers; it does not supersede that dated evidence or enable ordinary native
training, GRPO, public cancellation, or product support.
blockers; it does not supersede later GRPO/lifecycle evidence or enable ordinary
native training or product support without independently authenticated authority.

Restricted signed start admissions must satisfy
`now < expires_at <= now + one hour` on the execution host. `admission-candidate`
Expand Down Expand Up @@ -97,9 +111,10 @@ worker/math/verifier bytes. No new provider verb or accepting authority exists.

Linux CPU controls must not import MLX. The real tiny numerical test additionally
requires `SYNAPTIC_TEST_NATIVE_GRPO_MLX=1` on Darwin arm64; root/source/runtime
review and a bounded authorized command must precede it. Mac execution, GPU fit,
real grouped reward variation, saved adapter changes and public artifact
readback remain separate gates. Public logs/cancel/reconcile remain disabled.
review and a bounded authorized command must precede it. The exact M4 mechanics
and lifecycle fixtures passed those gates; other selections need their own proof.
Legacy synchronous selections keep logs/cancel/reconcile disabled. Only the
explicit independently authenticated lifecycle policy/session can expose them.

## Read-only host diagnosis (commands)

Expand Down Expand Up @@ -509,9 +524,10 @@ qualification or replay authority.
and two distinct retained attempt-evidence references; its independent host
authority must authenticate the supporting real runs, selected wheel/install
provenance and final-adapter/public-readback evidence. Reference hashes alone
are not qualification. Public logs, cancellation and reconciliation remain
disabled even with this narrow qualification. The guardian's internal stop
path does not promote public cancellation.
are not qualification. This hardware qualification alone leaves public logs,
cancellation and reconciliation disabled. The separately qualified versioned
lifecycle additionally requires an exact independently authenticated lifecycle
grant and owned session; an internal stop method cannot promote capabilities.

`native_mlx_publication.py` independently checks the exact output inventory,
workload/input binding, optimizer count, finite saved tensor delta, retained
Expand Down Expand Up @@ -624,7 +640,7 @@ tools and a bounded process; it loads MLX but no model or training publication.
Its three cases skip on non-Apple hosts. A skip or CPU algebra double is not
real MLX numerical evidence and does not issue training authority.

### Public lifecycle qualification candidate — 2026-10-27
### Public lifecycle qualification workflow — 2026-10-28

Use the existing `native_host.py` with exact v2 config and separately root-signed
selection for `qualify`; see `native-host.md` for the full contract. The selected
Expand All @@ -639,9 +655,10 @@ Never repeat `qualify`, signal saved PIDs, adopt a live child or restart trainin
Only the signed cancel scenario can bind public cancellation; request and
confirmed terminal are separate. Preserve completion races, uncertain claims
and create-only reports. `logs` provides later bounded public readback.
Source/CPU acceptance does not qualify Darwin/MLX or enable default capabilities;
fresh final capture/admission, real lifecycle evidence and independent review
remain required. Full desktop distribution and model-quality work are excluded.
Source/CPU acceptance alone does not qualify Darwin/MLX or enable default
capabilities. The dated real M4 evidence and independent review above complete
the bounded fixture; every new attempt still needs fresh reviewed capture and
admission. Full desktop distribution and model-quality work are excluded.

Actual Darwin CPython startup can initialize `__CF_USER_TEXT_ENCODING` even with
`-I -S -B` and an explicit clean environment. The CPU fixture's `/bin/sh` shim
Expand Down
6 changes: 3 additions & 3 deletions .claude/skills/fine-tuning/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Train language models with SFT, KTO, and GRPO locally or on supported cloud prov
| SFT training | `cd Trainers/sft && python train_sft.py --model-size 7b` |
| KTO training | `cd Trainers/kto && python train_kto.py --model-size 7b` |
| Modal conversation SFT host path | Existing `train --job-config <recipe> --plan --json`, explicit conversation format and compatible named candidate; CPU host proof, unqualified runtime; see `reference/conversation-preparation.md` |
| Public GRPO preparation and Modal runner | Explicit host-owned preparation ports and compatible named GRPO profile; normal execution/CPU qualification joined, live image/model qualification remains unproven; see `reference/grpo-training.md` |
| Public GRPO preparation and Modal runner | Explicit host-owned preparation ports and compatible named GRPO profile; bounded live Modal mechanics evidence is source-scoped, with broader ordinary runtime/lifecycle gates retained; see `reference/grpo-training.md` and the support matrix |
| Legacy GRPO training | `cd Trainers/grpo && python train_grpo.py` |
| Pivot-profile GRPO dataset | `cd Trainers/grpo && python train_grpo.py --config configs/pivot_config.yaml --pivot-profile-only` |
| GRPO with pivot filtering | `cd Trainers/grpo && python train_grpo.py --config configs/pivot_config.yaml` |
Expand Down Expand Up @@ -59,8 +59,8 @@ Train language models with SFT, KTO, and GRPO locally or on supported cloud prov
| Prepare representative native SFT subsets | Config-first `examples/training_qualification/native_sft_datasets/prepare.py {acquire,prepare}`; existing conversation publisher, explicit labels/splits, no training authority; see its README |
| Diagnose an offline SFT worker rejection | Read the exact retained `trainer.stderr.log`; closed phase/category/milestone labels locate a boundary, not a cause or retry authority; see `reference/sft-training.md` |
| Diagnose Torch import in a retained Docker image | `python scripts/diagnose_docker_torch_import.py --help` for bounded guarded, worker-context prefix, and worker-entry probes; each live command needs exact review; see `reference/sft-training.md` |
| Native MLX restricted host consumer | `python -B examples/training_qualification/native_host.py inspect <canonical-host-config.json>` is read-only; exact-run `start` requires an externally signed root admission and separately supplied public-key pin. The earlier raw attempt is consumed/uncertain; a fixed CPU guardian worker has a separate normal outcome. Fresh reviewed v2 capture and admission remain necessary; see `reference/native-local-training.md` |
| Native MLX GRPO source candidate | Same public native composition and restricted host consumer, separate named profile/54-package runtime closure, attributed on-policy objective and bounded rewards; CPU controls only until separately admitted Apple qualification. See `reference/native-local-training.md` and `reference/grpo-training.md` |
| Native MLX restricted host consumer | `python -B examples/training_qualification/native_host.py inspect <canonical-host-config.json>` is read-only; v1 `start` or v2 lifecycle `qualify` requires an exact externally signed single-use admission and separate public-key pin. Bounded M4 SFT/GRPO and public lifecycle qualification passed; every new attempt still requires reviewed source/runtime and fresh authority. See `reference/native-local-training.md` |
| Native MLX GRPO | Same public native composition and restricted host consumer, separate named profile/54-package runtime closure, attributed on-policy objective and bounded rewards. Bounded M4 mechanics and lifecycle evidence passed; ordinary qualification stays host-authenticated. See `reference/native-local-training.md` and `reference/grpo-training.md` |
| Diagnose a retained native GRPO failure | Read the exact authenticated process outcome with its admitted source. Closed numeric exits locate phases only; historical 122 remains unclassified. See `reference/native-local-training.md`; no replay or raw exception/traceback logging. |
| Native-only GRPO input preparation | `python -B examples/training_qualification/native_grpo_preparation/prepare.py {inspect,prepare} <reviewed-config.json>` — existing generic preparation service through a config-first Linux host wrapper, no Modal/runtime/ML effects; read the example README and `reference/grpo-training.md` |
| Native GRPO tokenizer-only profile | `python -B examples/training_qualification/native_grpo_preparation/prepare.py profile-tokenizer <reviewed-tokenizer-profile.json>` — Linux/Darwin host, exact shared prompt-ID contract and private bounded evidence; root reviews source/environment first, no MLX/model/training; see the example README. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ model:
runtime:
provider: modal
lock_path: tuner/execution/providers/modal/modal-runtime-v1.lock.json
expected_lock_sha256: 2d7dfb11f8c850bd33ab9ddfa452183acfa845b2d9fd3210f6373d4d12ad57a9
expected_lock_sha256: 64f9ca368de9478e7b6b8024641a328fd99910942f16aae059a742fc2c6db761
input:
jsonl_path: /replace/with/private/prepared-dataset.jsonl
mode: text
Expand Down
9 changes: 7 additions & 2 deletions .claude/skills/fine-tuning/reference/grpo-training.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ CLI commands below to that candidate or infer Mac qualification from Modal
evidence. Its attributed objective, bounded regex-V0 reward engine, strict public
control refusals and new private runtime require exact independent review and
fresh root admission before ML imports. The qualified SFT environment is not a
GRPO environment; no native public lifecycle capability is promoted.
GRPO environment. Separately authenticated versioned lifecycle selections have
bounded M4 progress/cancellation/caller-loss evidence through merged PR #279;
legacy synchronous selections retain those capability flags off. See
`docs/review/native-mlx-lifecycle-qualification.md` (repo root).

Native GRPO failure diagnosis uses the closed numeric phase exits documented in
`native-local-training.md`, interpreted with the exact admitted worker source and
Expand Down Expand Up @@ -644,7 +647,9 @@ env-GRPO smoke job and confirm the run does not raise a length/logprob mismatch.
## Platform Note

The legacy CUDA/TRL GRPO commands require **WSL/Linux**; native Windows is not
supported. The distinct native MLX candidate above remains hardware-unqualified.
supported. Native Apple-silicon MLX uses the separate host-integrated path above,
with exact bounded M4 mechanics/lifecycle qualification. This does not qualify
other models, rewards, runtimes or hardware combinations.


## Captured ordinary candidate configuration
Expand Down
Loading
Loading