mirror of
https://github.com/karpathy/llm.c.git
synced 2026-07-27 20:25:09 -04:00
simplify bool
This commit is contained in:
parent
a332ea5d92
commit
4e4eba0441
1 changed files with 1 additions and 1 deletions
|
|
@ -403,7 +403,7 @@ if __name__ == "__main__":
|
|||
write_model(model, "gpt2_124M.bin")
|
||||
write_state(model, x, y, logits, loss, "gpt2_124M_debug_state.bin")
|
||||
|
||||
use_fused = True if device == "cuda" else False
|
||||
use_fused = device == "cuda" # only works on CUDA (?)
|
||||
optimizer = torch.optim.Adam(model.parameters(), lr=1e-4, fused=use_fused)
|
||||
timings = []
|
||||
if device == "cuda":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue