Skip to content

Commit

Permalink
Import the model.data from a single source variable in sparsezoo (#…
Browse files Browse the repository at this point in the history
…1584)

* Update export.py

* quality

---------

Co-authored-by: Benjamin Fineran <bfineran@users.noreply.github.com>
  • Loading branch information
dbogunowicz and bfineran committed Jun 9, 2023
1 parent 07e1459 commit 6c33599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sparseml/transformers/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
from sparseml.pytorch.utils import export_onnx
from sparseml.transformers.sparsification import Trainer
from sparseml.transformers.utils import SparseAutoModel
from sparsezoo.utils.onnx import EXTERNAL_ONNX_DATA_NAME


__all__ = ["export_transformer_to_onnx", "load_task_model"]
Expand All @@ -98,11 +99,10 @@
"tokenizer_config.json",
"config.json",
]
EXTERNAL_ONNX_DATA_NAME = ["model.data"]
OPT_TOKENIZER_FILES = ["special_tokens_map.json", "vocab.json", "merges.txt"]

OPTIONAL_DEPLOYMENT_FILES: List[str] = ["tokenizer.json"]
OPTIONAL_DEPLOYMENT_FILES.extend(EXTERNAL_ONNX_DATA_NAME)
OPTIONAL_DEPLOYMENT_FILES.append(EXTERNAL_ONNX_DATA_NAME)
OPTIONAL_DEPLOYMENT_FILES.extend(OPT_TOKENIZER_FILES)


Expand Down

0 comments on commit 6c33599

Please sign in to comment.