Git Product home page Git Product logo

Comments (4)

t1101675 avatar t1101675 commented on June 3, 2024

Thanks for your attention to our work!

This error is caused by DeepSpeed-zero3 (They do not support backward in an evaluation mode). We need the eval mode because the MiniLLM training is similar to the RL training where dropout is usually not applied.

If you use zero3 because of insufficient GPU memory, you can try using zero-offload by setting the DeepSpeed config to the corresponding path .
If you insist on using zero3, you can set the dropout value to 0 in the model config files before running the script and add self.model.train() before every step (for example, at this line). In this way, you can avoid using dropout and do backward with the training mode at the same time.

from lmops.

Ispanicus avatar Ispanicus commented on June 3, 2024

I was using your deepspeed config file for zero2 offload, which I changed to zero3 and added parameter offload. If I understand you correctly, optimizer offload with zero2 works, but adding parameter offload and using zero3 is not yet implemented?

Which model config file are you referring to exactly which contains the dropout value?

I managed to run llama7B_13B minillm with zero2 on a single H100 GPU by reducing the max sequence length to 256. In your opinion, will this degrade performance significantly?

Thank you for your help!

from lmops.

t1101675 avatar t1101675 commented on June 3, 2024

I was using your deepspeed config file for zero2 offload, which I changed to zero3 and added parameter offload. If I understand you correctly, optimizer offload with zero2 works, but adding parameter offload and using zero3 is not yet implemented?

Yes.

The "model config file" refers to the huggingface config files in the checkpoint directory you load from.

I think reducing the max sequence length to 256 will mainly affect the performance of long instructions/responses. On short instructions, the performance will not be affected much.

from lmops.

Ispanicus avatar Ispanicus commented on June 3, 2024

Alright, thank you for your help!

from lmops.

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.