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

Saving external data for > 2GB models #254

Closed
1 of 4 tasks
Tracked by #257
NouamaneTazi opened this issue Jul 1, 2022 · 0 comments · Fixed by #586
Closed
1 of 4 tasks
Tracked by #257

Saving external data for > 2GB models #254

NouamaneTazi opened this issue Jul 1, 2022 · 0 comments · Fixed by #586
Assignees
Labels
bug Something isn't working onnx Related to the ONNX export

Comments

@NouamaneTazi
Copy link
Member

NouamaneTazi commented Jul 1, 2022

Who can help?

@philschmid

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

from optimum.onnxruntime import ORTModelForCausalLM

model_ckpt = "bigscience/bloom-350m"
model = ORTModelForCausalLM.from_pretrained(model_ckpt, use_auth_token=True, from_transformers=True)
model.save_pretrained("output/") # saves only model.onnx without the rest of external data

Expected behavior

The script above should save all the following files:

model.onnx         onnx__MatMul_9335  onnx__MatMul_9561  onnx__MatMul_9815                                     transformer.h.1.mlp.dense_h_to_4h.bias
onnx__MatMul_9086  onnx__MatMul_9336  onnx__MatMul_9566  onnx__MatMul_9816                                     transformer.h.1.self_attention.query_key_value.bias
onnx__MatMul_9111  onnx__MatMul_9337  onnx__MatMul_9591  onnx__MatMul_9817                                     transformer.h.20.mlp.dense_h_to_4h.bias
onnx__MatMul_9112  onnx__MatMul_9342  onnx__MatMul_9592  onnx__MatMul_9822                                     transformer.h.20.self_attention.query_key_value.bias
onnx__MatMul_9113  onnx__MatMul_9367  onnx__MatMul_9593  onnx__MatMul_9847                                     transformer.h.21.mlp.dense_h_to_4h.bias
onnx__MatMul_9118  onnx__MatMul_9368  onnx__MatMul_9598  onnx__MatMul_9848                                     transformer.h.21.self_attention.query_key_value.bias
onnx__MatMul_9143  onnx__MatMul_9369  onnx__MatMul_9623  onnx__MatMul_9849                                     transformer.h.22.mlp.dense_h_to_4h.bias
onnx__MatMul_9144  onnx__MatMul_9374  onnx__MatMul_9624  onnx__MatMul_9850                                     transformer.h.22.self_attention.query_key_value.bias
onnx__MatMul_9145  onnx__MatMul_9399  onnx__MatMul_9625  transformer.h.0.mlp.dense_h_to_4h.bias                transformer.h.23.mlp.dense_h_to_4h.bias
onnx__MatMul_9150  onnx__MatMul_9400  onnx__MatMul_9630  transformer.h.0.self_attention.query_key_value.bias   transformer.h.23.self_attention.query_key_value.bias
onnx__MatMul_9175  onnx__MatMul_9401  onnx__MatMul_9655  transformer.h.10.mlp.dense_h_to_4h.bias               transformer.h.2.mlp.dense_h_to_4h.bias
onnx__MatMul_9176  onnx__MatMul_9406  onnx__MatMul_9656  transformer.h.10.self_attention.query_key_value.bias  transformer.h.2.self_attention.query_key_value.bias
onnx__MatMul_9177  onnx__MatMul_9431  onnx__MatMul_9657  transformer.h.11.mlp.dense_h_to_4h.bias               transformer.h.3.mlp.dense_h_to_4h.bias
onnx__MatMul_9182  onnx__MatMul_9432  onnx__MatMul_9662  transformer.h.11.self_attention.query_key_value.bias  transformer.h.3.self_attention.query_key_value.bias
onnx__MatMul_9207  onnx__MatMul_9433  onnx__MatMul_9687  transformer.h.12.mlp.dense_h_to_4h.bias               transformer.h.4.mlp.dense_h_to_4h.bias
onnx__MatMul_9208  onnx__MatMul_9438  onnx__MatMul_9688  transformer.h.12.self_attention.query_key_value.bias  transformer.h.4.self_attention.query_key_value.bias
onnx__MatMul_9209  onnx__MatMul_9463  onnx__MatMul_9689  transformer.h.13.mlp.dense_h_to_4h.bias               transformer.h.5.mlp.dense_h_to_4h.bias
onnx__MatMul_9214  onnx__MatMul_9464  onnx__MatMul_9694  transformer.h.13.self_attention.query_key_value.bias  transformer.h.5.self_attention.query_key_value.bias
onnx__MatMul_9239  onnx__MatMul_9465  onnx__MatMul_9719  transformer.h.14.mlp.dense_h_to_4h.bias               transformer.h.6.mlp.dense_h_to_4h.bias
onnx__MatMul_9240  onnx__MatMul_9470  onnx__MatMul_9720  transformer.h.14.self_attention.query_key_value.bias  transformer.h.6.self_attention.query_key_value.bias
onnx__MatMul_9241  onnx__MatMul_9495  onnx__MatMul_9721  transformer.h.15.mlp.dense_h_to_4h.bias               transformer.h.7.mlp.dense_h_to_4h.bias
onnx__MatMul_9246  onnx__MatMul_9496  onnx__MatMul_9726  transformer.h.15.self_attention.query_key_value.bias  transformer.h.7.self_attention.query_key_value.bias
onnx__MatMul_9271  onnx__MatMul_9497  onnx__MatMul_9751  transformer.h.16.mlp.dense_h_to_4h.bias               transformer.h.8.mlp.dense_h_to_4h.bias
onnx__MatMul_9272  onnx__MatMul_9502  onnx__MatMul_9752  transformer.h.16.self_attention.query_key_value.bias  transformer.h.8.self_attention.query_key_value.bias
onnx__MatMul_9273  onnx__MatMul_9527  onnx__MatMul_9753  transformer.h.17.mlp.dense_h_to_4h.bias               transformer.h.9.mlp.dense_h_to_4h.bias
onnx__MatMul_9278  onnx__MatMul_9528  onnx__MatMul_9758  transformer.h.17.self_attention.query_key_value.bias  transformer.h.9.self_attention.query_key_value.bias
onnx__MatMul_9303  onnx__MatMul_9529  onnx__MatMul_9783  transformer.h.18.mlp.dense_h_to_4h.bias               transformer.word_embeddings.weight
onnx__MatMul_9304  onnx__MatMul_9534  onnx__MatMul_9784  transformer.h.18.self_attention.query_key_value.bias
onnx__MatMul_9305  onnx__MatMul_9559  onnx__MatMul_9785  transformer.h.19.mlp.dense_h_to_4h.bias
onnx__MatMul_9310  onnx__MatMul_9560  onnx__MatMul_9790  transformer.h.19.self_attention.query_key_value.bias
@NouamaneTazi NouamaneTazi added the bug Something isn't working label Jul 1, 2022
@michaelbenayoun michaelbenayoun added the onnx Related to the ONNX export label Oct 14, 2022
@michaelbenayoun michaelbenayoun self-assigned this Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working onnx Related to the ONNX export
Projects
None yet
2 participants