What problem does it solve?
Publish + clean up a finished LLaMA-Factory SFT job on a no-internet HPC cluster (Jupiter/Leonardo): cancel pending retries, drop intermediate checkpoints, HF-upload the model to its configured --hub_model_id, and free disk. Covers the 8B path (root safetensors, direct upload), the 32B/ZeRO-3 path (consolidate shards → safetensors first), the Qwen3.5 preprocessor_config copy, the don't-upload-partials policy, and the hf-upload gotchas (tmux not nohup, hf upload not -large-folder, Leonardo sbatch-tunnel not login node). Use when an SFT fine-tune finishes and needs uploading + registering, or "run the SFT cleanup checklist". Distinct from RL cleanup (rl-job-cleanup) and datagen cleanup (datagen-job-cleanup).
Core Features & Use Cases
- End-to-end post-run cleanup: cancel retries, drop checkpoints, upload to Hugging Face, and register in the unified DB.
- No-internet HPC workflow safety: handles upload via tmux sessions and Leonardo sbatch-tunnel patterns.
- Policy-compliant cleanup: enforces the don't-upload-partials rule, validates tokenizer, and frees disk after successful publish.
Quick Start
Run the SFT cleanup workflow after a finished fine-tune to publish, upload, register, and free resources.