[Deprecated] Separate setting: OverflowError: cannot fit 'int' into an index-sized integer
See original GitHub issuein fetaqa config file if I change concatenate to separate and run prefix tuning the following error occurs
file train.py", line 185, in main
train_result = trainer.train(resume_from_checkpoint=checkpoint)
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/trainer.py", line 1260, in train
for step, inputs in enumerate(epoch_iterator):
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
data = self._next_data()
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/pouramini/UnifiedSKG/utils/dataset.py", line 116, in __getitem__
max_length=self.tokenizer.model_max_length,
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2406, in __call__
**kwargs,
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2476, in encode_plus
**kwargs,
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 480, in _encode_plus
verbose=verbose,
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2913, in prepare_for_model
return_attention_mask=return_attention_mask,
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2731, in pad
return_attention_mask=return_attention_mask,
File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 3065, in _pad
encoded_inputs["attention_mask"] = [1] * len(required_input) + [0] * difference
OverflowError: cannot fit 'int' into an index-sized integer
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
OverflowError: cannot fit 'int' into an index-sized integer
However when I try to run some tests, I get this error. File "C:\Users\User\flask-python\site-tracker\app\users\models.py", line ...
Read more >OverflowError: cannot fit 'int' into an index-sized integer #47
The Issue occurs on the binary build "px.exe" on ca5d1fb. Using source and Miniconda3 x64 the px.py seems to download the file to...
Read more >Simple O(n) Python Solution - LeetCode Discuss
For example, on [1,2,99999999999999999999] it fails with the Python error "OverflowError: cannot fit 'int' into an index-sized integer".
Read more >OverflowError: Is this do-able? : r/learnpython - Reddit
On line 8, I can't convert it to int until I convert it to hex, ... OverflowError: cannot fit 'int' into an index-sized...
Read more >OverflowError: cannot fit 'int' into an index ... - Python Forum
Hello I am running a simple audio read program: import matplotlib.pyplot as plt import scipy.io.wavfile
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi,
The
separatefeature is deprecated and not used in our experiment, so we did not test it. In our latest commite337e3b0b492772ba10f35bf64112c10d16d203c, we attempted to fix this bug. In short, themodel_max_lengthflag of T5 is set as a very large integer, which causes RAM overflow. Could you check the latest code? Thanks!Hi, thanks for pointing out, we will fix that sooner. For the meanings of
separateandconcatenateversion:separate: Get the prefix weight fromquery,structured knowledgeseparately but has been deprecated by us since it didn’t improve the result in our early version.concat: concat thequery,structured knowledgeandcontextto formulate them as one sentence input and get its prefix weight. It is simple and effective thus we adopt it as defaulted.Contact us if you have some further findings!