CoolFace
Modelpublic

claudiatang/flan-t5-base-eng-hwp

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
1likes26downloads
Model Card

English-Hawaiian Pidgin Translator | flan-t5-base-eng-hwp

This model is a fine-tuned version of google/flan-t5-base on a English and Hawaiian Pidgin dataset. It achieves the following results on the evaluation set:

  • —Loss: 1.5058
  • —Bleu: 4.9532
  • —Gen Len: 18.8709

Model description

Running the model

The google/flan-t5-base documentation has more details on running the model.

However, to use this model to translate English to Hawaiian Pidgin, enter `"translate English to Hawaiian Pidgin: "` before your statement.

For example, if you would like to translate "I went to Ala Moana today to go shopping" please tokenize all of the following: `"translate English to Hawaiian Pidgin: I went to Ala Moana today to go shopping."`

If you are trying the English-Hawaiian Pidgin Translator space, there is no need for the input prefix, as it is automatically added.

Training and evaluation data

There are not many English-Hawaiian Pidgin parallel corpora that are easily accessible. A parallel dataset, similar to bible_para, was compiled by scraping the Hawaiʻi Pidgin Version (HWP) and the King James Version (KJV) from biblegateway.com. For more information, refer to `get_data.ipynb`.

Intended uses & limitations

Due to a limited set of training and evaluation data, this model has many limitations, such as not knowing certain Hawaiian Pidgin phrases or having trouble with longer sentences.

Training procedure

For more information regarding training, refer to `finetune_FLAN_T5.ipynb`.

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 0.0003
  • —trainbatchsize: 16
  • —evalbatchsize: 16
  • —seed: 42
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: linear
  • —num_epochs: 12

Training results

Training LossEpochStepValidation LossBleuGen Len
No log1.04201.61583.632118.892
2.13182.08401.47114.1918.8743
1.51463.012601.41934.392118.8608
1.29364.016801.39364.526818.8363
1.14035.021001.40304.681318.8608
1.02846.025201.40784.823418.8684
1.02847.029401.41924.812618.8709
0.91968.033601.43034.859918.87
0.84599.037801.45064.780218.8599
0.788410.042001.47574.889518.8785
0.73911.046201.49454.912618.8759
0.708312.050401.50584.953218.8709

Framework versions

  • —Transformers 4.34.1
  • —Pytorch 2.1.0+cu118
  • —Datasets 2.14.6
  • —Tokenizers 0.14.1

Resources

  • —Christodouloupoulos, C., & Steedman, M. (2014). A massively parallel corpus: the Bible in 100 languages. Language Resources and Evaluation, 49(2), 375–395. https://doi.org/10.1007/s10579-014-9287-y ‌
  • —Chung, H. W., Hou, L., Longpre, S., Zoph, B., Tay, Y., Fedus, W., … Wei, J. (2022). Scaling Instruction-Finetuned Language Models. doi:10.48550/ARXIV.2210.11416
  • —Hawaii Pidgin. (2017). Wycliffe. https://www.biblegateway.com/versions/Hawaii-Pidgin-HWP/ (Original work published 2000)
  • —King James Bible. (2017). BibleGateway.com. https://www.biblegateway.com/versions/king-james-version-kjv-bible/ (Original work published 1769)
  • —T5. (n.d.). Huggingface.co. https://huggingface.co/docs/transformers/model_doc/t5
  • —Translation. (n.d.). Huggingface.co. Retrieved October 18, 2023, from https://huggingface.co/docs/transformers/tasks/translation