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
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ repository. If you are actively using this repository and want to report any iss
11
11
12
12
The latest version of the documentation for the Poplar software stack, and other developer resources, is available at https://www.graphcore.ai/developer.
13
13
14
-
> The code presented here requires using Poplar SDK 2.2.x
14
+
> The code presented here requires using Poplar SDK 2.3.x
15
15
16
16
Please install and enable the Poplar SDK following the instructions in the Getting Started guide for your IPU system.
|`bert_data/`| Directory containing the data pipeline and training data generation <br /><br />- `dataset.py` - Dataloader and preprocessing. Loads binary files into Numpy arrays to be passed `popart.PyStepIO`, with shapes based on training options, `--batches-per-step` & `--pipeline` <br /><br /> -`create_pretraining_data.py` - Script to generate binary files to be loaded from text data |
47
+
|`utils/`| Utility functions |
48
+
|`bert_data/`| Directory containing the data pipeline and training data generation <br /><br />- `dataset.py` - Dataloader and preprocessing. Loads binary files into Numpy arrays to be passed `popart.PyStepIO`, with shapes to match the configuration <br /><br /> -`create_pretraining_data.py` - Script to generate binary files to be loaded from text data |
49
49
|`configs/`| Directory containing JSON configuration files to be used by the `--config` argument. |
50
-
|`custom_ops/`| Directory containing custom PopART operators. These are optimised parts of the graph that target Poplar/PopLibs operations directly.<br /> - `attention.cpp` - This operation is the fwd and grad implementation for multi-headed self-attention.<br/> - `detach.cpp` - This operation is an identity with no grad implementation. This allows for the embedding dictionary to only be updated by its use in the projection.<br/> -`embeddingGather.cpp` - This operation is a modification of the PopART Gather to ensure correct layout of the weights.|
50
+
|`custom_ops/`| Directory containing custom PopART operators. These are optimised parts of the graph that target Poplar/PopLibs operations directly. |
51
51
52
52
53
53
## Quick start guide
@@ -161,18 +161,14 @@ For the sample text a configuration has been created - `configs/demo.json`. It
161
161
{
162
162
# Two layers as our dataset does not need the capacity of the usual 12 Layer BERT Base
163
163
"num_layers":2,
164
-
"no_dropout":true,
165
164
"popart_dtype":"FLOAT16",
166
-
"loss_scaling":1.0,
167
-
"stochastic_rounding":true,
168
165
# The data generation should have created 64samples. Therefore, we will do an epoch per session.run
169
166
"batches_per_step":64,
170
-
"epochs":150,
167
+
"training_steps":500,
171
168
# Here we specify the file we created in the previous step.
172
169
"input_files": [
173
170
"data/sample_text.bin"
174
-
]
175
-
"shuffle":true,
171
+
],
176
172
"no_validation":true
177
173
}
178
174
```
@@ -183,7 +179,7 @@ Run this config:
183
179
python3 bert.py --config configs/demo.json
184
180
```
185
181
186
-
This will compile the graph and run for 150 epochs. At end our model should have overfit to 100% test accuracy.
182
+
This will compile the graph and run for 500 training steps. At end our model should have overfit to 100% test accuracy.
187
183
188
184
##### View the pre-training results in Tensorboard
189
185
@@ -235,14 +231,10 @@ How to get the SQuAD 1.1 files required for inference is described in `bert_data
235
231
236
232
To run SQuAD BERT Base inference with a sequence length of 128:
View the JSON files in configs for detailed parameters.
245
-
246
-
It is also possible to run inference on the pretraining graph to validate the MLM/NSP results. It requires input files to be provided, either by adding them to the config or by using the following command-line for sequence length of 128:
$PARTITION, $IPUOF_VIPU_API_PARTITION_ID: ID of the Pod64 reconfigurable partition
35
+
$TCP_IF_INCLUDE: sets the default route for traffic between Poplar hosts. It should be configured for a network to which all Poplar hosts have access, and for which the interfaces only have a single IP address.
36
+
$VIPU_SERVER_HOST: IP address as appropriate for the target hardware
$PARTITION, $IPUOF_VIPU_API_PARTITION_ID: ID of the Pod64 reconfigurable partition
93
+
$TCP_IF_INCLUDE: sets the default route for traffic between Poplar hosts. It should be configured for a network to which all Poplar hosts have access, and for which the interfaces only have a single IP address.
94
+
$VIPU_SERVER_HOST: IP address as appropriate for the target hardware
0 commit comments