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
9eb3a410
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "dd288303273a96ebe38346d048b2900bbd747989"
Unverified
Commit
9eb3a410
authored
Oct 30, 2020
by
Sylvain Gugger
Committed by
GitHub
Oct 30, 2020
Browse files
Remove deprecated arguments from new run_clm (#8197)
parent
00112c35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/language-modeling/run_clm.py
examples/language-modeling/run_clm.py
+4
-4
No files found.
examples/language-modeling/run_clm.py
View file @
9eb3a410
...
@@ -259,14 +259,14 @@ def main():
...
@@ -259,14 +259,14 @@ def main():
)
)
if
data_args
.
block_size
<=
0
:
if
data_args
.
block_size
<=
0
:
block_size
=
tokenizer
.
max_len
block_size
=
tokenizer
.
model_
max_len
gth
else
:
else
:
if
data_args
.
block_size
>
tokenizer
.
max_len
:
if
data_args
.
block_size
>
tokenizer
.
model_
max_len
gth
:
logger
.
warn
(
logger
.
warn
(
f
"The block_size passed (
{
data_args
.
block_size
}
) is larger than the maximum length for the model"
f
"The block_size passed (
{
data_args
.
block_size
}
) is larger than the maximum length for the model"
f
"(
{
tokenizer
.
max_len
}
). Using block_size=
{
tokenizer
.
max_len
}
."
f
"(
{
tokenizer
.
model_
max_len
gth
}
). Using block_size=
{
tokenizer
.
model_
max_len
gth
}
."
)
)
block_size
=
min
(
data_args
.
block_size
,
tokenizer
.
max_len
)
block_size
=
min
(
data_args
.
block_size
,
tokenizer
.
model_
max_len
gth
)
# Main data processing function that will concatenate all texts from our dataset and generate chunks of block_size.
# Main data processing function that will concatenate all texts from our dataset and generate chunks of block_size.
def
group_texts
(
examples
):
def
group_texts
(
examples
):
...
...
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