transformers tensorboard safetensors t5 text2text-generation generated_from_trainer dataset:opus_books base_model:google/flan-t5-small license:apache-2.0 autotrain_compatible endpoints_compatible text-generation-inference region:us
---
license: apache-2.0
base_model: google/flan-t5-small
tags:
- generated_from_trainer
metrics:
- bleu
model-index:
- name: flan-t5-small-translator
  results: []
widget:
- text: 'translate English to French:  All creative skill levels are welcome.'
  example_title: Translation
datasets:
- opus_books
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# flan-t5-small-translator

This model is a fine-tuned version of [google/flan-t5-small](https://huggingface.co/google/flan-t5-small) on [opus_books/en-fr](https://huggingface.co/datasets/opus_books/viewer/en-fr) dataset.
It achieves the following results on the evaluation set:
- Loss: nan
- Bleu: 1.078
- Gen Len: 18.0374


## Sample Request

Try this sentence - `translate English to French: what is love?`

You should get response like - `Qu'est-ce que l'amour?`

> Ensure that you are prepending `translate English to French: ` for all translations 


## Intended uses & limitations

> This model has been trained only on en-fr subset of OPUS dataset.


## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step  | Validation Loss | Bleu  | Gen Len |
|:-------------:|:-----:|:-----:|:---------------:|:-----:|:-------:|
| 0.0           | 1.0   | 6355  | nan             | 1.078 | 18.0374 |
| 0.0           | 2.0   | 12710 | nan             | 1.078 | 18.0374 |


### Framework versions

- Transformers 4.36.2
- Pytorch 2.1.0+cu121
- Datasets 2.16.1
- Tokenizers 0.15.0