Comments (9)
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.
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.
Hey @younesbelkada Thank you very much sir. It is working fine.
from bitsandbytes.
Great ! Very happy that you made it work! 💪 Do not hesitate to open an issue if you face into any new issue
from bitsandbytes.
@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?
from bitsandbytes.
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.
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)
Could you please suggest how to use load_in_8bit with DDP?
from bitsandbytes.
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.
Hey @younesbelkada Sorry to bother you with more error. Yes, with load_in_8bit=False
this error happened code attached screenshot-1.
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)
- Quantized model using load_in_8bit produces very different results on T4 vs V100 GPU on Colab
- NameError: name 'str2optimizer32bit' is not defined
- CUDA Setup failed despite CUDA being Available :: NameError: name 'str2optimizer32bit' is not defined HOT 4
- bitsandbytes interprets URLs from environment variables as paths HOT 2
- Bug issues
- error on VectorstoreIndexCreator HOT 6
- CONTRIBUTING.md references Meta CLA HOT 1
- bitsandbytes import error in colab HOT 1
- Could not run Kohya
- PicklingError: Can't pickle <function Embedding.forward at XXXXXXX> it's not the same object as torch.nn.modules.sparse.Embedding.forward
- AttributeError: 'NoneType' object has no attribute 'split' CUDA Setup failed despite CUDA being available.
- Mistral-v0.1 nf4 is not quantized into 4bit HOT 1
- RuntimeError: CUDA Setup failed despite GPU being available. Please run the following command to get more information: HOT 3
- problem with loading my finetuned Llama2 model - type object 'Params4bit' has no attribute 'from_prequantized' HOT 3
- undefined symbol: cdequantize_blockwise_fp32 HOT 1
- AnimateDiff SDXL won't run
- AttributeError: 'NoneType' object has no attribute 'cquantize_blockwise_fp16_nf4' HOT 5
- Could not load bitsandbytes native library: 'NoneType' object has no attribute 'split' HOT 1
- ImportError: Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` and the latest version of bitsandbytes: `pip install -i https://pypi.org/simple/ bitsandbytes`
- RuntimeError: Something when wrong when trying to find file. Maybe you do not have a linux system? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitsandbytes.