Financial FLAN-T5 Text Generation (Base)

Description

FLAN-T5 is an enhanced version of the original T5 model and is designed to produce better quality and more coherent text generation. It is trained on a large dataset of diverse texts and can generate high-quality summaries of articles, documents, and other text-based inputs. The model can also be utilized to generate financial text.

Predicted Entities

Download Copy S3 URI

How to use

document_assembler = nlp.DocumentAssembler()\
    .setInputCol("text")\
    .setOutputCol("question")

flant5 = finance.TextGenerator.pretrained('fingen_flant5_base','en','finance/models')\
    .setInputCols(["question"])\
    .setOutputCol("generated_text")
    .setMaxNewTokens(150)\
    .setStopAtEos(True)
  

pipeline = nlp.Pipeline(stages=[document_assembler, flant5])

data = spark.createDataFrame([
  [1, "Explain what is Sec 10-k filing "]
]).toDF('id', 'text')

results = pipeline.fit(data).transform(data)

results.select("generated_text.result").show(truncate=False)

Results

+--------------------------------------------------------------------------------------------------------------------+
|result                                                                                                              |
+--------------------------------------------------------------------------------------------------------------------+
|[Sec 10k filing is a form of tax filing that requires a party to file jointly or several entities for tax purposes.]|
+--------------------------------------------------------------------------------------------------------------------+

Model Information

Model Name: fingen_flant5_base
Compatibility: Finance NLP 1.0.0+
License: Licensed
Edition: Official
Language: en
Size: 920.9 MB