__init__.py 1.96 KB
Newer Older
thomwolf's avatar
thomwolf committed
1
__version__ = "0.6.2"
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

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

thomwolf's avatar
thomwolf committed
30
from .optimization import BertAdam
thomwolf's avatar
thomwolf committed
31
from .optimization_openai import OpenAIAdam
32

33
34
from .file_utils import (PYTORCH_PRETRAINED_BERT_CACHE, cached_path)

35
36
from .model_utils import (WEIGHTS_NAME, CONFIG_NAME, TF_WEIGHTS_NAME,
                          PretrainedConfig, PreTrainedModel, prune_layer, Conv1D)