التحقق من استهلاك الطاقة للذكاء الاصطناعي: التحقق من CodeCarbon مقابل القياسات الخارجية Ground-truthing AI energy consumption: validating CodeCarbon against external measurements

شارك:
المجلة: it – Information Technology، المجلد: 67، العدد: 4
DOI: https://doi.org/10.1515/itit-2025-0031
تاريخ النشر: 2026-07-10
المؤلف: Raphael Fischer
الموضوع الرئيسي: تكنولوجيا المعلومات الخضراء والاستدامة

نظرة عامة

يتناول هذا القسم من ورقة البحث الآثار البيئية للتقدم في التعلم الآلي (ML) والذكاء الاصطناعي (AI)، مع تسليط الضوء على تطوير أدوات مثل آلة حساب انبعاثات ML وCodeCarbon لتقدير استهلاك الطاقة والانبعاثات الكربونية المرتبطة بنماذج الذكاء الاصطناعي. على الرغم من أن هذه الأدوات سهلة الاستخدام وتتكامل بسهولة في مشاريع الذكاء الاصطناعي، إلا أنها تعتمد على افتراضات عملية قد تؤثر على دقة التقدير. تقوم الدراسة بتقييم موثوقية كل من طرق تقدير الطاقة الثابتة والديناميكية بشكل منهجي من خلال مقارنتها بالقياسات الحقيقية من العديد من تجارب الذكاء الاصطناعي. تكشف النتائج أن هذه الأساليب التقديرية يمكن أن تظهر أخطاء تصل إلى 40%، مما يبرز الحاجة إلى تحسين الدقة في تقييمات استهلاك الطاقة.

في الختام، تؤكد الدراسة فعالية أدوات تقدير الطاقة في التقاط الاستهلاك العام للموارد لنماذج الذكاء الاصطناعي ولكنها تبرز أيضًا التباينات الكبيرة عند مقارنتها بالقياسات الفعلية. تشير إلى أن زيادة تعقيد النموذج تتوافق مع زيادة الطلب على الطاقة وعدم دقة التقديرات، المتأثرة باختيارات المعلمات الفائقة وأنواع المعالجات. تزود الأبحاث الممارسين المدركين للموارد بأساليب لتقييم استهلاك الطاقة في تجاربهم في الذكاء الاصطناعي وتوفر إرشادات لمطوري أدوات التقدير لتحسين دقتها. بشكل عام، تعزز مساهمات هذا العمل الشفافية وتسهّل التنمية المستدامة وتطبيق تقنيات الذكاء الاصطناعي.

مقدمة

تسلط مقدمة ورقة البحث الضوء على الطبيعة المزدوجة للذكاء الاصطناعي (AI)، مع التأكيد على إمكانيته للابتكار المستدام عبر مختلف القطاعات، بما في ذلك البناء والنقل والرعاية الصحية والتصنيع. ومع ذلك، فإنها تبرز أيضًا المخاطر الكبيرة المرتبطة بالذكاء الاصطناعي، وخاصة المخاطر النظامية التي تهدد الاستدامة الاجتماعية والاقتصادية والبيئية. يشير المؤلفون إلى أن مجتمع التعلم الآلي (ML) غالبًا ما يعطي الأولوية للأداء التنبؤي على الوعي بالموارد، مما يؤدي إلى اتجاهات مقلقة في استهلاك الحوسبة ونموذج “الأكبر هو الأفضل”. من الضروري لتحقيق تقدم مستدام في الذكاء الاصطناعي تحقيق توازن بين القدرات التنبؤية واستهلاك الموارد والتنقل عبر “واجهة باريتو” لأداء النموذج متعدد الأبعاد.

