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

[compiler] Support large models #12732

Open
seanshpark opened this issue Mar 7, 2024 · 2 comments
Open

[compiler] Support large models #12732

seanshpark opened this issue Mar 7, 2024 · 2 comments

Comments

@seanshpark
Copy link
Contributor

seanshpark commented Mar 7, 2024

Issue to gather issues, task for large models, such as

  • flatbuffer size > 2G
  • quantize < 8 bit
  • ...


things to do with our LLM model

  • convert model to circle -> done with internal onnx2circle
  • optimize circle model -> conversion seems ok
  • ...
@hseok-oh
Copy link
Contributor

hseok-oh commented Mar 7, 2024

We may need to support external data file on circle spec (like onnx spec) to save large weight.

@seanshpark
Copy link
Contributor Author

We may need to support external data file

circle schema from 0.7 has this in changes from tflite

(for table Operator)
  // When an op is using custom_options in a model that is larger than 2GB, then
  // we instead use the following attributes to find the buffer location which
  // is stored outside of flatbuffers, the offset is calculated relative to the
  // beginning of the file and is only valid if > 1
  large_custom_options_offset: ulong;
  large_custom_options_size: ulong;

(for table Buffer)
  // In a model that is larger than 2GB, then buffers instead uses the following
  // attributes to find stored data, which is outside of flatbuffers
  // the offset is calculated relative to the beginning of the file and is only
  // valid if > 1.
  offset: ulong;
  size: ulong;

I need to look inside tflite implementation but,
it seems large data are added at the end of the file, flat buffer managed part,
as single file.

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

2 participants