English T5ForConditionalGeneration Base Cased model (from Tejas21)

Description

Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. Totto_t5_base_BERT_Score_20k_steps is a English model originally trained by Tejas21.

Download Copy S3 URI

How to use

documentAssembler = DocumentAssembler() \
    .setInputCols("text") \
    .setOutputCols("document")

t5 = T5Transformer.pretrained("t5_totto_base_bert_score_20k_steps","en") \
    .setInputCols("document") \
    .setOutputCol("answers")
    
pipeline = Pipeline(stages=[documentAssembler, t5])

data = spark.createDataFrame([["PUT YOUR STRING HERE"]]).toDF("text")

result = pipeline.fit(data).transform(data)
val documentAssembler = new DocumentAssembler() 
      .setInputCols("text")
      .setOutputCols("document")
       
val t5 = T5Transformer.pretrained("t5_totto_base_bert_score_20k_steps","en") 
    .setInputCols("document")
    .setOutputCol("answers")
   
val pipeline = new Pipeline().setStages(Array(documentAssembler, t5))

val data = Seq("PUT YOUR STRING HERE").toDS.toDF("text")

val result = pipeline.fit(data).transform(data)

Model Information

Model Name: t5_totto_base_bert_score_20k_steps
Compatibility: Spark NLP 4.3.0+
License: Open Source
Edition: Official
Input Labels: [documents]
Output Labels: [t5]
Language: en
Size: 925.2 MB

References

  • https://huggingface.co/Tejas21/Totto_t5_base_BERT_Score_20k_steps
  • https://github.com/google-research-datasets/ToTTo
  • https://ai.googleblog.com/2020/02/exploring-transfer-learning-with-t5.html
  • https://github.com/google-research/language/tree/master/language/totto
  • https://github.com/Tiiiger/bert_score