Update README.md
Browse files
README.md
CHANGED
|
@@ -2,5 +2,67 @@
|
|
| 2 |
license: mit
|
| 3 |
base_model:
|
| 4 |
- deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
| 3 |
base_model:
|
| 4 |
- deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
---
|
| 8 |
|
| 9 |
+
# DeepSeek-R1-Distill-Qwen2.5-Math-1.5B-awq-asym-uint4-g128-lmhead-onnx-hybrid
|
| 10 |
+
- ## Introduction
|
| 11 |
+
This model was created by applying [Quark](https://quark.docs.amd.com/latest/index.html) with calibration samples from Pile dataset.
|
| 12 |
+
- ## Quantization Strategy
|
| 13 |
+
- ***Quantized Layers***: All linear layers
|
| 14 |
+
- ***Weight***: uint4 asymmetric per-group, group_size=128
|
| 15 |
+
- ## Quick Start
|
| 16 |
+
1. [Download and install Quark](https://quark.docs.amd.com/latest/install.html)
|
| 17 |
+
2. Run the quantization script in the example folder using the following command line:
|
| 18 |
+
```sh
|
| 19 |
+
export MODEL_DIR = [local model checkpoint folder] or Qwen2.5-Math-1.5B
|
| 20 |
+
# single GPU
|
| 21 |
+
python quantize_quark.py --model_dir $MODEL_DIR \
|
| 22 |
+
--output_dir output_dir $MODEL_NAME-awq-asym-uint4-g128-lmhead \
|
| 23 |
+
--quant_scheme w_uint4_per_group_asym \
|
| 24 |
+
--num_calib_data 128 \
|
| 25 |
+
--quant_algo awq \
|
| 26 |
+
--dataset pileval_for_awq_benchmark \
|
| 27 |
+
--seq_len 512 \
|
| 28 |
+
--model_export hf_format \
|
| 29 |
+
--data_type bfloat16 \
|
| 30 |
+
--exclude_layers
|
| 31 |
+
# cpu
|
| 32 |
+
python quantize_quark.py --model_dir $MODEL_DIR \
|
| 33 |
+
--output_dir output_dir $MODEL_NAME-awq-asym-uint4-g128-lmhead \
|
| 34 |
+
--quant_scheme w_uint4_per_group_asym \
|
| 35 |
+
--num_calib_data 128 \
|
| 36 |
+
--quant_algo awq \
|
| 37 |
+
--dataset pileval_for_awq_benchmark \
|
| 38 |
+
--seq_len 512 \
|
| 39 |
+
--model_export hf_format \
|
| 40 |
+
--data_type bfloat16 \
|
| 41 |
+
--exclude_layers \
|
| 42 |
+
--device cpu
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
#### License
|
| 46 |
+
Modifications copyright(c) 2024 Advanced Micro Devices,Inc. All rights reserved.
|
| 47 |
+
|
| 48 |
+
MIT License
|
| 49 |
+
|
| 50 |
+
Copyright (c) 2023 DeepSeek
|
| 51 |
+
|
| 52 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 53 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 54 |
+
in the Software without restriction, including without limitation the rights
|
| 55 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 56 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 57 |
+
furnished to do so, subject to the following conditions:
|
| 58 |
+
|
| 59 |
+
The above copyright notice and this permission notice shall be included in all
|
| 60 |
+
copies or substantial portions of the Software.
|
| 61 |
+
|
| 62 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 63 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 64 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 65 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 66 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 67 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 68 |
+
SOFTWARE.
|