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
438d06c9
Unverified
Commit
438d06c9
authored
Aug 06, 2024
by
Francisco Kurucz
Committed by
GitHub
Aug 06, 2024
Browse files
Fix get large model config for Switch Transformer encoder only tester (#32438)
parent
fb66ef81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/models/switch_transformers/test_modeling_switch_transformers.py
.../switch_transformers/test_modeling_switch_transformers.py
+1
-1
No files found.
tests/models/switch_transformers/test_modeling_switch_transformers.py
View file @
438d06c9
...
@@ -770,7 +770,7 @@ class SwitchTransformersEncoderOnlyModelTester:
...
@@ -770,7 +770,7 @@ class SwitchTransformersEncoderOnlyModelTester:
self
.
is_training
=
is_training
self
.
is_training
=
is_training
def
get_large_model_config
(
self
):
def
get_large_model_config
(
self
):
return
SwitchTransformersConfig
.
from_pretrained
(
"switch
_
base
_
8"
)
return
SwitchTransformersConfig
.
from_pretrained
(
"
google/
switch
-
base
-
8"
)
def
prepare_config_and_inputs
(
self
):
def
prepare_config_and_inputs
(
self
):
input_ids
=
ids_tensor
([
self
.
batch_size
,
self
.
encoder_seq_length
],
self
.
vocab_size
)
input_ids
=
ids_tensor
([
self
.
batch_size
,
self
.
encoder_seq_length
],
self
.
vocab_size
)
...
...
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