cocktailpeanut / dalai

The simplest way to run LLaMA on your local machine
https://cocktailpeanut.github.io/dalai
13.09k stars 1.42k forks source link

Installation breaks in-between #134

Open leandermaerkisch opened 1 year ago

leandermaerkisch commented 1 year ago

First, thanks a lot for your incredible work!

I'm using macOS. I followed the instructions by installing relevant packages and ran the command npx dalai alpaca install 7B. It starts the execution and creates a dalai directory. Yet, it does not download any files. image

I'd be grateful to try out this marvelous contribution"

Here are the latest logs: 968 info run node-pty@0.10.1 install node_modules/node-pty node scripts/install.js 969 info run node-pty@0.10.1 install { code: 0, signal: null } 970 timing build:run:install:node_modules/node-pty Completed in 1087ms 971 timing build:run:install Completed in 1087ms 972 info run dalai@0.2.42 postinstall node_modules/dalai node setup 973 info run node-pty@0.10.1 postinstall node_modules/node-pty node scripts/post-install.js 974 info run node-pty@0.10.1 postinstall { code: 0, signal: null } 975 timing build:run:postinstall:node_modules/node-pty Completed in 35ms 976 info run dalai@0.2.42 postinstall { code: 1, signal: null } 977 timing reify:rollback:createSparse Completed in 199ms 978 timing reify:rollback:retireShallow Completed in 0ms 979 timing command:exec Completed in 4745ms 980 verbose exit 1 981 timing npm Completed in 4765ms 982 verbose unfinished npm timer reify 1679263514037 983 verbose unfinished npm timer reify:build 1679263514831 984 verbose unfinished npm timer build 1679263514831 985 verbose unfinished npm timer build:deps 1679263514831 986 verbose unfinished npm timer build:run:postinstall 1679263515922 987 verbose unfinished npm timer build:run:postinstall:node_modules/dalai 1679263515922 988 verbose code 1

patmifsud commented 1 year ago

I was able to make some progress on this by running it with sudo, and then following the prompts to download and install the Xcode packages in the modal that pops up.

hashmil commented 1 year ago

I was able to make some progress on this by running it with sudo, and then following the prompts to download and install the Xcode packages in the modal that pops up.

thanks! i was having the same issue. using sudo npx dalai llama install 7B 13B and now it's downloading. Just waiting now.

patmifsud commented 1 year ago

In the end it was actually an issue with homebrew if you’re still struggling with it. I had to try reinstalling homebrew again, Making sure to follow the instructions at the end of the installation to run commands to add the homebrew path, or something similar.

Autistaman commented 1 year ago

I have encountered the same exact issue with a fedora 36 VM. Running with sudo or as root does not work and the linux installation does not have homebrew

drwootton commented 1 year ago

I also cannot install this, on either Windows or Fedora 36. Both fail in the reify:dalai step, where it just hangs.

kha84 commented 1 year ago

Most probably the very last step in the installation flow (npm verb unfinished npm timer build:run:postinstall:node_modules/dalai ...) is the one where the actual model download is happening. And problem somewhere on the server side. Just because after a number of attempts it managed to download everything.

For a proper troubleshooting:

Below worked fine for me in docker with Fedora 37 image:

docker run   -p 3000:3000  -it --rm fedora /bin/sh
yum install npm python3.9.x86_64 make automake gcc gcc-c++ kernel-devel python3-virtualenv git -y
npm install -g npm@9.6.2
cd /usr/bin ; unlink python3 ; ln -s python3.9 python3
npx dalai llama install 7B
npx dalai serve
CoeusCC commented 1 year ago

Worth noting I went through a lot of debug and troubleshooting steps, but ultimately it took time. Not sure if any of the steps I took were helpful or necessary ultimately, but after tailing the install logs and seeing that it was actually busy even though the --verbose script didn't specific updates it became clear that I was killing the process at different points in the installation. Now it's downloading the .bin file. I have a terribly slow rural cellular connection, so this is why patience can sometimes pay off for me. Hope that helps others who might be a little to anxious to kill the script when it gets stuck at the reify:dalai step.

leandermaerkisch commented 1 year ago

Thanks a lot, @afif-malghani!