Former-commit-id: d0340391e8075cff0d84b3ef879c2101b66ca1dc
This commit is contained in:
hiyouga
2024-04-01 21:35:18 +08:00
parent 4e3ee3b703
commit 8365522ce2
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: