"vscode:/vscode.git/clone" did not exist on "4d3ea67af79918a0f87cf9d1307f8518ee1e4cbc"
__init__.py 1.75 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
from .tokenization_xlnet import XLNetTokenizer, SPIECE_UNDERLINE
7

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

thomwolf's avatar
thomwolf committed
26
from .optimization import BertAdam
thomwolf's avatar
thomwolf committed
27
from .optimization_openai import OpenAIAdam
28

29
30
from .file_utils import (PYTORCH_PRETRAINED_BERT_CACHE, cached_path)

31
32
from .model_utils import (WEIGHTS_NAME, CONFIG_NAME, TF_WEIGHTS_NAME,
                          PretrainedConfig, PreTrainedModel, prune_layer, Conv1D)