# FLAN-T5

## 概要

FLAN-T5は論文[Scaling Instruction-Finetuned Language Models](https://huggingface.co/papers/2210.11416)で公開されました。これは、複数のタスクの混合でファインチューニングされたT5の強化版です。

モデルのファインチューニングを行わずに、FLAN-T5の重みを直接使用できます:

```python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

model = AutoModelForSeq2SeqLM.from_pretrained("google/flan-t5-small", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("google/flan-t5-small")

inputs = tokenizer("A step by step recipe to make bolognese pasta:", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))
['Pour a cup of bolognese into a large bowl and add the pasta']
```

FLAN-T5には、T5 バージョン 1.1 と同じ改善が含まれています（モデルの改善に関する詳細は、[こちら](./t5v1.1)を参照してください。）。

Googleは、以下のバリアントをリリースしました:

- [google/flan-t5-small](https://huggingface.co/google/flan-t5-small)

- [google/flan-t5-base](https://huggingface.co/google/flan-t5-base)

- [google/flan-t5-large](https://huggingface.co/google/flan-t5-large)

- [google/flan-t5-xl](https://huggingface.co/google/flan-t5-xl)

- [google/flan-t5-xxl](https://huggingface.co/google/flan-t5-xxl)。

元のチェックポイントは[こちら](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints)で確認できます。

すべての API リファレンス、コード例、ノートブックについては、[T5 のドキュメントページ](./t5)を参照してください。FLAN-T5 の学習と評価に関する詳細については、モデルカードを参照してください。

