You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# bert-multi-gpu
2
2
3
-
Feel free to fine tune large BERT models with large batch size easily. Multi-GPU are supported.
3
+
Feel free to fine tune large BERT models with large batch size easily. Multi-GPU and FP16 are supported.
4
4
5
5
## Dependencies
6
6
@@ -11,6 +11,15 @@ Feel free to fine tune large BERT models with large batch size easily. Multi-GPU
11
11
12
12
13
13
14
+
## Features
15
+
16
+
- CPU/GPU/TPU Support
17
+
-**Multi-GPU Support**: [`tf.distribute.MirroredStrategy`](https://www.tensorflow.org/api_docs/python/tf/distribute/MirroredStrategy) is used to achieve Multi-GPU support for this project, which mirrors vars to distribute across multiple devices and machines. The maximum batch_size for each GPU is almost the same as [bert](https://github.com/google-research/bert/blob/master/README.md#out-of-memory-issues). So **global batch_size** depends on how many GPUs there are.
18
+
-**FP16 Support**: [FP16](https://en.wikipedia.org/wiki/Half-precision_floating-point_format) allows you to use a larger batch_size. And training speed will increase by 70~100% on Volta GPUs, but may be slower on Pascal GPUs([REF1](https://github.com/tensorflow/tensorflow/issues/15585#issuecomment-361769151), [REF2](https://github.com/HaoyuHu/bert-multi-gpu/issues/1#issuecomment-493363383)).
19
+
-**SavedModel Export**
20
+
21
+
22
+
14
23
## Usage
15
24
16
25
List some optional parameters below:
@@ -29,6 +38,7 @@ List some optional parameters below:
29
38
-`num_train_epochs`: Train epoch number.
30
39
-`use_gpu`: Use GPU or not.
31
40
-`num_gpu_cores`: Total number of GPU cores to use, only used if `use_gpu` is True.
41
+
-`use_fp16`: Use [`FP16`](https://en.wikipedia.org/wiki/Half-precision_floating-point_format) or not.
32
42
-`output_dir`: **Checkpoints** and **SavedModel(.pb) files** will be saved in this directory.
0 commit comments