16
$\begingroup$

I note this question was deemed off-topic, so I'm trying to clearly frame this question in terms of scope of response I'm interested in, namely ethics and sustainability issues associated with the soon-to-be proliferation of OpenAI Chat GPT types of tools for all manner of online information seeking behavior (from humans and other bots). This is not a programming or specific hardware question.

On average, how much energy is consumed for each response that Open AI's public chatgpt-3 provides? i.e. what is the energy to run the entire system for 24 hours divided by the number of responses generated in 24 hours (ignoring energy consumed to train the system or build the hardware components).

How does this compare to a Google/Duck Duck Go/Bing search inquiry?

I read somewhere an OpenAI employee on the ChatGPT team that the computer power used to provide responses to queries is "ridiculous", and there's documentation of the size of the memory requirements of hosting servers and parameters but without knowing its throughput for example it's hard to quantify the energy consumption.

I often get more interesting results from Chat GPT than Duck Duck Go on certain types of queries where I used to know the answer but cannot remember the answer. IN these cases I can fact check for myself, I'm looking for a memory prompts with names and jargon that will remind me.

Also when seeking out counter-views to my own (say critiques of degrowth or heterodoxy economics concepts) Chat GPT is good at providing names and papers/reports/books that critiques the view I provide it.

In many cases more usefully than conventional search engines. Therefore, I can see the popularity of these tools ballooning rapidly, especially when the operational costs CAPEX + OPEX of the servers and maintainers is borne by large amounts of seed funding (eg OpenAI) or any other loss-leader startup wishing to ride the next wave of AI.

The heart of my question is "at what externalized costs do we gain these tools in terms of greenhouse gases, use of limited mineral resources, GPUs scarcity etc."

$\endgroup$
3
  • 2
    $\begingroup$ Note the environment tag is for reinforcement learning, not the physical environment of earth. It has nothing to do with your question. $\endgroup$ Jan 31 at 6:51
  • 2
    $\begingroup$ Unless there is someone from the OpenAI team reading your question, no one here can answer this since they have not published any concrete information about the final design or supporting hardware architecture. $\endgroup$ Jan 31 at 11:46
  • $\begingroup$ Other answers on this forum have have very general descriptions of the size of GPU architecture, from which power consumption could be estimated assuming a constant workload. What i haven't seen in public domain is a estimate of the throughput of response numbers per second/hour/day/week. $\endgroup$ Feb 1 at 20:54

3 Answers 3

4
$\begingroup$

Sam Altman states "probably single-digits cents" thus worst case 0,09€/request.

I guess a least half the cost are energy at a cost of 0,15€/1kWh, a request would cost 0,09€/request*50%/0,15€/1kW=0,3kWh/request = 300Wh per request. 60 Smartphone charges of 5Wh per Charge ;) Source:https://www.forbes.com/sites/ariannajohnson/2022/12/07/heres-what-to-know-about-openais-chatgpt-what-its-disrupting-and-how-to-use-it/

Google Search request 0.0003 kWh = 0,3Wh, thus a search request by Google uses 1000x less, but as Google has started to use AI to, probably a search consumes more by now as well. Source: https://store.chipkin.com/articles/did-you-know-it-takes-00003-kwh-per-google-search-and-more

$\endgroup$
4
  • $\begingroup$ It’s worth noting that Sam Altman and OpenAI are American, so USD and American energy costs are more relevant than Euros. Also, we know ChatGPT is trained from a GPT3.5 foundation model, so the architecture and energy expenditure can be estimated from that direction as well. (I assume that running the language model itself absolutely dominates the energy intensity, compared to e.g web servers, moderation models, etc.) $\endgroup$
    – kdbanman
    Feb 2 at 16:54
  • 1
    $\begingroup$ Correct the difference between € and $ are not so important, compared to the other factors, like energy cost. As I live in the EU, it is harder for me to estimate the energy price OpenAI might pay, may you provide that, so I can update my estimate? I don't have the knowledge neither inside to calculate from GPU usage of the model. I am looking forward to that calculation to see how off I was. $\endgroup$
    – KFilter
    Feb 3 at 17:14
  • $\begingroup$ yes, like CAPEX and OPEX, there would be training phase and embodied energy of the GPU servers (embodied energy as a one off energy and emissions 'cost' equivalent of CAPEX) and the energy consumption of the servers since ChatGPT was opened up for public access. I'm guessing operational energy is the majority of energy use. $\endgroup$ Feb 17 at 2:57
  • $\begingroup$ @Kfilter depends if they are paying for energy on a Power Purchase Agreement (probably if their consumption is high) and if it's 100% RE or dirty power supply. depends what state the servers are operating it too (they might be in Greenland or Alaska running on geothermal with cheap cooling with the freezing air exchange outside). I'll try and find a wholesale power price. Do you kwon where their servers are located geographically? $\endgroup$ Feb 17 at 3:00