تناقش الورقة تطوير أدوات تهدف إلى قياس استهلاك الطاقة والانبعاثات الكربونية المرتبطة بالذكاء الاصطناعي، مثل آلة حساب انبعاثات ML وCodeCarbon. لقد اكتسبت هذه الأدوات زخمًا بين الممارسين الذين يركزون على الوعي بالموارد، حيث تم الاستشهاد بآلة حساب انبعاثات ML بشكل واسع وحقق CodeCarbon شعبية كبيرة على منصات مثل GitHub. على الرغم من مساهماتها، يثير المؤلفون أسئلة حاسمة بشأن دقة هذه الأدوات في تقدير استهلاك الطاقة. يشيرون إلى أن الأساليب الثابتة قد لا تأخذ في الاعتبار سحب الطاقة المتغيرة خلال تجارب مختلفة، بينما قد تتجاهل الطرق الديناميكية بعض مكونات الأجهزة التي تؤثر على استهلاك الطاقة الكلي. وهذا يبرز الحاجة إلى قياسات منهجية ودقيقة لفهم التأثير البيئي لتقنيات الذكاء الاصطناعي بشكل أفضل.

الطرق

في هذا القسم، يتم توضيح المنهجية للتحقق من تقدير استهلاك الطاقة في الذكاء الاصطناعي، مع التركيز على ثلاثة نهج رئيسية لقياس الآثار البيئية المرتبطة باستخدام وتطوير الذكاء الاصطناعي. يتماشى الإطار مع معايير التقارير المستدامة والموثوقة، كما هو مذكور في المصادر [14، 15].

تُجرى تجارب الذكاء الاصطناعي، أو التقييمات، ضمن بيئة محددة تشمل كل من مكونات الأجهزة والبرامج. يتميز كل تجربة بتكوين محدد يوضح مهمة التعلم، ومجموعة البيانات، ونموذج أو طريقة الذكاء الاصطناعي المستخدمة. على الرغم من أن الدراسة الحالية تركز على نشر الذكاء الاصطناعي—تحديدًا مرحلة الاستدلال باستخدام النماذج المدربة مسبقًا—إلا أن المنهجيات التي تم مناقشتها قابلة للتكيف مع مهام أخرى ذات صلة بالذكاء الاصطناعي.

النتائج

يوفر قسم النتائج تحليلًا مفصلًا لاستهلاك الطاقة ودقة التقدير لمختلف نماذج التعلم العميق خلال التقييمات التجريبية. توضح الشكل 4 متوسط سحب الطاقة (بالواط) للنماذج مرتبة حسب عدد المعلمات، مما يكشف عن اتجاه تصاعدي في استهلاك الطاقة مع زيادة التعقيد. من الجدير بالذكر أن بعض النماذج، مثل NASNetMobile وDenseNet201، تظهر كفاءة طاقة أكبر مما هو متوقع. يبالغ تقدير تقدير الطاقة الثابت بشكل مستمر في سحب الطاقة للنماذج الصغيرة بينما يقلل من تقديرها للنماذج الأكبر، مع تباينات غالبًا ما تتجاوز 100 واط. وصل الحد الأقصى لسحب الطاقة الملحوظ إلى 534 واط لنموذج magistral:24b، وهو ما يقارب ضعف التقدير الثابت.

تشير التحليلات الإضافية للطاقة المطلوبة لتصنيف 1000 صورة أو للإجابة على استفسار واحد إلى أن نماذج اللغة التوليدية تتطلب موارد أكبر بكثير من مصنفي الصور. بينما تلتقط كل من طرق التقدير الثابتة والديناميكية أنماط الاستهلاك العامة، فإنها تظهر أخطاء منهجية، خاصة مع النماذج الأكبر. يستكشف القسم أيضًا تأثير المعلمات الفائقة، مثل حجم الدفعة ودرجة الحرارة، على استهلاك الموارد. تقلل أحجام الدفعات الأكبر من سحب الطاقة وأخطاء التقدير، بينما تؤدي درجات الحرارة المنخفضة في نماذج اللغة إلى زيادة الطلب على الطاقة والتباين. أخيرًا، يؤثر اختيار بيئة التنفيذ (وحدة المعالجة المركزية مقابل وحدة معالجة الرسومات) بشكل كبير على دقة التقدير، حيث يؤدي الاستدلال باستخدام وحدة المعالجة المركزية فقط إلى أخطاء أعلى بكثير، خاصة للنماذج المعقدة. تؤكد هذه النتائج على أهمية الإبلاغ عن تكوينات النماذج وتبرز التحديات في تقدير الطاقة عبر بيئات المعالجة المختلفة.

