Class BgeSmallZhV15QuantizedEmbeddingModel

All Implemented Interfaces:
EmbeddingModel

public class BgeSmallZhV15QuantizedEmbeddingModel extends AbstractInProcessEmbeddingModel
Quantized BAAI bge-small-zh-v1.5 embedding model that runs within your Java application's process.

Maximum length of text (in tokens) that can be embedded at once: unlimited. However, while you can embed very long texts, the quality of the embedding degrades as the text lengthens. It is recommended to embed segments of no more than 512 tokens long.

Embedding dimensions: 512

It is recommended to add "为这个句子生成表示以用于检索相关文章:" prefix to a query.

Uses an Executor to parallelize the embedding process. By default, uses a cached thread pool with the number of threads equal to the number of available processors. Threads are cached for 1 second.

More details here

  • Constructor Details

    • BgeSmallZhV15QuantizedEmbeddingModel

      public BgeSmallZhV15QuantizedEmbeddingModel()
      Creates an instance of an BgeSmallZhV15QuantizedEmbeddingModel. Uses a cached thread pool with the number of threads equal to the number of available processors. Threads are cached for 1 second.
    • BgeSmallZhV15QuantizedEmbeddingModel

      public BgeSmallZhV15QuantizedEmbeddingModel(Executor executor)
      Creates an instance of an BgeSmallZhV15QuantizedEmbeddingModel.
      Parameters:
      executor - The executor to use to parallelize the embedding process.
  • Method Details