Description
Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. t5-small-ssm is a English model originally trained by google.
Predicted Entities
How to use
documentAssembler = DocumentAssembler() \
    .setInputCols("text") \
    .setOutputCols("document")
t5 = T5Transformer.pretrained("t5_small_ssm","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_small_ssm","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_small_ssm | 
| Compatibility: | Spark NLP 5.4.2+ | 
| License: | Open Source | 
| Edition: | Official | 
| Input Labels: | [document] | 
| Output Labels: | [output] | 
| Language: | en | 
| Size: | 179.2 MB | 
References
References
- https://huggingface.co/google/t5-small-ssm
- https://ai.googleblog.com/2020/02/exploring-transfer-learning-with-t5.html
- https://arxiv.org/pdf/2002.08909.pdf
- https://arxiv.org/abs/1910.10683.pdf
- https://goo.gle/t5-cbqa
- https://raw.githubusercontent.com/patrickvonplaten/scientific_images/master/how_much_know_ledge_image.png