ran out of memory
See original GitHub issueHey guys,
I’m trying to use fairseq to train a simple summarizer like a translation task. oom happened where even though when I set --max-tokens to 500. 100 or smaller max-tokens set got error:
Traceback (most recent call last):
File "train.py", line 359, in <module>
main(args)
File "train.py", line 78, in main
trainer.dummy_train_step([dummy_batch])
File "/home/fairseq/fairseq/trainer.py", line 326, in dummy_train_step
self.train_step(dummy_batch, dummy_batch=True)
File "/home/fairseq/fairseq/trainer.py", line 176, in train_step
self.model, self.criterion, sample,
File "/home/fairseq/fairseq/tasks/fairseq_task.py", line 157, in get_loss
return criterion(model, sample)
File "/home/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
result = self.forward(*input, **kwargs)
File "/home/fairseq/fairseq/criterions/cross_entropy.py", line 30, in forward
net_output = model(**sample['net_input'])
TypeError: 'NoneType' object is not subscriptable
So, any suggestion? My dataset contains about 100,000 sentences and my gpu is single 1080ti 11G memory.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Fix: Google Chrome Ran Out Of Memory - Appuals.com
Method 3: Clear Cache · Open Google Chrome · Press CTRL, SHIFT and DELETE keys simultaneously (CTRL + SHIFT + DELETE) · Check...
Read more >How to Fix Google Chrome's Out of Memory Error
How to Fix Google Chrome's Out of Memory Error · Close Your Unused Tabs in Chrome · Restart Your Chrome Browser · Force...
Read more >How to Fix Chrome Ran Out of Memory - TechCult
How to Fix Chrome Ran Out of Memory in Windows 10 · 1. Launch Task Manager by hitting Ctrl + Shift + Esc...
Read more >How to Fix Ran Out of Video RAM or Memory Errors
Press the Windows Key + R and type in SystemPropertiesAdvanced followed by the enter key. You should be in the Advanced tab of...
Read more >Here are the ways to fix 'Google Chrome Is Out of Memory' error
1. Restart your device. 2. Update Google Chrome. 3. Clear the browser's cache.
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 FreeTop 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
Top GitHub Comments
Another thing to try is to apply BPE encoding to your data, that will naturally reduce dictionary size. There are examples in our repository: https://github.com/pytorch/fairseq/blob/master/examples/translation/prepare-wmt14en2de.sh#L125-L132
1 million is too large. try --thresholdsrc --thresholdtgt