英文

AraT5-base

AraT5: 面向阿拉伯语生成的文本到文本转换器

这是我们论文所附带的资料库。在这个资料库中,我们介绍了 AraT5 MSA、AraT5 Tweet 和 AraT5:三个基于阿拉伯语的文本到文本转换器模型;

如何使用 AraT5 模型

下面是一个关于如何在 Aranews 数据集上对 AraT5-base 进行新闻标题生成的微调示例。

!python run_trainier_seq2seq_huggingface.py \
        --learning_rate 5e-5 \
        --max_target_length 128 --max_source_length 128 \
        --per_device_train_batch_size 8 --per_device_eval_batch_size 8 \
        --model_name_or_path "UBC-NLP/AraT5-base" \
        --output_dir "/content/AraT5_FT_title_generation" --overwrite_output_dir \
        --num_train_epochs 3 \
        --train_file "/content/ARGEn_title_genration_sample_train.tsv" \
        --validation_file "/content/ARGEn_title_genration_sample_valid.tsv" \
        --task "title_generation" --text_column "document" --summary_column "title" \
        --load_best_model_at_end --metric_for_best_model "eval_bleu" --greater_is_better True --evaluation_strategy epoch --logging_strategy epoch --predict_with_generate\
        --do_train --do_eval

有关微调示例的更多细节,请阅读此笔记本

此外,我们发布了论文中描述的新闻标题生成(NGT)的微调检查点。模型可在 Huggingface 上使用( UBC-NLP/AraT5-base-title-generation )。

更多细节,请访问我们自己的 GitHub 。

AraT5 模型检查点

AraT5 的 Pytorch 和 TensorFlow 检查点可直接在 Huggingface 网站上下载和使用,仅限于研究。商业用途请通过电子邮件联系作者:(muhammad.mageed[at]ubc[dot]ca)。

Model Link
AraT5-base 1236321
AraT5-msa-base 1237321
AraT5-tweet-base 1238321
AraT5-msa-small 1239321
AraT5-tweet-small 12310321

BibTex

如果您将我们的模型(Arat5-base、Arat5-msa-base、Arat5-tweet-base、Arat5-msa-small 或 Arat5-tweet-small)用于科学出版物,或者您发现本资料库中的资源有用,请按照以下方式引用我们的论文:(待更新):

@inproceedings{nagoudi2022_arat5,
@inproceedings{nagoudi-etal-2022-arat5,
    title = "{A}ra{T}5: Text-to-Text Transformers for {A}rabic Language Generation",
    author = "Nagoudi, El Moatez Billah  and
      Elmadany, AbdelRahim  and
      Abdul-Mageed, Muhammad",
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.acl-long.47",
    pages = "628--647",
    abstract = "Transfer learning with a unified Transformer framework (T5) that converts all language problems into a text-to-text format was recently proposed as a simple and effective transfer learning approach. Although a multilingual version of the T5 model (mT5) was also introduced, it is not clear how well it can fare on non-English tasks involving diverse data. To investigate this question, we apply mT5 on a language with a wide variety of dialects{--}Arabic. For evaluation, we introduce a novel benchmark for ARabic language GENeration (ARGEN), covering seven important tasks. For model comparison, we pre-train three powerful Arabic T5-style models and evaluate them on ARGEN. Although pre-trained with {\textasciitilde}49 less data, our new models perform significantly better than mT5 on all ARGEN tasks (in 52 out of 59 test sets) and set several new SOTAs. Our models also establish new SOTA on the recently-proposed, large Arabic language understanding evaluation benchmark ARLUE (Abdul-Mageed et al., 2021). Our new models are publicly available. We also link to ARGEN datasets through our repository: https://github.com/UBC-NLP/araT5.",
}

## Acknowledgments
We gratefully acknowledge support from the Natural Sciences and Engineering Research Council  of Canada, the  Social  Sciences and  Humanities  Research  Council  of  Canada, Canadian  Foundation for  Innovation,  [ComputeCanada](www.computecanada.ca) and [UBC ARC-Sockeye](https://doi.org/10.14288/SOCKEYE). We  also  thank  the  [Google TensorFlow Research Cloud (TFRC)](https://www.tensorflow.org/tfrc) program for providing us with free TPU access.