Vietnamese T5ForConditionalGeneration Base Cased model (from VietAI)

Description

Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. vit5-base-vietnews-summarization is a Vietnamese model originally trained by VietAI.

Download Copy S3 URI

How to use

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

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

References

  • https://huggingface.co/VietAI/vit5-base-vietnews-summarization
  • https://paperswithcode.com/sota/abstractive-text-summarization-on-vietnews?p=vit5-pretrained-text-to-text-transformer-for
  • https://github.com/vietai/ViT5
  • https://github.com/vietai/ViT5/blob/main/eval/Eval_vietnews_sum.ipynb