From 580902617c329dd9f0978606caa2db85839de906 Mon Sep 17 00:00:00 2001 From: Andrej Karpathy Date: Sun, 5 Feb 2023 00:43:15 +0000 Subject: [PATCH] oops optimizer now demands to know device_type --- bench.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bench.py b/bench.py index f234bfb..66a083b 100644 --- a/bench.py +++ b/bench.py @@ -57,7 +57,7 @@ gptconf = GPTConfig( model = GPT(gptconf) model.to(device) -optimizer = model.configure_optimizers(weight_decay=1e-2, learning_rate=1e-4, betas=(0.9, 0.95)) +optimizer = model.configure_optimizers(weight_decay=1e-2, learning_rate=1e-4, betas=(0.9, 0.95), device_type=device_type) if compile: print("Compiling model...")