🚀 イタリア語T5ベースモデル
このIT5モデルファミリーは、元のT5モデルが採用したアプローチに従い、イタリア語用の大規模シーケンス-to-シーケンストランスフォーマーモデルの事前学習に向けた最初の試みです。
このモデルは、Gabriele Sarti と Malvina Nissim による "IT5: Text-to-Text Pretraining for Italian Language Understanding and Generation" プロジェクトの一部として公開されています。このプロジェクトは Huggingface の支援を受け、Googleの TPU Research Cloud が提供するTPUを使用して行われました。すべてのトレーニングはGoogle Cloud上の単一のTPU3v8-VMマシンで実施されました。トレーニングプロセスの概要については、リポジトリのTensorboardタブを参照してください。
推論ウィジェットは無効になっています。これは、モデルを実際に使用するには、下流タスクに対するタスク固有のシーケンス-to-シーケンスの微調整が必要なためです。
✨ 主な機能
モデルのバリエーション
このリポジトリには、モデルの base
バージョンのチェックポイントが含まれています。このモデルは、Thoroughly Cleaned Italian mC4 Corpus(約410億語、約275GB)上で、🤗 Datasets と google/t5-v1_1-base
の改良された設定を使用して1エポック(105万ステップ)トレーニングされました。OSCARコーパス 上でトレーニングされたこのモデルの別のバージョンも、gsarti/it5-base-oscar
という名前で利用可能です。トレーニング手順は Github で公開されています。
以下の表は、すべての利用可能なモデルのパラメータをまとめたものです。
モデル名 |
it5-small |
it5-base (このモデル) |
it5-large |
gsarti/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時間 |
FF投影 |
gated-gelu |
gated-gelu |
gated-gelu |
relu |
埋め込みの共有 |
false |
false |
false |
true |
オプティマイザ |
adafactor |
adafactor |
adafactor |
adafactor |
最大シーケンス長 |
512 |
512 |
512 |
512 |
デバイスあたりのバッチサイズ |
16 |
16 |
8 |
16 |
総バッチサイズ |
128 |
128 |
64 |
128 |
重み減衰 |
1e-3 |
1e-3 |
1e-2 |
1e-3 |
検証データ分割サイズ |
15,000サンプル |
15,000サンプル |
15,000サンプル |
15,000サンプル |
it5-base-oscar
のトレーニング時間が長かったのは、トレーニングスクリプトのバグ が原因でした。
個々のモデルパラメータのリストについては、それぞれのリポジトリの config.json
ファイルを参照してください。
📦 インストール
このモデルを使用するには、transformers
ライブラリが必要です。以下のコマンドでインストールできます。
pip install transformers
💻 使用例
基本的な使用法
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("gsarti/it5-base")
model = AutoModelForSeq2SeqLM.from_pretrained("gsarti/it5-base")
注意: モデルを使用するには、下流のシーケンス-to-シーケンスタスクでモデルを微調整する必要があります。例を こちら で確認できます。
高度な使用法
FlaxとTensorflowバージョンのモデルも利用可能です。
from transformers import FlaxT5ForConditionalGeneration, TFT5ForConditionalGeneration
model_flax = FlaxT5ForConditionalGeneration.from_pretrained("gsarti/it5-base")
model_tf = TFT5ForConditionalGeneration.from_pretrained("gsarti/it5-base")
🔧 技術詳細
制限事項
IT5モデルがトレーニングされたウェブスクレイピングコーパスの性質上、これらのモデルの使用により、データに事前に存在するバイアスが再現および拡大される可能性があります。これにより、人種や性別の固定概念や陰謀論的な見解など、潜在的に有害なコンテンツが生成される可能性があります。このため、このようなバイアスの研究が明確に奨励されており、理想的には、モデルの使用は研究目的でのみ行われ、一般ユーザーに向けた用途には制限されるべきです。
モデルの管理者
このモデルに関する問題や更新については、gabriele.sarti996@gmail.com までご連絡ください。
📄 ライセンス
このモデルは、Apache 2.0ライセンスの下で公開されています。
📚 ドキュメント
引用情報
@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 = "We introduce IT5, the first family of encoder-decoder transformer models pretrained specifically on Italian. We document and perform a thorough cleaning procedure for a large Italian corpus and use it to pretrain four IT5 model sizes. We then introduce the ItaGen benchmark, which includes a broad range of natural language understanding and generation tasks for Italian, and use it to evaluate the performance of IT5 models and multilingual baselines. We find monolingual IT5 models to provide the best scale-to-performance ratio across tested models, consistently outperforming their multilingual counterparts and setting a new state-of-the-art for Italian language generation.",
}