Multilingual t5_base_scand3m T5Transformer from north

Description

Pretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.t5_base_scand3m is a Multilingual model originally trained by north.

Download Copy S3 URI

How to use

     
documentAssembler = DocumentAssembler() \
    .setInputCol('text') \
    .setOutputCol('document')

t5  = T5Transformer.pretrained("t5_base_scand3m","xx") \
     .setInputCols(["document"]) \
     .setOutputCol("output")

pipeline = Pipeline().setStages([documentAssembler, t5])
data = spark.createDataFrame([["I love spark-nlp"]]).toDF("text")
pipelineModel = pipeline.fit(data)
pipelineDF = pipelineModel.transform(data)


val documentAssembler = new DocumentAssembler()
    .setInputCols("text")
    .setOutputCols("document")

val t5 = T5Transformer.pretrained("t5_base_scand3m", "xx")
    .setInputCols(Array("documents")) 
    .setOutputCol("output") 
    
val pipeline = new Pipeline().setStages(Array(documentAssembler, t5))
val data = Seq("I love spark-nlp").toDS.toDF("text")
val pipelineModel = pipeline.fit(data)
val pipelineDF = pipelineModel.transform(data)

Model Information

Model Name: t5_base_scand3m
Compatibility: Spark NLP 5.4.2+
License: Open Source
Edition: Official
Input Labels: [document]
Output Labels: [output]
Language: xx
Size: 2.8 GB

References

https://huggingface.co/north/t5_base_scand3M