---
title: "CO2 Emissions and the 🤗 Hub: Leading the Charge"
description: "The huggingface_hub library supports filtering Hub models by training carbon footprint via an emissions threshold on list_models, letting you find, for example, the 191 models that emitted at most 100 g CO2 or the 10 that emitted over 500 g. On the reporting side, installing codecarbon makes the transformers Trainer automatically add a CodeCarbonCallback that writes per-run emissions to emissions.csv."
url: "https://swe.quest/articles/co2-emissions-and-the-hub-leading-the-charge-b7891a3809117369"
canonical: "https://huggingface.co/blog/carbon-emissions-on-the-hub"
source: "Hugging Face"
published: "2022-04-22"
difficulty: "medium"
kind: "How-to"
reading_minutes: 4
tags: ["model-training","machine-learning","python"]
---

# CO2 Emissions and the 🤗 Hub: Leading the Charge

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2022-04-22, 4 min read, How-to. Original: [https://huggingface.co/blog/carbon-emissions-on-the-hub](https://huggingface.co/blog/carbon-emissions-on-the-hub)

## Summary

The huggingface\_hub library supports filtering Hub models by training carbon footprint via an emissions threshold on list\_models, letting you find, for example, the 191 models that emitted at most 100 g CO2 or the 10 that emitted over 500 g. On the reporting side, installing codecarbon makes the transformers Trainer automatically add a CodeCarbonCallback that writes per-run emissions to emissions.csv. That value can then go into the model card's co2\_eq\_emissions metadata to make emissions transparent and searchable.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Machine learning](https://swe.quest/tags/machine-learning.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- Hugging Face Transformers Trainer
- Python ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))

## Keywords

Hugging Face Hub, huggingface\_hub, Transformers, CodeCarbon, model cards

## Related posts

- [CO₂ Emissions and Models Performance: Insights from the Open LLM Leaderboard](https://swe.quest/articles/co2-emissions-and-models-performance-insights-from-the-open-llm-leaderboard-83f3a9f9e3cf49a2.md): Hugging Face · 2025-01-09 · Medium · 16 min read · Evaluation, LLMs, Inference & serving
  Across 2,742 models evaluated on the Open LLM Leaderboard, estimated CO₂ cost grows with parameter count while scores show diminishing returns.
- [Codex is Open Sourcing AI models](https://swe.quest/articles/codex-is-open-sourcing-ai-models-fa17d18abe8d9c1f.md): Hugging Face · 2025-12-11 · Medium · 18 min read · Model training, AI agents, AI for coding, Evaluation
  Hugging Face Skills, a repository of agent instructions loaded via AGENTS.md (or Claude Code Skills), lets OpenAI Codex run end-to-end fine-tuning experiments on Hugging Face Jobs.
- [Introducing Skops](https://swe.quest/articles/introducing-skops-ddba76d41440d3bf.md): Hugging Face · 2022-08-12 · Medium · 6 min read · ML platforms, Python, Machine learning, Open source
  Skops is a Hugging Face library for hosting scikit-learn models on the Hugging Face Hub, generating model cards and sharing them with collaborators.
- [Shipping huggingface\_hub every week with AI, open tools, and a human in the loop](https://swe.quest/articles/shipping-huggingface-hub-every-week-with-ai-open-tools-and-a-human-in-the-loop-beb8acfe6f6762ac.md): Hugging Face · 2026-06-23 · Medium · 10 min read · CI/CD, Deployment, AI agents, Supply chain security, Python
  huggingface\_hub moved from releases every 4-6 weeks to weekly releases driven by a single GitHub Actions workflow that automates versioning, tagging, PyPI publishing, downstream test branches, post-release bumps and Slack reporting, with an open-weights model (GLM via HF Inference Providers, run through OpenCode) drafting release notes and announcements.
- [Personal Copilot: Train Your Own Coding Assistant](https://swe.quest/articles/personal-copilot-train-your-own-coding-assistant-058d44307821dd4e.md): Hugging Face · 2023-10-27 · Hard · 15 min read · Model training, AI for coding, LLMs
  HugCoder is a code LLM fine-tuned on the top 10 Hugging Face GitHub repositories, built by cloning repos in parallel, filtering non-code files and training StarCoder with a fill-in-the-middle objective.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
