/ Модель

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

Контекст
514 токенов
Параметры
152 млн
Лицензия
Apache 2.0
Архитектура
roberta · dense
Опубликована
19 мая 2023

roberta-base-ca-v2-cawikitc

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

Модель RoBERTa, дообученная для классификации каталанских текстов по категориям без примеров целевых классов.

36скачиваний за 30 дней1лайквеса обновлены19 июн 2023

Бенчмарки

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

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

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

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

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

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

roberta-base-ca-v2-cawikitc — модель для классификации текстов на каталанском языке без обучения на целевых метках. Её разработала команда Projecte AINA, дообучив RoBERTa-base-ca-v2 на наборе CaWikiTC, преобразованном в задачу распознавания текстового следования (NLI). Модель содержит 151,8 млн параметров, использует архитектуру RoBERTa и принимает последовательности длиной до 514 токенов.

Модель сопоставляет текст с заданными категориями и определяет, какая из них подходит, используя шаблон гипотезы «Aquest article tracta sobre {}.» («Эта статья о {}»). Она предназначена прежде всего для тематической классификации каталанских статей, включая сценарии с малым количеством размеченных данных. В оценке TeCla взвешенная F1 составила 75,0 для четырёх укрупнённых классов и 49,1 для 53 детальных классов.

Модель выпущена под лицензией Apache 2.0. Она обучалась на текстах, основанных на Википедии, и фиксированном шаблоне гипотезы, поэтому может хуже обобщать на другие типы текстов и формулировки категорий. Систематическая оценка предвзятости и токсичности не проводилась.

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

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

Ограничения

Обучение опиралось на статьи Википедии и фиксированный каталанский шаблон гипотезы, поэтому качество на других жанрах текстов и формулировках может быть ниже. Предвзятость и токсичность модели систематически не оценивались.

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

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

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

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

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

Открыть на Hugging Face

RoBERTa-ca-CaWikiTC

Overview

  • Model type: Language Model
  • Architecture: RoBERTa-base
  • Language: Catalan
  • License: Apache 2.0
  • Task: Zero-Shot Text Classification
  • Data: CaWikiTC

Model description

The roberta-base-ca-v2-cawikitc (RoBERTa-ca-CaWikiTC) is a Zero-Shot Text Classification model in Catalan created by fine-tuning RoBERTa-base-ca-v2 with a classification dataset, CaWikiTC, reformulated as entailment. This model was developed as part of the experimental research presented in the following paper "Entailment-based Task Transfer for Catalan Text Classification in Small Data Regimes".

Intended uses and limitations

This model can be used for zero-shot text classification in Catalan. It has been trained with a fixed hypothesis template, "Aquest article tracta sobre {}.", and Wikipedia-based articles as premises, and may not generalize well for all use cases.

How to use

from transformers import pipeline

classifier = pipeline("zero-shot-classification", model="ibaucells/RoBERTa-ca-CaWikiTC")

sentence = "'Tierra firme' de Marqués-Marcet inaugura el Festival de cinema de Guadalajara amb Catalunya com a convidada d'honor. El director del film afirma sentir-se orgullós de formar part d'aquesta nova generació de cineastes catalans amb moltes dones directores."
candidate_labels = ["societat", "política", "cultura", "economia"]
template = "Aquest article tracta sobre {}."

output = classifier(sentence, candidate_labels, hypothesis_template=template, multi_label=False)

print(output)
print(f'Predicted class: {output["labels"][0]}')

Limitations and bias

No measures have been taken to estimate the bias and toxicity embedded in the model.

Training

Training data

This model was fine-tuned for the Natural Language Inference (NLI) task on an authomatically Wikipedia-based text classification dataset, CaWikiTC, reformulated as entailment. In the reformulation process, we generated two NLI examples for each text classification instance (text and label): an entailment example and a non-entailment example. In both cases, we employed the text as the premise and utilized a shared template to create the hypothesis ("Aquest article tracta {}."), which was completed with the correct label for the entailment example and a randomly-selected label from the remaining options for the non-entailment example.

Training procedure

The pre-trained Catalan model RoBERTa-base-ca-v2 was fine-tuned with the training data using a learning rate of 3e-5, a batch size of 16, seed 26 and a maximum of 10 epochs. The development set (converted into entailment) was used to select the best checkpoint according to the highest weighted F1 score in the classification task, which was obtained in the first epoch.

Evaluation

Evaluation results

This model was evaluated for the TeCla zero-shot text classification task (without specific fine-tuning for the task) and obtained weighted F1 scores of 75.0 in the coarse-grained task (4 classes) and 49.1 in the fine-grained task (53 classes).

Additional information

Contact

For further information, send an email to either irene.baucells@bsc.es.

License

This work is distributed under a Apache License, Version 2.0.

Funding

This work was funded by the [Departament de la Vicepresidència i de Polítiques Digitals i Territori de la Generalitat de Catalunya](https://politiquesdigitals.gencat.cat/ca/inici/index.html#googtrans(ca|en) within the framework of Projecte AINA.

Citation

Disclaimer

When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.

In no event shall the owner and creator of the models be liable for any results arising from the use made by third parties of these models.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
RobertaForSequenceClassification
Ревизия весов
75a06c4

0 моделей