المناقشة

يتناول قسم المناقشة في ورقة البحث المنهجيات لتقدير استهلاك الطاقة والأثر البيئي لتجارب الذكاء الاصطناعي. يميز بين أساليب التقدير الثابتة والديناميكية. تبسط التقديرات الثابتة، كما هو موضح في آلة حساب تأثير ML، حساب انبعاثات CO₂ باستخدام صيغة تأخذ في الاعتبار استهلاك الطاقة، ومدة التشغيل، وكفاءة CO₂. على الرغم من أن هذه الطريقة بسيطة، إلا أنها تفشل في أخذ تعقيدات بيئات التنفيذ الحديثة في الاعتبار، مثل سحب الطاقة المتغيرة بناءً على حجم النموذج ونوع المهمة. في المقابل، تستخدم التقديرات الديناميكية أدوات التوصيف لالتقاط استهلاك الطاقة في الوقت الفعلي، مما يوفر تمثيلًا أكثر دقة لاستخدام الطاقة. ومع ذلك، فإنها محدودة بقدرة الأجهزة على تتبع استهلاك الطاقة عبر جميع المكونات وقد تقلل من تقدير تأثير أنظمة التبريد.

تؤكد الورقة على ضرورة التحقق من استهلاك الطاقة من خلال قياسات خارجية، والتي يمكن أن توفر تقييمًا أكثر دقة للحقائق. تم تنفيذ إعداد عملي باستخدام مقياس طاقة قياسي وتقنيات رؤية الكمبيوتر لمقارنة الأساليب الثابتة والديناميكية والقياسات الخارجية. تشير النتائج إلى أن أدوات تقدير الطاقة الحالية غالبًا ما تقلل من تقدير استهلاك الطاقة الفعلي، خاصة مع زيادة تعقيد النموذج. تبرز المناقشة أهمية النظر في عوامل إضافية في دورة حياة الذكاء الاصطناعي، مثل التأثيرات المتجسدة وتكاليف التبريد، لتحقيق فهم شامل للأثر البيئي للذكاء الاصطناعي. يدعو المؤلفون إلى تحسين أدوات تقدير الطاقة التي تأخذ في الاعتبار هذه النتائج، مما يدعم في النهاية ممارسات الذكاء الاصطناعي الأكثر استدامة.

Journal: it – Information Technology, Volume: 67, Issue: 4
DOI: https://doi.org/10.1515/itit-2025-0031
Publication Date: 2026-07-10
Author(s): Raphael Fischer
Primary Topic: Green IT and Sustainability

Overview

This research paper section discusses the environmental implications of machine learning (ML) and artificial intelligence (AI) advancements, highlighting the development of tools like the ML Emissions Calculator and CodeCarbon for estimating energy consumption and carbon emissions associated with AI models. While these tools are user-friendly and integrate easily into AI projects, they rely on pragmatic assumptions that may compromise estimation accuracy. The study systematically assesses the reliability of both static and dynamic energy estimation methods by comparing them with ground-truth measurements from numerous AI experiments. The findings reveal that these estimation approaches can exhibit errors of up to 40%, underscoring the need for improved accuracy in energy consumption assessments.

In conclusion, the study validates the effectiveness of energy estimation tools in capturing the general resource consumption of AI models but also highlights significant discrepancies when compared to actual measurements. It notes that increased model complexity correlates with higher energy demands and estimation inaccuracies, influenced by hyperparameter choices and processor types. The research equips resource-aware practitioners with methods to evaluate the energy consumption of their AI experiments and provides guidelines for developers of estimation tools to enhance their accuracy. Overall, the contributions of this work promote transparency and facilitate the sustainable development and application of AI technologies.

Introduction

