IlyaGusev / xlm_roberta_large_headline_cause_simple

huggingface.co
Total runs: 6
24-hour runs: 0
7-day runs: 2
30-day runs: -10
Model's Last Updated: July 13 2022
text-classification

Introduction of xlm_roberta_large_headline_cause_simple

Model Details of xlm_roberta_large_headline_cause_simple

XLM-RoBERTa HeadlineCause Simple

Model description

This model was trained to predict the presence of causal relations between two headlines. This model is for the Simple task with 3 possible labels: A causes B, B causes A, no causal relation. English and Russian languages are supported.

You can use hosted inference API to infer a label for a headline pair. To do this, you shoud seperate headlines with </s> token. For example:

Песков опроверг свой перевод на удаленку</s>Дмитрий Песков перешел на удаленку
Intended uses & limitations
How to use
from tqdm.notebook import tqdm
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline

def get_batch(data, batch_size):
    start_index = 0
    while start_index < len(data):
        end_index = start_index + batch_size
        batch = data[start_index:end_index]
        yield batch
        start_index = end_index


def pipe_predict(data, pipe, batch_size=64):
    raw_preds = []
    for batch in tqdm(get_batch(data, batch_size)):
        raw_preds += pipe(batch)
    return raw_preds

MODEL_NAME = TOKENIZER_NAME = "IlyaGusev/xlm_roberta_large_headline_cause_simple"
tokenizer = AutoTokenizer.from_pretrained(TOKENIZER_NAME, do_lower_case=False)
model = AutoModelForSequenceClassification.from_pretrained(MODEL_NAME)
model.eval()
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, framework="pt", return_all_scores=True)
texts = [
    (
        "Judge issues order to allow indoor worship in NC churches",
        "Some local churches resume indoor services after judge lifted NC governor’s restriction"
    ),
    (
        "Gov. Kevin Stitt defends $2 million purchase of malaria drug touted by Trump",
        "Oklahoma spent $2 million on malaria drug touted by Trump"
    ),
    (
        "Песков опроверг свой перевод на удаленку",
        "Дмитрий Песков перешел на удаленку"
    )
]
pipe_predict(texts, pipe)
Limitations and bias

The models are intended to be used on news headlines. No other limitations are known.

Training data
Training procedure
Eval results

Evaluation results can be found in the arxiv paper .

BibTeX entry and citation info
@misc{gusev2021headlinecause,
      title={HeadlineCause: A Dataset of News Headlines for Detecting Causalities}, 
      author={Ilya Gusev and Alexey Tikhonov},
      year={2021},
      eprint={2108.12626},
      archivePrefix={arXiv},
      primaryClass={cs.CL}
}

Runs of IlyaGusev xlm_roberta_large_headline_cause_simple on huggingface.co

6
Total runs
0
24-hour runs
1
3-day runs
2
7-day runs
-10
30-day runs

More Information About xlm_roberta_large_headline_cause_simple huggingface.co Model

More xlm_roberta_large_headline_cause_simple license Visit here:

https://choosealicense.com/licenses/apache-2.0

xlm_roberta_large_headline_cause_simple huggingface.co

xlm_roberta_large_headline_cause_simple huggingface.co is an AI model on huggingface.co that provides xlm_roberta_large_headline_cause_simple's model effect (), which can be used instantly with this IlyaGusev xlm_roberta_large_headline_cause_simple model. huggingface.co supports a free trial of the xlm_roberta_large_headline_cause_simple model, and also provides paid use of the xlm_roberta_large_headline_cause_simple. Support call xlm_roberta_large_headline_cause_simple model through api, including Node.js, Python, http.

xlm_roberta_large_headline_cause_simple huggingface.co Url

https://huggingface.co/IlyaGusev/xlm_roberta_large_headline_cause_simple

IlyaGusev xlm_roberta_large_headline_cause_simple online free

xlm_roberta_large_headline_cause_simple huggingface.co is an online trial and call api platform, which integrates xlm_roberta_large_headline_cause_simple's modeling effects, including api services, and provides a free online trial of xlm_roberta_large_headline_cause_simple, you can try xlm_roberta_large_headline_cause_simple online for free by clicking the link below.

IlyaGusev xlm_roberta_large_headline_cause_simple online free url in huggingface.co:

https://huggingface.co/IlyaGusev/xlm_roberta_large_headline_cause_simple

xlm_roberta_large_headline_cause_simple install

xlm_roberta_large_headline_cause_simple is an open source model from GitHub that offers a free installation service, and any user can find xlm_roberta_large_headline_cause_simple on GitHub to install. At the same time, huggingface.co provides the effect of xlm_roberta_large_headline_cause_simple install, users can directly use xlm_roberta_large_headline_cause_simple installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

xlm_roberta_large_headline_cause_simple install url in huggingface.co:

https://huggingface.co/IlyaGusev/xlm_roberta_large_headline_cause_simple

Url of xlm_roberta_large_headline_cause_simple

xlm_roberta_large_headline_cause_simple huggingface.co Url

Provider of xlm_roberta_large_headline_cause_simple huggingface.co

IlyaGusev
ORGANIZATIONS

Other API from IlyaGusev

huggingface.co

Total runs: 6
Run Growth: 6
Growth Rate: 100.00%
Updated: December 12 2024
huggingface.co

Total runs: 4
Run Growth: -9
Growth Rate: -225.00%
Updated: July 13 2022