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

Save model data into more compact and efficient binary format #201

Closed
antimora opened this issue Mar 6, 2023 · 0 comments · Fixed by #247
Closed

Save model data into more compact and efficient binary format #201

antimora opened this issue Mar 6, 2023 · 0 comments · Fixed by #247

Comments

@antimora
Copy link
Collaborator

antimora commented Mar 6, 2023

Feature description

Save model data into more compact and efficient binary format, such as bincode or messagepack

Feature motivation

Saving large data into JSON is not efficient (large files and memory requirements). Additionally, saving float numbers to JSON and getting from is not precise because of some intermediate number type conversion (some may consider as data loss).

The efficiency deserialization (space and speed) becomes more important for applications that want to bundle model data into the code, using include_bytes! macro.

(Optional) Suggest a Solution

In our binary format, we should include format and version information the the output for future compatibility and support.

messagepack has more language support and could be used as our de-facto export format. Bincode seems to work on rust.

Action Item

Remove/modify examples/mnist-inference-web/build.rs once we have built-in facility to export data directly to binary format.

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

Successfully merging a pull request may close this issue.

1 participant