/ Модель

Характеристики

Контекст
512 токенов
Параметры
15,6 млн
Лицензия
Apache 2.0
Архитектура
bert · dense
Базовая модель
TinyBERT_General_4L_312D
Библиотека
transformers
Опубликована
17 янв 2025

TinyBert-frugal-ai-text-classification

Классификация текстаТекст → label3 профессии

Компактная модель на базе TinyBERT классифицирует текстовые аргументы о скептицизме по отношению к изменению климата по семи категориям.

109скачиваний за 30 дней8лайковвеса обновлены20 янв 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

ParisNeo разработала модель классификации текста на базе TinyBERT для распознавания аргументов, связанных со скептицизмом по отношению к изменению климата. Модель дообучена на huawei-noah/TinyBERT_General_4L_312D и предсказывает одну из семи категорий: нерелевантность, отрицание факта изменения климата, отрицание влияния человека, преуменьшение последствий, необходимость ископаемого топлива, ненадёжность науки и предвзятость сторонников климатической повестки. Карточка также упоминает возражения против решений, но не приводит их отдельной меткой в указанном сопоставлении классов.

Модель принимает текст и выдаёт метку класса. Используются архитектура BERT и классификационная голова; размер составляет 15,6 млн параметров, контекст — до 512 токенов по метаданным. Для обучения применялись взвешенная функция потерь и данные Frugal AI Challenge; README указывает ограничение предобработки до 128 токенов. Доступны веса Safetensors и формат ONNX. Валидационные метрики в карточке расходятся: заявленная точность 99,92% не согласуется с таблицей и сводкой, где указана точность около 0,83, поэтому результаты следует проверять на целевых данных. Лицензия — Apache-2.0.

Сценарии применения

  • классификация аргументов об отрицании изменения климата
  • поиск отрицания антропогенной причины изменения климата
  • выявление утверждений о ненадёжности климатической науки
  • сортировка сообщений по аргументам о необходимости ископаемого топлива
  • анализ заявлений о предвзятости сторонников климатической повестки

Ограничения

Карточка приводит противоречивые оценки качества: заявленные 99,92% точности расходятся с валидационной сводкой около 0,83; проверьте модель на целевых данных. README указывает, что качество может снижаться на текстах длиннее 128 токенов и на новых или тонко сформулированных аргументах.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Model Card: climate-skepticism-classifier

Model Overview

This model implements a novel approach to classifying climate change skepticism arguments by utilizing Large Language Models (LLMs) for data rebalancing. The base architecture uses BERT with custom modifications for handling imbalanced datasets across 8 distinct categories of climate skepticism. The model achieves exceptional performance with an accuracy of 99.92%.

The model categorizes text into the following skepticism types:
- Fossil fuel necessity arguments
- Non-relevance claims
- Climate change denial
- Anthropogenic cause denial
- Impact minimization
- Bias allegations
- Scientific reliability questions
- Solution opposition

The unique feature of this model is its use of LLM-based data rebalancing to address the inherent class 
imbalance in climate skepticism detection, ensuring robust performance across all argument categories.

Dataset

  • Source: Frugal AI Challenge Text Task Dataset
  • Classes: 7 unique labels representing various categories of text
  • Preprocessing: Tokenization using BertTokenizer with padding and truncation to a maximum sequence length of 128.

Model Architecture

  • Base Model: huawei-noah/TinyBERT_General_4L_312D
  • Classification Head: cross-entropy loss.
  • Number of Labels: 7

Training Details

  • Optimizer: AdamW
  • Learning Rate: 2e-5
  • Batch Size: 16 (for both training and evaluation)
  • Epochs: 3
  • Weight Decay: 0.01
  • Evaluation Strategy: Performed at the end of each epoch
  • Hardware: Trained on GPUs for efficient computation

Performance Metrics (Validation Set)

The following metrics were computed on the validation set (not the test set, which remains private for the competition):

ClassPrecisionRecallF1-ScoreSupport
not_relevant0.880.820.85130.0
not_happening0.820.930.8759.0
not_human0.800.860.8356.0
not_bad0.870.840.8531.0
fossil_fuels_needed0.870.840.8562.0
science_unreliable0.780.770.7764.0
proponents_biased0.730.750.7463.0
  • Overall Accuracy: 0.83
  • Macro Average: Precision: 0.82, Recall: 0.83, F1-Score: 0.83
  • Weighted Average: Precision: 0.83, Recall: 0.83, F1-Score: 0.83

Training Evolution

Training and Validation Loss

The training and validation loss evolution over epochs is shown below:

Training Loss

Validation Accuracy

The validation accuracy evolution over epochs is shown below:

Validation Accuracy

Confusion Matrix

The confusion matrix below illustrates the model's performance on the validation set, highlighting areas of strength and potential misclassifications:

Confusion Matrix

Key Features

  • Class Weighting: Addressed dataset imbalance by incorporating class weights during training.
  • Custom Loss Function: Used weighted cross-entropy loss for better handling of underrepresented classes.
  • Evaluation Metrics: Accuracy, precision, recall, and F1-score were computed to provide a comprehensive understanding of the model's performance.

Class Mapping

The mapping between model output indices and class names is as follows: 0: not_relevant, 1: not_happening, 2: not_human, 3: not_bad, 4: fossil_fuels_needed, 5: science_unreliable, 6: proponents_biased

Usage

This model can be used for multi-class text classification tasks where the input text needs to be categorized into one of the eight predefined classes. It is particularly suited for datasets with class imbalance, thanks to its weighted loss function.

Example Usage

from transformers import AutoModelForSequenceClassification, AutoTokenizer

# Load the fine-tuned model and tokenizer
model = AutoModelForSequenceClassification.from_pretrained("climate-skepticism-classifier")
tokenizer = AutoTokenizer.from_pretrained("climate-skepticism-classifier")

# Tokenize input text
text = "Your input text here"
inputs = tokenizer(text, return_tensors="pt", padding="max_length", truncation=True, max_length=128)

# Perform inference
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(-1).item()

print(f"Predicted Class: {predicted_class}")

Limitations

  • Performance may vary on extremely imbalanced datasets
    • Requires significant computational resources for training
    • Model performance is dependent on the quality of LLM-generated balanced data
    • May not perform optimally on very long text sequences (>128 tokens)
    • May struggle with novel or evolving climate skepticism arguments
    • Could be sensitive to subtle variations in argument framing
    • May require periodic updates to capture emerging skepticism patterns

Citation

If you use this model, please cite: @article{your_name2024climateskepticism, title={LLM-Rebalanced Transformer for Climate Change Skepticism Classification}, author={Your Name}, year={2024}, journal={Preprint} }

Acknowledgments

Special thanks to the Frugal AI Challenge organizers for providing the dataset and fostering innovation in AI research.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
5aa3f22

0 моделей