English T5ForConditionalGeneration Cased model (from tscholak)

Description

Pretrained T5ForConditionalGeneration model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. 1zha5ono is a English model originally trained by tscholak.

Download Copy S3 URI

How to use

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

t5 = T5Transformer.pretrained("t5_1zha5ono","en") \
    .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_1zha5ono","en")
    .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_1zha5ono
Compatibility: Spark NLP 4.3.0+
License: Open Source
Edition: Official
Input Labels: [documents]
Output Labels: [t5]
Language: en
Size: 947.0 MB

References

  • https://huggingface.co/tscholak/1zha5ono
  • https://arxiv.org/abs/2109.05093
  • https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#lm-adapted-t511lm100k
  • https://yale-lily.github.io/spider
  • https://github.com/google-research/text-to-text-transfer-transformer/blob/main/released_checkpoints.md#lm-adapted-t511lm100k
  • https://github.com/ElementAI/picard
  • https://github.com/ElementAI/picard
  • https://arxiv.org/abs/2109.05093
  • https://github.com/ElementAI/picard