Comments (8)
I am looking for a better method of measuring the prefill/context stage. The numbers for the prefill stage are not accurate, unfortunately - as I noted in the pull request, they are roughly 3x better using the old method of measurement.
Additionally, the claimed 2x speedup comes from the choice of a strong GPU and CPU combination. Speed may vary across both GPU and CPU. This may also vary across batch size and context size when using the model.generate
functionality (this applies overhead from the transformers library).
My own conclusion is that I want to improve the way we run the benchmark to avoid all overhead. This will be a future improvement.
from autoawq.
Yeah, the numbers for the prefill stage are not accurate, because it is not expected to have worse performance than FP16 models.
The numbers for the decode stage seem counterintuitive with small batch size, because there is no significant improvement.
Hope the better performance in next version~
from autoawq.
There can be many reasons for a slow-down as batch size increases. It could be overhead from model.generate
or the CUDA kernel. Soon, I will experiment with other standard generator methods like the one from nanoGPT and check all the numbers again.
from autoawq.
Hope and pleasure to see that.
from autoawq.
I ran tests today on Vicuna 7B on A30 GPU + AMD EPYC 7402P CPU (Weak GPU+CPU). Working on better measurement of the speed! Speedup will be higher when you use BOTH a strong GPU and CPU.
Batch Size | n_generate | n_context | tokens/s FP16 | tokens/s INT4 | Speedup |
---|---|---|---|---|---|
1 | 32 | 64 | 34 | 67 | 1.97 |
1 | 64 | 128 | 34 | 68 | 2.00 |
1 | 128 | 256 | 35 | 74 | 2.11 |
1 | 256 | 512 | 35 | 69 | 1.97 |
1 | 512 | 1024 | 35 | 64 | 1.83 |
1 | 1024 | 2048 | 33 | 53 | 1.61 |
2 | 32 | 64 | 68 | 125 | 1.84 |
2 | 64 | 128 | 68 | 130 | 1.91 |
2 | 128 | 256 | 64 | 132 | 2.06 |
2 | 256 | 512 | 65 | 120 | 1.85 |
2 | 512 | 1024 | 64 | 100 | 1.56 |
2 | 1024 | 2048 | 54 | 75 | 1.39 |
from autoawq.
I have fully benchmark test again with llama-13b.
- The numbers for the prefill stage must not accurate, the method of measurement should be optimized.
- For some cases, the GPU memory doesn't show a significant decrease, and in some cases, it even increases.
from autoawq.
I have fully benchmark test again with llama-13b.
- The numbers for the prefill stage must not accurate, the method of measurement should be optimized.
- For some cases, the GPU memory doesn't show a significant decrease, and in some cases, it even increases.
New kernels and more fused layers are coming, making the models even faster. Prefill stage measurement will be optimized at a later stage.
from autoawq.
Updated the performance data base on version: d76125b released on Sep 13.
![image](https://private-user-images.githubusercontent.com/24476563/269256679-d5530cda-d841-4cb0-8a30-6f31da8be369.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY0MDk2MTcsIm5iZiI6MTcxNjQwOTMxNywicGF0aCI6Ii8yNDQ3NjU2My8yNjkyNTY2NzktZDU1MzBjZGEtZDg0MS00Y2IwLThhMzAtNmYzMWRhOGJlMzY5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTIyVDIwMjE1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJhMGRiMGE1MWM2MGRiZmIxMGYzM2NkNWQ3NzYyZTA0OWYyZjc1YmYwZDc0YzBhODc2ZWI3MGI1M2IzMzMwNGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.r64A_WquVeSNdc_N0jdGfkETrJuUTnchax-Lpjcc5uA)
from autoawq.
Related Issues (20)
- AWQ quantization of gemma results in "RuntimeError: probability tensor contains either `inf`, `nan` or element < 0" HOT 2
- Phi-3 mini support? HOT 5
- Possibly a bug when checking if awq_ext is installed HOT 2
- python 3.12 support HOT 1
- Can I use peft/lora with fuse_layers = True ? HOT 1
- torch 2.3.x support HOT 1
- Need Assistance with “pip install autoawq” Error HOT 3
- assert freqs_cis.shape == (x.shape[1], x.shape[-1])
- DeepSeek V2 MoE support HOT 2
- Question about format difference between AutoAWQ and AutoGPTQ
- After quantization,the ppl is ok but humaneval score drops sharply HOT 2
- Is AutoAWQ supported on Mac mps chip? HOT 1
- anyone found the solution to this?
- llama symmetric quantize bug HOT 3
- Vllm AutoAWQ with 4-GPU doesnt utilize GPU HOT 1
- Support for Traditional Linear/CNN Layer?
- Reduce the amount of gpu memory used in the quantification process HOT 8
- Support for deepseek v2 HOT 1
- about grid search
- Does AWQ and GPTQ kernels share with each other?
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 autoawq.