Comments (3)
How do you use ByteSize()? Maybe we can implement a function which returns the result you build with it. I don't think protobuf will update its API since it is not meant to support models bigger than 2Gb.
The other option is to export the model with external weights enabled. A new API https://onnx.ai/onnx/api/model_container.html was introduced to make it easier to build such model with external weights without serialization of the weights. That would be the direction I would recommend.
from optimum.
Thank you, related to #1044 & https://github.com/microsoft/Olive/blob/697948c2a1f7fe938609e1c97060d17f255c322e/olive/passes/onnx/optimum_merging.py#L44-L49
This is a bug in ModelProto.ByteSize() on Windows only.
As a workaround, can you try: python -m optimum.exporters.onnx -m microsoft/phi-2 --library-name transformers . --no-post-process
It would be great if you can open an issue at https://github.com/onnx/onnx sharing the onnx model there, and with a small reproduction like
import onnx
model = onnx.load(model_path)
print(model.ByteSizes())
from optimum.
Thanks for the info. Just create the issue in ONNX repo.
from optimum.
Related Issues (20)
- Mixtral quantization hard-freezes Python HOT 4
- Xenova mbart-large-50-many-to-many-mmt conversion is not translating. HOT 2
- Clarity on the convert.py for a model to ONNX.py.. documentation issue HOT 2
- TextStreamer not supported for ORTCausalLM? HOT 1
- Whisper-v3 ValueError: Transformers now supports natively BetterTransformer optimizations
- Bitsandbytes integration in ORTModelForCausalLM.from_pretrained()
- the onnx in optimum can not accelerate the speed of batch feature extraction. HOT 3
- task text-classification to be supported in the ONNX export for bart HOT 2
- Assistant model in generate method
- GPTQQuantizer hard coded the device to 0 HOT 2
- ONNX support for Mixtral text-classification HOT 3
- export `audio-classification` model based on OpenAI whisper model to other formats HOT 1
- KeyError: 'last_hidden_state' HOT 1
- Non-pinned Transformers Version Incompatability HOT 2
- ORTStableDiffusionXLPipeline sdxl onnx fp16 unet load error
- ORTModelForCausalLM inference fails (after converting transformer to ONNX) HOT 4
- optimum-cli export neuron failed for 'meta-llama/Llama-2-13b-hf' HOT 2
- Issue in Quantizer decoeder_model_merged.onnx of MT5 HOT 2
- OVModelForWhisper cannot extract word level timestamps HOT 3
- Optimum CLI export to ONNX fails for MPNET based sentence-transformers HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optimum.