Checkpoints: Local-only for best_ckpt, 1000-step interval, HF upload only for final in code/train_sft.py
Browse files748 unmodified lines749750751752753754755677 unmodified lines1433143414351436143714381439144014411442144314441445144614471448748 unmodified linesparser.add_argument("--weight_decay", type=float, default=0.01, help="AdamW weight decay")parser.add_argument("--warmup_ratio", type=float, default=0.04, help="Warmup ratio of total steps")parser.add_argument("--neftune_alpha", type=float, default=5.0, help="NEFTune noise scale for SFT quality (Default: 5.0)")parser.add_argument("--eval_interval", type=int, default=500, help="Validation evaluation step interval (Default: 500)")parser.add_argument("--disable_checkpointing", action="store_true", default=False, help="Disable activation checkpointing for 30-40%% faster training on GPUs with >= 24GB VRAM")parser.add_argument("--compile", action="store_true", default=False, help="Enable PyTorch 2.0 torch.compile for maximum speed")parser.add_argument("--seed", type=int, default=42, help="Random seed for full reproducibility (Default: 42)")677 unmodified lines)print(f" ✅ Uploaded {ckpt_filename} to ViuAI/ViuAI-500M (sft_checkpoints/{repo_subfolder}/)")if os.path.exists(best_save_path):print(f" ⬆️ Uploading best checkpoint {best_filename}...")api.upload_file(path_or_fileobj=best_save_path,path_in_repo=f"sft_checkpoints/{repo_subfolder}/{best_filename}",repo_id="ViuAI/ViuAI-500M",repo_type="model")print(f" ✅ Uploaded BEST checkpoint {best_filename} to ViuAI/ViuAI-500M (sft_checkpoints/{repo_subfolder}/)")if os.path.exists(safetensors_path):print(f" ⬆️ Uploading model.safetensors...")api.upload_file(748 unmodified lines749750751752753754755677 unmodified lines143314341435143614371438748 unmodified linesparser.add_argument("--weight_decay", type=float, default=0.01, help="AdamW weight decay")parser.add_argument("--warmup_ratio", type=float, default=0.04, help="Warmup ratio of total steps")parser.add_argument("--neftune_alpha", type=float, default=5.0, help="NEFTune noise scale for SFT quality (Default: 5.0)")parser.add_argument("--eval_interval", type=int, default=1000, help="Validation evaluation step interval (Default: 1000)")parser.add_argument("--disable_checkpointing", action="store_true", default=False, help="Disable activation checkpointing for 30-40%% faster training on GPUs with >= 24GB VRAM")parser.add_argument("--compile", action="store_true", default=False, help="Enable PyTorch 2.0 torch.compile for maximum speed")parser.add_argument("--seed", type=int, default=42, help="Random seed for full reproducibility (Default: 42)")677 unmodified lines)print(f" ✅ Uploaded {ckpt_filename} to ViuAI/ViuAI-500M (sft_checkpoints/{repo_subfolder}/)")if os.path.exists(safetensors_path):print(f" ⬆️ Uploading model.safetensors...")api.upload_file(
code/train_sft.py+1-11