Small fix for Nonetype error (#10104)
This commit is contained in:
parent
d61f4905ac
commit
518ef95abc
1 changed files with 2 additions and 1 deletions
|
|
@ -376,7 +376,8 @@ class _BaseAutoModelClass:
|
||||||
|
|
||||||
# enable tie_word_embeddings for MPT
|
# enable tie_word_embeddings for MPT
|
||||||
# refer to https://huggingface.co/mosaicml/mpt-7b-chat/blob/main/modeling_mpt.py#L232
|
# refer to https://huggingface.co/mosaicml/mpt-7b-chat/blob/main/modeling_mpt.py#L232
|
||||||
if model.config.architectures[0] != 'MPTForCausalLM':
|
if model.config.architectures is None \
|
||||||
|
or model.config.architectures[0] != 'MPTForCausalLM':
|
||||||
model.config.update({"tie_word_embeddings": False})
|
model.config.update({"tie_word_embeddings": False})
|
||||||
|
|
||||||
# add save_low_bit to pretrained model dynamically
|
# add save_low_bit to pretrained model dynamically
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue