Comments (4)
The model I used is official llama2-7b pth model, which parameters size is close to 13GB. the fp32 pte file I got by using following steps:
python3 -m examples.models.llama2.export_llama -c ../llama2/consolidated.00.pth -p ../llama2/params.json
The size of llama.pte file I got is 26GB. This is already twice the weight of the original model file, is this reasonable? What are the main contents of the pte file besides the model weights?
Hi thanks for trying out llama model. Please note that by default we are converting fp16 weights to fp32 which is the reason of doubling the pte file size. The reason for this decision was we didn’t support fp16 that well before. Now that we have full support for fp16 on portable kernels, we will change the default behavior of export_llama to be exporting fp16.
BTW you can pass a -H flag to the script to export to fp16.
from executorch.
@larryliu0820 thanks for your reply!
my question is that llama2/consolidated.00.pth
is a fp32 model, not half, there is no fp16 weight to fp32. but why pte file still double?
BTW, the pte file size if 16GB when I pass a -H flag to the script by using fp16.
from executorch.
@huangzhiyuan AFAIK llama2/consolidated.00.pth
is a checkpoint with fp16 weights.
from executorch.
You are right. I make a mistake, and it makes sense.
Now close the issue.
from executorch.
Related Issues (20)
- Does executorch support qat quant for qualcomm qnn backend?
- Remove Arm SDK step from docker image
- Qualcomm AI Engine Direct - support 4bit quantization HOT 1
- buck2 build failure HOT 7
- Unable to run the iOS demo app HOT 4
- ImportError: cannot import name '_transform' from 'executorch.exir.program._program' HOT 3
- AttributeError: module 'mpmath' has no attribute 'rational' HOT 1
- How do you get executorch to run within Mbed OS? HOT 3
- mpmath package version HOT 1
- ExecuTorch: Failed to install inmemoryfs extension. HOT 6
- How to analyze executorch .pte file performance? HOT 6
- Operator torch._ops.quantized_decomposed.quantize_per_tensor.default is not Aten Canonical HOT 4
- Move Arm bare-metal platform builds to C++17, and include arm builds and aot flow in standard precommits HOT 1
- ’xnn_executor_runner' is missing in the documentation 'Building and Running ExecuTorch with XNNPACK Backend'
- Unknown target `generated_lib_all_ops` from package `root//kernels/portable`. HOT 5
- The core has been dumped after alternately reasoning three times about the two preloaded models
- ExecuTorch main branch setup fails while stable branch works HOT 4
- nn.BatchNorm2d is not supported at exir.to_edge HOT 9
- How to perform inference and gathering accuracy metrics on executorch model
- For the Runtime build for QNN
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 executorch.