News for hackers. Stuff that matters.

Show HN: Compile ML models into dependency-free source code for easy deployment

https://waveworks.dk/flow-coder/

I'm a machine learning engineer who always found it annoying to integrate ML models into phone apps, smartwatch apps, microcontroller firmware etc... Why do we need all these libraries and runtimes with all the overhead, compatibility issues and other headaches, when it's just some math to be executed? So I made a compiler that simply converts the model into plain source code with no dependencies, and it actually solved all my deployment problems. Now I'm curious if it can help anyone else too. Through the link you can submit your model file (Keras h5, onnx soon to be supported), and I'll use my compiler to convert it into source code for you. It might not work for everyone, but I'll use your input to make the compiler better and hopefully turn it into a full-fledged product someday. Thanks a bunch for any contribution!
( 8 comments | 4 points | on HN )
Re:Show HN: Compile ML models into dependency-free source co... by etagenyeti on Thursday April 06, 2023 @12:07PM (#35470389)
I just submitted a model we are working on. Curious to see the results.
Re:Show HN: Compile ML models into dependency-free source co... by gustafwaveworks on Thursday April 06, 2023 @04:05PM (#35473638)
Thanks - I have converted your model, please let me know how it works!
Re:Show HN: Compile ML models into dependency-free source co... by etagenyeti on Thursday April 06, 2023 @05:15PM (#35474570)
Thanks, that was fast. Will check with the team and get back to you.
Re:Show HN: Compile ML models into dependency-free source co... by etagenyeti on Friday April 07, 2023 @05:46PM (#35487413)
The team was able to use the code with some minor tweaks and said you might be on to something ;-) Let’s talk soon
Re:Show HN: Compile ML models into dependency-free source co... by gustafwaveworks on Saturday April 08, 2023 @04:38AM (#35491642)
Glad it's working, and thank you for also submitting feedback!
Re:Show HN: Compile ML models into dependency-free source co... by bheadmaster on Thursday April 06, 2023 @03:48PM (#35473438)
If I may ask, why not just share the compiler code? Do you plan to monetize this? Not that I personally have any problem with that, but I like to know when I'm reading an advertisement.

That being said, sounds like a great idea. It would definitely help a lot with deployment. Does the generated source code work GPUs, or does it just run on CPU?

Re:Show HN: Compile ML models into dependency-free source co... by gustafwaveworks on Thursday April 06, 2023 @04:04PM (#35473616)
Of course you may ask! Exactly that, I want to see if I can monetize in one way or the other, so that's why I keep the compiler code to myself for now.

I'm planning to support generation of CUDA code and maybe also Triton for GPU inference. Would that be helpful for you?

Re:Show HN: Compile ML models into dependency-free source co... by bheadmaster on Thursday April 06, 2023 @06:19PM (#35475299)
I don't have a particular use case in mind, I am just curious about the capabilities.

Hope your project succeeds !