hooshvare / parsbert-ner

🤗 ParsBERT Persian NER Tasks

Home Page:https://huggingface.co/HooshvareLab/bert-base-parsbert-ner-uncased

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More Than 512 tokens causes error

RYNEQ opened this issue · comments

HI
thanks for your work.
I'm trying the model but when my text is more than or equal 512 tokens I get:

InvalidArgumentError: indices[0,512] = 512 is not in [0, 512) [Op:ResourceGather]

I know original BERT is limited to 512 tokens and truncates more tokens but
What can I do other than splitting my text into smaller parts less than 512 tokens?

Because splitting on positions other than punctuation chars can break the entity sequence