Skip to content

(Unofficial) PyTorch Implementation of BERT [WIP]

Notifications You must be signed in to change notification settings

Huffon/pytorch-bert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BERT PyTorch implementation

This repository contains unofficial BERT implmentation using PyTorch Framework.

Usage

  • To build vocabulary, run following code snippet
python build_vocab.py
  • To pretrain BERT model, run following code snippet with options
python main.py \
    --mode MODE
    --max_len MAX_LEN
    --max_pred MAX_PRED
    --num_layers NUM_LAYERS
    --num_heads NUM_HEADS
    --num_segments NUM_SEGMENTS
    --hidden_dim HIDDEN_DIM
    --ffn_dim FFN_DIM
    --dropout DROPOUT

TODO

  • Finish build_iter and make_instance logic on large dataset
  • Apply WordPiece tokenization
  • Add Fine-tuning stage

References

About

(Unofficial) PyTorch Implementation of BERT [WIP]

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages