Enable auto-detection for up to 8x RTX 5090 GPUs
Browse files97 unmodified lines989910010110210310410510610710810911097 unmodified lines# 7. Auto-configure GPU Batching & Launchgpu_count = torch.cuda.device_count() if torch.cuda.is_available() else 1nproc = 4 if gpu_count >= 4 else max(1, gpu_count)micro_b = 8grad_acc = max(1, 128 // (micro_b * nproc))eff_b = micro_b * nproc * grad_accprint("\n" + "=" * 85)print(f"🚀 LAUNCHING SARUS-500M SFT TRAINING ({nproc}x RTX 5090 GPUs)")print(f" • Micro-Batch: {micro_b}")print(f" • Grad Accumulation: {grad_acc}")print(f" • Effective Batch: {eff_b} (Exact 128 | 262,144 tokens/step)")97 unmodified lines989910010110210310410510610710810911097 unmodified lines# 7. Auto-configure GPU Batching & Launchgpu_count = torch.cuda.device_count() if torch.cuda.is_available() else 1nproc = min(8, max(1, gpu_count))micro_b = 8grad_acc = max(1, 128 // (micro_b * nproc))eff_b = micro_b * nproc * grad_accprint("\n" + "=" * 85)print(f"🚀 LAUNCHING SARUS-500M SFT TRAINING ({nproc}x GPU Rig)")print(f" • Micro-Batch: {micro_b}")print(f" • Grad Accumulation: {grad_acc}")print(f" • Effective Batch: {eff_b} (Exact 128 | 262,144 tokens/step)")
run_sft_4x5090.py+2-2