3e163d1e39afd0d4e049354aee9f9cdd1c6f90674c38e898f8506b11589684f7
Browse files- README.md +3 -3
- model/config.json +1 -1
- model/smash_config.json +4 -4
README.md
CHANGED
@@ -36,7 +36,7 @@ metrics:
|
|
36 |
![image info](./plots.png)
|
37 |
|
38 |
**Frequently Asked Questions**
|
39 |
-
- ***How does the compression work?*** The model is compressed by combining quantization,
|
40 |
- ***How does the model quality change?*** The quality of the model output might slightly vary compared to the base model.
|
41 |
- ***How is the model efficiency evaluated?*** These results were obtained on NVIDIA A100-PCIE-40GB with configuration described in `model/smash_config.json` and are obtained after a hardware warmup. The smashed model is directly compared to the original base model. Efficiency results may vary in other settings (e.g. other hardware, image size, batch size, ...). We recommend to directly run them in the use-case conditions to know if the smashed model can benefit you.
|
42 |
- ***What is the model format?*** We used a custom Pruna model format based on pickle to make models compatible with the compression methods. We provide a tutorial to run models in dockers in the documentation [here](https://pruna-ai-pruna.readthedocs-hosted.com/en/latest/) if needed.
|
@@ -75,8 +75,8 @@ You can run the smashed model with these steps:
|
|
75 |
model_path = "mattshumer-Hermes-2-Pro-11B-smashed/model" # Specify the downloaded model path.
|
76 |
smashed_model = PrunaModel.load_model(model_path) # Load the model.
|
77 |
|
78 |
-
|
79 |
-
|
80 |
```
|
81 |
|
82 |
## Configurations
|
|
|
36 |
![image info](./plots.png)
|
37 |
|
38 |
**Frequently Asked Questions**
|
39 |
+
- ***How does the compression work?*** The model is compressed by combining quantization, xformers, jit, cuda graphs, triton.
|
40 |
- ***How does the model quality change?*** The quality of the model output might slightly vary compared to the base model.
|
41 |
- ***How is the model efficiency evaluated?*** These results were obtained on NVIDIA A100-PCIE-40GB with configuration described in `model/smash_config.json` and are obtained after a hardware warmup. The smashed model is directly compared to the original base model. Efficiency results may vary in other settings (e.g. other hardware, image size, batch size, ...). We recommend to directly run them in the use-case conditions to know if the smashed model can benefit you.
|
42 |
- ***What is the model format?*** We used a custom Pruna model format based on pickle to make models compatible with the compression methods. We provide a tutorial to run models in dockers in the documentation [here](https://pruna-ai-pruna.readthedocs-hosted.com/en/latest/) if needed.
|
|
|
75 |
model_path = "mattshumer-Hermes-2-Pro-11B-smashed/model" # Specify the downloaded model path.
|
76 |
smashed_model = PrunaModel.load_model(model_path) # Load the model.
|
77 |
|
78 |
+
prompt = 'What is the color of a prune?'
|
79 |
+
smashed_model(prompt=prompt)
|
80 |
```
|
81 |
|
82 |
## Configurations
|
model/config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "/tmp/
|
3 |
"architectures": [
|
4 |
"MistralForCausalLM"
|
5 |
],
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "/tmp/tmp6w09dcat",
|
3 |
"architectures": [
|
4 |
"MistralForCausalLM"
|
5 |
],
|
model/smash_config.json
CHANGED
@@ -5,20 +5,20 @@
|
|
5 |
"pruners": "[]",
|
6 |
"pruning_ratio": 0.0,
|
7 |
"factorizers": "[]",
|
8 |
-
"quantizers": "
|
9 |
"n_quantization_bits": 8,
|
10 |
-
"output_deviation": 0.
|
11 |
"compilers": "[]",
|
12 |
"static_batch": true,
|
13 |
"static_shape": true,
|
14 |
"controlnet": "None",
|
15 |
"unet_dim": 4,
|
16 |
"device": "cuda",
|
17 |
-
"cache_dir": "/ceph/hdd/staff/charpent/.cache/
|
18 |
"batch_size": 1,
|
19 |
"model_name": "mattshumer/Hermes-2-Pro-11B",
|
20 |
"max_batch_size": 1,
|
21 |
-
"save_dir": "/ceph/hdd/staff/charpent/.cache/
|
22 |
"qtype_weight": "torch.qint8",
|
23 |
"qtype_activation": "torch.quint8",
|
24 |
"qobserver": "<class 'torch.ao.quantization.observer.MinMaxObserver'>",
|
|
|
5 |
"pruners": "[]",
|
6 |
"pruning_ratio": 0.0,
|
7 |
"factorizers": "[]",
|
8 |
+
"quantizers": "llm-int8",
|
9 |
"n_quantization_bits": 8,
|
10 |
+
"output_deviation": 0.005,
|
11 |
"compilers": "[]",
|
12 |
"static_batch": true,
|
13 |
"static_shape": true,
|
14 |
"controlnet": "None",
|
15 |
"unet_dim": 4,
|
16 |
"device": "cuda",
|
17 |
+
"cache_dir": "/ceph/hdd/staff/charpent/.cache/modelsa05vehry",
|
18 |
"batch_size": 1,
|
19 |
"model_name": "mattshumer/Hermes-2-Pro-11B",
|
20 |
"max_batch_size": 1,
|
21 |
+
"save_dir": "/ceph/hdd/staff/charpent/.cache/modelsp5gocu7z",
|
22 |
"qtype_weight": "torch.qint8",
|
23 |
"qtype_activation": "torch.quint8",
|
24 |
"qobserver": "<class 'torch.ao.quantization.observer.MinMaxObserver'>",
|