Description
Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. t5-small-nl16-finnish
is a Finnish model originally trained by Finnish-NLP
.
How to use
documentAssembler = DocumentAssembler() \
.setInputCols("text") \
.setOutputCols("document")
t5 = T5Transformer.pretrained("t5_small_nl16","fi") \
.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_small_nl16","fi")
.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_small_nl16 |
Compatibility: | Spark NLP 4.3.0+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [documents] |
Output Labels: | [t5] |
Language: | fi |
Size: | 751.2 MB |
References
- https://huggingface.co/Finnish-NLP/t5-small-nl16-finnish
- https://arxiv.org/abs/1910.10683
- https://github.com/google-research/text-to-text-transfer-transformer
- https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#t511
- https://arxiv.org/abs/2002.05202
- https://arxiv.org/abs/2109.10686
- http://urn.fi/urn:nbn:fi:lb-2017070501
- http://urn.fi/urn:nbn:fi:lb-2021050401
- http://urn.fi/urn:nbn:fi:lb-2018121001
- http://urn.fi/urn:nbn:fi:lb-2020021803
- https://sites.research.google/trc/about/
- https://github.com/google-research/t5x
- https://github.com/spyysalo/yle-corpus
- https://github.com/aajanki/eduskunta-vkk
- https://sites.research.google/trc/
- https://www.linkedin.com/in/aapotanskanen/
- https://www.linkedin.com/in/rasmustoivanen/