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
1bf38611
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "1670be4bdec19d5a8893f943bf78a8d9b3dc8911"
Unverified
Commit
1bf38611
authored
Aug 06, 2021
by
Lysandre Debut
Committed by
GitHub
Aug 06, 2021
Browse files
Put smaller ALBERT model (#13028)
parent
dc420b0e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/test_onnx_v2.py
tests/test_onnx_v2.py
+2
-2
No files found.
tests/test_onnx_v2.py
View file @
1bf38611
...
@@ -195,7 +195,7 @@ if is_torch_available():
...
@@ -195,7 +195,7 @@ if is_torch_available():
)
)
PYTORCH_EXPORT_DEFAULT_MODELS
=
{
PYTORCH_EXPORT_DEFAULT_MODELS
=
{
(
"ALBERT"
,
"
albert-base-v2
"
,
AlbertModel
,
AlbertConfig
,
AlbertOnnxConfig
),
(
"ALBERT"
,
"
hf-internal-testing/tiny-albert
"
,
AlbertModel
,
AlbertConfig
,
AlbertOnnxConfig
),
(
"BART"
,
"facebook/bart-base"
,
BartModel
,
BartConfig
,
BartOnnxConfig
),
(
"BART"
,
"facebook/bart-base"
,
BartModel
,
BartConfig
,
BartOnnxConfig
),
(
"BERT"
,
"bert-base-cased"
,
BertModel
,
BertConfig
,
BertOnnxConfig
),
(
"BERT"
,
"bert-base-cased"
,
BertModel
,
BertConfig
,
BertOnnxConfig
),
(
"DistilBERT"
,
"distilbert-base-cased"
,
DistilBertModel
,
DistilBertConfig
,
DistilBertOnnxConfig
),
(
"DistilBERT"
,
"distilbert-base-cased"
,
DistilBertModel
,
DistilBertConfig
,
DistilBertOnnxConfig
),
...
@@ -229,7 +229,7 @@ class OnnxExportTestCaseV2(TestCase):
...
@@ -229,7 +229,7 @@ class OnnxExportTestCaseV2(TestCase):
self
.
assertTrue
(
hasattr
(
onnx_config_class
,
"default"
))
self
.
assertTrue
(
hasattr
(
onnx_config_class
,
"default"
))
tokenizer
=
AutoTokenizer
.
from_pretrained
(
model
)
tokenizer
=
AutoTokenizer
.
from_pretrained
(
model
)
model
=
model_class
(
config_class
(
))
model
=
model_class
(
config_class
.
from_pretrained
(
model
))
onnx_config
=
onnx_config_class
.
default
(
model
.
config
)
onnx_config
=
onnx_config_class
.
default
(
model
.
config
)
with
NamedTemporaryFile
(
"w"
)
as
output
:
with
NamedTemporaryFile
(
"w"
)
as
output
:
...
...
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