5 ms·
There's a float16 version of GPT-J rewritten in C++ here that apparently fits into 16GB... https://github.com/ggerganov/ggml/tree/master/examples/gpt-j https:/
by anentropic 4y ago
There's a float16 version of GPT-J rewritten in C++ here that apparently fits into 16GB...
https://github.com/ggerganov/ggml/tree/master/examples/gpt-j https://github.com/ggerganov/ggml/tree/master/examples/gpt-j
it's CPU-only and runs inference at "about ~6 words per second" on an M1 MBP
- smoldesu 4y agoThat's for the max-size model (6B parameters). GPT-Neo has pruned models 125m and 1.3b that fit into 1.5gb and 6gb of memory respectively. These models are obviously nerfed, but you can run them on budget ARM hardware and get legible, paragraph-length responses in less than 10 seconds.
- flangola7 4y agoThere's a 20B model now
- smoldesu 4y agoThe 20B model was the original I believe, and the other models were all pruned from it.
- atylerrice 4y agoThis is incorrect. Thought would be interesting. Pruning usually removes some parameters from the model (setting certain ones to 0 for instance). The smaller models all have less layers and therefore weren’t pruned but were smaller to begin with.
- mark_l_watson 4y agoThey have a link to the bottom for something similar, but with GPT-2. The Hugging Face docs have hints for using FP16, and avoiding double memory requirements for model and checkpoint data.
- atylerrice 4y agoYou can also use int8 quantization which comes for free with huggingface and isn’t a huge cost to accuracy. Which cuts the memory usage almost in half again. (almost in half because some layers might stay 32 bit if they make a tiny part of the model)