Skip to content

Reducing GPU utilization while working with CLAREAugmenter #812

Open
@dkoterwa

Description

@dkoterwa

Hi,
I was trying to use CLAREAugmenter from your library and was surprised that it consumes more than 40GB of VRAM during the augmentation process.

I have some longer texts (~800 tokens) but did not expect that a method loading a simple distilroberta underneath will cause any memory issues.

Is there any way to reduce the memory consumption in this augmenter?

The code that I am using is really simple:

from textattack.augmentation.recipes import CLAREAugmenter
augmenter = CLAREAugmenter(pct_words_to_swap=0.1)
augmented_texts= []
for text in texts:
    augmented_texts.append(augmenter.augment(text))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions