# FLAN-T5

## Ikhtisar

FLAN-T5 dirilis dalam makalah [Scaling Instruction-Finetuned Language Models](https://huggingface.co/papers/2210.11416) - ini adalah versi T5 yang ditingkatkan dan telah difinetune pada campuran tugas.

Seseorang dapat langsung menggunakan bobot FLAN-T5 tanpa melakukan penyesuaian halus (finetuning) pada model:

```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 mencakup peningkatan yang sama dengan T5 versi 1.1 (lihat [di sini](./t5v1.1) untuk detail lengkap mengenai peningkatan model.)

Google telah merilis varian berikut:

- [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).

Checkpoint asli dapat ditemukan [di sini](https://github.com/google-research/t5x/blob/main/docs/models.md#flan-t5-checkpoints).

Lihat [halaman dokumentasi T5](./t5) untuk semua referensi API, contoh kode, dan notebook. Untuk detail lebih lanjut mengenai pelatihan dan evaluasi FLAN-T5, lihat kartu model.

