Git Product home page Git Product logo

Comments (6)

tonylins avatar tonylins commented on July 20, 2024

Hi, may I know if you are loading and applying the pre-computed scales, or are you doing the AWQ search yourself?

I think our current implementation does not use techniques like offloading to reduce GPU memory usage during the quantization stage. We can definitely add that to reduce GPU memory usage. What do you think @Sakits ?

from llm-awq.

abhinavkulkarni avatar abhinavkulkarni commented on July 20, 2024

Hey @tonylins,

I was trying to do AWQ search. Since AWQ works layer by layer, the entire model should be loaded into RAM and only the layer that is being quantized should be moved to GPU and then moved back to RAM after quantization.

from llm-awq.

Sakits avatar Sakits commented on July 20, 2024

Hi @abhinavkulkarni ,
We have added the CPU offloading support for run_awq in the dev/more_models branch. Now you should able to run awq for opt-6.7b on a single RTX 3060-12G. Welcome to try it out and feel free to bring up any issues you might encounter!

Thanks for your interest in our work!

from llm-awq.

abhinavkulkarni avatar abhinavkulkarni commented on July 20, 2024

Hi @Sakits, @tonylins,

Thanks for adding support for CPU offloading. I had to make additional changes on top of your branch to run all the steps - run AWQ search for scale and clip values, evaluate using fake quantization, dump AWQ weights, and run AWQ evaluation using quantized weights.

You can view the changes in my forked branch here.
If those look okay to you, I'd be happy to raise a PR.

I had to hard code the value of max_memory according to my GPU (12GB of VRAM) here, but I'd be happy to add --max-memory argument to the command line and remove this hard-coded value.

from llm-awq.

Sakits avatar Sakits commented on July 20, 2024

Hi @abhinavkulkarni,

Thank you for your contributions on enhancing the CPU offloading and --max-memory argument!
We'd definitely welcome a pr from you!

from llm-awq.

abhinavkulkarni avatar abhinavkulkarni commented on July 20, 2024

Thanks @Sakits, I have opened a PR: #22

I was able to run all the steps for mosiacml/mpt-7b-instruct model on RTX 3060 (12GB of VRAM).

from llm-awq.

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.