🚨🚨🚨 [Pix2Struct] Attempts to fix training issues 🚨🚨🚨 (#23004)

* multiple fixes

- add `add_special_tokens` to `True` by default
- remove label smoothing and labels masking

* fix test
This commit is contained in:
Younes Belkada
2023-04-26 18:29:25 +02:00
committed by GitHub
parent ba0dc54576
commit 304aacac90
3 changed files with 4 additions and 5 deletions

View File

@@ -108,7 +108,7 @@ class Pix2StructProcessorTest(unittest.TestCase):
encoded_processor = processor(text=input_str)
encoded_tok = tokenizer(input_str, return_token_type_ids=False, add_special_tokens=False)
encoded_tok = tokenizer(input_str, return_token_type_ids=False, add_special_tokens=True)
for key in encoded_tok.keys():
self.assertListEqual(encoded_tok[key], encoded_processor[key])