__init__.py 2.03 KB
Newer Older
thomwolf's avatar
thomwolf committed
1
__version__ = "0.7.0"
thomwolf's avatar
thomwolf committed
2
from .tokenization_bert import BertTokenizer, BasicTokenizer, WordpieceTokenizer
thomwolf's avatar
thomwolf committed
3
from .tokenization_openai import OpenAIGPTTokenizer
4
from .tokenization_transfo_xl import (TransfoXLTokenizer, TransfoXLCorpus)
thomwolf's avatar
thomwolf committed
5
from .tokenization_gpt2 import GPT2Tokenizer
6
from .tokenization_xlnet import XLNetTokenizer, SPIECE_UNDERLINE
thomwolf's avatar
thomwolf committed
7
from .tokenization_xlm import XLMTokenizer
8
from .tokenization_utils import (PreTrainedTokenizer, clean_up_tokenization)
9

thomwolf's avatar
thomwolf committed
10
from .modeling_bert import (BertConfig, BertModel, BertForPreTraining,
thomwolf's avatar
thomwolf committed
11
                       BertForMaskedLM, BertForNextSentencePrediction,
12
                       BertForSequenceClassification, BertForMultipleChoice,
thomwolf's avatar
thomwolf committed
13
14
                       BertForTokenClassification, BertForQuestionAnswering,
                       load_tf_weights_in_bert)
thomwolf's avatar
thomwolf committed
15
from .modeling_openai import (OpenAIGPTConfig, OpenAIGPTModel,
thomwolf's avatar
thomwolf committed
16
17
                              OpenAIGPTLMHeadModel, OpenAIGPTDoubleHeadsModel,
                              load_tf_weights_in_openai_gpt)
thomwolf's avatar
thomwolf committed
18
from .modeling_transfo_xl import (TransfoXLConfig, TransfoXLModel, TransfoXLLMHeadModel,
thomwolf's avatar
thomwolf committed
19
                                  load_tf_weights_in_transfo_xl)
thomwolf's avatar
thomwolf committed
20
from .modeling_gpt2 import (GPT2Config, GPT2Model,
thomwolf's avatar
thomwolf committed
21
                            GPT2LMHeadModel, GPT2DoubleHeadsModel,
thomwolf's avatar
thomwolf committed
22
                            load_tf_weights_in_gpt2)
23
from .modeling_xlnet import (XLNetConfig,
thomwolf's avatar
thomwolf committed
24
                             XLNetPreTrainedModel, XLNetModel, XLNetLMHeadModel,
25
                             XLNetForSequenceClassification, XLNetForQuestionAnswering,
thomwolf's avatar
thomwolf committed
26
                             load_tf_weights_in_xlnet)
thomwolf's avatar
thomwolf committed
27
28
29
from .modeling_xlm import (XLMConfig, XLMModel,
                           XLMWithLMHeadModel, XLMForSequenceClassification,
                           XLMForQuestionAnswering)
30
31
from .modeling_utils import (WEIGHTS_NAME, CONFIG_NAME, TF_WEIGHTS_NAME,
                          PretrainedConfig, PreTrainedModel, prune_layer, Conv1D)
32

thomwolf's avatar
thomwolf committed
33
from .optimization import BertAdam
thomwolf's avatar
thomwolf committed
34
from .optimization_openai import OpenAIAdam
35

36
from .file_utils import (PYTORCH_PRETRAINED_BERT_CACHE, cached_path)