mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 10:12:23 +06:00
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:
parent
805db1fe13
commit
3ff89f29f5
@ -118,6 +118,7 @@ class Pix2StructTextConfig(PretrainedConfig):
|
|||||||
pad_token_id=0,
|
pad_token_id=0,
|
||||||
eos_token_id=1,
|
eos_token_id=1,
|
||||||
tie_word_embeddings=False,
|
tie_word_embeddings=False,
|
||||||
|
is_decoder=True,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
self.vocab_size = vocab_size
|
self.vocab_size = vocab_size
|
||||||
@ -144,6 +145,7 @@ class Pix2StructTextConfig(PretrainedConfig):
|
|||||||
eos_token_id=eos_token_id,
|
eos_token_id=eos_token_id,
|
||||||
decoder_start_token_id=decoder_start_token_id,
|
decoder_start_token_id=decoder_start_token_id,
|
||||||
tie_word_embeddings=tie_word_embeddings,
|
tie_word_embeddings=tie_word_embeddings,
|
||||||
|
is_decoder=is_decoder,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user