unsloth/.github/workflows
Daniel Han c7e3989d72 ci(mlx): real MLX training + inference smoke test on Mac M1
Add tests/studio/run_real_mlx_smoke.py and wire it into the macos-14
job as the final step. The script trains unsloth/gemma-3-270m-it
for 7 deterministic LoRA steps on an in-memory dataset of the SAME
row repeated:

    "<<HELLO!!>> My name is Unsloth!"

then prompts the trained model with "<<HELLO!!>> My name is " and
asserts the completion contains "Unsloth". Captures and asserts:

- per-step training loss (via MLXTrainer.add_step_callback);
- pre- and post-training loss + gradient norm (computed manually via
  mx.nn.value_and_grad over the training row, since MLXTrainer does
  not currently expose per-step grad norms);
- losses are finite, do not diverge, and post-train loss < pre-train;
- grad norms are finite and positive;
- the inference output contains "Unsloth".

Determinism: seeds python random, numpy, and mlx.core.random; passes
random_state=SEED to FastMLXModel.from_pretrained and
get_peft_model (both invoke _seed_mlx_random_state internally) and
seed=SEED to MLXTrainingConfig (drives batch shuffling). Uses fp16
+ no quant (gemma-3-270m is small enough to skip 4-bit) and LoRA
r=8 on the four attention projections.

This is the only place in CI that exercises a real MLX backward
pass + optimizer step + mlx_lm.generate call.
2026-05-07 03:40:03 +00:00
..
lint-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
mlx-ci.yml ci(mlx): real MLX training + inference smoke test on Mac M1 2026-05-07 03:40:03 +00:00
release-desktop.yml Fix Studio desktop tray installer and titlebar and bux fixes (#5179) 2026-04-30 08:40:39 -07:00
security-audit.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
stale.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-backend-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-frontend-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-inference-smoke.yml CI: rename + comprehensive Chat UI Tests (verified locally) 2026-05-07 01:51:01 +00:00
studio-tauri-smoke.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-ui-smoke.yml CI(security): random-generated passwords in every workflow (no hardcoded creds) 2026-05-07 03:27:54 +00:00
studio-update-smoke.yml CI: rename + comprehensive Chat UI Tests (verified locally) 2026-05-07 01:51:01 +00:00
wheel-smoke.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00