README.md 2.69 KB
Newer Older
1
2
3
# TF-NLP Model Garden

⚠️ Disclaimer: All datasets hyperlinked from this page are not owned or
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
4
5
6
distributed by Google. The dataset is made available by third parties. Please
review the terms and conditions made available by the third parties before using
the data.
Hongkun Yu's avatar
Hongkun Yu committed
7

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
8
This codebase provides a Natural Language Processing modeling toolkit written in
9
10
11
[TF2](https://www.tensorflow.org/guide/effective_tf2). It allows researchers and
developers to reproduce state-of-the-art model results and train custom models
to experiment new research ideas.
Hongkun Yu's avatar
Hongkun Yu committed
12

13
## Features
Hongkun Yu's avatar
Hongkun Yu committed
14

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
15
16
17
18
19
*   Reusable and modularized modeling building blocks
*   State-of-the-art reproducible
*   Easy to customize and extend
*   End-to-end training
*   Distributed trainable on both GPUs and TPUs
20

21
22
23
24
25
## Major components

### Libraries

We provide modeling library to allow users to train custom models for new
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
26
research ideas. Detailed instructions can be found in READMEs in each folder.
27

28
29
*   [modeling/](modeling): modeling library that provides building blocks
    (e.g.,Layers, Networks, and Models) that can be assembled into
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
30
    transformer-based architectures.
31
32
*   [data/](data): binaries and utils for input preprocessing, tokenization,
    etc.
33
34
35
36
37

### State-of-the-Art models and examples

We provide SoTA model implementations, pre-trained models, training and
evaluation examples, and command lines. Detail instructions can be found in the
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
38
39
READMEs for specific papers. Below are some papers implemented in the repository
and more NLP projects can be found in the
Hongkun Yu's avatar
Hongkun Yu committed
40
41
[`projects`](https://github.com/tensorflow/models/tree/master/official/projects)
folder:
42

A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
43
44
45
1.  [BERT](MODEL_GARDEN.md#available-model-configs): [BERT: Pre-training of Deep
    Bidirectional Transformers for Language
    Understanding](https://arxiv.org/abs/1810.04805) by Devlin et al., 2018
46
2.  [ALBERT](MODEL_GARDEN.md#available-model-configs):
47
48
    [A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942)
    by Lan et al., 2019
Hongkun Yu's avatar
Hongkun Yu committed
49
3.  [XLNet](MODEL_GARDEN.md):
50
51
    [XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237)
    by Yang et al., 2019
Hongkun Yu's avatar
Hongkun Yu committed
52
4.  [Transformer for translation](MODEL_GARDEN.md#available-model-configs):
53
54
55
56
57
58
    [Attention Is All You Need](https://arxiv.org/abs/1706.03762) by Vaswani et
    al., 2017

### Common Training Driver

We provide a single common driver [train.py](train.py) to train above SoTA
A. Unique TensorFlower's avatar
A. Unique TensorFlower committed
59
60
models on popular tasks. Please see [docs/train.md](docs/train.md) for more
details.
61
62
63
64
65
66

### Pre-trained models with checkpoints and TF-Hub

We provide a large collection of baselines and checkpoints for NLP pre-trained
models. Please see [docs/pretrained_models.md](docs/pretrained_models.md) for
more details.