Skip to content

The size of output model is very large when exporting to ONNX format. #98

@hibayesian

Description

@hibayesian

I am exporting Embedder to ONNX format. But the size of output model is so large(~7G) that I doubt there are many duplications of weights.
How to export Embedder correctly?

Code snippet:

model = Embedder(elmo_model_dir).get_model()[0]

torch.onnx.export(model, (w, c, masks), 'output_model.onnx', export_params=True, opset_version=12, do_constant_folding=True, input_names=['w', 'c', 'masks'], output_names=['logits'], use_external_data_format=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions