Skip to content

Commit 4c38552

Browse files
authored
Merge pull request NVIDIA#246 from swethmandava/master
BERT TF syntactical fixes
2 parents 66a4472 + 8749cf3 commit 4c38552

7 files changed

Lines changed: 864 additions & 103 deletions

File tree

TensorFlow/LanguageModeling/BERT/README.md

Lines changed: 86 additions & 85 deletions
Large diffs are not rendered by default.

TensorFlow/LanguageModeling/BERT/configurations.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,6 @@ bert--DGX2_n32:
108108
NUM_ACCUMULATION_STEPS: "8"
109109
PHASE: "1"
110110

111-
#64 DGX2 phase1
112-
bert--DGX2_n64:
113-
<<: *BERT_ON_CLUSTER
114-
<<: *DGX2
115-
variables:
116-
<<: *DGX2_VARS
117-
NNODES: "32"
118-
BATCHSIZE: "32"
119-
LEARNING_RATE: "1.171875e-5"
120-
NUM_ACCUMULATION_STEPS: "4"
121-
PHASE: "1"
122-
123111
#1 DGX1 phase2
124112
bert--DGX1_n1p2:
125113
<<: *BERT_ON_CLUSTER

TensorFlow/LanguageModeling/BERT/data/bertPrep.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,14 @@ def create_record_worker(filename_prefix, shard_id, output_format='hdf5'):
288288
'--n_training_shards',
289289
type=int,
290290
help='Specify the number of training shards to generate',
291-
default=256
291+
default=1472
292292
)
293293

294294
parser.add_argument(
295295
'--n_test_shards',
296296
type=int,
297297
help='Specify the number of test shards to generate',
298-
default=256
298+
default=1472
299299
)
300300

301301
parser.add_argument(

TensorFlow/LanguageModeling/BERT/notebooks/bert_squad_tf_finetuning.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"cell_type": "markdown",
2727
"metadata": {},
2828
"source": [
29-
"<img src=http://developer.download.nvidia.com/compute/machine-learning/frameworks/nvidia_logo.png style=\"width: 90px; float: right;\">\n",
29+
"<img src=\"http://developer.download.nvidia.com/compute/machine-learning/frameworks/nvidia_logo.png\" style=\"width: 90px; float: right;\">\n",
3030
"\n",
3131
"# BERT Question Answering Fine-Tuning with Mixed Precision"
3232
]

TensorFlow/LanguageModeling/BERT/notebooks/bert_squad_tf_inference.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"cell_type": "markdown",
2727
"metadata": {},
2828
"source": [
29-
"<img src=http://developer.download.nvidia.com/compute/machine-learning/frameworks/nvidia_logo.png style=\"width: 90px; float: right;\">\n",
29+
"<img src=\"http://developer.download.nvidia.com/compute/machine-learning/frameworks/nvidia_logo.png\" style=\"width: 90px; float: right;\">\n",
3030
"\n",
3131
"# BERT Question Answering Inference with Mixed Precision\n"
3232
]

TensorFlow/LanguageModeling/BERT/notebooks/bert_squad_tf_inference_colab.ipynb

Lines changed: 773 additions & 1 deletion
Large diffs are not rendered by default.

TensorFlow/LanguageModeling/BERT/run_pretraining.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def input_fn():
469469
lambda record: _decode_record(record, name_to_features),
470470
batch_size=batch_size,
471471
num_parallel_batches=num_cpu_threads,
472-
drop_remainder=True))
472+
drop_remainder=True if is_training else False))
473473
return d
474474

475475
return input_fn

0 commit comments

Comments
 (0)