poltextlab's picture
usage guide update (gated access)
3264542 verified
metadata
license: mit
language:
  - multilingual
tags:
  - zero-shot-classification
  - text-classification
  - pytorch
metrics:
  - accuracy
  - f1-score
widget:
  - text: >-
      We will place an immediate 6-month halt on the finance driven closure of
      beds and wards, and set up an independent audit of needs and facilities.
  - text: >-
      Разграничение компетенции в сфере социальной политики между федеральными и
      местными властями должно завершиться подписанием специального договора
      между Центром и субъектами федерации о принципах, целях и механизмах
      социальной политики.
  - text: >-
      Vse lokalno ali malo širše od lokalnega se skuša prevaliti na državno
      raven.
  - text: >-
      Սոցիալ-տնտեսական ասպեկտով ռեժիմի գործունեության արդյունքը եղել է այն, որ
      10 ամենահարուստ ընտանիքների ունեցվածքի շուկայական արժեքը ՀՀ-ում կազմում է
      ՀՆԱ-ի 54.7 տոկոսը։
  - text: >-
      Povedano drugače, na medijski trg ne morejo vplivati oglaševalska sredstva
      podjetij, ki so povsem v zasebni lasti in brez povezav s politiko, ker so,
      prvič, premajhna (rast teh podjetij je bila omejena z rastjo preferenčnih
      državnih podjetij) in drugič, ker njihovo oglaševanje ne more prinašati
      skritih motivov in agend, saj jih ne morejo imeti, ko pa je njihova edina
      dejavnost tržna in ne politična.
  - text: >-
      U 2009. I 2010 godini osmišljen je i proveden novi projekt GAZELE temeljem
      kojega je ispladeno 79 potpora u iznosu od 3.657.534 EUR-a.
  - text: >-
      Toleranţa nu include obligaţia de a tolera intoleranţa sau manifestările
      antisociale.
  - text: >-
      edistää sekä yritysten hakeutumista työvoiman luo että työvoiman
      hakeutumista yritysten luo tehokkaalla aluepolitiikalla sekä parantamalla
      työvoiman ammatillista ja alueellista liikkuvuutta.
  - text: με εξορθολογισμό της διοίκησης και των αμοιβών της
  - text: Från ca 18 barn i början av 1980-talet till 40,4 barn år 2013.
extra_gated_fields:
  Name: text
  Country: country
  Institution: text
  E-mail: text
  Use case: text
extra_gated_prompt: >-
  Our models are intended for academic use only. If you are not affiliated with
  an academic institution, please provide a rationale for using our models.

xlm-roberta-large-manifesto

Model description

An xlm-roberta-large model finetuned on multilingual training data labeled using the Manifesto Project's coding scheme.

How to use the model

from transformers import AutoTokenizer, pipeline

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-large")
pipe = pipeline(
    model="poltextlab/xlm-roberta-large-manifesto",
    task="text-classification",
    tokenizer=tokenizer,
    use_fast=False,
    token="<your_hf_read_only_token>"
)

text = "We will place an immediate 6-month halt on the finance driven closure of beds and wards, and set up an independent audit of needs and facilities."
pipe(text)

Gated access

Due to the gated access, you must pass the token parameter when loading the model. In earlier versions of the Transformers package, you may need to use the use_auth_token parameter instead.

Model performance

The model was evaluated on a test set of 305141 examples, which were split in a stratified manner, where for every label, 20% of all occurences were randomly selected.
Metrics (precision, recall and F1-score are weighted macro averages):

Precision Recall F1-Score Accuracy Top3_Acc Top5_Acc
0.6495 0.6547 0.6507 0.6547 0.8505 0.9073

Language-specific metrics: Model benchmark (language-specific test)

Debugging and issues

This architecture uses the sentencepiece tokenizer. In order to run the model before transformers==4.27 you need to install it manually.