Giter VIP home page Giter VIP logo

Comments (9)

younesbelkada avatar younesbelkada commented on June 10, 2024 1

Hi @sanyalsunny111
Thank you very much for your message
Your initial issue is related to the fact that you did not installed the latest version of transformers. Since the new features of the library has not been released yet, you cannot retrieve these features with pip install transformers. Therefore, you have to manually install the latest version by running:
pip install git+https://github.com/huggingface/transformers.git

However, this model does not support device_map=auto yet. This should be addressed in the PR: huggingface/transformers#18683 therefore available as soon as the fix will be validated.
If you want to use this feature, you can directly download the transformers version that contains the ViLT support. I made an example colab that you can try out here
Let me know if anything else is unclear!

from bitsandbytes.

younesbelkada avatar younesbelkada commented on June 10, 2024 1

Hi @sanyalsunny111 !
No worries, I think that you still didn't installed the correct version because you have your previous transformers that you probably did not removed.
Could you try this command? pip install --force git+https://github.com/younesbelkada/transformers.git@eee3986ec37e3050c1ee94a63efb13090602eae5
Thanks!

from bitsandbytes.

sanyalsunny111 avatar sanyalsunny111 commented on June 10, 2024 1

Hey @younesbelkada Thank you very much sir. It is working fine.

from bitsandbytes.

younesbelkada avatar younesbelkada commented on June 10, 2024 1

Great ! Very happy that you made it work! 💪 Do not hesitate to open an issue if you face into any new issue

from bitsandbytes.

sanyalsunny111 avatar sanyalsunny111 commented on June 10, 2024

@younesbelkada Thank you for your previous response. you rightly mentioned device map auto is not supported yet and without that we cannot run a 8 bit model. But my question is how you have used device_map="auto in the colab link you have shared in your previous comment?
image

from bitsandbytes.

younesbelkada avatar younesbelkada commented on June 10, 2024

Hi @sanyalsunny111
If you follow the same installation guidelines as on the google colab I shared you, you should be able to pass "device_map=auto" without any problems

from bitsandbytes.

sanyalsunny111 avatar sanyalsunny111 commented on June 10, 2024

Hey @younesbelkada the device_map='auto' is actually affecting the distributed data parallel (DDP). I am using 8 GPUs and trying to run a faster inference. Here is the error I am getting model = ViltForQuestionAnswering.from_pretrained("dandelin/vilt-b32-finetuned-vqa", device_map="auto", load_in_8bit=True)
image

Could you please suggest how to use load_in_8bit with DDP?

from bitsandbytes.

younesbelkada avatar younesbelkada commented on June 10, 2024

Hi @sanyalsunny111
Thanks for your message!
Did the error happen also with "load_in_8bit=False"? Could you also share the full script to reproduce the issue?
Thanks

from bitsandbytes.

sanyalsunny111 avatar sanyalsunny111 commented on June 10, 2024

Hey @younesbelkada Sorry to bother you with more error. Yes, with load_in_8bit=False this error happened code attached screenshot-1.
image
Now when I am not using load_in_8bit at all no error is happening so, it's safe to assume either device_map or load_in_8bit is causing the error. Here is my piece of code and here is the hugging face tutorial which my code is based upon.

from bitsandbytes.

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.