语言:
- 意大利语
数据集:
- 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标签。
推理小部件已停用,因为该模型需要在下游任务上进行特定任务的序列到序列微调才能在实践中发挥作用。it5
组织中的模型提供了一些针对不同下游任务微调后的示例。
模型变体
此仓库包含模型的base
版本检查点。模型在彻底清理的意大利语mC4语料库(约410亿词,约275GB)上训练了一个周期(105万步),使用了🤗 Datasets和google/t5-v1_1-small
改进配置。训练过程可在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 AutoTokenzier, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("gsarti/it5-small")
model = AutoModelForSeq2SeqLM.from_pretrained("gsarti/it5-small")
注意:您需要在下游序列到序列任务上微调模型才能使用。参见此处的示例。
模型的Flax和Tensorflow版本也可用:
from transformers import FlaxT5ForConditionalGeneration, TFT5ForConditionalGeneration
model_flax = FlaxT5ForConditionalGeneration.from_pretrained("gsarti/it5-small")
model_tf = TFT5ForConditionalGeneration.from_pretrained("gsarti/it5-small")
局限性
由于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",
}