mPLUG-DocOwl icon indicating copy to clipboard operation
mPLUG-DocOwl copied to clipboard

IndexError: piece id is out of range

Open AkshataABhat opened this issue 8 months ago • 1 comments

Hi getting this error while running inference: Reloading the model helps, but it is extremely time consuming.

The attention mask and the pad token id were not set. As a consequence, you may observe unexpected behavior. Please pass your input's attention_maskto obtain reliable results. Settingpad_token_idtoeos_token_id`:2 for open-end generation.

IndexError Traceback (most recent call last) in <cell line: 3>() 1 image='../2-015-000213-1.jpg' 2 query='Extract all the grammatically complete sentences in the invoice.' ----> 3 answer=docowl.inference(image, query) 4 print(answer)

9 frames /usr/local/lib/python3.10/dist-packages/sentencepiece/init.py in _func(v, n) 1036 def _func(v, n): 1037 if type(n) is int and (n < 0 or n >= v.piece_size()): -> 1038 raise IndexError('piece id is out of range.') 1039 return func(v, n) 1040

IndexError: piece id is out of range.`

AkshataABhat avatar May 28 '24 12:05 AkshataABhat