语言:
- 意大利语
数据集:
- gsarti/clean_mc4_it
标签:
- 序列到序列
- 语言模型头部
许可证: apache-2.0
推理: 否
缩略图: https://gsarti.com/publication/it5/featured.png
意大利语T5大模型 🇮🇹
IT5模型家族是首个针对意大利语大规模预训练的序列到序列Transformer模型,遵循了原始T5模型的方法。
此模型作为项目"IT5: 意大利语理解与生成的文本到文本预训练"(即将发布)的一部分发布,由Gabriele Sarti和Malvina Nissim在Huggingface的支持下完成,并由Google的TPU研究云赞助TPU使用。所有训练均在Google Cloud上的单个TPU3v8-VM机器上进行。有关训练过程的概览,请参考仓库的Tensorboard标签。
推理小部件已停用,因为该模型需要针对下游任务进行特定任务的序列到序列微调才能在实际中发挥作用。
模型变体
此仓库包含模型的base
版本检查点。该模型在彻底清理的意大利语mC4语料库(约410亿词,约275GB)上使用🤗 Datasets和google/t5-v1_1-large
改进配置训练了一个周期(105万步)。训练过程可在Github上获取。
下表总结了所有可用模型的参数:
|
it5-small |
it5-base |
it5-large (当前模型) |
it5-base-oscar |
数据集 |
gsarti/clean_mc4_it |
gsarti/clean_mc4_it |
gsarti/clean_mc4_it |
oscar/unshuffled_deduplicated_it |
架构 |
google/t5-v1_1-small |
google/t5-v1_1-base |
google/t5-v1_1-large |
t5-base |
学习率 |
5e-3 |
5e-3 |
5e-3 |
1e-2 |
步数 |
1,050,000 |
1,050,000 |
2,100,000 |
258,000 |
训练时间 |
36小时 |
101小时 |
370小时 |
98小时 |
前馈投影 |
门控GELU |
门控GELU |
门控GELU |
ReLU |
嵌入绑定 |
否 |
否 |
否 |
是 |
优化器 |
Adafactor |
Adafactor |
Adafactor |
Adafactor |
最大序列长度 |
512 |
512 |
512 |
512 |
每设备批量大小 |
16 |
16 |
8 |
16 |
总批量大小 |
128 |
128 |
64 |
128 |
权重衰减 |
1e-3 |
1e-3 |
1e-2 |
1e-3 |
验证集大小 |
15K样本 |
15K样本 |
15K样本 |
15K样本 |
it5-base-oscar
的高训练时间是由于训练脚本中的一个错误导致的。
有关各个模型参数的详细信息,请参阅相应仓库中的config.json
文件。
使用模型
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("gsarti/it5-large")
model = AutoModelForSeq2SeqLM.from_pretrained("gsarti/it5-large")
注意:您需要在下游序列到序列任务上微调模型才能使用。
模型还提供了Flax和Tensorflow版本:
from transformers import FlaxT5ForConditionalGeneration, TFT5ForConditionalGeneration
model_flax = FlaxT5ForConditionalGeneration.from_pretrained("gsarti/it5-large")
model_tf = TFT5ForConditionalGeneration.from_pretrained("gsarti/it5-large")
局限性
由于IT5模型训练所基于的网络爬取语料库的性质,其使用可能会复制和放大数据中已有的偏见,导致潜在有害内容,如种族或性别刻板印象及阴谋论观点。因此,我们明确鼓励研究这些偏见,并理想情况下应将模型使用限制在研究导向和非面向用户的领域。
模型维护者
有关此模型的问题或更新,请联系gabriele.sarti996@gmail.com。
引用信息
@inproceedings{sarti-nissim-2024-it5-text,
title = "{IT}5: Text-to-text Pretraining for {I}talian Language Understanding and Generation",
author = "Sarti, Gabriele and
Nissim, Malvina",
editor = "Calzolari, Nicoletta and
Kan, Min-Yen and
Hoste, Veronique and
Lenci, Alessandro and
Sakti, Sakriani and
Xue, Nianwen",
booktitle = "Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)",
month = may,
year = "2024",
address = "Torino, Italia",
publisher = "ELRA and ICCL",
url = "https://aclanthology.org/2024.lrec-main.823",
pages = "9422--9433",
abstract = "我们介绍了IT5,这是首个专门针对意大利语预训练的编码器-解码器Transformer模型家族。我们记录并执行了对大型意大利语语料库的彻底清理过程,并用其预训练了四种规模的IT5模型。然后,我们引入了ItaGen基准,该基准包括广泛的意大利语自然语言理解和生成任务,并用其评估了IT5模型和多语言基线的性能。我们发现单语IT5模型在测试模型中提供了最佳的性能规模比,始终优于其多语言对应模型,并为意大利语生成设定了新的最先进水平。",
}