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

thomwolf's avatar
thomwolf committed
7
8
from .modeling import (BertConfig, BertModel, BertForPreTraining,
                       BertForMaskedLM, BertForNextSentencePrediction,
9
                       BertForSequenceClassification, BertForMultipleChoice,
thomwolf's avatar
thomwolf committed
10
11
                       BertForTokenClassification, BertForQuestionAnswering,
                       load_tf_weights_in_bert)
thomwolf's avatar
thomwolf committed
12
from .modeling_openai import (OpenAIGPTConfig, OpenAIGPTModel,
thomwolf's avatar
thomwolf committed
13
14
                              OpenAIGPTLMHeadModel, OpenAIGPTDoubleHeadsModel,
                              load_tf_weights_in_openai_gpt)
thomwolf's avatar
thomwolf committed
15
from .modeling_transfo_xl import (TransfoXLConfig, TransfoXLModel, TransfoXLLMHeadModel,
thomwolf's avatar
thomwolf committed
16
                                  load_tf_weights_in_transfo_xl)
thomwolf's avatar
thomwolf committed
17
from .modeling_gpt2 import (GPT2Config, GPT2Model,
vanche's avatar
vanche committed
18
                            GPT2LMHeadModel, GPT2DoubleHeadsModel, GPT2MultipleChoiceHead,
thomwolf's avatar
thomwolf committed
19
                            load_tf_weights_in_gpt2)
thomwolf's avatar
thomwolf committed
20
21
22
from .modeling_xlnet import (XLNetBaseConfig, XLNetConfig, XLNetRunConfig,
                             XLNetPreTrainedModel, XLNetModel, XLNetLMHeadModel,
                             load_tf_weights_in_xlnet)
23

thomwolf's avatar
thomwolf committed
24
from .optimization import BertAdam
thomwolf's avatar
thomwolf committed
25
from .optimization_openai import OpenAIAdam
26

27
from .file_utils import PYTORCH_PRETRAINED_BERT_CACHE, cached_path, WEIGHTS_NAME, CONFIG_NAME