Giter Site home page Giter Site logo

Comments (6)

gante avatar gante commented on July 4, 2024 2

@zucchini-nlp In my experience the spikes are hardware-dependent, even when two devices have the same spare memory available.

@songh11 "You may might also notice that the second time we run our model with torch.compile is significantly slower than the other runs, although it is much faster than the first run. This is because the "reduce-overhead" mode runs a few warm-up iterations for CUDA graphs." (source)

from transformers.

gante avatar gante commented on July 4, 2024 1

Hi @songh11 👋

If you check the documentation regarding torch.compile, especially relative to the "reduce-overhead" flag, you'll see an explanation :)

from transformers.

zucchini-nlp avatar zucchini-nlp commented on July 4, 2024 1

Interestingly I didn't get sudden memory spike after second generation and after 5 steps the memory remained around 16GB 🤔 . My specs are:

PyTorch version: 2.3.0+cu121
CUDA used to build PyTorch: 12.1
OS: Ubuntu 20.04.6 LTS (x86_64) 
GPU: NVIDIA A100-SXM4-80GB

from transformers.

songh11 avatar songh11 commented on July 4, 2024 1

Interestingly I didn't get sudden memory spike after second generation and after 5 steps the memory remained around 16GB 🤔 . My specs are:

PyTorch version: 2.3.0+cu121
CUDA used to build PyTorch: 12.1
OS: Ubuntu 20.04.6 LTS (x86_64) 
GPU: NVIDIA A100-SXM4-80GB

NVIDIA RTX A5000, I think the second generation is also for warm-up.

from transformers.

songh11 avatar songh11 commented on July 4, 2024

Hi @songh11 👋

If you check the documentation regarding torch.compile, especially relative to the "reduce-overhead" flag, you'll see an explanation :)

Many thanks, another question I have is why does the second generate use more memory

from transformers.

songh11 avatar songh11 commented on July 4, 2024

@zucchini-nlp In my experience the spikes are hardware-dependent, even when two devices have the same spare memory available.

@songh11 "You may might also notice that the second time we run our model with torch.compile is significantly slower than the other runs, although it is much faster than the first run. This is because the "reduce-overhead" mode runs a few warm-up iterations for CUDA graphs." (source)

Thank you for your reply. I can use default to pass.

from transformers.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.