Update README.md
Browse files
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,12 @@ 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 gptq quantization, 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 |
+
smashed_model.to("cuda")
|
79 |
+
prompt = 'What is the color of a prune?'
|
80 |
+
from transformers import AutoTokenizer
|
81 |
+
tokenizer = AutoTokenizer.from_pretrained("mattshumer/Hermes-2-Pro-11B")
|
82 |
+
tokens = tokenizer(prompt, return_tensors="pt").to('cuda')
|
83 |
+
smashed_model(**tokens)
|
84 |
```
|
85 |
|
86 |
## Configurations
|