From 7166dc47c9bd764e2cd1d7c3d9e046cdc439b58c Mon Sep 17 00:00:00 2001 From: CaptainJack2491 Date: Mon, 17 Aug 2026 16:35:28 +0100 Subject: perf(cuda): add AMP fp16 autocast with GradScaler and torch.compile reduce-overhead mode --- src/config.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/config.py') diff --git a/src/config.py b/src/config.py index 25dcdda..4db66b0 100644 --- a/src/config.py +++ b/src/config.py @@ -39,6 +39,8 @@ class Config: log_n_examples: int = 10 out_dir: str = "runs" device: str = "auto" # "auto" | "cuda" | "cpu" | "mps" + use_amp: bool = True # FP16 mixed precision on CUDA (Turing Tensor Cores) + compile_model: bool = False # torch.compile (reduce-overhead / CUDA Graphs) @property def vocab(self) -> int: -- cgit v1.2.3