diff --git a/tests/studio/run_real_mlx_smoke.py b/tests/studio/run_real_mlx_smoke.py index 959ab39577..950eb6f1b1 100644 --- a/tests/studio/run_real_mlx_smoke.py +++ b/tests/studio/run_real_mlx_smoke.py @@ -278,6 +278,16 @@ def cmd_train(args) -> int: optim = "adamw", weight_decay = 0.0, max_grad_norm = 1.0, + # Explicitly disable the new per-element clip introduced in + # #5340 (default max_grad_value=5.0). When both are set the + # MLX trainer silently drops max_grad_norm in favour of the + # per-element clip, but +-5.0 is far too loose for this + # 270M LoRA setup -- losses diverge after step 4 and the + # model never memorises "Unsloth!" (verified via the CUDA + # mirror at scripts/cuda_mlx_mirror_sim.py). Pinning + # max_grad_value=0 makes the smoke depend on the same + # max_grad_norm=1.0 the test was originally written for. + max_grad_value = 0.0, logging_steps = 1, max_seq_length = 64, seed = SEED,