Description
Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. Randeng-T5-77M-MultiTask-Chinese
is a Chinese model originally trained by IDEA-CCNL
.
How to use
documentAssembler = DocumentAssembler() \
.setInputCols("text") \
.setOutputCols("document")
t5 = T5Transformer.pretrained("t5_randeng_77m_multitask_chinese","zh") \
.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_randeng_77m_multitask_chinese","zh")
.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_randeng_77m_multitask_chinese |
Compatibility: | Spark NLP 4.3.0+ |
License: | Open Source |
Edition: | Official |
Input Labels: | [documents] |
Output Labels: | [t5] |
Language: | zh |
Size: | 349.2 MB |
References
- https://huggingface.co/IDEA-CCNL/Randeng-T5-77M-MultiTask-Chinese
- https://github.com/IDEA-CCNL/Fengshenbang-LM
- https://fengshenbang-doc.readthedocs.io/
- http://jmlr.org/papers/v21/20-074.html
- https://github.com/IDEA-CCNL/Fengshenbang-LM/
- https://github.com/IDEA-CCNL/Fengshenbang-LM/tree/main/fengshen/examples/pretrain_t5
- https://github.com/IDEA-CCNL/Fengshenbang-LM/tree/main/fengshen/examples/mt5_summary
- https://github.com/IDEA-CCNL/Fengshenbang-LM/
- https://github.com/IDEA-CCNL/Fengshenbang-LM/tree/main/fengshen/examples/pretrain_t5
- https://github.com/IDEA-CCNL/Fengshenbang-LM/tree/main/fengshen/examples/mt5_summary
- https://arxiv.org/abs/2209.02970
- https://arxiv.org/abs/2209.02970
- https://github.com/IDEA-CCNL/Fengshenbang-LM/
- https://github.com/IDEA-CCNL/Fengshenbang-LM/