Update inference.py
Browse files- inference.py +1 -1
inference.py
CHANGED
|
@@ -30,7 +30,7 @@ ptdtype = {'float32': torch.float32, 'bfloat16': torch.bfloat16, 'float16': torc
|
|
| 30 |
ctx = nullcontext() if device_type == 'cpu' else torch.amp.autocast(device_type=device_type, dtype=ptdtype)
|
| 31 |
|
| 32 |
|
| 33 |
-
ckpt_path = os.path.join(out_dir, '
|
| 34 |
checkpoint = torch.load(ckpt_path, map_location=device)
|
| 35 |
gptconf = GPTConfig(**checkpoint['model_args'])
|
| 36 |
model = GPT(gptconf)
|
|
|
|
| 30 |
ctx = nullcontext() if device_type == 'cpu' else torch.amp.autocast(device_type=device_type, dtype=ptdtype)
|
| 31 |
|
| 32 |
|
| 33 |
+
ckpt_path = os.path.join(out_dir, 'model.ckpt')
|
| 34 |
checkpoint = torch.load(ckpt_path, map_location=device)
|
| 35 |
gptconf = GPTConfig(**checkpoint['model_args'])
|
| 36 |
model = GPT(gptconf)
|