Description
Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. t5-tiny-bahasa-cased
is a Malay model originally trained by mesolitica
.
How to use
documentAssembler = DocumentAssembler() \
.setInputCols("text") \
.setOutputCols("document")
t5 = T5Transformer.pretrained("t5_tiny_bahasa_cased","ms") \
.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_tiny_bahasa_cased","ms")
.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_tiny_bahasa_cased |
Compatibility: | Spark NLP 4.3.0+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [documents] |
Output Labels: | [t5] |
Language: | ms |
Size: | 90.5 MB |
References
- https://huggingface.co/mesolitica/t5-tiny-bahasa-cased
- https://github.com/huseinzol05/malaya/tree/master/pretrained-model/t5/prepare
- https://github.com/google-research/text-to-text-transfer-transformer
- https://github.com/huseinzol05/Malaya/tree/master/pretrained-model/t5