Re:Llama.cpp 30B runs with only 6GB of RAM now
by nynx on Friday March 31, 2023 @05:24PM
(#35393868)
Why is it behaving sparsely? There are only dense operations, right?
[ Parent
| on HN ]
Re:Llama.cpp 30B runs with only 6GB of RAM now
by w1nk on Friday March 31, 2023 @05:46PM
(#35394105)
I also have this question, yes it should be. The forward pass should require accessing all the weights AFAIK.
Re:Llama.cpp 30B runs with only 6GB of RAM now
by HarHarVeryFunny on Saturday April 01, 2023 @08:27AM
(#35399718)
From what I've read there's no evidence it's "behaving sparsely".. That was just offered as a suggestion why it might not be loading all the weights, but makes no sense in terms of the model. It's going to be using all the weights.
Another suggestion is that not all of the word/token embedding table might be used, which would be a function of the input used to test, but that would be easy enough to disprove as there would then be different memory usage for different inputs.
It seems possible the reported memory usage is lower than reality if that's how mmap/top work. In any case, a good use of mmap it seems, especially since for a multi-layer model layer weights will be used sequentially so paged load-on-demand will work relatively well even in a low memory situation.