English T5ForConditionalGeneration Cased model (from paulowoicho)

Description

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

Download Copy S3 URI

How to use

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

t5 = T5Transformer.pretrained("t5_podcast_summarisation","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_podcast_summarisation","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_podcast_summarisation
Compatibility: Spark NLP 4.3.0+
License: Open Source
Edition: Official
Input Labels: [documents]
Output Labels: [t5]
Language: en
Size: 927.4 MB

References

  • https://huggingface.co/paulowoicho/t5-podcast-summarisation
  • https://arxiv.org/abs/2004.04270
  • https://ai.googleblog.com/2020/02/exploring-transfer-learning-with-t5.html
  • https://arxiv.org/pdf/1910.10683.pdf
  • https://arxiv.org/abs/2004.04270
  • https://github.com/paulowoicho/msc_project/blob/master/reformat.py
  • https://github.com/abhimishra91/transformers-tutorials/blob/master/transformers_summarization_wandb.ipynb
  • https://github.com/abhimishra91