3 ms·
I don't understand. I thought each parameter was 16 bit (two bytes) which would predict minimally 60GB of RAM for a 30 billion parameter model. Not 6GB.
by cubefox 4y ago
I don't understand. I thought each parameter was 16 bit (two bytes) which would predict minimally 60GB of RAM for a 30 billion parameter model. Not 6GB.
- heap_perms 4y agoI was thinking something similar. Turns out that you don't need all the weights for any given prompt. > LLaMA 30B appears to be a sparse model. While there's 20GB of weights, depending on your prompt I suppose only a small portion of that needs to be used at evaluation time [...] Found the answer from the author of this amazing pull request: https://github.com/ggerganov/llama.cpp/discussions/638#discussioncomment-5492916 https://github.com/ggerganov/llama.cpp/discussions/638#discu...
- xsmasher 4y agoDoes this mean LLaMA only uses 10% of it's brain? An urban legend come to life!
- w1nk 4y agoNo, your OP is mistaken. The model weights have to all be accessed for the forward pass. What has happened is that using mmap changes where the memory is consumed (kernel vs process) and so it was being incorrectly interpreted. There are still 30B parameters, and you'll need that times however big your floating point representation is to use the model still.
- xsmasher 4y agoBut do they all need to be accessed at the same time? If not, pages that are not being actively used can be dropped from memory until needed again.
- gamegoblin 4y agoParameters have been quantized down to 4 bits per parameter, and not all parameters are needed at the same time.