merge_mp_bert.sh 814 Bytes
Newer Older
Mohammad's avatar
Mohammad committed
1
2
#!/bin/bash

3
INTRA_LAYER_MODEL_PARALLEL_SIZE=2
Mohammad's avatar
Mohammad committed
4
5
6
7

VOCAB_FILE=bert-vocab.txt
CHECKPOINT_PATH=checkpoints/bert_345m

8
WORLD_SIZE=$INTRA_LAYER_MODEL_PARALLEL_SIZE python tools/merge_mp_partitions.py \
Mohammad's avatar
Mohammad committed
9
                                --model-type BERT \
10
                                --intra-layer-model-parallel-size $INTRA_LAYER_MODEL_PARALLEL_SIZE \
Mohammad's avatar
Mohammad committed
11
12
13
14
15
16
17
18
                                --tokenizer-type BertWordPieceLowerCase \
                                --vocab-file $VOCAB_FILE \
                                --num-layers 24 \
                                --hidden-size 1024 \
                                --num-attention-heads 16 \
                                --seq-length 512 \
                                --max-position-embeddings 512 \
                                --load $CHECKPOINT_PATH