You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am guessing it works because of this parameter called allow_long_sentences? But can I know how it actually works behind the scenes. Does it split my one sequence into multiple 512 chunks and process them separately and combine later (or) just ignores the words after 512 words.
Can we use models like reformer etc., which can handle large text sentences.
Please help out.
The text was updated successfully, but these errors were encountered:
user06039
changed the title
How long flair handles when using bert with sentences longer than 512?
How does flair handles text sentences longer than 512 when using bert?
May 20, 2021
@schelv Thanks for explaining. If I am understanding correctly,
Lets say I use any transformer model each has a limit of 512 tokens. I have a sentence with 1024 tokens.
If I use allow_long_sentences=True in TransformerWordEmbeddings It uses strides to split my sentence to 512 and 512 and then concat at the end into one embedding.
Do I have to set allow_long_sentences=True to make this work (or) Is it enabled by default.?
I am currently using flair with bert embeddings for a ner model but the input sequence length of my sentences are around 1000-2000 words.
I am using this setup,
allow_long_sentences
? But can I know how it actually works behind the scenes. Does it split my one sequence into multiple 512 chunks and process them separately and combine later (or) just ignores the words after 512 words.Please help out.
The text was updated successfully, but these errors were encountered: