Italian T5ForConditionalGeneration Small Cased model (from it5)

Description

Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. it5-efficient-small-el32-informal-to-formal is a Italian model originally trained by it5.

Download Copy S3 URI

How to use

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

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

References

  • https://huggingface.co/it5/it5-efficient-small-el32-informal-to-formal
  • https://github.com/stefan-it
  • https://arxiv.org/abs/2203.03759
  • https://gsarti.com
  • https://malvinanissim.github.io
  • https://arxiv.org/abs/2109.10686
  • https://github.com/gsarti/it5
  • https://paperswithcode.com/sota?task=Informal-to-formal+Style+Transfer&dataset=XFORMAL+%28Italian+Subset%29