Enable TF32 + cuDNN benchmark + persistent_workers + grad_accum_steps CLI for RTX 3090 max speed
Browse files131 unmodified lines1321331341351361371 unmodified line13914014114214314414597 unmodified lines243244245246247248131 unmodified linesprint("Only one distinct transcript. Validation is unavailable.")device = torch.device("cuda" if torch.cuda.is_available() else "cpu")torch.manual_seed(tc.seed)model = MurliV15Engine(cfg).to(device)optimizer = torch.optim.AdamW(model.parameters(), lr=tc.lr, weight_decay=tc.weight_decay, betas=(0.9, 0.98))1 unmodified linebf16 = amp and torch.cuda.is_bf16_supported()scaler = torch.amp.GradScaler("cuda", enabled=amp and not bf16)loader_opts = dict(batch_size=tc.batch_size, num_workers=tc.num_workers,pin_memory=device.type == "cuda", collate_fn=v15_collate_fn)val_loader = DataLoader(val_ds, **loader_opts)signature = hashlib.sha256()for row in dataset.rows:97 unmodified linesp.add_argument("--target_speaker", help="Exact speaker ID, default syspin_male_01")p.add_argument("--target_gender")p.add_argument("--batch_size", type=int)p.add_argument("--max_steps", type=int, help="Completed optimizer updates")p.add_argument("--num_workers", type=int)p.add_argument("--max_samples", type=int)131 unmodified lines1321331341351361371381391401411 unmodified line14314414514614714814915015197 unmodified lines249250251252253254255256131 unmodified linesprint("Only one distinct transcript. Validation is unavailable.")device = torch.device("cuda" if torch.cuda.is_available() else "cpu")if device.type == "cuda":torch.backends.cuda.matmul.allow_tf32 = Truetorch.backends.cudnn.allow_tf32 = Truetorch.backends.cudnn.benchmark = Truetorch.manual_seed(tc.seed)model = MurliV15Engine(cfg).to(device)optimizer = torch.optim.AdamW(model.parameters(), lr=tc.lr, weight_decay=tc.weight_decay, betas=(0.9, 0.98))1 unmodified linebf16 = amp and torch.cuda.is_bf16_supported()scaler = torch.amp.GradScaler("cuda", enabled=amp and not bf16)loader_opts = dict(batch_size=tc.batch_size, num_workers=tc.num_workers,pin_memory=device.type == "cuda",persistent_workers=(tc.num_workers > 0),collate_fn=v15_collate_fn)val_loader = DataLoader(val_ds, **loader_opts)signature = hashlib.sha256()for row in dataset.rows:97 unmodified linesp.add_argument("--target_speaker", help="Exact speaker ID, default syspin_male_01")p.add_argument("--target_gender")p.add_argument("--batch_size", type=int)p.add_argument("--grad_accum_steps", type=int)p.add_argument("--max_epochs", type=int)p.add_argument("--max_steps", type=int, help="Completed optimizer updates")p.add_argument("--num_workers", type=int)p.add_argument("--max_samples", type=int)
train.py+9-1