Closed anatoleg closed 6 months ago
I think that dep is needed for the embedder, so until that dep works Concordia doesn't work on M1 macs.
If you can get by without an embedder, cb505d3795e04006206b7d62bb1acd788e64428f might help. You can git clone our repo and pip install from there. That would also allow you to comment out anything else that doesn't work on M1 macs.
~#34 adds an alternative embedder, so hopefully that will work soon.~
See code snippet in https://github.com/google-deepmind/concordia/issues/37#issuecomment-2022416660.
I assume that the embedder is needed to properly run the provided agent examples. Any chance for a gdm-concordia package release that can be PIP installed on M1 macs?
There is a pull request under review right now which will solve this once it's fully incorporated.
You can use the following snippet on M1 macs if you install sentence_transformers:
@functools.cache
def embedder(model: str = 'sentence-transformers/sentence-t5-base'):
return sentence_transformers.SentenceTransformer(model).encode
Thanks @wacunn for this workaround.
Thank you @jagapiou. What do I need to do to properly install Concordia instead of "pip install gdm-concordia" as recommended in README? Do I follow the manual install instructions and patch a file (which one)? Thanks again.
You can pip install directly from GitHub, or you can git clone it locally and pip install from there (the manual install instructions).
Cloned the files and followed the manual install instructions. No installer complaints this time. But the code still blows up on "import tensorflow_text" in embedder_st5.py ("No module named tensorflow_text"). Not clear how to apply the suggested workaround. Should I use a different embedder? Which one? Thanks.
This is the code that I am using on an M1 Mac.
from sentence_transformers import SentenceTransformer st5_model = SentenceTransformer('sentence-transformers/sentence-t5-base') embedder = st5_model.encode
That worked. I installed sentence_transformers and did not import embedder_st5 from concordia.associative_memory. Used your code instead. Thank you very much.
Cannot install the gdm-concordia package on an M1 Mac either for Python3.11 or Python3.12. The PIP installer cannot find TensorFlow-text which, apparently, does not exist for M1 Macs. Is there any way around this?