Comments (5)
check out my Notebook link: https://drive.google.com/file/d/1Oq371TVP2QMQqsw0juYwt4-T1z9fvGyC/view?usp=sharing
i want to use free Colab as I use during BnB quantization
from hqq.
Hi, the branch and the example: https://gist.github.com/mobicham/cb07c1eff443ad0918c49ab7bb03e269 are working fine, I just tried it now. Make sure:
- You have a clean installation of
transformers
from https://github.com/mobiusml/transformers/tree/stable (not main) - Make sure the GPU is selected in the Colab session
from hqq.
I used the same transformer from the stable branch https://github.com/mobiusml/transformers/tree/stable, but facing the same issue ,
I am also using GPU ,
Please Review my code if there is any mistake:
#first download the cloned repo of transformer from stable branch https://github.com/mobiusml/transformers/tree/stable
#download hqq from master branch repo https://github.com/mobiusml/hqq
!pip install git+https://github.com/Abdullah-kwl/Transformers-HQQ-Integration.git
!pip install git+https://github.com/mobiusml/hqq.git
import torch, transformers
from hqq.core.quantize import *
model_id = "senseable/WestLake-7B-v2"
#Basic
quant_config = BaseQuantizeConfig(nbits=4, group_size=64)
cache_path = ''
compute_dtype = torch.float16
device = 'cuda:0'
#pass BaseQuantizeConfig to AutoModelForCausalLM
model = transformers.AutoModelForCausalLM.from_pretrained(model_id, cache_dir=cache_path, torch_dtype=compute_dtype, device_map=device, quantization_config=transformers.HQQConfig(quant_config) )
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
After this cell run it do every thing but in last it show the error ValueError: .to
is not supported for HQQ-quantized models.
.to is not supported for HQQ-quantized models
#39
please look at https://github.com/mobiusml/transformers/blob/stable/src/transformers/modeling_utils.py
this is from transformer stabel branch
from hqq.
Strange, I tried the same branch and it worked, with Llama2-7B. Can you with Llama2-7B?
from hqq.
Try using HQQ with transformers: huggingface/transformers#29637
from hqq.
Related Issues (20)
- Weight Sharding HOT 2
- Support Gemma quantization HOT 2
- Bug of the saved model when applying zero and scale quantization HOT 1
- Expected in.dtype() == at::kInt to be true, but got false HOT 14
- Easy way to run lm evaluation harness HOT 1
- Warning: failed to import the BitBlas backend HOT 7
- TypeError: Object of type dtype is not JSON serializable HOT 11
- RuntimeError: Expected in.dtype() == at::kInt to be true, but got false. HOT 9
- zero and scale quant HOT 1
- `hqq/backends/torchao.py` line 177, KeyError: 'scale' HOT 13
- Quesiton on the speed for generating the response HOT 18
- Question about Quantization HOT 4
- Issue when loading the quantized model HOT 5
- question about fine tune 1bit-quanitzed model HOT 35
- module 'torch.library' has no attribute 'custom_op' HOT 4
- bitblas introduces dependency on CUDA version HOT 3
- OSError: libnvrtc.so.12: cannot open shared object file: No such file or directory HOT 1
- About the implentation of .cpu() HOT 1
- 3-bit quantization weight data type issue HOT 10
- RuntimeError: Expected in.dtype() == at::kInt to be true, but got false. (Could this error message be improved? If so, please report an enhancement request to PyTorch.) 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 hqq.