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
4e1dee0e
Unverified
Commit
4e1dee0e
authored
Aug 17, 2023
by
Marc Sun
Committed by
GitHub
Aug 17, 2023
Browse files
Revert "change version (#25387)" (#25573)
This reverts commit
3a05e010
.
parent
d4c0aa14
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+2
-2
src/transformers/trainer.py
src/transformers/trainer.py
+1
-1
No files found.
src/transformers/modeling_utils.py
View file @
4e1dee0e
...
...
@@ -2904,10 +2904,10 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
model
=
replace_with_bnb_linear
(
model
,
modules_to_not_convert
=
modules_to_not_convert
,
quantization_config
=
quantization_config
)
# training in 8-bit is only available in 0.37.0+
but a major bug in 8-bit optimizers was fixed in 0.41.1
# training in 8-bit is only available in 0.37.0+
model
.
_is_quantized_training_enabled
=
version
.
parse
(
importlib
.
metadata
.
version
(
"bitsandbytes"
)
)
>=
version
.
parse
(
"0.
41.1
"
)
)
>=
version
.
parse
(
"0.
37.0
"
)
model
.
config
.
quantization_config
=
quantization_config
model
.
is_8bit_serializable
=
is_8bit_serializable
...
...
src/transformers/trainer.py
View file @
4e1dee0e
...
...
@@ -404,7 +404,7 @@ class Trainer:
else
:
raise
ValueError
(
"The model you want to train is loaded in 8-bit precision. if you want to fine-tune an 8-bit"
" model, please make sure that you have installed `bitsandbytes>=0.
41.1
`. "
" model, please make sure that you have installed `bitsandbytes>=0.
37.0
`. "
)
# Setup Sharded DDP training
...
...
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