Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onnx issues #155

Open
konioy opened this issue Dec 6, 2024 · 0 comments
Open

onnx issues #155

konioy opened this issue Dec 6, 2024 · 0 comments

Comments

@konioy
Copy link

konioy commented Dec 6, 2024

How do I convert to ONNX? I'm encountering errors when trying to convert to ONNX.

RuntimeError: The serialized model is larger than the 2GiB limit imposed by the protobuf library. Therefore the output file must be a file path, so that the ONNX external data can be written to the same directory. Please specify the output file name.

my code:

    torch.onnx.export(model,text,
                      "./llm2vec.onnx",
                      export_params=True,
                      opset_version=15,
                      input_names=("texts", ),
                      output_names=("text_features", ),
                      dynamic_axes=None,
                      large_model=True,
                      use_external_data_format=True,
                      verbose=True,
                      size_threshold=128 * 1024 * 1024)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant