File tree 19 files changed +71
-71
lines changed
post_training_quantization
19 files changed +71
-71
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ TinyBERT蒸馏流程图
29
29
30
30
``` shell
31
31
pip install paddlenlp
32
- pip install paddlepaddle_gpu
32
+ pip install paddlepaddle_gpu==2.4rc0
33
33
```
34
34
35
35
## 数据、预训练模型介绍及获取
Original file line number Diff line number Diff line change 9
9
## 版本要求
10
10
``` bash
11
11
python3.5+
12
- paddlepaddle> =2.2.0
13
- paddleslim> =2.2.0
12
+ paddlepaddle> =2.4rc0
13
+ paddleslim> =2.4rc
14
14
```
15
15
16
16
请参照github安装[ paddlepaddle] ( https://github.com/PaddlePaddle/Paddle ) 和[ paddleslim] ( https://github.com/PaddlePaddle/PaddleSlim ) 。
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ BERT-base模型是一个迁移能力很强的通用语义表示模型,但是
183
183
184
184
``` shell
185
185
pip install paddlenlp
186
- pip install paddlepaddle_gpu> =2.0rc1
186
+ pip install paddlepaddle_gpu==2.4rc0
187
187
```
188
188
189
189
### 2.2 Fine-tuing
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ This tutorial uses the GLUE/SST-2 dataset as an example to perform 1-bit quantiz
16
16
17
17
``` shell
18
18
pip install paddlenlp
19
- pip install paddlepaddle_gpu
19
+ pip install paddlepaddle_gpu==2.4rc0
20
20
```
21
21
22
22
### Acquisition of data and training models
Original file line number Diff line number Diff line change 10
10
11
11
### 环境准备
12
12
13
- PaddlePaddle >= 2.3 或develop版本
13
+ PaddlePaddle >= 2.4rc0 或develop版本
14
14
15
15
### 准备数据
16
16
Original file line number Diff line number Diff line change 9
9
## 版本要求
10
10
``` bash
11
11
python3.5+
12
- paddlepaddle> =2.2.0
13
- paddleslim> =2.2.0
12
+ paddlepaddle> =2.4rc0
13
+ paddleslim> =2.4rc
14
14
```
15
15
16
16
请参照github安装[ PaddlePaddle] ( https://github.com/PaddlePaddle/Paddle ) 和[ PaddleSlim] ( https://github.com/PaddlePaddle/PaddleSlim ) 。
Original file line number Diff line number Diff line change @@ -94,19 +94,19 @@ ACT相比传统的模型压缩方法,
94
94
95
95
## ** 环境准备**
96
96
97
- - 安装PaddlePaddle >= 2.3.2 :(可以参考[ 飞桨官网安装文档] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
97
+ - 安装PaddlePaddle >= 2.4rc0 :(可以参考[ 飞桨官网安装文档] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
98
98
99
99
``` shell
100
100
# CPU
101
- pip install paddlepaddle --upgrade
101
+ pip install paddlepaddle==2.4rc0
102
102
# GPU 以CUDA11.2为例
103
- python -m pip install paddlepaddle-gpu ==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
103
+ python -m pip install paddlepaddle_gpu ==2.4rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
104
104
```
105
105
106
- - 安装PaddleSlim >=2.3.3 :
106
+ - 安装PaddleSlim 2.4rc :
107
107
108
108
``` shell
109
- pip install paddleslim==2.3.3
109
+ pip install paddleslim==2.4rc
110
110
```
111
111
112
112
## ** 快速开始**
Original file line number Diff line number Diff line change 35
35
## 3. 自动压缩流程
36
36
37
37
#### 3.1 准备环境
38
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
39
- - PaddleSlim >= 2.3
38
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
39
+ - PaddleSlim >= 2.4rc
40
40
- PaddleDet >= 2.4
41
41
- opencv-python
42
42
43
43
安装paddlepaddle:
44
44
``` shell
45
45
# CPU
46
- pip install paddlepaddle==2.3.2
46
+ pip install paddlepaddle==2.4rc0
47
47
# GPU 以Ubuntu、CUDA 11.2为例
48
- python -m pip install paddlepaddle-gpu ==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
48
+ python -m pip install paddlepaddle_gpu ==2.4rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
49
49
```
50
50
51
51
安装paddleslim:
52
52
``` shell
53
- pip install paddleslim
53
+ pip install paddleslim==2.4rc
54
54
```
55
55
56
56
安装paddledet:
Original file line number Diff line number Diff line change 57
57
#### 3.1 准备环境
58
58
59
59
- python >= 3.6
60
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
61
- - PaddleSlim >= 2.3
60
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
61
+ - PaddleSlim >= 2.4rc
62
62
63
63
安装paddlepaddle:
64
64
``` shell
65
65
# CPU
66
- pip install paddlepaddle
66
+ pip install paddlepaddle==2.4rc0
67
67
# GPU
68
- pip install paddlepaddle-gpu
68
+ pip install paddlepaddle_gpu==2.4rc0
69
69
```
70
70
71
71
安装paddleslim:
72
72
``` shell
73
- pip install paddleslim
73
+ pip install paddleslim==2.4rc
74
74
```
75
75
76
76
#### 3.2 准备数据集
Original file line number Diff line number Diff line change 47
47
48
48
#### 3.1 准备环境
49
49
- python >= 3.6
50
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
50
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
51
51
- PaddleSlim >= 2.3
52
52
- PaddleNLP >= 2.3
53
53
54
54
安装paddlepaddle:
55
55
``` shell
56
56
# CPU
57
- pip install paddlepaddle
57
+ pip install paddlepaddle==2.4rc0
58
58
# GPU
59
- pip install paddlepaddle-gpu
59
+ pip install paddlepaddle_gpu==2.4rc0
60
60
```
61
61
62
62
安装paddleslim:
63
63
``` shell
64
- pip install paddleslim
64
+ pip install paddleslim==2.4rc
65
65
```
66
66
67
67
安装paddlenlp:
Original file line number Diff line number Diff line change 29
29
#### 3.1 准备环境
30
30
31
31
- python >= 3.6
32
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
33
- - PaddleSlim >= 2.3
32
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
33
+ - PaddleSlim >= 2.4rc
34
34
35
35
安装paddlepaddle:
36
36
``` shell
37
37
# CPU
38
- pip install paddlepaddle
38
+ pip install paddlepaddle==2.4rc0
39
39
# GPU
40
- pip install paddlepaddle-gpu
40
+ pip install paddlepaddle_gpu==2.4rc0
41
41
```
42
42
43
43
安装paddleslim:
44
44
``` shell
45
- pip install paddleslim
45
+ pip install paddleslim==2.4rc
46
46
```
47
47
48
48
#### 3.2 准备数据集
Original file line number Diff line number Diff line change 40
40
## 3. 自动压缩流程
41
41
#### 3.1 准备环境
42
42
- python >= 3.6
43
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
44
- - PaddleSlim >= 2.3
43
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
44
+ - PaddleSlim >= 2.4rc
45
45
- X2Paddle develop版本
46
46
- transformers >= 4.18.0
47
47
- PaddleNLP >= 2.3
52
52
安装paddlepaddle:
53
53
``` shell
54
54
# CPU
55
- pip install paddlepaddle
55
+ pip install paddlepaddle==2.4rc0
56
56
# GPU
57
- pip install paddlepaddle-gpu
57
+ pip install paddlepaddle_gpu==2.4rc0
58
58
```
59
59
60
60
安装paddleslim:
61
61
``` shell
62
- pip install paddleslim
62
+ pip install paddleslim==2.4rc
63
63
```
64
64
65
65
安装X2Paddle:
Original file line number Diff line number Diff line change 45
45
## 3. 自动压缩流程
46
46
47
47
#### 3.1 准备环境
48
- - PaddlePaddle >= 2.3.2版本 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 根据相应环境的安装指令进行安装)
48
+ - PaddlePaddle >= 2.4rc0版本 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 根据相应环境的安装指令进行安装)
49
49
- PaddleSlim develop 版本
50
50
51
51
(1)安装paddlepaddle
52
52
```
53
53
# CPU
54
- pip install paddlepaddle==2.3.2
54
+ pip install paddlepaddle==2.4rc0
55
55
# GPU 以Ubuntu、CUDA 11.2为例
56
- python -m pip install paddlepaddle-gpu ==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
56
+ python -m pip install paddlepaddle_gpu ==2.4rc0 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
57
57
```
58
58
59
- (2)安装paddleslim>=2.3.3 :
59
+ (2)安装paddleslim>=2.4rc :
60
60
``` shell
61
- pip install paddleslim==2.3.3
61
+ pip install paddleslim==2.4rc
62
62
```
63
63
64
64
Original file line number Diff line number Diff line change 47
47
48
48
#### 3.1 准备环境
49
49
50
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
51
- - PaddleSlim >= 2.3
50
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
51
+ - PaddleSlim >= 2.4rc
52
52
- PaddleSeg == 2.5.0
53
53
54
54
安装paddlepaddle:
55
55
``` shell
56
56
# CPU
57
- pip install paddlepaddle
57
+ pip install paddlepaddle==2.4rc0
58
58
# GPU
59
- pip install paddlepaddle-gpu
59
+ pip install paddlepaddle_gpu==2.4rc0
60
60
```
61
61
62
62
安装paddleslim:
63
63
``` shell
64
- pip install paddleslim
64
+ pip install paddleslim==2.4rc
65
65
```
66
66
67
67
准备paddleslim示例代码:
Original file line number Diff line number Diff line change 31
31
## 3. 自动压缩流程
32
32
33
33
#### 3.1 准备环境
34
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
35
- - PaddleSlim >= 2.3
34
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
35
+ - PaddleSlim >= 2.4rc
36
36
- [ X2Paddle] ( https://github.com/PaddlePaddle/X2Paddle ) >= 1.3.6
37
37
- opencv-python
38
38
39
39
(1)安装paddlepaddle:
40
40
``` shell
41
41
# CPU
42
- pip install paddlepaddle
42
+ pip install paddlepaddle==2.4rc0
43
43
# GPU
44
- pip install paddlepaddle-gpu
44
+ pip install paddlepaddle_gpu==2.4rc0
45
45
```
46
46
47
47
(2)安装paddleslim:
48
48
``` shell
49
- pip install paddleslim
49
+ pip install paddleslim==2.4rc
50
50
```
51
51
52
52
(3)安装TensorFlow:
Original file line number Diff line number Diff line change 31
31
#### 3.1 准备环境
32
32
33
33
- python >= 3.6
34
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
35
- - PaddleSlim >= 2.3
34
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
35
+ - PaddleSlim >= 2.4rc
36
36
37
37
安装paddlepaddle:
38
38
``` shell
39
39
# CPU
40
- pip install paddlepaddle
40
+ pip install paddlepaddle==2.4rc0
41
41
# GPU
42
- pip install paddlepaddle-gpu
42
+ pip install paddlepaddle_gpu==2.4rc0
43
43
```
44
44
45
45
安装paddleslim:
46
46
``` shell
47
- pip install paddleslim
47
+ pip install paddleslim==2.4rc
48
48
```
49
49
50
50
#### 3.2 准备数据集
Original file line number Diff line number Diff line change 30
30
## 3. 全量化流程
31
31
32
32
#### 3.1 准备环境
33
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
34
- - PaddleSlim >= 2.3.4
33
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
34
+ - PaddleSlim >= 2.4rc
35
35
- PaddleDet >= 2.4
36
36
- opencv-python
37
37
38
38
安装paddlepaddle:
39
39
``` shell
40
40
# CPU
41
- pip install paddlepaddle
41
+ pip install paddlepaddle==2.4rc0
42
42
# GPU
43
- pip install paddlepaddle-gpu
43
+ pip install paddlepaddle_gpu==2.4rc0
44
44
```
45
45
46
46
安装paddleslim:
47
47
``` shell
48
- pip install paddleslim
48
+ pip install paddleslim==2.4rc
49
49
```
50
50
51
51
安装paddledet:
Original file line number Diff line number Diff line change 35
35
## 3. 离线量化流程
36
36
37
37
#### 3.1 准备环境
38
- - PaddlePaddle >= 2.3 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
39
- - PaddleSlim >= 2.3
38
+ - PaddlePaddle >= 2.4rc0 (可从[ Paddle官网] ( https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html ) 下载安装)
39
+ - PaddleSlim >= 2.4rc
40
40
- PaddleDet >= 2.4
41
41
- opencv-python
42
42
43
43
安装paddlepaddle:
44
44
``` shell
45
45
# CPU
46
- pip install paddlepaddle
46
+ pip install paddlepaddle==2.4rc0
47
47
# GPU
48
- pip install paddlepaddle-gpu
48
+ pip install paddlepaddle_gpu==2.4rc0
49
49
```
50
50
51
51
安装paddleslim:
52
52
``` shell
53
- pip install paddleslim
53
+ pip install paddleslim==2.4rc
54
54
```
55
55
56
56
安装paddledet:
You can’t perform that action at this time.
0 commit comments