sharpenb commited on
Commit
38e4482
1 Parent(s): 5d37c83

Upload folder using huggingface_hub (#3)

Browse files

- 7df2d4d7ba398d8a4e6db623e8f0e8d58c79e70de73873b2438235d65a0fdafd (4f90ad9ad41eaa83a3776e28ec0951c5c3289171)
- 03a2f04a35fc13a06fe99e8a3c40814f4c95a5718bf15e8727347539ee4214e0 (d4e2c7db425f34249c9b5ca13ec9558d678b3f75)

Files changed (2) hide show
  1. README.md +9 -13
  2. results.json +15 -28
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: UnicomLLM/Unichat-llama3-Chinese-8B
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 hqq.
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,22 +52,18 @@ tags:
52
 
53
  You can run the smashed model with these steps:
54
 
55
- 0. Check requirements from the original repo UnicomLLM/Unichat-llama3-Chinese-8B 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 hqq
59
  ```
60
  2. Load & run the model.
61
  ```python
62
  from transformers import AutoModelForCausalLM, AutoTokenizer
63
- from hqq.engine.hf import HQQModelForCausalLM
64
- from hqq.models.hf.base import AutoHQQHFModel
65
-
66
- try:
67
- model = HQQModelForCausalLM.from_quantized("PrunaAI/UnicomLLM-Unichat-llama3-Chinese-8B-HQQ-2bit-smashed", device_map='auto')
68
- except:
69
- model = AutoHQQHFModel.from_quantized("PrunaAI/UnicomLLM-Unichat-llama3-Chinese-8B-HQQ-2bit-smashed")
70
- tokenizer = AutoTokenizer.from_pretrained("UnicomLLM/Unichat-llama3-Chinese-8B")
71
 
72
  input_ids = tokenizer("What is the color of prunes?,", return_tensors='pt').to(model.device)["input_ids"]
73
 
@@ -81,7 +77,7 @@ The configuration info are in `smash_config.json`.
81
 
82
  ## Credits & License
83
 
84
- The license of the smashed model follows the license of the original model. Please check the license of the original model UnicomLLM/Unichat-llama3-Chinese-8B 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.
85
 
86
  ## Want to compress other models?
87
 
 
1
  ---
2
  thumbnail: "https://assets-global.website-files.com/646b351987a8d8ce158d1940/64ec9e96b4334c0e1ac41504_Logo%20with%20white%20text.svg"
3
+ base_model: PrunaAI/UnicomLLM-Unichat-llama3-Chinese-8B-HQQ-2bit-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/UnicomLLM-Unichat-llama3-Chinese-8B-HQQ-2bit-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/UnicomLLM-Unichat-llama3-Chinese-8B-HQQ-2bit-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/UnicomLLM-Unichat-llama3-Chinese-8B-HQQ-2bit-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,30 +1,17 @@
1
  {
2
- "base_current_gpu_type": "NVIDIA A100-PCIE-40GB",
3
- "base_current_gpu_total_memory": 40339.3125,
4
- "base_token_generation_latency_sync": 53.17919807434082,
5
- "base_token_generation_latency_async": 53.305395878851414,
6
- "base_token_generation_throughput_sync": 0.018804345236685772,
7
- "base_token_generation_throughput_async": 0.0187598269089442,
8
- "base_token_generation_CO2_emissions": null,
9
- "base_token_generation_energy_consumption": null,
10
- "base_inference_latency_sync": 52.69626922607422,
11
- "base_inference_latency_async": 51.61581039428711,
12
- "base_inference_throughput_sync": 0.01897667547791406,
13
- "base_inference_throughput_async": 0.01937390873767393,
14
- "base_inference_CO2_emissions": null,
15
- "base_inference_energy_consumption": null,
16
- "smashed_current_gpu_type": "NVIDIA A100-PCIE-40GB",
17
- "smashed_current_gpu_total_memory": 40339.3125,
18
- "smashed_token_generation_latency_sync": 163.73534088134767,
19
- "smashed_token_generation_latency_async": 164.74530082195997,
20
- "smashed_token_generation_throughput_sync": 0.006107416973130189,
21
- "smashed_token_generation_throughput_async": 0.006069975865840924,
22
- "smashed_token_generation_CO2_emissions": null,
23
- "smashed_token_generation_energy_consumption": null,
24
- "smashed_inference_latency_sync": 171.19641571044923,
25
- "smashed_inference_latency_async": 139.2533779144287,
26
- "smashed_inference_throughput_sync": 0.005841243789188535,
27
- "smashed_inference_throughput_async": 0.007181154345961364,
28
- "smashed_inference_CO2_emissions": null,
29
- "smashed_inference_energy_consumption": null
30
  }
 
1
  {
2
+ "current_gpu_type": "NVIDIA A100-PCIE-40GB",
3
+ "current_gpu_total_memory": 40339.3125,
4
+ "perplexity": 23332.130859375,
5
+ "token_generation_latency_sync": 274.0644332885742,
6
+ "token_generation_latency_async": 274.208939447999,
7
+ "token_generation_throughput_sync": 0.0036487769974408064,
8
+ "token_generation_throughput_async": 0.0036468541179330884,
9
+ "token_generation_CO2_emissions": null,
10
+ "token_generation_energy_consumption": null,
11
+ "inference_latency_sync": 263.15919342041013,
12
+ "inference_latency_async": 210.33341884613037,
13
+ "inference_throughput_sync": 0.003799981247101823,
14
+ "inference_throughput_async": 0.00475435622872441,
15
+ "inference_CO2_emissions": null,
16
+ "inference_energy_consumption": null
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }