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
df6a855e
Unverified
Commit
df6a855e
authored
Oct 03, 2023
by
Patrick von Platen
Committed by
GitHub
Oct 03, 2023
Browse files
[RFC, Logging] Change warning to info (#26545)
[Logging] Change warning to info
parent
cf345d5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+1
-1
No files found.
src/transformers/modeling_utils.py
View file @
df6a855e
...
@@ -1614,7 +1614,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
...
@@ -1614,7 +1614,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
new_num_tokens
=
old_embeddings
.
weight
.
shape
[
0
]
new_num_tokens
=
old_embeddings
.
weight
.
shape
[
0
]
new_num_tokens
=
((
new_num_tokens
+
pad_to_multiple_of
-
1
)
//
pad_to_multiple_of
)
*
pad_to_multiple_of
new_num_tokens
=
((
new_num_tokens
+
pad_to_multiple_of
-
1
)
//
pad_to_multiple_of
)
*
pad_to_multiple_of
else
:
else
:
logger
.
warning
(
logger
.
info
(
"You are resizing the embedding layer without providing a `pad_to_multiple_of` parameter. This means that the new embedding"
"You are resizing the embedding layer without providing a `pad_to_multiple_of` parameter. This means that the new embedding"
f
" dimension will be
{
new_num_tokens
}
. This might induce some performance reduction as *Tensor Cores* will not be available."
f
" dimension will be
{
new_num_tokens
}
. This might induce some performance reduction as *Tensor Cores* will not be available."
" For more details about this, or help on choosing the correct value for resizing, refer to this guide:"
" For more details about this, or help on choosing the correct value for resizing, refer to this guide:"
...
...
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