Pre-training toolkit for language understanding tasks
Top 39.0% on sourcepulse
This repository provides a TensorFlow implementation inspired by BERT and the Transformer architecture, focusing on pre-training and fine-tuning strategies for Natural Language Understanding (NLU) tasks. It aims to simplify the adoption of these powerful techniques, particularly by demonstrating that pre-training with a Masked Language Model (MLM) can significantly boost performance even when using simpler backbone architectures like TextCNN, and on smaller datasets.
How It Works
The core idea is to leverage the pre-train and fine-tune paradigm, which is presented as model- and task-independent. The implementation includes a Masked Language Model (MLM) pre-training task, where words are masked and the model learns to reconstruct them from context. This is followed by a fine-tuning stage for specific downstream tasks. A key differentiator is the successful application of this pre-training strategy to a TextCNN backbone, showing substantial performance gains and faster convergence compared to training from scratch.
Quick Start & Requirements
python train_bert_lm.py
python train_bert_fine_tuning.py
Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
6 years ago
Inactive