sharpenb commited on
Commit
e7d87b0
1 Parent(s): ed68a4b

Upload folder using huggingface_hub (#7)

Browse files

- 0892a570d781d9712d504d7217efe0e2e3bb37b02f91e4b8d6b65d96607a825a (dbfc5bcbadfec319ee42435d6581a686f0a1fae5)
- a417cf539b15aadf2b36ad280ad26283e1cef57d1c1dab9b6ab6de6a3c36a983 (3fa6ac1fb41dae22f0b486c568ae5f64873d328e)

Files changed (2) hide show
  1. README.md +8 -8
  2. results.json +15 -30
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  thumbnail: "https://assets-global.website-files.com/646b351987a8d8ce158d1940/64ec9e96b4334c0e1ac41504_Logo%20with%20white%20text.svg"
3
- base_model: gradientai/Llama-3-8B-Instruct-262k
4
  metrics:
5
  - memory_disk
6
  - memory_inference
@@ -38,7 +38,7 @@ tags:
38
  ![image info](./plots.png)
39
 
40
  **Frequently Asked Questions**
41
- - ***How does the compression work?*** The model is compressed with awq.
42
  - ***How does the model quality change?*** The quality of the model output might vary compared to the base model.
43
  - ***How is the model efficiency evaluated?*** These results were obtained on HARDWARE_NAME 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.
44
  - ***What is the model format?*** We use safetensors.
@@ -52,18 +52,18 @@ tags:
52
 
53
  You can run the smashed model with these steps:
54
 
55
- 0. Check requirements from the original repo gradientai/Llama-3-8B-Instruct-262k installed. In particular, check python, cuda, and transformers versions.
56
  1. Make sure that you have installed quantization related packages.
57
  ```bash
58
- pip install autoawq
59
  ```
60
  2. Load & run the model.
61
  ```python
62
  from transformers import AutoModelForCausalLM, AutoTokenizer
63
- from awq import AutoAWQForCausalLM
64
 
65
- model = AutoAWQForCausalLM.from_quantized("PrunaAI/gradientai-Llama-3-8B-Instruct-262k-AWQ-4bit-smashed", trust_remote_code=True, device_map='auto')
66
- tokenizer = AutoTokenizer.from_pretrained("gradientai/Llama-3-8B-Instruct-262k")
67
 
68
  input_ids = tokenizer("What is the color of prunes?,", return_tensors='pt').to(model.device)["input_ids"]
69
 
@@ -77,7 +77,7 @@ The configuration info are in `smash_config.json`.
77
 
78
  ## Credits & License
79
 
80
- The license of the smashed model follows the license of the original model. Please check the license of the original model gradientai/Llama-3-8B-Instruct-262k before using this model which provided the base model. The license of the `pruna-engine` is [here](https://pypi.org/project/pruna-engine/) on Pypi.
81
 
82
  ## Want to compress other models?
83
 
 
1
  ---
2
  thumbnail: "https://assets-global.website-files.com/646b351987a8d8ce158d1940/64ec9e96b4334c0e1ac41504_Logo%20with%20white%20text.svg"
3
+ base_model: PrunaAI/gradientai-Llama-3-8B-Instruct-262k-AWQ-4bit-smashed
4
  metrics:
5
  - memory_disk
6
  - memory_inference
 
38
  ![image info](./plots.png)
39
 
40
  **Frequently Asked Questions**
41
+ - ***How does the compression work?*** The model is compressed with [.
42
  - ***How does the model quality change?*** The quality of the model output might vary compared to the base model.
43
  - ***How is the model efficiency evaluated?*** These results were obtained on HARDWARE_NAME 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.
44
  - ***What is the model format?*** We use safetensors.
 
52
 
53
  You can run the smashed model with these steps:
54
 
55
+ 0. Check requirements from the original repo PrunaAI/gradientai-Llama-3-8B-Instruct-262k-AWQ-4bit-smashed installed. In particular, check python, cuda, and transformers versions.
56
  1. Make sure that you have installed quantization related packages.
57
  ```bash
58
+ REQUIREMENTS_INSTRUCTIONS
59
  ```
60
  2. Load & run the model.
61
  ```python
62
  from transformers import AutoModelForCausalLM, AutoTokenizer
63
+ IMPORTS
64
 
65
+ MODEL_LOAD
66
+ tokenizer = AutoTokenizer.from_pretrained("PrunaAI/gradientai-Llama-3-8B-Instruct-262k-AWQ-4bit-smashed")
67
 
68
  input_ids = tokenizer("What is the color of prunes?,", return_tensors='pt').to(model.device)["input_ids"]
69
 
 
77
 
78
  ## Credits & License
79
 
80
+ The license of the smashed model follows the license of the original model. Please check the license of the original model PrunaAI/gradientai-Llama-3-8B-Instruct-262k-AWQ-4bit-smashed before using this model which provided the base model. The license of the `pruna-engine` is [here](https://pypi.org/project/pruna-engine/) on Pypi.
81
 
82
  ## Want to compress other models?
83
 
results.json CHANGED
@@ -1,32 +1,17 @@
1
  {
2
- "base_current_gpu_type": "NVIDIA A100-PCIE-40GB",
3
- "base_current_gpu_total_memory": 40339.3125,
4
- "base_perplexity": 8.405904769897461,
5
- "base_token_generation_latency_sync": 35.634182929992676,
6
- "base_token_generation_latency_async": 36.07999123632908,
7
- "base_token_generation_throughput_sync": 0.02806294175355757,
8
- "base_token_generation_throughput_async": 0.027716192984911157,
9
- "base_token_generation_CO2_emissions": null,
10
- "base_token_generation_energy_consumption": null,
11
- "base_inference_latency_sync": 120.22138977050781,
12
- "base_inference_latency_async": 39.18566703796387,
13
- "base_inference_throughput_sync": 0.008317987355735225,
14
- "base_inference_throughput_async": 0.02551953496239275,
15
- "base_inference_CO2_emissions": null,
16
- "base_inference_energy_consumption": null,
17
- "smashed_current_gpu_type": "NVIDIA A100-PCIE-40GB",
18
- "smashed_current_gpu_total_memory": 40339.3125,
19
- "smashed_perplexity": 8.853601455688477,
20
- "smashed_token_generation_latency_sync": 40.49961433410645,
21
- "smashed_token_generation_latency_async": 40.31131472438574,
22
- "smashed_token_generation_throughput_sync": 0.02469159315321819,
23
- "smashed_token_generation_throughput_async": 0.02480693092837939,
24
- "smashed_token_generation_CO2_emissions": null,
25
- "smashed_token_generation_energy_consumption": null,
26
- "smashed_inference_latency_sync": 163.6304901123047,
27
- "smashed_inference_latency_async": 70.32005786895752,
28
- "smashed_inference_throughput_sync": 0.006111330469728893,
29
- "smashed_inference_throughput_async": 0.014220693644244647,
30
- "smashed_inference_CO2_emissions": null,
31
- "smashed_inference_energy_consumption": null
32
  }
 
1
  {
2
+ "current_gpu_type": "NVIDIA A100-PCIE-40GB",
3
+ "current_gpu_total_memory": 40339.3125,
4
+ "perplexity": 8.414657592773438,
5
+ "token_generation_latency_sync": 16.68424062728882,
6
+ "token_generation_latency_async": 16.685200855135918,
7
+ "token_generation_throughput_sync": 0.059936800381816334,
8
+ "token_generation_throughput_async": 0.05993335103857544,
9
+ "token_generation_CO2_emissions": null,
10
+ "token_generation_energy_consumption": null,
11
+ "inference_latency_sync": 188.3500549316406,
12
+ "inference_latency_async": 46.97415828704834,
13
+ "inference_throughput_sync": 0.005309263118415006,
14
+ "inference_throughput_async": 0.021288300556429957,
15
+ "inference_CO2_emissions": null,
16
+ "inference_energy_consumption": null
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }