Description
Pretrained T5Transformer model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP.vanilla_mt5_tiny8l_vs32k
is a English model originally trained by mimi33.
How to use
documentAssembler = DocumentAssembler() \
.setInputCol('text') \
.setOutputCol('document')
t5 = T5Transformer.pretrained("vanilla_mt5_tiny8l_vs32k","en") \
.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("vanilla_mt5_tiny8l_vs32k", "en")
.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: | vanilla_mt5_tiny8l_vs32k |
Compatibility: | Spark NLP 5.4.2+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [document] |
Output Labels: | [output] |
Language: | en |
Size: | 67.0 MB |
References
https://huggingface.co/mimi33/vanilla-mt5-tiny8L-vs32k