News for hackers. Stuff that matters.
Re:Using LLaMA with M1 Mac and Python 3.11 by diimdeep on Sunday March 12, 2023 @01:18PM (#35122956)
Remove "and Python 3.11" from title. Python used only for converting model to llama.cpp project format, 3.10 or whatever is fine.

Additionally, llama.cpp works fine with 10 y.o hardware that supports AVX2.

I'm running llama.cpp right now on an ancient Intel i5 2013 MacBook with only 2 cores and 8 GB RAM - 7B 4bit model loads in 8 seconds to 4.2 GB RAM and gives 600 ms per token.

btw: anyone knows how to disable swap per process in macOS ? even though there is enough free RAM, sometimes macOS decides to use swap instead.

Re:Using LLaMA with M1 Mac and Python 3.11 by metadat on Sunday March 12, 2023 @01:37PM (#35123280)
Can you provide a link to what guide or steps you followed to get this up and running? I have a physical Linux machine with 300+ GB of RAM, would love to try out llama on it but I'm not sure where to get started for how to get it working with such a configuration.
Re:Using LLaMA with M1 Mac and Python 3.11 by smoldesu on Sunday March 12, 2023 @01:40PM (#35123337)
Give this a whirl, it should be relevant still: https://github.com/oobabooga/text-generation-webui/wiki/LLaM...
Re:Using LLaMA with M1 Mac and Python 3.11 by diimdeep on Sunday March 12, 2023 @01:45PM (#35123427)
Sure. You can get models with magnet link from here https://github.com/shawwn/llama-dl/

To get running, just follow these steps https://github.com/ggerganov/llama.cpp/#usage

Re:Using LLaMA with M1 Mac and Python 3.11 by CharlesW on Sunday March 12, 2023 @02:27PM (#35124110)
> Remove "and Python 3.11" from title. Python used only for converting model to llama.cpp project format, 3.10 or whatever is fine.

As @rnosov notes elsewhere in the thread, this post has a workaround for the PyTorch issue with Python 3.11, which is why the "and Python 3.11" qualification is there.

Re:Using LLaMA with M1 Mac and Python 3.11 by ahoho on Sunday March 12, 2023 @03:47PM (#35125265)
Do you know if there's there a good reason to favor 3.11 over 3.10 for this use case?
Re:Using LLaMA with M1 Mac and Python 3.11 by CharlesW on Sunday March 12, 2023 @04:45PM (#35126030)
I'm a Python neophyte, but I've read that Python 3.11 is 10-60% faster than 3.10, so that may be a consideration.
Re:Using LLaMA with M1 Mac and Python 3.11 by simonw on Sunday March 12, 2023 @05:01PM (#35126231)
In this particular case that doesn't matter, because the only time you run Python is for a one-off conversion against the model files.

That takes at most a minute to run, but once converted you'll never need to run it again. Actual llama.cpp model inference uses compiled C++ code with no Python involved at all.

Re:Using LLaMA with M1 Mac and Python 3.11 by e12e on Sunday March 12, 2023 @06:01PM (#35126872)
Re:Using LLaMA with M1 Mac and Python 3.11 by codetrotter on Sunday March 12, 2023 @06:13PM (#35126989)
The real question is. Which python3 version does current macOS ship with?

Well, on my macOS Ventura 13.2.1 install, /usr/bin/python3 is Python 3.9.6, which may be too old?

But also, my custom installed python3 via homebrew is not 3.11 either. My /opt/homebrew/bin/python3 is Python 3.10.9

MacBook Pro M1

Re:Using LLaMA with M1 Mac and Python 3.11 by datadeft on Sunday March 12, 2023 @08:11PM (#35128620)
brew install [email protected]
Re:Using LLaMA with M1 Mac and Python 3.11 by zitterbewegung on Sunday March 12, 2023 @05:15PM (#35126402)
I am able to get 30B on a MacBook Pro 14.2 with 64gb of ram. https://gist.github.com/zitterbewegung/4787e42617aa0be6019c3...