CO2 Emissions and the 🤗 Hub: Leading the Charge
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.
Related posts
- CO₂ Emissions and Models Performance: Insights from the Open LLM Leaderboard
Hugging Face mediumAdeptAcross 2,742 models evaluated on the Open LLM Leaderboard, estimated CO₂ cost grows with parameter count while scores show diminishing returns. MoE models have a poor score-to-emission ratio due to long inference times, and Qwen-2.5-14B and Phi-3-Medium come out as the most efficient. Community fine-tunes and merges tend to emit less than the official models they derive from, largely because they produce shorter, terminating outputs. On generative benchmarks like IFEval, which run without a stop token, base models and verbose instruct models generate long or repetitive text up to the 1,280-token limit, inflating energy use. The emission figures are estimated from evaluation time, cluster power draw and grid carbon intensity, so they apply only to this specific inference setup.
- Codex is Open Sourcing AI models
Hugging Face mediumAdeptHugging 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. From a short prompt it validates the dataset, picks hardware, submits TRL training (SFT, DPO, GRPO), tracks metrics in Trackio, runs lighteval evaluations and keeps a markdown experiment report up to date. In the walkthrough, a LoRA SFT of Qwen3-0.6B on open-r1/codeforces-cots raises HumanEval pass@1 from about 0.30 to 0.34, and the model is then converted to quantized GGUF for llama.cpp. Rough costs are $1-2 for models under 1B, $5-15 for 1-3B and $15-40 for 3-7B with LoRA, and models above 7B are not yet supported.
- Introducing Skops
Hugging Face mediumAdeptSkops is a Hugging Face library for hosting scikit-learn models on the Hugging Face Hub, generating model cards and sharing them with collaborators. An end-to-end walkthrough trains a DecisionTreeClassifier, serializes it with pickle, and uses hub_utils.init to build a local repo with a config file capturing requirements, task and example input. It then fills a model card via the Card class with metadata, metrics, plots and descriptions, pushes to the Hub (enabling the inference widget), and covers download and update_env. The backend currently loads models with joblib, and the post does not cover secure serialization.
- Shipping huggingface_hub every week with AI, open tools, and a human in the loop
Hugging Face mediumAdepthuggingface_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. The key pattern wraps the model in deterministic guardrails: a script extracts PR numbers from squash-merge commits as a manifest, diffs it against PRs referenced in the draft, and re-prompts the agent to fix missing or extra entries. The model is grounded with docs diffs from each PR, and a human edits the draft before promoting the RC. Publishing uses PyPI Trusted Publishing with OIDC and Sigstore attestations plus a checksum-pinned agent runtime, and each release costs about $0.25 in inference.
- Personal Copilot: Train Your Own Coding Assistant
Hugging Face hardMasterHugCoder 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. Full fine-tuning of the 15.5B model on 8×A100 80GB with FSDP took 9 hours (~$108), while QLoRA on a single A100 40GB took 12.5 hours (~$13.75), with a per-parameter memory breakdown explaining why. QLoRA reached slightly higher loss than full fine-tuning but preserved HumanEval pass@1 (33.37 vs 33.57) and matched it qualitatively on HF-specific infilling where GitHub Copilot failed. The post also covers serving the model in VS Code via Inference Endpoints, training a chat variant, and combining LoRA adapters across tasks and base models.