abhik1505040's picture
Add evaluation results on the mlqa config and test.ar split of xglue (#4)
1a850ef
|
raw
history blame
6.97 kB
metadata
language:
  - am
  - ar
  - az
  - bn
  - my
  - zh
  - en
  - fr
  - gu
  - ha
  - hi
  - ig
  - id
  - ja
  - rn
  - ko
  - ky
  - mr
  - ne
  - om
  - ps
  - fa
  - pcm
  - pt
  - pa
  - ru
  - gd
  - sr
  - si
  - so
  - es
  - sw
  - ta
  - te
  - th
  - ti
  - tr
  - uk
  - ur
  - uz
  - vi
  - cy
  - yo
tags:
  - summarization
  - mT5
licenses:
  - cc-by-nc-sa-4.0
widget:
  - text: >-
      Videos that say approved vaccines are dangerous and cause autism, cancer
      or infertility are among those that will be taken down, the company said. 
      The policy includes the termination of accounts of anti-vaccine
      influencers.  Tech giants have been criticised for not doing more to
      counter false health information on their sites.  In July, US President
      Joe Biden said social media platforms were largely responsible for
      people's scepticism in getting vaccinated by spreading misinformation, and
      appealed for them to address the issue.  YouTube, which is owned by
      Google, said 130,000 videos were removed from its platform since last
      year, when it implemented a ban on content spreading misinformation about
      Covid vaccines.  In a blog post, the company said it had seen false claims
      about Covid jabs "spill over into misinformation about vaccines in
      general". The new policy covers long-approved vaccines, such as those
      against measles or hepatitis B.  "We're expanding our medical
      misinformation policies on YouTube with new guidelines on currently
      administered vaccines that are approved and confirmed to be safe and
      effective by local health authorities and the WHO," the post said,
      referring to the World Health Organization.
model-index:
  - name: csebuetnlp/mT5_m2o_arabic_crossSum
    results:
      - task:
          type: summarization
          name: Summarization
        dataset:
          name: xglue
          type: xglue
          config: mlqa
          split: test.ar
        metrics:
          - type: rouge
            value: 0.1874
            name: ROUGE-1
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiZDAwNWEyMzY2Y2E4N2ZlMWFmNjU1ZGM2Y2VmNjNhYTE0ZWJlZjA2NzBmY2VjY2ViZjRjNjU5ODhiYWJlN2E0NCIsInZlcnNpb24iOjF9.AcXy911VMGaPiT-gYKbUi9s5mM5BjTmZGo4h045IEId9qj3DRXn5rXVoMGmxBR53HXiUYOqMeGYCaGwk63vMBg
          - type: rouge
            value: 0
            name: ROUGE-2
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNTA2YmI4NmEyZWQwN2ZmYWMwZGM3MjEzYWRkMzExYmY0OTIxYzc3ZjY5YmQ0MDIyZjY3NmExY2RlMDMwNDRiNyIsInZlcnNpb24iOjF9.-V1k8LSpeVyVAT3Jo-AUBzosq5cn6XSCZIXKOvloSIvdSMGEra9T6A2DjTDnlW4XtBterquktcbRoQv-v5yfDw
          - type: rouge
            value: 0.1937
            name: ROUGE-L
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNDZmNzZjMGZkOTc4NWJiY2ZmNzI5Y2UxYTFmODEwMTVkYzBhZTY5NDIzNWJlMWU1OTU3ODNlMGM1ZTA2MjEyMCIsInZlcnNpb24iOjF9.QlTWoMwD8Arcd3x1bfwtAuc3JWJbr7AR0YMze2eKy5RgGQFxlKXLfTlVoP9mdgfyXY5T8XWCchx9Df13XGPYCw
          - type: rouge
            value: 0.1874
            name: ROUGE-LSUM
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiNzY4ZmIwYTE4NGQyOWMxMzQ1MmEzZDZlMmNhOGJkYjk0YTk0MjY2NGE5YWRiMTcxY2QyOTliYWM4OTI5ZGM5YiIsInZlcnNpb24iOjF9.BBd0xsSXwmT349qgaLJF5jtAikUwktM8k8SdcVYwcbNbt2iazeETnEKm9JxKV9dnRaCLKPBkJVqOYymVh_pgBA
          - type: loss
            value: 5.084585666656494
            name: loss
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMWU5MWQ0ODc5MTQ4ZDc0MDFmYWVjMDc5YTc3Y2ViYjM1YzY5NWYzZTU2ZjgxNTJlN2VmZTVkNThlMDQ4YTU3YiIsInZlcnNpb24iOjF9.rXlFN9iKMmcG84P4Z8_fj-3gLCB-Gej6WuerbwFfWOY3_K8YEnnR4vDxtegLOGDkWn9tdRsaxp9Ojqhpi7CdBQ
          - type: gen_len
            value: 42.6337
            name: gen_len
            verified: true
            verifyToken: >-
              eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJoYXNoIjoiMTM0ZThkOGYzZjYwNzcxMzk3OTYwNTc2NzJlYWE0ODE2MWUwN2VjZDAxZDU2MWRjZWJiOTExNTI5ODk5N2MzNSIsInZlcnNpb24iOjF9.3dyGRE61FjmpFNTTGVB_pVVI_kr_YU1eXx736NFK9JxMJs50eP48ArYt1m2LutgxjMRo-PABAMhvjh8vcvbRBw

mT5-m2o-arabic-CrossSum

This repository contains the many-to-one (m2o) mT5 checkpoint finetuned on all cross-lingual pairs of the CrossSum dataset, where the target summary was in arabic, i.e. this model tries to summarize text written in any language in Arabic. For finetuning details and scripts, see the paper and the official repository.

Using this model in transformers (tested on 4.11.0.dev0)

import re
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

WHITESPACE_HANDLER = lambda k: re.sub('\s+', ' ', re.sub('\n+', ' ', k.strip()))

article_text = """Videos that say approved vaccines are dangerous and cause autism, cancer or infertility are among those that will be taken down, the company said.  The policy includes the termination of accounts of anti-vaccine influencers.  Tech giants have been criticised for not doing more to counter false health information on their sites.  In July, US President Joe Biden said social media platforms were largely responsible for people's scepticism in getting vaccinated by spreading misinformation, and appealed for them to address the issue.  YouTube, which is owned by Google, said 130,000 videos were removed from its platform since last year, when it implemented a ban on content spreading misinformation about Covid vaccines.  In a blog post, the company said it had seen false claims about Covid jabs "spill over into misinformation about vaccines in general". The new policy covers long-approved vaccines, such as those against measles or hepatitis B.  "We're expanding our medical misinformation policies on YouTube with new guidelines on currently administered vaccines that are approved and confirmed to be safe and effective by local health authorities and the WHO," the post said, referring to the World Health Organization."""

model_name = "csebuetnlp/mT5_m2o_arabic_crossSum"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)

input_ids = tokenizer(
    [WHITESPACE_HANDLER(article_text)],
    return_tensors="pt",
    padding="max_length",
    truncation=True,
    max_length=512
)["input_ids"]

output_ids = model.generate(
    input_ids=input_ids,
    max_length=84,
    no_repeat_ngram_size=2,
    num_beams=4
)[0]

summary = tokenizer.decode(
    output_ids,
    skip_special_tokens=True,
    clean_up_tokenization_spaces=False
)

print(summary)

Citation

If you use this model, please cite the following paper:

@article{hasan2021crosssum,
  author    = {Tahmid Hasan and Abhik Bhattacharjee and Wasi Uddin Ahmad and Yuan-Fang Li and Yong-bin Kang and Rifat Shahriyar},
  title     = {CrossSum: Beyond English-Centric Cross-Lingual Abstractive Text Summarization for 1500+ Language Pairs},
  journal   = {CoRR},
  volume    = {abs/2112.08804},
  year      = {2021},
  url       = {https://arxiv.org/abs/2112.08804},
  eprinttype = {arXiv},
  eprint    = {2112.08804}
}