Re:Llama.cpp 30B runs with only 6GB of RAM now
by bestcoder69 on Friday March 31, 2023 @09:19PM
(#35395995)
Thanks for this! I was able to integrate alpaca-30B into a slack bot & a quick tkinter GUI (coded by GPT-4 tbh) by just shelling out to `./main` in both cases, since model loading is so quick now. (I didn't even have to ask GPT-4 to code me up Python bindings to llama's c-style api!)
[ Parent
| on HN ]
Re:Llama.cpp 30B runs with only 6GB of RAM now
by bugglebeetle on Saturday April 01, 2023 @01:19PM
(#35402054)
What’s your setup for running these? I’m not seeing performance improvements on off the shelf hardware that would allow for this.
Re:Llama.cpp 30B runs with only 6GB of RAM now
by MacsHeadroom on Saturday April 01, 2023 @11:56PM
(#35407026)
I host a llama-13B IRC chatbot on a spare old android phone.
Re:Llama.cpp 30B runs with only 6GB of RAM now
by bugglebeetle on Sunday April 02, 2023 @12:22AM
(#35407147)
Have a repo anywhere?
Re:Llama.cpp 30B runs with only 6GB of RAM now
by MacsHeadroom on Monday April 03, 2023 @01:01AM
(#35418741)
It's just the same llama.cpp repo everyone else is using. You just git clone it to your android phone in termux and then run make and you're done. https://github.com/ggerganov/llama.cpp
Assuming you have the model file downloaded (you can use wget to download it) these are the instructions to install and run:
pkg install git
pkg install cmake
pkg install build-essential
git clone https://github.com/ggerganov/llama.cpp
cd llama.cpp
make -j
./main
Re:Llama.cpp 30B runs with only 6GB of RAM now
by bugglebeetle on Monday April 03, 2023 @01:24AM
(#35418871)
Yeah, I’ve already been running llama.cpp locally, but not found it to perform at the level attested in the comment (30B model as a chat bot on commodity hardware). 13B runs okay, but inference appears generally too slow on to do anything useful on my MacBook. I wondered what you might be doing to get usable performance in that context.
Re:Llama.cpp 30B runs with only 6GB of RAM now
by MacsHeadroom on Tuesday April 04, 2023 @11:37AM
(#35441374)
You can change the number of threads llama.cpp uses with the -t argument. By default it only uses 4. For example, if your CPU has 16 physical cores then you can run ./main -m model.bin -t 16
16 cores would be about 4x faster than the default 4 cores. Eventually you hit memory bottlenecks. So 32 cores is not twice as fast as 13 cores unfortunately.
Re:Llama.cpp 30B runs with only 6GB of RAM now
by bugglebeetle on Tuesday April 04, 2023 @02:19PM
(#35443868)
Thanks! Will test that out!