Closed sairights closed 1 year ago
Sorry for the delayed response; it's been a crazy few weeks. This is probably happening because the text you've input is too long. When we mask + replace, the longer the text, the more mask tokens (e.g. <extra_token_16>
) get put in the text. T5 has to keep track of all of these tokens and where they are, and if there are more than 10, sometimes we don't get back the right number of fills.
You can fix this problem by either using shorter sequences, or applying mask fills in multiple rounds (sampling only 5 masks + fills at a time and repeating until you've applied the desired number of masks to the text).
Hope this helps- I'll close for now, but feel free to re-open if you still have questions!
I have encountered the following issue when I am processing my own text:
As I set breakpoints and looked at the intermediate variables, I found that
if len(fills) < n
is activated in functionapply_extracted_fills
which results in an empty list output of the function. What might be the problem?The text that I am dealing with is:
Thank you!