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
3a05e010
Unverified
Commit
3a05e010
authored
Aug 08, 2023
by
Marc Sun
Committed by
GitHub
Aug 08, 2023
Browse files
change version (#25387)
parent
e3490104
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 @
3a05e010
...
@@ -2786,10 +2786,10 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
...
@@ -2786,10 +2786,10 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
model
=
replace_with_bnb_linear
(
model
=
replace_with_bnb_linear
(
model
,
modules_to_not_convert
=
modules_to_not_convert
,
quantization_config
=
quantization_config
model
,
modules_to_not_convert
=
modules_to_not_convert
,
quantization_config
=
quantization_config
)
)
# training in 8-bit is only available in 0.37.0+
# 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
model
.
_is_quantized_training_enabled
=
version
.
parse
(
model
.
_is_quantized_training_enabled
=
version
.
parse
(
importlib
.
metadata
.
version
(
"bitsandbytes"
)
importlib
.
metadata
.
version
(
"bitsandbytes"
)
)
>=
version
.
parse
(
"0.
37.0
"
)
)
>=
version
.
parse
(
"0.
41.1
"
)
model
.
config
.
quantization_config
=
quantization_config
model
.
config
.
quantization_config
=
quantization_config
model
.
is_8bit_serializable
=
is_8bit_serializable
model
.
is_8bit_serializable
=
is_8bit_serializable
...
...
src/transformers/trainer.py
View file @
3a05e010
...
@@ -404,7 +404,7 @@ class Trainer:
...
@@ -404,7 +404,7 @@ class Trainer:
else
:
else
:
raise
ValueError
(
raise
ValueError
(
"The model you want to train is loaded in 8-bit precision. if you want to fine-tune an 8-bit"
"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.
37.0
`. "
" model, please make sure that you have installed `bitsandbytes>=0.
41.1
`. "
)
)
# Setup Sharded DDP training
# 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