Italian T5ForConditionalGeneration Base Cased model (from aiknowyou)

Description

Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. mt5-base-it-paraphraser is a Italian model originally trained by aiknowyou.

Download Copy S3 URI

How to use

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

t5 = T5Transformer.pretrained("t5_mt5_base_it_paraphraser","it") \
    .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_mt5_base_it_paraphraser","it") 
    .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_mt5_base_it_paraphraser
Compatibility: Spark NLP 4.3.0+
License: Open Source
Edition: Official
Input Labels: [documents]
Output Labels: [t5]
Language: it
Size: 969.5 MB

References

  • https://huggingface.co/aiknowyou/mt5-base-it-paraphraser
  • https://arxiv.org/abs/2010.11934
  • https://colab.research.google.com/drive/1DGeF190gJ3DjRFQiwhFuZalp427iqJNQ
  • https://gist.github.com/avidale/44cd35bfcdaf8bedf51d97c468cc8001
  • http://creativecommons.org/licenses/by-nc-sa/4.0/
  • http://creativecommons.org/licenses/by-nc-sa/4.0/