unsloth/.github/workflows
dylanschroers 8cfd1a2173
fix: single-pass GGUF export for directly convertible outtypes in save.py (#7090)
* Single-pass GGUF export for direct outtypes + parallel multi-quant

save_to_gguf defaulted first_conversion to model_dtype before the block
that picks the optimal base conversion, leaving that block dead since it
landed (#3356). Every default export (fast_quantized -> q8_0) therefore
ran two passes: convert HF -> 16-bit GGUF, then llama-quantize -> q8_0,
writing a 2x-size intermediate that the cleanup step deletes again.

- Route single-output exports whose type convert_hf_to_gguf.py emits
  directly (f32/f16/bf16/q8_0) through one conversion pass with no
  16-bit intermediate. Measured on Qwen2.5-0.5B-Instruct (8-core CPU):
  bytes written 1525 MB -> 531 MB (2.9x less), peak extra disk 994 MB
  -> 0, wall time neutral on local NVMe (14.8s vs 15.4s). The dequantized
  q8_0 tensors are bit-identical to the two-pass output (max diff 0 over
  all 290 tensors, same quant-type table). On disk-capped runtimes
  (Kaggle 20 GB, Colab) the removed intermediate is the difference
  between an export that fits and one that dies - see the Kaggle error
  text this file already carries. imatrix runs keep the two-pass route
  since only llama-quantize can apply one; explicit first_conversion is
  still honored.

- Run independent llama-quantize passes two at a time when several
  quant methods are requested (thread budget split between workers,
  outputs byte-identical, order preserved). Measured 1.38x wall-clock
  on q4_k_m+q5_k_m+q6_k. Sequential under UNSLOTH_ENABLE_LOGGING=1 to
  keep subprocess logs readable; kill switch
  UNSLOTH_PARALLEL_GGUF_QUANTS=0. Duplicate methods now quantize once.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Guard parallel GGUF quant on Kaggle and make multi-quant failures atomic

Each llama-quantize pass loads the whole model into RAM, so running two at once on Kaggle can OOM a host that succeeded sequentially; skip the parallel path there. On a failed multi-quant export, stop launching queued passes and remove orphaned quant outputs so a failure leaves no partial GGUFs behind, keeping the 16-bit base for retry. Also accept 0/false/no/off/empty for UNSLOTH_PARALLEL_GGUF_QUANTS so a well-meant 'false' actually disables parallelism, and add tests/saving/test_gguf_single_pass_export.py to the CI saving bucket so the new tests run.

* Preserve pre-existing outputs for canceled quant passes on failure

The parallel cleanup unlinked every requested output name, so a failed rerun could delete a valid model.<METHOD>.gguf left by an earlier successful export for a method whose pass was canceled and never ran this session. Skip canceled futures and only remove outputs from passes that actually executed.

* Gate parallel GGUF quant on available memory and preserve prior outputs

Skip the two-worker path when RAM cannot hold two full-model quantizations at once (and on Colab as well as Kaggle), so a multi-quant export that fit sequentially no longer OOMs. On failure, remove only outputs this run newly created, tracked against a pre-launch snapshot, so a rerun into an existing _gguf directory never deletes a valid artifact from an earlier export.

---------

Co-authored-by: djs <dschroers2@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: danielhanchen <michaelhan2050@gmail.com>
2026-07-15 05:25:03 -07:00
..
consolidated-tests-ci.yml fix: single-pass GGUF export for directly convertible outtypes in save.py (#7090) 2026-07-15 05:25:03 -07:00
cross-platform-parity-ci.yml Studio: add UNSLOTH_SKIP_AUTOSTART installer flag (#7093) 2026-07-12 21:23:14 -07:00
lint-ci.yml Lint CI: diff import-hoist check against the PR merge-base, not the base tip (#6190) 2026-06-11 04:23:41 -07:00
local-agent-guides-ci.yml unsloth start: add --persist to keep and reopen agent sessions (#7014) 2026-07-09 11:47:59 +02:00
lockfile-audit.yml CI: pin lockfile-audit actions to commit SHAs (#6902) 2026-07-06 07:11:33 -07:00
mlx-ci.yml CI: add PyPI extra-index to CPU torch installs to fix sympy resolution (#6660) 2026-06-29 17:35:26 -03:00
notebooks-ci.yml CI: add PyPI extra-index to CPU torch installs to fix sympy resolution (#6660) 2026-06-29 17:35:26 -03:00
ossf.yml Create ossf.yml (#6952) 2026-07-07 17:10:01 -07:00
release-desktop.yml Verify linuxdeploy AppImage digest before use in desktop release (#6673) 2026-06-25 20:45:24 -07:00
security-audit.yml scripts: refresh scan_packages allowlist baseline (#7032) 2026-07-09 04:52:30 -07:00
stale.yml CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
studio-api-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-backend-ci.yml [Studio] Add --with-llama-cpp-dir installer flag to reuse a local llama.cpp (#6472) 2026-07-02 22:11:20 +01:00
studio-export-capability-ci.yml Studio: multi-select export formats, portable FP8/INT8, GGUF LoRA, and source parity (#6767) 2026-07-03 08:25:10 -07:00
studio-frontend-ci.yml Frontend CI: hard-fail unreviewed npm install scripts (#6139) 2026-06-10 06:10:16 -07:00
studio-inference-smoke.yml Studio CI: make tool-calling SSE probes resilient to transport stalls (#7137) 2026-07-15 02:45:05 -07:00
studio-load-orchestrator-ci.yml studio: unblock /load event loop on detect_audio_type (#5642, #5635) (#5669) 2026-05-22 05:47:58 -07:00
studio-mac-api-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-mac-inference-smoke.yml Studio CI: make tool-calling SSE probes resilient to transport stalls (#7137) 2026-07-15 02:45:05 -07:00
studio-mac-install-matrix.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-mac-ui-smoke.yml Harden flaky Studio CI: retry VS-hide rename and tolerate same-URL nav interrupt (#6713) 2026-06-26 19:45:46 -07:00
studio-mac-update-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-tauri-smoke.yml Fix Linux AppImage packaging (#6657) 2026-06-24 19:40:00 -07:00
studio-ui-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-update-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-windows-api-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-windows-inference-smoke.yml Studio CI: make tool-calling SSE probes resilient to transport stalls (#7137) 2026-07-15 02:45:05 -07:00
studio-windows-ui-smoke.yml Withhold HF_TOKEN from pull_request CI runs (#6600) 2026-06-23 03:59:12 -07:00
studio-windows-update-smoke.yml Studio: source CPU llama.cpp prebuilts from unslothai/llama.cpp (#6311) 2026-07-08 05:34:59 -07:00
version-compat-ci.yml version-compat CI: fake CPU training runs for SFT/GRPO/DPO (#6965) 2026-07-08 04:06:28 -07:00
wheel-smoke.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00