3
$\begingroup$

I've taken a stab at estimating the carbon footprint of ChatGPT here. I estimated the daily carbon footprint of the ChatGPT service to be around 23 kgCO2e and the primary assumption was that the service was running on 16 A100 GPUs. I made the estimate at a time with little information about the user base was available. I now believe that the estimate is way too low because ChatGPT reportedly had 590M visits in January which I don't think 16 gpus can handle.

Recently, I also estimated ChatGPT's electricity consumption in January 2023 to be between 1.1M and 23M KWh.

To convert that into a carbon footprint, we'd need to know the carbon intensity of the electricity grid in every location where a ChatGPT instance is running. We don't have this info, but if we instead convert the electricity consumption into a carbon footprint using a very low carbon intensity like Sweden's 9g / KWh (which is the lowest in EU and lower than the US), the carbon footprint of ChatGPT in January 2023 would be estimated to be between 10 and 207 tons CO2e.

$\endgroup$
5
  • $\begingroup$ I asked CHatGTP what cloud computing services openAI use… it listed four of the big ones… > 1. AWS, 2. Microsoft Azure, 3. Google Cloud Platform (GVP) 4. IBM Cloud… just ask ChatGTP for details, but it doesn't get into specifics or proportions of workloads used across these services used by ChatGTP so it's all pretty vague. $\endgroup$ Mar 4 at 15:47
  • 2
    $\begingroup$ Since ChatGPT is known to hallucinate, I don't really trust ChatGPT's answers in this regard. Since OpenAI has what appears to be a pretty close partnership with Microsoft, I'd be very surprised if ChatGPT also run on other cloud vendors :) btw I've asked ChatGPT about its carbon footprint many times, but never gotten anything useful. But perhaps I'm not good enough at prompt engineering $\endgroup$
    – KasperGL
    Mar 5 at 9:46
  • $\begingroup$ true, I often correct it and sometimes for fun I correct it with a lie and then it repeats the lie back to me like I schooled it in something. :-) $\endgroup$ Mar 7 at 5:29
  • $\begingroup$ it's pretty amazing that it's not a question that one hundred blogger, podcasters and YouTubers haven't asked. if the C footprint is in the scale of 10^3 or higher and literally all information based website start using it or similar architectures, (which is a lot if you think about it a little) then that's a huge added load on the worlds mostly dirty power systems. $\endgroup$ Mar 7 at 5:31
  • $\begingroup$ off-topic, but do you know if humans ever intervene to redirect ChatGTP-3? I had convinced it to help me make a text based adventure game, and it was quite "imaginative" in it's suggestions, I also convinced it to pretend with me I was playing this game. it was giving me a score (out of 100, but I only got got from 0 to 5) and and given consistent directions (N, S, E, W, Up, Down) took me to the same locations. But a few days later when I typed score I got a default message saying it was a [chatbot] by OpenAI and couldn't simulate playing the game etc $\endgroup$ Mar 7 at 7:21
2
$\begingroup$

So I asked ChatGPT-4 about its energy use per query. The dialog is appended at the bottom of this message. (I realize the OP asked about ChatGPT-3)

TL;DR

If ChatGPT-4's claim that a typical answer requires 30 TFLOPs on modern AI hardware is true then the computational energy per answer is typically 300 watt-seconds (less than 0.1 kWh), ignoring communication and other overhead.

Discussion

