question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

max_sequence_length not used(?)

See original GitHub issue

Hi @kermitt2

I was just considering whether we need sliding windows to not have to use a really large max_sequence_length. But then I realised that max_sequence_length doesn’t actually seem to be used. It’s passed to the DataGenerator which doesn’t seem to use it. Instead it simply pads the batch to whatever the maximum length is within the batch.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:32 (21 by maintainers)

github_iconTop GitHub Comments

1reaction
lfoppianocommented, Mar 10, 2020

Yes, I just had this problem, if the sequences are truncated in the tagging, then grobid will crash with IndexOutOfBounds. The fix is in #97 .

0reactions
kermitt2commented, Mar 14, 2022

yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

token indices sequence length is longer than the specified ...
When I use Bert, the "token indices sequence length is longer than the specified maximum sequence length for this model (1017 > 512)"...
Read more >
Maximum Sequence Length | Collatz Conjecture
Given an integer N. The task is to find the number in the range from 1 to N-1 which is having the maximum...
Read more >
Token indices sequence length is longer than the specified ...
In my case, I am using a BERT model, so I have MAX_TOKENS=510 (leaving room ... the tokens are guaranteed not to exceed...
Read more >
Preprocessing data — transformers 3.0.2 documentation
'longest_first' truncate to a maximum length specified by the max_length argument or the maximum length accepted by the model if no max_length is...
Read more >
How to Apply Transformers to Any Length of Text
padding="max_length" tells the encoder to pad any sequences that are shorter than the max_length with padding tokens.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found