Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
da02b403
Unverified
Commit
da02b403
authored
Aug 30, 2022
by
Ekagra Ranjan
Committed by
GitHub
Aug 30, 2022
Browse files
Add docstring for BartForCausalLM (#18795)
* add docstring for BartForCausalLM * doc-style fic
parent
8c4a1149
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/transformers/models/bart/modeling_bart.py
src/transformers/models/bart/modeling_bart.py
+6
-0
No files found.
src/transformers/models/bart/modeling_bart.py
View file @
da02b403
...
@@ -1702,6 +1702,12 @@ class BartDecoderWrapper(BartPretrainedModel):
...
@@ -1702,6 +1702,12 @@ class BartDecoderWrapper(BartPretrainedModel):
return
self
.
decoder
(
*
args
,
**
kwargs
)
return
self
.
decoder
(
*
args
,
**
kwargs
)
@
add_start_docstrings
(
"""
BART decoder with with a language modeling head on top (linear layer with weights tied to the input embeddings).
"""
,
BART_START_DOCSTRING
,
)
class
BartForCausalLM
(
BartPretrainedModel
):
class
BartForCausalLM
(
BartPretrainedModel
):
def
__init__
(
self
,
config
):
def
__init__
(
self
,
config
):
config
=
copy
.
deepcopy
(
config
)
config
=
copy
.
deepcopy
(
config
)
...
...
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