Open Kent-Min opened 1 year ago
All models work on M1 Max
Check if you're trying to run the commands through "rosetta", I had that issue and it built the executables on x86_64 instead of arm64 and obviously it didn't work. Also use the "debug" checkbox to get a better error message.
To check if your terminal runs in "rosetta" mode use this command:
uname -m
If it says x86_64 run this command to switch to native arm64:
arch -arm64 /bin/zsh
PS. You'll need to reinstall the model/s.
Hope it helps 🙏
I have just got dalai works on my own M2 Max macbook, here by the steps to get dalai setup.
mkdir -p ~/dalai/alpaca/models
npx dalai alpaca install 7B
<-switch to other model if wantedcd ~/dalai/alpaca
make clean
make quantize
then make main
npx dalai serve
After that you should see dalai up and running
in case there are errors during make, try to run make clean
and then make ggml.o
and make utils.o
and run again from step 6
some how the dalai install
command is not intelligent enough to determine the architecture of the Host Machine. it uses its virtual env that when Makefile tries to run uname -m
will return x86_64
instead of arm64
. If the alpaca is built with x86_64, M2 Max which runs arm64 will response illegal instruction:4
. To mitigate this error, just have to rebuild the alpaca with correct Arch with your own terminal should fix all problem.
since dalai install
command will wipe the whole away the alpaca folder on each call. Every time installing new model weight requires redo of step 5 to 7
M2 here, no problem running alpaca nor llama