Fixed default config for Pix2Struct model to set Pix2StructTextModel to is_decoder=True (#23051)

added  as default keyword arg. to  in order to correctly configure the decoder
This commit is contained in:
Gregory (Gabriel) Barello 2023-05-02 10:40:41 -07:00 committed by GitHub
parent 805db1fe13
commit 3ff89f29f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,6 +118,7 @@ class Pix2StructTextConfig(PretrainedConfig):
pad_token_id=0,
eos_token_id=1,
tie_word_embeddings=False,
is_decoder=True,
**kwargs,
):
self.vocab_size = vocab_size
@ -144,6 +145,7 @@ class Pix2StructTextConfig(PretrainedConfig):
eos_token_id=eos_token_id,
decoder_start_token_id=decoder_start_token_id,
tie_word_embeddings=tie_word_embeddings,
is_decoder=is_decoder,
**kwargs,
)