public class AllMiniLmL6V2EmbeddingModel extends AbstractInProcessEmbeddingModel
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 256 tokens.
Embedding dimensions: 384
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.
| Constructor and Description |
|---|
AllMiniLmL6V2EmbeddingModel()
Creates an instance of an
AllMiniLmL6V2EmbeddingModel. |
AllMiniLmL6V2EmbeddingModel(Executor executor)
Creates an instance of an
AllMiniLmL6V2EmbeddingModel. |
| Modifier and Type | Method and Description |
|---|---|
protected Integer |
knownDimension() |
protected OnnxBertBiEncoder |
model() |
embedAll, estimateTokenCount, loadFromJarclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic AllMiniLmL6V2EmbeddingModel()
AllMiniLmL6V2EmbeddingModel.
Uses a cached thread pool with the number of threads equal to the number of available processors.public AllMiniLmL6V2EmbeddingModel(Executor executor)
AllMiniLmL6V2EmbeddingModel.executor - The executor to use to parallelize the embedding process.protected OnnxBertBiEncoder model()
model in class AbstractInProcessEmbeddingModelprotected Integer knownDimension()
knownDimension in class dev.langchain4j.model.embedding.DimensionAwareEmbeddingModelCopyright © 2024. All rights reserved.