Commit d6a677b1 authored by Genta Indra Winata's avatar Genta Indra Winata Committed by Lysandre Debut
Browse files

Fix typograpical errors (#2438)

parent 27c1b656
...@@ -355,7 +355,7 @@ class AlbertTransformer(nn.Module): ...@@ -355,7 +355,7 @@ class AlbertTransformer(nn.Module):
class AlbertPreTrainedModel(PreTrainedModel): class AlbertPreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = AlbertConfig config_class = AlbertConfig
......
...@@ -521,7 +521,7 @@ class BertPreTrainingHeads(nn.Module): ...@@ -521,7 +521,7 @@ class BertPreTrainingHeads(nn.Module):
class BertPreTrainedModel(PreTrainedModel): class BertPreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = BertConfig config_class = BertConfig
......
...@@ -163,7 +163,7 @@ class EncoderLayer(torch.nn.Module): ...@@ -163,7 +163,7 @@ class EncoderLayer(torch.nn.Module):
class CTRLPreTrainedModel(PreTrainedModel): class CTRLPreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = CTRLConfig config_class = CTRLConfig
......
...@@ -240,7 +240,7 @@ class Block(nn.Module): ...@@ -240,7 +240,7 @@ class Block(nn.Module):
class GPT2PreTrainedModel(PreTrainedModel): class GPT2PreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = GPT2Config config_class = GPT2Config
......
...@@ -257,7 +257,7 @@ class Block(nn.Module): ...@@ -257,7 +257,7 @@ class Block(nn.Module):
class OpenAIGPTPreTrainedModel(PreTrainedModel): class OpenAIGPTPreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = OpenAIGPTConfig config_class = OpenAIGPTConfig
......
...@@ -446,7 +446,7 @@ class T5Block(nn.Module): ...@@ -446,7 +446,7 @@ class T5Block(nn.Module):
class T5PreTrainedModel(PreTrainedModel): class T5PreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = T5Config config_class = T5Config
......
...@@ -435,7 +435,7 @@ class TFAlbertTransformer(tf.keras.layers.Layer): ...@@ -435,7 +435,7 @@ class TFAlbertTransformer(tf.keras.layers.Layer):
class TFAlbertPreTrainedModel(TFPreTrainedModel): class TFAlbertPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = AlbertConfig config_class = AlbertConfig
......
...@@ -576,7 +576,7 @@ class TFBertMainLayer(tf.keras.layers.Layer): ...@@ -576,7 +576,7 @@ class TFBertMainLayer(tf.keras.layers.Layer):
class TFBertPreTrainedModel(TFPreTrainedModel): class TFBertPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = BertConfig config_class = BertConfig
......
...@@ -344,7 +344,7 @@ class TFCTRLMainLayer(tf.keras.layers.Layer): ...@@ -344,7 +344,7 @@ class TFCTRLMainLayer(tf.keras.layers.Layer):
class TFCTRLPreTrainedModel(TFPreTrainedModel): class TFCTRLPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = CTRLConfig config_class = CTRLConfig
......
...@@ -360,7 +360,7 @@ class TFGPT2MainLayer(tf.keras.layers.Layer): ...@@ -360,7 +360,7 @@ class TFGPT2MainLayer(tf.keras.layers.Layer):
class TFGPT2PreTrainedModel(TFPreTrainedModel): class TFGPT2PreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = GPT2Config config_class = GPT2Config
......
...@@ -346,7 +346,7 @@ class TFOpenAIGPTMainLayer(tf.keras.layers.Layer): ...@@ -346,7 +346,7 @@ class TFOpenAIGPTMainLayer(tf.keras.layers.Layer):
class TFOpenAIGPTPreTrainedModel(TFPreTrainedModel): class TFOpenAIGPTPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = OpenAIGPTConfig config_class = OpenAIGPTConfig
......
...@@ -98,7 +98,7 @@ class TFRobertaMainLayer(TFBertMainLayer): ...@@ -98,7 +98,7 @@ class TFRobertaMainLayer(TFBertMainLayer):
class TFRobertaPreTrainedModel(TFPreTrainedModel): class TFRobertaPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = RobertaConfig config_class = RobertaConfig
......
...@@ -514,7 +514,7 @@ class TFT5MainLayer(tf.keras.layers.Layer): ...@@ -514,7 +514,7 @@ class TFT5MainLayer(tf.keras.layers.Layer):
#################################################### ####################################################
class TFT5PreTrainedModel(TFPreTrainedModel): class TFT5PreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = T5Config config_class = T5Config
......
...@@ -622,7 +622,7 @@ class TFTransfoXLMainLayer(tf.keras.layers.Layer): ...@@ -622,7 +622,7 @@ class TFTransfoXLMainLayer(tf.keras.layers.Layer):
class TFTransfoXLPreTrainedModel(TFPreTrainedModel): class TFTransfoXLPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = TransfoXLConfig config_class = TransfoXLConfig
......
...@@ -465,7 +465,7 @@ class TFXLMMainLayer(tf.keras.layers.Layer): ...@@ -465,7 +465,7 @@ class TFXLMMainLayer(tf.keras.layers.Layer):
class TFXLMPreTrainedModel(TFPreTrainedModel): class TFXLMPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = XLMConfig config_class = XLMConfig
......
...@@ -686,7 +686,7 @@ class TFXLNetMainLayer(tf.keras.layers.Layer): ...@@ -686,7 +686,7 @@ class TFXLNetMainLayer(tf.keras.layers.Layer):
class TFXLNetPreTrainedModel(TFPreTrainedModel): class TFXLNetPreTrainedModel(TFPreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = XLNetConfig config_class = XLNetConfig
......
...@@ -449,7 +449,7 @@ class AdaptiveEmbedding(nn.Module): ...@@ -449,7 +449,7 @@ class AdaptiveEmbedding(nn.Module):
class TransfoXLPreTrainedModel(PreTrainedModel): class TransfoXLPreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = TransfoXLConfig config_class = TransfoXLConfig
......
...@@ -213,7 +213,7 @@ class TransformerFFN(nn.Module): ...@@ -213,7 +213,7 @@ class TransformerFFN(nn.Module):
class XLMPreTrainedModel(PreTrainedModel): class XLMPreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = XLMConfig config_class = XLMConfig
......
...@@ -468,7 +468,7 @@ class XLNetLayer(nn.Module): ...@@ -468,7 +468,7 @@ class XLNetLayer(nn.Module):
class XLNetPreTrainedModel(PreTrainedModel): class XLNetPreTrainedModel(PreTrainedModel):
""" An abstract class to handle weights initialization and """ An abstract class to handle weights initialization and
a simple interface for dowloading and loading pretrained models. a simple interface for downloading and loading pretrained models.
""" """
config_class = XLNetConfig config_class = XLNetConfig
...@@ -514,7 +514,7 @@ XLNET_START_DOCSTRING = r""" The XLNet model was proposed in ...@@ -514,7 +514,7 @@ XLNET_START_DOCSTRING = r""" The XLNet model was proposed in
The specific attention pattern can be controlled at training and test time using the `perm_mask` input. The specific attention pattern can be controlled at training and test time using the `perm_mask` input.
Do to the difficulty of training a fully auto-regressive model over various factorization order, Due to the difficulty of training a fully auto-regressive model over various factorization order,
XLNet is pretrained using only a sub-set of the output tokens as target which are selected XLNet is pretrained using only a sub-set of the output tokens as target which are selected
with the `target_mapping` input. with the `target_mapping` input.
......
...@@ -39,7 +39,7 @@ TOKENIZER_CONFIG_FILE = "tokenizer_config.json" ...@@ -39,7 +39,7 @@ TOKENIZER_CONFIG_FILE = "tokenizer_config.json"
class PreTrainedTokenizer(object): class PreTrainedTokenizer(object):
""" Base class for all tokenizers. """ Base class for all tokenizers.
Handle all the shared methods for tokenization and special tokens as well as methods dowloading/caching/loading pretrained tokenizers as well as adding tokens to the vocabulary. Handle all the shared methods for tokenization and special tokens as well as methods downloading/caching/loading pretrained tokenizers as well as adding tokens to the vocabulary.
This class also contain the added tokens in a unified way on top of all tokenizers so we don't have to handle the specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece...). This class also contain the added tokens in a unified way on top of all tokenizers so we don't have to handle the specific vocabulary augmentation methods of the various underlying dictionary structures (BPE, sentencepiece...).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment