Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
1562c04e
Unverified
Commit
1562c04e
authored
Jun 22, 2021
by
Sylvain Gugger
Committed by
GitHub
Jun 22, 2021
Browse files
FlaxBartPretrainedModel -> FlaxBartPreTrainedModel (#12313)
parent
ebe54135
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/transformers/models/bart/modeling_flax_bart.py
src/transformers/models/bart/modeling_flax_bart.py
+5
-5
No files found.
src/transformers/models/bart/modeling_flax_bart.py
View file @
1562c04e
...
@@ -911,7 +911,7 @@ class FlaxBartModule(nn.Module):
...
@@ -911,7 +911,7 @@ class FlaxBartModule(nn.Module):
)
)
class
FlaxBartPre
t
rainedModel
(
FlaxPreTrainedModel
):
class
FlaxBartPre
T
rainedModel
(
FlaxPreTrainedModel
):
config_class
=
BartConfig
config_class
=
BartConfig
base_model_prefix
:
str
=
"model"
base_model_prefix
:
str
=
"model"
module_class
:
nn
.
Module
=
None
module_class
:
nn
.
Module
=
None
...
@@ -1232,7 +1232,7 @@ class FlaxBartPretrainedModel(FlaxPreTrainedModel):
...
@@ -1232,7 +1232,7 @@ class FlaxBartPretrainedModel(FlaxPreTrainedModel):
"The bare Bart Model transformer outputting raw hidden-states without any specific head on top."
,
"The bare Bart Model transformer outputting raw hidden-states without any specific head on top."
,
BART_START_DOCSTRING
,
BART_START_DOCSTRING
,
)
)
class
FlaxBartModel
(
FlaxBartPre
t
rainedModel
):
class
FlaxBartModel
(
FlaxBartPre
T
rainedModel
):
config
:
BartConfig
config
:
BartConfig
dtype
:
jnp
.
dtype
=
jnp
.
float32
# the dtype of the computation
dtype
:
jnp
.
dtype
=
jnp
.
float32
# the dtype of the computation
module_class
=
FlaxBartModule
module_class
=
FlaxBartModule
...
@@ -1318,7 +1318,7 @@ class FlaxBartForConditionalGenerationModule(nn.Module):
...
@@ -1318,7 +1318,7 @@ class FlaxBartForConditionalGenerationModule(nn.Module):
@
add_start_docstrings
(
@
add_start_docstrings
(
"The BART Model with a language modeling head. Can be used for summarization."
,
BART_START_DOCSTRING
"The BART Model with a language modeling head. Can be used for summarization."
,
BART_START_DOCSTRING
)
)
class
FlaxBartForConditionalGeneration
(
FlaxBartPre
t
rainedModel
):
class
FlaxBartForConditionalGeneration
(
FlaxBartPre
T
rainedModel
):
module_class
=
FlaxBartForConditionalGenerationModule
module_class
=
FlaxBartForConditionalGenerationModule
dtype
:
jnp
.
dtype
=
jnp
.
float32
dtype
:
jnp
.
dtype
=
jnp
.
float32
...
@@ -1623,7 +1623,7 @@ class FlaxBartForSequenceClassificationModule(nn.Module):
...
@@ -1623,7 +1623,7 @@ class FlaxBartForSequenceClassificationModule(nn.Module):
"""
,
"""
,
BART_START_DOCSTRING
,
BART_START_DOCSTRING
,
)
)
class
FlaxBartForSequenceClassification
(
FlaxBartPre
t
rainedModel
):
class
FlaxBartForSequenceClassification
(
FlaxBartPre
T
rainedModel
):
module_class
=
FlaxBartForSequenceClassificationModule
module_class
=
FlaxBartForSequenceClassificationModule
dtype
=
jnp
.
float32
dtype
=
jnp
.
float32
...
@@ -1710,7 +1710,7 @@ class FlaxBartForQuestionAnsweringModule(nn.Module):
...
@@ -1710,7 +1710,7 @@ class FlaxBartForQuestionAnsweringModule(nn.Module):
"""
,
"""
,
BART_START_DOCSTRING
,
BART_START_DOCSTRING
,
)
)
class
FlaxBartForQuestionAnswering
(
FlaxBartPre
t
rainedModel
):
class
FlaxBartForQuestionAnswering
(
FlaxBartPre
T
rainedModel
):
module_class
=
FlaxBartForQuestionAnsweringModule
module_class
=
FlaxBartForQuestionAnsweringModule
dtype
=
jnp
.
float32
dtype
=
jnp
.
float32
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment