Models to perform neural summarization (extractive and abstractive) using machine learning transformers and a tool to convert abstractive summarization datasets to the extractive task.
When self.tokenizer.pad_token is None, self.tokenizer.pad_token_id will also be None (to ensure, one can check on AutoTokenizer.from_pretrained('sberbank-ai/rugpt3small_based_on_gpt2')). Consequently, this will lead to errors (e.g. in lines 171, 175 in abstractive.py) when using self.tokenizer.pad_token_id.
Added a small fix that will add pad_token to the tokenizer (tokenizer.pad_token_id and tokenizer.special_tokens_map update automatically).
When
self.tokenizer.pad_token is None
,self.tokenizer.pad_token_id
will also be None (to ensure, one can check onAutoTokenizer.from_pretrained('sberbank-ai/rugpt3small_based_on_gpt2')
). Consequently, this will lead to errors (e.g. in lines 171, 175 inabstractive.py
) when usingself.tokenizer.pad_token_id
.Added a small fix that will add
pad_token
to the tokenizer (tokenizer.pad_token_id
andtokenizer.special_tokens_map
update automatically).