Giter Club home page Giter Club logo

Comments (10)

B-Soul avatar B-Soul commented on July 3, 2024

I meet the same problem,have you found a solution?

from colossalai.

botbw avatar botbw commented on July 3, 2024

hey @ArnaudFickinger @B-Soul , could you please share the settings of your scripts?

from colossalai.

B-Soul avatar B-Soul commented on July 3, 2024

My code is related to my own ongoing research, so it is not convenient to share. But I just changed the distributed framework used to Huggingface Accelerate, and gradients are not None. So, I think there is a bug in colossalai framwork.

from colossalai.

botbw avatar botbw commented on July 3, 2024

My code is related to my own ongoing research, so it is not convenient to share. But I just changed the distributed framework used to Huggingface Accelerate, and gradients are not None. So, I think there is a bug in colossalai framwork.

hi @B-Soul , a snippet of optimizer/plugin settings will help. Besides, the gradient accessing API might be different due to optimization, if you are using LowLevelZeroOptimizer or GeminiOptimizer, you could check those tests for gradient accessing: genimi and low-level

from colossalai.

ArnaudFickinger avatar ArnaudFickinger commented on July 3, 2024

@botbw thank you the low-level snippet is working! By the way which of gemini or low-level should I use for best performance with 1 to 8 A100 GPUs and 500M to 2B trainable parameters?

from colossalai.

botbw avatar botbw commented on July 3, 2024

@botbw thank you the low-level snippet is working! By the way which of gemini or low-level should I use for best performance with 1 to 8 A100 GPUs and 500M to 2B trainable parameters?

@ArnaudFickinger Glad to hear that! And we might work on the API to make it more intuitive.

Regarding the performance, LowLevelZeroOptimizer implements zero-1 and zero-2 and GeminiOptimizer implements zero-3 together with continuous memory optimization (i.e. memory locality, you may check this doc for more information) to reduce communication cost.

Generally speaking, you should choose the plugin by the intended zero-n parallel strategy, the real-world performance might be case-by-case and depend on the trade-off between computation and communication.

Do let us know if you have further doubts :p

from colossalai.

ArnaudFickinger avatar ArnaudFickinger commented on July 3, 2024

@botbw when I define 2 param_groups the id() of the parameters of the second group do not match any keys of optimizer._grad_store._grads_of_params[1]

from colossalai.

botbw avatar botbw commented on July 3, 2024

@botbw when I define 2 param_groups the id() of the parameters of the second group do not match any keys of optimizer._grad_store._grads_of_params[1]

@ArnaudFickinger I guess it's unexpected since each group is handled separately in the same way (like a for loop), would you mind sharing the version (or commit) you are using and a min repro if possible?

from colossalai.

ArnaudFickinger avatar ArnaudFickinger commented on July 3, 2024

@botbw I have written a min repro with a simple network and in this case the keys actually match! I will take a closer look at my code and get back to you if I believe the issue might still be ColossalAI related.

from colossalai.

botbw avatar botbw commented on July 3, 2024

@botbw I have written a min repro with a simple network and in this case the keys actually match! I will take a closer look at my code and get back to you if I believe the issue might still be ColossalAI related.

@ArnaudFickinger Sure, feel free to ask here or raise a new issue

from colossalai.

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.