Text Classification
Transformers
Safetensors
distilbert
dia
carbon-footprint
energy-efficiency
sustainability
Instructions to use DIA-MVP/my-bert-sentiment-cpu with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DIA-MVP/my-bert-sentiment-cpu with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="DIA-MVP/my-bert-sentiment-cpu")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("DIA-MVP/my-bert-sentiment-cpu") model = AutoModelForSequenceClassification.from_pretrained("DIA-MVP/my-bert-sentiment-cpu", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| library_name: transformers | |
| tags: | |
| - dia | |
| - carbon-footprint | |
| - energy-efficiency | |
| - sustainability | |
| dia_version: '0.1' | |
| dia_report: | |
| scope: incremental | |
| lineage: | |
| - model: distilbert-base-uncased | |
| relation: finetune | |
| compute: | |
| hardware: | |
| gpu: cpu-80core | |
| count: 1 | |
| duration_gpu_hours: 0.5381 | |
| footprint: | |
| energy_kwh: | |
| value: 0.026 | |
| quality: measured | |
| carbon_kgco2eq: | |
| value: 0.0017 | |
| quality: measured | |
| water_liters: | |
| value: | |
| - 0.047 | |
| - 0.104 | |
| quality: estimated-from-default-wue | |
| context: | |
| region: ca-on | |
| carbon_intensity: 0.03 | |
| wue_l_per_kwh: | |
| - 1.8 | |
| - 4.0 | |
| tool: codecarbon | |
| license: apache-2.0 | |
| pipeline_tag: text-classification | |
| base_model: distilbert-base-uncased | |
| # DistilBERT — SST-2 sentiment (CPU (80-core)) | |
| A demo model from the **Data & Impact Accounting (DIA)** lab. It performs | |
| binary sentiment classification (SST-2) via **full fine-tune**, with the base model `distilbert-base-uncased`, trained on | |
| **CPU (80-core)**. | |
| The point of this repo is not the model itself but its **`dia_report`** — a | |
| standardized record of the energy, carbon, and water used to train it, embedded | |
| in this card's metadata. | |
| This footprint feeds the DIA dashboard, which rolls up a base model and all its derivatives to show the **cumulative** carbon, water, and energy cost of a model family. | |
| ## Training footprint | |
| | Metric | Value | | |
| |---|---| | |
| | Hardware | 1× cpu-80core | | |
| | Compute | 0.5381 GPU-hours | | |
| | Energy | 0.026 (measured) kWh | | |
| | Carbon | 0.0017 (measured) kgCO₂eq | | |
| | Water | 0.047–0.104 (estimated-from-default-wue) L | | |
| | Grid region | ca-on | | |
| *Energy and carbon are measured with [CodeCarbon](https://github.com/mlco2/codecarbon); | |
| water is estimated from a default water-usage-effectiveness range. Carbon uses the | |
| local grid's intensity (Ontario, ~0.03 kgCO₂eq/kWh).* | |
| ## Reproduce | |
| ```bash | |
| REPO=DIA-MVP/my-bert-sentiment-cpu python scripts/train_bert_demo.py | |
| ``` | |
| ## Links | |
| - **Footprint table (dataset):** [DIA-MVP/dia-state-lab-2026](https://huggingface.co/datasets/DIA-MVP/dia-state-lab-2026) | |
| - **Project / paper:** [ai-impact-accounting](https://github.com/VectorInstitute/ai-impact-accounting) | |
| - **Lab workflow:** see `LAB.md` in the repo | |