Comments (2)
Hi,
since the A100 has a very high memory bandwidth and only rather little non-tensor-core compute (which is what we use for matrix-vector products), the initial simple kernels only gave moderate speedup over FP16 execution on the A100 (meanwhile, on e.g. the A6000 they were pretty close to the optimal 5.3x that is expected from 3bit compression, on large matrices).
The new kernels decode two quantized weights simultaneously into a fused 2xFP16 value, using a look-up table stored in fast shared memory (which is replicated to avoid bank conflicts during reads), which are then multiplied by 2 fused FP16 inputs in a single step. This significantly reduces the relative dequantization and computation overhead of the kernel, which was quite significant on the A100. Thus the bandwidth savings through quantization translate to better overall speedups.
In general, the kernels may also be a bit faster on not as strong GPUs but there the original simple kernels already worked quite well.
from gptq.
@efrantar Thank you so much for the explanation. I think this will help others perform further hardware specific quantize optimization.
from gptq.
Related Issues (20)
- How to adopt GPTQ on Conv2d with `groups` attribute? HOT 1
- How can we use this lib to quantize Falcon7b / 40b models?
- How to run the quantized model for perditions on my prompts?
- How should I verify the speedup effect of the algorithm?
- LAMBADA evaluation accuracy
- Why is the wikitext-2 ppl calculated in the code lower than the ppl by lm-evaluation-harness?
- Use modified Cholesky decomposition instead of regularized Cholesky
- About the cuda code, I think "tmp2 >> 30" should be " tmp2 >> 31" HOT 2
- H_inv not updated HOT 3
- running speed slow on NVIDIA vGPU
- pack_model takes too long time HOT 1
- act-order on inference
- Compatibility of Quant3Linear and 4-bit quantization
- GPTQ转化的INT8模型,如何运行呢?请大佬指教
- GPTQ pseudo-quantization saved weights (pt format) How load Re-evaluation
- Regarding the method for computing the Hessian matrix. HOT 1
- AssertionError
- GPTQ on BERT based
- Reconstruct Quantized Model Layer in torch.
- Test on CNN model containing group conv by GPTQ method
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 gptq.