Skip to content

Commit

Permalink
Fixed default config for Pix2Struct model to set `Pix2StructTextMod…
Browse files Browse the repository at this point in the history
…el` to `is_decoder=True` (huggingface#23051)

added  as default keyword arg. to  in order to correctly configure the decoder
  • Loading branch information
gbarello-uipath authored and qywu committed May 3, 2023
1 parent 29ff16e commit d6bf65f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def __init__(
pad_token_id=0,
eos_token_id=1,
tie_word_embeddings=False,
is_decoder=True,
**kwargs,
):
self.vocab_size = vocab_size
Expand All @@ -144,6 +145,7 @@ def __init__(
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,
)

Expand Down

0 comments on commit d6bf65f

Please sign in to comment.