From aa51411d68feb5454718c8fa3bee61c28f4e7900 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Thu, 3 Sep 2020 15:07:06 -0700 Subject: [PATCH 1/3] correct bool types fix docstring s/int/bool/ --- src/transformers/configuration_bart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformers/configuration_bart.py b/src/transformers/configuration_bart.py index 3a28dd9e3726..f2fd849ae0dd 100644 --- a/src/transformers/configuration_bart.py +++ b/src/transformers/configuration_bart.py @@ -65,7 +65,7 @@ Typically set this to something large just in case (e.g., 512 or 1024 or 2048). init_std (:obj:`float`, optional, defaults to 0.02): The standard deviation of the truncated_normal_initializer for initializing all weight matrices. - add_bias_logits (:obj:`int`, optional, defaults to False): + add_bias_logits (:obj:`bool`, optional, defaults to False): True for marian only. normalize_before (:obj:`bool`, optional, defaults to False): Call layernorm before attention ops. True for pegasus, mbart. False for bart. FIXME: marian? @@ -91,7 +91,7 @@ How many extra learned positional embeddings to use. Should be pad_token_id+1 for bart. num_labels: (:obj:`int`, optional, defaults to 2): for SequenceClassification - is_encoder_decoder (:obj:`int`, optional, defaults to True): + is_encoder_decoder (:obj:`bool`, optional, defaults to True): True force_bos_token_to_be_generated (:obj:`bool`, `optional`, defaults to :obj:`False`): Whether or not to force BOS token to be generated at step 1 (after ``decoder_start_token_id``), only true for `bart-large-cnn`. From 176173103c075ffbc8910730d6aca21f31fb434e Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Thu, 3 Sep 2020 15:09:52 -0700 Subject: [PATCH 2/3] fix description --- src/transformers/configuration_bart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/configuration_bart.py b/src/transformers/configuration_bart.py index f2fd849ae0dd..fff93e691527 100644 --- a/src/transformers/configuration_bart.py +++ b/src/transformers/configuration_bart.py @@ -92,7 +92,7 @@ num_labels: (:obj:`int`, optional, defaults to 2): for SequenceClassification is_encoder_decoder (:obj:`bool`, optional, defaults to True): - True + Whether this is an encoder/decoder model force_bos_token_to_be_generated (:obj:`bool`, `optional`, defaults to :obj:`False`): Whether or not to force BOS token to be generated at step 1 (after ``decoder_start_token_id``), only true for `bart-large-cnn`. From 1c08fdbe12abb98e2886d977d8f95077ca04aa73 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Thu, 3 Sep 2020 15:18:37 -0700 Subject: [PATCH 3/3] fix num_labels to match reality --- src/transformers/configuration_bart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/configuration_bart.py b/src/transformers/configuration_bart.py index fff93e691527..f36f877a29eb 100644 --- a/src/transformers/configuration_bart.py +++ b/src/transformers/configuration_bart.py @@ -89,7 +89,7 @@ Google "layerdrop arxiv", as its not explainable in one line. extra_pos_embeddings: (:obj:`int`, optional, defaults to 2): How many extra learned positional embeddings to use. Should be pad_token_id+1 for bart. - num_labels: (:obj:`int`, optional, defaults to 2): + num_labels: (:obj:`int`, optional, defaults to 3): for SequenceClassification is_encoder_decoder (:obj:`bool`, optional, defaults to True): Whether this is an encoder/decoder model