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

Model save/load #30

Open
atlv24 opened this issue Feb 22, 2024 · 3 comments
Open

Model save/load #30

atlv24 opened this issue Feb 22, 2024 · 3 comments

Comments

@atlv24
Copy link
Collaborator

atlv24 commented Feb 22, 2024

expose a way to save out a computation graph, accompanied by all constants parameters and model weights as relative-path hlo format files, xla-rs has utils for this and its the expected format for model/optimizer saving in XLA

@Ebanflo42
Copy link
Collaborator

xla-rs has utils for saving a converted XLA computation as HLO and also utils for saving literals as numpy, i think it would be dope to have these things combined in the same file, so the compute graph is serialized to HLO and eventually we have a Model object which contains weights that get serialized to a dictionary of numpy arrays.

@Ebanflo42
Copy link
Collaborator

Reading HLO into an unda context would be a neat trick. Might also be good to look into the ONNX format, I've never used this but apparently everyone is using it. Would boost our compatibility with existing APIs.

@Ebanflo42
Copy link
Collaborator

@BradenEverson or @atlv24 this should be implemented sooner rather than later if either of you have the bandwidth. There is already utilities for this in xla-rs/src/wrappers/mod.rs (of all places). If one of you could look into saving and loading SupervisedModel with these utilities I will clean up the organization of xla-rs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants