Former-commit-id: aee634cd20
This commit is contained in:
hiyouga
2024-04-01 21:35:18 +08:00
parent b7468ea0a8
commit 34f1de0574
7 changed files with 37 additions and 16 deletions

View File

@@ -331,7 +331,7 @@ def patch_model(
):
gen_config.do_sample = True
if model_args.resize_vocab:
if is_trainable and model_args.resize_vocab:
_resize_embedding_layer(model, tokenizer)
if is_trainable: