sun1638650145 / Libraries-and-Extensions-for-TensorFlow-for-Apple-Silicon

This Repo will provide TensorFlow libraries and extended build tutorials that require compilation to build, as well as pre-compiled wheel files.
115 stars 9 forks source link

tensorflow-text for TF2.10 ? #7

Closed SoyGema closed 1 year ago

SoyGema commented 2 years ago

Hello there! Congrats for the progress on your reselases for tensorflow-text library for MAC M1 . These add a significant value to the community! 🥇 💯

I was able to follow this tutorial thanks to your release , previous to this one, at apply transformers for Neural Machine translation with python 3.9 an tensorflow-mac-os 2.8 for creating tokenized datasets by installing one of your releases. Thanks so much!

However to advance with decoder mask multihead attention setup for Transformers tutorial and call one of its arguments use_causal_mask=True, Tensorflow 2.10 is required , and I think I need tensorflow-textfor 2.10. I saw that you have the addons wheel but not the library .whl itself ,

any idea on when it might be available or any workaround to track this to make it work?

Please don´t hesitate to point me out in the right direction if there´s any worng assuption here...

For installing TensorFlow 2.10 , I´ve followed this :

conda install -c apple tensorflow-deps conda install -c apple tensorflow-deps==2.10.0 python -m pip install tensorflow-macos

After that I can see that Tensorflow 2.10.0 has been installed.

Thanks so much for the time dedicated to this and keep up the great work! 👍

sun1638650145 commented 2 years ago

Sorry for replying to you only now, because tensorflow-macos 2.10 modified something we don't know (Apple did not open source it), resulting in a symbol error according to the original method. I am now trying to find a way to solve this problem.

SoyGema commented 2 years ago

Hope you find a solution ! Please keep me posted and keep the good work up! 👍

MinaAku commented 2 years ago

感谢您为 Apple Arm64 提供的解决方案;如本问题的标题,我也有同样的需求,我知道这可能很难解决,如果可能的话希望更新支持 TF2.10 的版本,感谢作者!!

sun1638650145 commented 1 year ago

@SoyGema @MinaAku Sorry for taking so long to reply to everyone. I tried compiling text 2.10 and 2.11 on macOS 13, and compiling text after compiling tensorflow-cpu by myself, unfortunately none of these methods worked Function. The root of the problem now is that there is a problem with ld in Xcode, and this problem can only be solved by Apple.

sun1638650145 commented 1 year ago

You can follow the links to all related issues.

  1. Unable to build tensorflow from source on Apple M1
  2. TF 2.11.0 fails to build in MacOS 13 - XCode 14.1 - issue with ld linker
eddie-matsec commented 1 year ago

@sun1638650145 it looks like there may be an Xcode update that may help here?

https://github.com/tensorflow/tensorflow/issues/58368#issuecomment-1481492160

sun1638650145 commented 1 year ago

I am happy to inform you that after updating Xcode and macOS, tensorflow-text 2.12.0 can be successfully built. I will not close this issue until I re-build 2.10.0 and 2.11.0 successfully.

sun1638650145 commented 1 year ago

After confirmation, it was determined that the issues with tensorflow-text 2.10 and 2.11 were caused by Apple Clang. Upgrading and recompiling should resolve the issues. The tutorials for 2.10 and 2.11 have been updated, and pre-compiled whl files are also available for download.