Update README.md
Browse files
README.md
CHANGED
|
@@ -4,4 +4,26 @@ tags:
|
|
| 4 |
- OmniQuant
|
| 5 |
- Quantization
|
| 6 |
- Weight-Quantization
|
| 7 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- OmniQuant
|
| 5 |
- Quantization
|
| 6 |
- Weight-Quantization
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
This repo contains all the required Learnable Weight Clipping for Omniquant https://arxiv.org/abs/2308.13137.
|
| 10 |
+
|
| 11 |
+
To use them please first run:
|
| 12 |
+
|
| 13 |
+
```
|
| 14 |
+
!mkdir OmniQuant_LWC
|
| 15 |
+
!git lfs install
|
| 16 |
+
!git clone https://huggingface.co/Tfloow/OmniQuant
|
| 17 |
+
!cp Omniquant/* OmniQuant_LWC/ # To avoid conflict in names
|
| 18 |
+
!git clone https://github.com/OpenGVLab/OmniQuant/tree/main
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
Then you can run OmniQuant as usual with the flag `--resume`:
|
| 22 |
+
|
| 23 |
+
```
|
| 24 |
+
CUDA_VISIBLE_DEVICES=0 python OmniQuant/main.py \
|
| 25 |
+
--model NAME_OF_MODEL \
|
| 26 |
+
--epochs 0 --output_dir ./log/test \
|
| 27 |
+
--eval_ppl --wbits 4 --abits 16 --group_size 128 --lwc \
|
| 28 |
+
--resume OmniQuant_LWC/NAME_OF_MODEL-w4a16g128.pth
|
| 29 |
+
```
|