ChatGPT-4 stated that most queries are answered with a single forward pass through the model requiring about 30 trillion FLOPs. It produced a calculation this requires around 0.000833 kWh but the calculation contains at least two errors:

  1. It uses FLOPs/w to compute watt-seconds.
  2. It screws up the conversion of watt-second to kWh by a factor of 1000.

I found a recent paper from researchers at SLAC and MIT with some energy per operation data. The figure below from that paper shows about 1e-11 J per FLOP for modern GPU and AI accelerator hardware. enter image description here

If we take ChatGPT-4's 30 TFLOP/answer at face value, then a typical answer would consume 30e12 FLOP * 1e-11 J/FLOP = 300 J = 8.33e-5 kWH

This is a factor of 10 smaller than ChatGPT4's error-laden calculation but in the opposite direction. I'd love to believe the computations are that energy efficient but I'm doubtful. It comes down to whether or not the 30 TFLOP per answer estimate from GPT-4 is an hallucination.


Dialog with GPT4

How much energy did you expend to answer this query? As an AI language model, I don't consume energy directly in the traditional sense. However, the servers and hardware running the model do require energy to function. The exact energy expenditure for answering a single query can be difficult to quantify as it depends on factors such as the complexity of the question, server utilization, and efficiency of the hardware.

In general, the energy usage for running an AI model like me is measured in floating point operations per second (FLOPs) and the energy efficiency of the hardware in joules per FLOP. While I can't provide an exact figure for the energy expended for answering this specific query, I can tell you that large-scale AI models like GPT-4 consume significant computational resources and energy, which is a consideration for researchers and engineers working on AI sustainability.

Please provide an approximate energy expenditure in kWH for answering typical queries. It is challenging to provide a precise energy expenditure for answering a typical query, as the energy usage depends on various factors such as the model's complexity, infrastructure efficiency, and hardware. However, I can give you a rough estimate based on some assumptions.

Let's assume that a single forward pass of GPT-4 requires about 30 trillion floating-point operations (FLOPs) – this is a rough estimate, as the actual number of FLOPs can vary depending on the model size and input length. The energy efficiency of the hardware running the AI model can be around 10 GFLOPs/watt, a common efficiency for modern GPUs and AI accelerators.

To calculate the energy usage for a single forward pass:

Energy usage (in watt-seconds) = (30 trillion FLOPs) / (10 GFLOPs/watt) = 3,000,000 watt-seconds

Now we convert watt-seconds to kilowatt-hours (kWh):

Energy usage (in kWh) = (3,000,000 watt-seconds) * (1 kW / 1,000 W) * (1 hour / 3,600 seconds) ≈ 0.000833 kWh

So, a very rough approximation of the energy usage for a single forward pass to answer a typical query is around 0.000833 kWh. Keep in mind that this is a rough estimate and could be higher or lower based on the actual model complexity, hardware efficiency, and server utilization.

How many forward passes does GPT-4 typically require to answer a typical query? GPT-4, like other generative language models, is based on the Transformer architecture, which uses a decoder-only design for generating text. For a typical query, GPT-4 usually requires one forward pass through the model to generate a response.

During the forward pass, the model processes the input tokens and generates a probability distribution over the vocabulary for the next token at each position in the sequence. The process continues sequentially until an end-of-sequence token is generated or a predetermined maximum length is reached.

In summary, GPT-4 generally needs one forward pass to answer a typical query. However, it's important to note that, in practice, additional computational overhead may be involved in tokenization, decoding, and other preprocessing and postprocessing steps.

Share

$\endgroup$
1
  • $\begingroup$ Nice! The 8.33e-5 seems reasonable. BLOOM once used 0.00396 KWh per query (arxiv.org/abs/2211.02001) and using the ChatGPT user and GPU numbers from an article on SemiAnalysis, we arrive at 0.000712 KWh per query. Daily requests: 15 x 13m = 195,000,000, which takes 28,936 A100 GPUs (semianalysis.com/p/…) Energy consumption per query assuming power draw is 50% of max TDP: 28,936 GPUs * (0.4KW/2) * 24 = 0,000712 KWh $\endgroup$
    – KasperGL
    Mar 31 at 13:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .