Closed tom-ph closed 7 months ago
Sorry for the late reply,
I will fix this in the next release
Fixed now
I tried the new version (0.1.9) with the fix you added, but still on the batches that all texts in the batch are whitespaces or empty, there would be an error:
shape '[16, 1, 12, 768]' is invalid for input of size 12288
RuntimeError: shape '[16, 1, 12, 768]' is invalid for input of size 12288
the batch of texts that I've paased is:
['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '']
I know it's a corner case, but just to let you know about the existing issue.
Thank you. It should be ok now
Hi, thank you for the great work with this model, it is really appreciated. We are using 0.1.7 version of GLiNER with urchade/gliner_multi-v2.1 model. However, when the text is empty or has only whitespaces the model fails with the following error:
IndexError: too many indices for tensor of dimension 1
This is a problem especially when running the _batch_predictentities method. We can workaround the issue by filtering the texts with a content before feeding them to the model, but it would be definitely easier to avoid doing it.
Thank you!
Below the stacktrace: