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
f6301b9a
Unverified
Commit
f6301b9a
authored
Sep 06, 2023
by
Lysandre Debut
Committed by
GitHub
Sep 06, 2023
Browse files
Falcon: fix revision propagation (#26006)
* Fix revision propagation * Cleaner
parent
f6295c6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
src/transformers/models/auto/configuration_auto.py
src/transformers/models/auto/configuration_auto.py
+3
-5
No files found.
src/transformers/models/auto/configuration_auto.py
View file @
f6301b9a
...
@@ -1016,13 +1016,11 @@ class AutoConfig:
...
@@ -1016,13 +1016,11 @@ class AutoConfig:
kwargs
[
"name_or_path"
]
=
pretrained_model_name_or_path
kwargs
[
"name_or_path"
]
=
pretrained_model_name_or_path
trust_remote_code
=
kwargs
.
pop
(
"trust_remote_code"
,
None
)
trust_remote_code
=
kwargs
.
pop
(
"trust_remote_code"
,
None
)
code_revision
=
kwargs
.
pop
(
"code_revision"
,
None
)
code_revision
=
kwargs
.
pop
(
"code_revision"
,
None
)
revision
=
kwargs
.
pop
(
"revision"
,
None
)
revision
=
sanitize_code_revision
(
pretrained_model_name_or_path
,
revision
,
trust_remote_code
)
revision
=
kwargs
.
pop
(
"revision"
,
None
)
kwargs
[
"revision"
]
=
sanitize_code_revision
(
pretrained_model_name_or_path
,
revision
,
trust_remote_code
)
config_dict
,
unused_kwargs
=
PretrainedConfig
.
get_config_dict
(
config_dict
,
unused_kwargs
=
PretrainedConfig
.
get_config_dict
(
pretrained_model_name_or_path
,
**
kwargs
)
pretrained_model_name_or_path
,
revision
=
revision
,
**
kwargs
)
has_remote_code
=
"auto_map"
in
config_dict
and
"AutoConfig"
in
config_dict
[
"auto_map"
]
has_remote_code
=
"auto_map"
in
config_dict
and
"AutoConfig"
in
config_dict
[
"auto_map"
]
has_local_code
=
"model_type"
in
config_dict
and
config_dict
[
"model_type"
]
in
CONFIG_MAPPING
has_local_code
=
"model_type"
in
config_dict
and
config_dict
[
"model_type"
]
in
CONFIG_MAPPING
trust_remote_code
=
resolve_trust_remote_code
(
trust_remote_code
=
resolve_trust_remote_code
(
...
...
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