Chinese Finance BERT Sentence Embedding Cased model

Description

Pretrained Finance BERT Sentence Embedding model, adapted from Hugging Face and curated to provide scalability and production-readiness using Spark NLP. sbert-chinese-qmc-finance-v1-distill is a Chinese model originally trained by DMetaSoul.

Download Copy S3 URI

How to use

sent_embeddings = BertSentenceEmbeddings.pretrained("bert_sentence_embeddings_sbert_chinese_qmc_finance_v1_distill", "zh") \
  .setInputCols("sentence") \
  .setOutputCol("bert_sentence")

  nlp_pipeline = Pipeline(stages=[document_assembler, sentence_detector, sent_embeddings ])
    result = pipeline.fit(data).transform(data)
val sent_embeddings = BertSentenceEmbeddings.pretrained("bert_sentence_embeddings_sbert_chinese_qmc_finance_v1_distill", "zh")
  .setInputCols("sentence")
  .setOutputCol("bert_sentence")

  val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, sent_embeddings ))

Model Information

Model Name: bert_sentence_embeddings_sbert_chinese_qmc_finance_v1_distill
Compatibility: Spark NLP 4.3.2+
License: Open Source
Edition: Official
Input Labels: [sentence]
Output Labels: [bert_sentence]
Language: zh
Size: 171.0 MB
Case sensitive: true

References

  • https://huggingface.co/DMetaSoul/sbert-chinese-qmc-finance-v1-distill
  • https://www.SBERT.net