Remix.run Logo
pjmlp a day ago

PyTorch also supports C++ and Java, Tensorflow also does C++ and Java, Apple AI is exposing ML libraries via Swift, Microsoft is exposing their AI stuff via .NET and Java as well, then there is Julia and Mojo is coming along.

It is happening.

og_kalu a day ago | parent [-]

TensorFlow is a C++ library with a python wrapping, yet nobody (obviously exaggeration) actually uses tensorflow (or torch) in C++ for ML R&D.

It's like people just don't get it. The ML ecosystem in python didn't just spring from the ether. People wanted to interface in python badly, that's why you have all these libraries with substantial code in another language yet development didn't just shift to that language.

If python was fast enough, most would be fine to ditch the C++ backends and have everything in python, but the reverse isn't true. The C++ interface exists, and no-one is using it.

pjmlp a day ago | parent [-]

The existing C++ API is done according to that "beautiful" Google guidelines, thus it could be much better.

However people are definitely using it, as Android doesn't do Python, neither does ChromeOS.

og_kalu a day ago | parent [-]

>However people are definitely using it, as Android doesn't do Python, neither does ChromeOS.

That's not really a reason to think people are using it for that when things like onnxruntime and executorch exist. In fact, they are very likely not using it for that, if only because the torch runtime is too heavy for distribution on the edge anyway (plus android can run python).

Regardless, that's just inference of existing models (which yes I'm sure happens in other languages), not research and/or development of new models (what /u/airza was concerned about), which is probably 99% in python.

pjmlp 12 hours ago | parent [-]

Well, onnxruntime is also having polyglot bindings, and yet another way to avoid Python.

Yes, you can package Python alongside your APK, if you feel like having fun making it compiled with NDK, and running stuff even more slowly in phone ARM chipsets over Dalvik JNI than it already is on desktops.