save tokenizer before training starts (#380)
Browse files- scripts/finetune.py +1 -0
scripts/finetune.py
CHANGED
@@ -307,6 +307,7 @@ def train(
|
|
307 |
|
308 |
if not Path(cfg.output_dir).is_dir():
|
309 |
os.makedirs(cfg.output_dir, exist_ok=True)
|
|
|
310 |
if cfg.flash_optimum:
|
311 |
with torch.backends.cuda.sdp_kernel(
|
312 |
enable_flash=True, enable_math=True, enable_mem_efficient=True
|
|
|
307 |
|
308 |
if not Path(cfg.output_dir).is_dir():
|
309 |
os.makedirs(cfg.output_dir, exist_ok=True)
|
310 |
+
tokenizer.save_pretrained(cfg.output_dir)
|
311 |
if cfg.flash_optimum:
|
312 |
with torch.backends.cuda.sdp_kernel(
|
313 |
enable_flash=True, enable_math=True, enable_mem_efficient=True
|