The introduction of the research paper highlights the dual nature of artificial intelligence (AI), emphasizing its potential for sustainable innovation across various sectors, including construction, transportation, healthcare, and manufacturing. However, it also underscores significant risks associated with AI, particularly systemic risks that threaten societal, economic, and environmental sustainability. The authors point out that the machine learning (ML) community often prioritizes predictive performance over resource awareness, leading to concerning trends in compute consumption and a “bigger-is-better” paradigm. To advance AI sustainably, it is essential to balance predictive capabilities with resource consumption and navigate the “Pareto front” of multidimensional model performance.

The paper discusses the development of tools aimed at quantifying the energy consumption and carbon emissions associated with AI, such as the ML Emissions Calculator and CodeCarbon. These tools have gained traction among practitioners focused on resource awareness, with the ML Emissions Calculator being cited extensively and CodeCarbon achieving significant popularity on platforms like GitHub. Despite their contributions, the authors raise critical questions regarding the accuracy of these tools in estimating energy consumption. They note that static approaches may not account for variable power draws during different experiments, while dynamic methods may overlook certain hardware components that influence overall energy usage. This highlights the need for systematic and accurate measurements to better understand the environmental impact of AI technologies.

Methods

In this section, the methodology for validating AI energy consumption estimation is outlined, with a focus on three primary approaches for quantifying environmental impacts associated with AI usage and development. The framework aligns with sustainable and trustworthy reporting standards, as referenced in sources [14, 15].

AI experiments, or evaluations, are conducted within a defined environment that encompasses both hardware and software components. Each experiment is characterized by a specific configuration detailing the learning task, dataset, and AI model or method employed. Although the current study emphasizes AI deployment—specifically the inference phase using pre-trained models—the methodologies discussed are adaptable to other AI-related tasks.

Results

The results section provides a detailed analysis of the energy consumption and estimation accuracy of various deep learning models during experimental evaluations. Figure 4 illustrates the average power draw (in Watts) of models sorted by parameter count, revealing an upward trend in power consumption with increased complexity. Notably, some models, such as NASNetMobile and DenseNet201, exhibit greater power efficiency than anticipated. The static energy estimation consistently overestimates power draw for smaller models while underestimating for larger ones, with discrepancies often exceeding 100 Watts. The maximum observed power draw reached 534 Watts for the magistral:24b model, nearly double the static estimate.

Further analysis of energy required to classify 1000 images or answer a single query indicates that generative language models demand significantly more resources than image classifiers. While both static and dynamic estimation methods capture general consumption patterns, they exhibit systematic errors, particularly with larger models. The section also explores the impact of hyperparameters, such as batch size and temperature, on resource consumption. Larger batch sizes reduce energy draw and estimation errors, while lower temperatures in language models lead to increased energy demand and variability. Lastly, the choice of execution environment (CPU vs. GPU) significantly affects estimation accuracy, with CPU-only inference resulting in substantially higher errors, particularly for complex models. These findings underscore the importance of reporting model configurations and highlight the challenges in energy estimation across different processing environments.

Discussion

The discussion section of the research paper addresses the methodologies for estimating the energy consumption and environmental impact of AI experiments. It distinguishes between static and dynamic estimation approaches. Static estimation, exemplified by the ML Impact Calculator, simplifies the calculation of CO₂ emissions using a formula that incorporates power consumption, running time, and CO₂ efficiency. While this method is straightforward, it fails to account for the complexities of modern execution environments, such as varying power draws based on model size and task type. In contrast, dynamic estimation employs profiling tools to capture real-time power consumption, providing a more accurate representation of energy usage. However, it is limited by the hardware’s ability to track power consumption across all components and may underestimate the impact of cooling systems.

The paper emphasizes the necessity of validating energy consumption through external measurements, which can provide a more accurate ground-truth assessment. A practical setup using a standard energy meter and computer vision techniques was implemented to compare static, dynamic, and external measurement approaches. The findings indicate that existing energy estimation tools often underestimate actual energy consumption, particularly as model complexity increases. The discussion highlights the importance of considering additional factors in the AI lifecycle, such as embodied impacts and cooling overhead, to achieve a holistic understanding of AI’s environmental footprint. The authors advocate for improved energy estimation tools that incorporate these findings, ultimately supporting more sustainable AI practices.