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
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
Show 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():
)
if
data_args
.
block_size
<=
0
:
block_size
=
tokenizer
.
max_len
block_size
=
tokenizer
.
model_
max_len
gth
else
:
if
data_args
.
block_size
>
tokenizer
.
max_len
:
if
data_args
.
block_size
>
tokenizer
.
model_
max_len
gth
:
logger
.
warn
(
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.
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