Carnets icon indicating copy to clipboard operation
Carnets copied to clipboard

Installing pyTorch

Open vzhilov opened this issue 2 years ago • 9 comments

Hello! Is it possible to install pyTorch to use AI models on iPad (mine is iPad Pro 2020)

vzhilov avatar Jan 01 '22 09:01 vzhilov

PyTorch is not yet available. It will be for the next major release, or maybe a separate app. In the meantime, you have both scikit-learn and coremltools in Carnets-with-scipy, which, I think, allow you to use AI models on iPad.

holzschu avatar Jan 01 '22 20:01 holzschu

Hi @holzschu, coremltools does have support for many more models, but provides no functionality to actually train a model, making libraries like PyTorch and Tensorflow/Keras the only way to train the many more complex models that exist.

Is there any way that we could help with the rewriting of code/development for PyTorch or Tensorflow? I would happily dedicate my time if it meant bringing these packages to iOS. Especially with certain iPad models literally having a desktop chip.

Thank you so much!

AidanShipperley avatar Aug 05 '22 19:08 AidanShipperley

I’d also like to see PyTorch with MPS support, which should be quite fast on iPad Pro’s with M1 or M2 chips. An example build formula for macOS is at MacPorts.

essandess avatar Jan 23 '23 03:01 essandess

I'm afraid that compiling a package for iOS is very different to compiling a package for the Mac. Even though the processors are identical, the operating systems are not. I usually have to edit the code in order to adapt to the specificities of iOS.

holzschu avatar Jan 23 '23 07:01 holzschu

PyTorch is not yet available. It will be for the next major release, or maybe a separate app. In the meantime, you have both scikit-learn and coremltools in Carnets-with-scipy, which, I think, allow you to use AI models on iPad.

Hi @holzschu ,so when would the next major release that you were saying? Really appreciated if it was already done, and cheer up if you are still working on it.

Kevin-Huang2000 avatar Jul 12 '23 11:07 Kevin-Huang2000

If something is complicated, I allocate a large time slot for working on it. With PyTorch, I know I'll need a lot of time to make it work. It's going to be several months, probably.

holzschu avatar Jul 12 '23 13:07 holzschu

Your app is positively GREAT! I use it nearly every day.

Peter230655 avatar Jul 12 '23 13:07 Peter230655

BTW, PyTorch now has an iOS page. This seems to be mainly about the C++ side, no Python integration.

I agree with all the comments about how great Carnets is -- it is really fantastic!

MJ-MQ avatar Feb 24 '24 22:02 MJ-MQ

AIUI the builds in this app targets WASM

Whereas the instructions there are thinking of native iOS builds

The approaches and issues that occur between the two are likely different

That said, maybe if a different approach were taken, like bundling PyTorch with the app instead of letting users install it separately, then the iOS instructions would apply

Am also curious whether the changes Apple is taking to meet EU DMA regulations allow any new distribution options (like native binaries). Though that may be a whole separate, interesting conversation

jakirkham avatar Feb 25 '24 00:02 jakirkham