英文

AraT5-msa-base

AraT5: 针对阿拉伯语生成的文本到文本转换器

这是我们论文的附属库。在这个库中,我们介绍了 AraT5 MSA,AraT5 Tweet和AraT5:三个基于阿拉伯语文字到文字的强大Transformer模型;

如何使用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{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.",
}

致谢

我们衷心感谢加拿大自然科学和工程研究委员会、加拿大社会科学和人文研究委员会、加拿大创新基金会、ComputeCanada和 UBC ARC-Sockeye 的支持。我们还感谢 Google TensorFlow Research Cloud (TFRC) 计划为我们提供免费的TPU访问权限。