Multilingual T5ForConditionalGeneration Cased model (from VietAI)

Description

Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. envit5-translation is a Multilingual model originally trained by VietAI.

Download Copy S3 URI

How to use

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

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

References

  • https://huggingface.co/VietAI/envit5-translation
  • https://paperswithcode.com/sota/machine-translation-on-iwslt2015-english-1?p=mtet-multi-domain-translation-for-english
  • https://paperswithcode.com/sota/on-phomt?p=mtet-multi-domain-translation-for-english-and
  • https://research.vietai.org/mtet/
  • https://github.com/VinAIResearch/PhoMT
  • https://user-images.githubusercontent.com/44376091/195998681-5860e443-2071-4048-8a2b-873dcee14a72.png