mirror of
https://github.com/osmarks/nanogpt-experiments.git
synced 2024-11-10 20:09:58 +00:00
rename to compile it's shorter
This commit is contained in:
parent
2febf4463c
commit
35f51974c4
4
train.py
4
train.py
@ -60,7 +60,7 @@ lr_decay_iters = 320000 # how many steps to decay the learning rate for
|
||||
min_lr = 1e-5 # minimum learning rate
|
||||
# DDP settings
|
||||
backend = 'nccl' # 'nccl', 'gloo', etc.
|
||||
compile_model = True # use PyTorch 2.0 to compile the model to be faster
|
||||
compile = True # use PyTorch 2.0 to compile the model to be faster
|
||||
# -----------------------------------------------------------------------------
|
||||
# poor man's Configurator. Potentially a bad idea. Example usage:
|
||||
# $ python train.py override_file --batch_size=32
|
||||
@ -165,7 +165,7 @@ if init_from == 'resume':
|
||||
optimizer.load_state_dict(checkpoint['optimizer'])
|
||||
|
||||
# compile the model
|
||||
if compile_model:
|
||||
if compile:
|
||||
print("compiling the model... (takes a ~minute)")
|
||||
unoptimized_model = model
|
||||
model = torch.compile(model) # requires PyTorch 2.0
|
||||
|
Loading…
Reference in New Issue
Block a user