-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make issue. Maybe flags? #302
Comments
I faced a similar issue. cc is getting a flag mismatched to the architecture. Open a terminal and run the commands: Note the results of each. Then open the dalia/llama/Makefile and around line 82 you should see the test for 'Linux' platforms. In this section of the Makefile, it tests for various x86 architectures using gerp to interrogate the /proc/cpuinfo file. In my case on my old machine, the flags set in AVX1_M was incorrect for my architecture. I replaced it with a suitable flag but I think -native will work. This section seems to be testing the processors simd and vector math capabilities. You can sort through /proc/cpuinfo to leanr the capabilities for your target. I think the make file simply needs to be updated for additional architectures to resolve these issues, and the comment in the Makefile is suggestive of that fact. |
Thank you very much for the reply. Indeed my laptop has quite a few years, around 14, still doing great however. I'm running a quad core intel core i7-2630QM. I checked the cpuinfo file and couldn't find any of the flags mentioned in the makefile. I guess the relevant string in the cpufino file is this one
|
Yes, that's it. You can also grep the file for flags you are looking for: grep /proc/cpuinfo just as the Makefile does. Try commenting out the first flag i.e.: #CDLAGS += -mavx and see if that solves the issue. |
To learn more about Makefiles see this short intro: https://www.youtube.com/watch?v=_r7i5X0rXJk |
Oh, I should have mentioned that once you make a change to the make file you'll need to run it manually as the dalai script will replace your edited version with the original. So cd to ~/dalai/llama and run $> make |
@Monotoba thanks yes I actually completely removed the relevant code in the makefile as no flags seemed to be supported. So I launched make in the folder and the attached image is the output. Does it look to you like a completed make process? also, the Alpaca installation process ends there or should I do something else? I ask because no models folder was created in my Alpaca folder, and of course I can't select it in the dalai GUI |
This looks like a completed make process. But that is only part of the install. I haven't looked at the nodejs code that I think manages the complete download, build, and install process. I'll look at that tomorrow and see if I can figure out what comes next. Just for clarity, did you have to remove all the flags or only the -mavx flag to get it to build? If you could do me a small favor and add each tag back one at a time and let me know which ones break your setup it would be helpful for creating a pull request to keep other (and our future selves) from having issues again. In the meantime, I'll see what else I can figure out to get you up and running. |
Sure, I checked what you asked me, all the flags are ok except the -mavx; it breaks the make process. Thanks for helping |
Clearly I have to download the model, this wasn't clear to me. Tough I am having a hard time finding a reliable download link for ggml-alpaca-7b-q4.bin. EDIT: downloaded but I need at least to change the modelsPath to the correct path as I don't have enough space on the default folder's partition. Trying to understand how to. otherwise use Torrent download |
Thank you for checking that out for me, and all those who are yet to experience these issues. I am just got to my desk this morning and have some work to do on another project. But I'll take some time to look into what you need to do next and get back to you as soon as I have something to share. As far as moving the model file, you can move your file to it's destination drive/folder and create a symbolic link to it. Then place the symbolic link in the model's folder. Here's a link to help: https://phoenixnap.com/kb/symbolic-link-linux |
Sure, I posted the link on another post, but I'll add it here too. |
I do suspect the hardware. All those flags enable various hardware features in your processor. All of these are related to high speed mathematical operations (Vector/Linear math operations). Without them the processor has to do all the calculations one at a time instead of placing the data in a vector and doing the calculation once. The older processors do have some multimedia instructions that can be used. But they are not as fast or efficient as the newer processors. Alpaca should run faster than llama because of it's reduced data set size. I don't have an i7-2630QM, but my older machine that I am running this on has an i7-3820 @ 3.60GHz and 32GB RAM, and it isn't as fast as it could be. My newer laptop with only 16GB RAM runs circles around it. |
I can confirm my CPU supports avx but not later ones. Despite this in Alpaca AVX1 is always disabled. Also F16C is disabled. I tried many flags but still no luck. I always get an inlining error. I am studying at this link which Is plenty of info. |
I managed to activate AVX1 by applying following fix, this means modifying ggml.c |
I had a performance improvement by implementing AVX acceleration |
Good Morning RiccaDS, I had a to cut yesterday short due to a migraine. I am happy you made some progress! Do you have models working in Dalai? What issues do you still have other than performance? |
Hi, hope you are better now! Actually I just have some spare time so I wasn't able to test this on Dalai but I'm trying now and letting you know. I think it will work fine. On alpaca model only performance btw, it's probably time for a HW upgrade. |
Ok so, I started from the beginning with Dalai and installed in default folder with At this point |
Hey, I resolved many issues up to now. I feel this is the last one. Any idea what this can be due to?
The text was updated successfully, but these errors were encountered: