- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38
Open
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
π Bug Report
When loading inseq with a larger dataset, on a CUDA device, an out-of-memory error is occurring regardless of the defined batch_size. I believe that is is caused by the call to self.encode inattribution_model.py lines 345 and 347, which is operating on the full inputs instead of a single batch and moves all inputs to the CUDA device after the encoding.
π¬ How To Reproduce
Steps to reproduce the behavior:
- Load any model without pre-generated targets
- Load a larger dataset with at least 1000 samples
- Call the .attribute()method with anybatch_sizeparameter
Code sample
Environment
- 
OS: macOS 
- 
Python version: 3.10 
- 
Inseq version: 0.4.0 
Expected behavior
The input texts should ideally only be encoded or moved to the GPU once they are actually processed.
Additional context
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working