That's all fine and good. But to do anything useful, you're going to want a powerful GPU (RTX 3090, RTX 4090 or A6000) with as much VRAM as possible. Unlike the diffusion models, LLM's are very memory-intensive, even at 4-bit GPTQ. The larger models like llama-13b and llama-30b run quite well at 4-bit on a 24GB GPU. The llama-65b-4bit should run on a dual 3090/4090 rig. Coupled with the leaked Bing prompt and text-ge…
Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
61–70 of 298 posts
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#62Could someone with experience explain: what's the theoretical minimum hardware requirement for llama 7B, 15B, etc, that still provides output on the order of It seems like we can pull some tricks, like using F16, and some kind of quantization, etc. At the end of the day, how much overhead is left that can be reduced? What can I expect to have running on 16gb ram with a 3080 and a midrange AMD processor?
Well I was able to run the original code with the 7B model on 16GB vram: https://news.ycombinator.com/item?id=35013604 The output I got was underwhelming, though I did not attempt any tuning.
https://twitter.com/ggerganov/status/1634310199170179075
I tried it out myself (git pull && make) and the difference in results are day and night! It's amazing to play with, although you should prompt it differently than ChatGPT (more like the GPT-3 API).
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#63George Hotz already implemented LLaMA 7B and 15B on Twitch yesterday on GPU in Tunygrad llama branch: https://github.com/geohot/tinygrad/tree/llama The only problem is that it's swapping on 16GB Macbook, so you need at least 24GB in practice.
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#64George Hotz already implemented LLaMA 7B and 15B on Twitch yesterday on GPU in Tunygrad llama branch: https://github.com/geohot/tinygrad/tree/llama The only problem is that it's swapping on 16GB Macbook, so you need at least 24GB in practice.
Both are very impressive. A nice thing about Gerganov's implementation is that it is written in almost pure C. Arguably easier for deployment.
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#65This is sort of the polar opposite of how modern high performance ML frameworks are built. Skimming the code, there's a ton of boilerplate for the various operations that could be library-ized and generified, if that makes sense. I actually really like minimal implementations of state-of-the-art systems because the code is much easier to understand (modern frameworks are super-complex) but I wonder what it means long…
This is just inference. The core at most ML library is the auto differentiation capability. It will be extremely tedious if you are to calculate the gradients manually. Or, if you implemented your own AD, then it is effectively a minified version of a ML library.
llama.cpp/ggml.h
// GGML Tensor Library
...
// This library implements:
// - a set of tensor operations
// - automatic differentiation
// - basic optimization algorithmsRe: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#66That's all fine and good. But to do anything useful, you're going to want a powerful GPU (RTX 3090, RTX 4090 or A6000) with as much VRAM as possible. Unlike the diffusion models, LLM's are very memory-intensive, even at 4-bit GPTQ. The larger models like llama-13b and llama-30b run quite well at 4-bit on a 24GB GPU. The llama-65b-4bit should run on a dual 3090/4090 rig. Coupled with the leaked Bing prompt and text-ge…
That makes them uniquely “powerful” for inference with large models.
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#67> Currently, only LLaMA-7B is supported since I haven't figured out how to merge the tensors of the bigger models. However, in theory, you should be able to run 65B on a 64GB MacBook Suddenly the choices Apple made with its silicon are looking like pure genius as there will be a lot of apps using this that are essentially exclusive to their platform. Even with the egregious ram pricing. With a lot of fine tuning if y…
If you ask it "What color is the sky?" It will reply with something like "Why is ice cold? Why do we exist?"
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#681. https://machinelearning.apple.com/research/neural-engine-tra...
Edit: just found this: https://github.com/ggerganov/whisper.cpp/pull/566
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#69George Hotz already implemented LLaMA 7B and 15B on Twitch yesterday on GPU in Tunygrad llama branch: https://github.com/geohot/tinygrad/tree/llama The only problem is that it's swapping on 16GB Macbook, so you need at least 24GB in practice.
Re: Llama.cpp: Port of Facebook's LLaMA model in C/C++, with Apple Silicon support
#70> Currently, only LLaMA-7B is supported since I haven't figured out how to merge the tensors of the bigger models. However, in theory, you should be able to run 65B on a 64GB MacBook Suddenly the choices Apple made with its silicon are looking like pure genius as there will be a lot of apps using this that are essentially exclusive to their platform. Even with the egregious ram pricing. With a lot of fine tuning if y…
LLaMA doesn't perform very well with answering questions. If you ask it "What color is the sky?" It will reply with something like "Why is ice cold? Why do we exist?"
```
You are a super intelligent honest question-answering system.
Q: What's 2+2?
A: 4
Q: What color is the sky?
A:
```