Answers.Body: <p>Likely one or multiple A100 based servers (i.e. servers with 8xA100 cards from Nvidia).</p>
  <p>Posssibly the same for H100 cards, but you could likely reduce memory usage with quantification and get a lot more throughput from the same hardware, so can do more queries per time. Memory would be more efficient on quantificatin, otherwise be quite similar to A100 - I hear that 3.5 runs on around 770 or so gb vram. One such node is around 300.000 USD.</p>
  <p>4 bit quantification should result in serious savings, possibly giving good performance on high end servers, with - as research shows - POSSIBLY very limited impact (there is a loss of quality that is small and gets smaller on larger models).</p>
  <p>The real hardware is not disclosed - you have to wait for large open source models to become available.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-21T22:22:22.497Z
Answers.LastActivityDate: 2023-05-21T22:22:22.497Z
Answers.UserDisplayName: TomTom
Answers.Body: <p>Executing specific queries, in the context of large language models, is referred to as <a href="https://en.wikipedia.org/wiki/Statistical_inference" rel="noreferrer">inference</a>. The hardware that runs GPT-4 has not been disclosed. However, Meta's LLaMA can be run on consumer hardware. <a href="https://github.com/ggerganov/llama.cpp" rel="noreferrer">llama.cpp can run the 7B model on an M1 Pro MacBook</a> – a decent, but not top of the line, computer:</p>
  <blockquote>
  <p>As the models are currently fully loaded into memory, you will need adequate disk space to save them and sufficient RAM to load them. At the moment, memory and disk requirements are the same.</p>
  <pre><code>Model     Original size   Quantized size (4-bit)
  7B        13 GB           3.9 GB
  13B       24 GB           7.8 GB
  30B       60 GB           19.5 GB
  65B       120 GB          38.5 GB
  </code></pre>
  </blockquote>
  <p>LLaMA-65B can be run on a CPU with 128GB of RAM, although this is unlikely to be efficient compared to renting data centre GPUs. GPT-4 is reported to be a much larger model than LLaMA-65B, with support for a 32K context window. Since <a href="https://lilianweng.github.io/posts/2023-01-10-inference-optimization/" rel="noreferrer">the amount of fast GPU memory required scales with the size of the model</a>, and <a href="https://gwern.net/note/attention" rel="noreferrer">inference cost scales quadratically with input sequence length</a>, GPT-4 inference cannot be performed on consumer hardware.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-08T16:22:20.167Z
Answers.LastActivityDate: 2023-05-08T16:22:20.167Z
Answers.UserDisplayName: sjy
Body: <p>I've heard that to train a model like GPT 4.0 you need a very powerful computer and ~$10M of computing power, but once you've produced the trained ~570GB model, what sort of computing power is necessary to execute specific queries with it?</p>
  
Tags: <gpt>
Title: What sort of computer would be necessary to run queries on a LLM?
UserDisplayName: ak0000
ThreadText: # What sort of computer would be necessary to run queries on a LLM?
  
  (Asked by: username_0 on 2023-05-08)
  
  I've heard that to train a model like GPT 4.0 you need a very powerful computer and ~$10M of computing power, but once you've produced the trained ~570GB model, what sort of computing power is necessary to execute specific queries with it?
  
  **Tags:** gpt
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2023-05-08. Score: 7 | Accepted answer
  
  Executing specific queries, in the context of large language models, is referred to as inference. The hardware that runs GPT-4 has not been disclosed. However, Meta's LLaMA can be run on consumer hardware. llama.cpp can run the 7B model on an M1 Pro MacBook – a decent, but not top of the line, computer:
  
  As the models are currently fully loaded into memory, you will need adequate disk space to save them and sufficient RAM to load them. At the moment, memory and disk requirements are the same.
  Model     Original size   Quantized size (4-bit)
  7B        13 GB           3.9 GB
  13B       24 GB           7.8 GB
  30B       60 GB           19.5 GB
  65B       120 GB          38.5 GB
  
  
  LLaMA-65B can be run on a CPU with 128GB of RAM, although this is unlikely to be efficient compared to renting data centre GPUs. GPT-4 is reported to be a much larger model than LLaMA-65B, with support for a 32K context window. Since the amount of fast GPU memory required scales with the size of the model, and inference cost scales quadratically with input sequence length, GPT-4 inference cannot be performed on consumer hardware.
  
  
  ---
  
  ### Answer by username_1 on 2023-05-21. Score: 2
  
  Likely one or multiple A100 based servers (i.e. servers with 8xA100 cards from Nvidia).
  
  Posssibly the same for H100 cards, but you could likely reduce memory usage with quantification and get a lot more throughput from the same hardware, so can do more queries per time. Memory would be more efficient on quantificatin, otherwise be quite similar to A100 - I hear that 3.5 runs on around 770 or so gb vram. One such node is around 300.000 USD.
  
  4 bit quantification should result in serious savings, possibly giving good performance on high end servers, with - as research shows - POSSIBLY very limited impact (there is a loss of quality that is small and gets smaller on larger models).
  
  The real hardware is not disclosed - you have to wait for large open source models to become available.
  
  
  ---
  
  