Namespace: LLama
The embedder for LLama, which supports getting embeddings from text.
public sealed class LLamaEmbedder : System.IDisposable
Inheritance Object → LLamaEmbedder
Implements IDisposable
Dimension of embedding vectors
public int EmbeddingSize { get; }
public LLamaEmbedder(IModelParams params)
params IModelParams
public LLamaEmbedder(LLamaWeights weights, IModelParams params)
weights LLamaWeights
params IModelParams
'threads' and 'encoding' parameters are no longer used
Get the embeddings of the text.
public Single[] GetEmbeddings(string text, int threads, bool addBos, string encoding)
text String
threads Int32
unused
addBos Boolean
Add bos to the text.
encoding String
unused
Get the embeddings of the text.
public Single[] GetEmbeddings(string text)
text String
Get the embeddings of the text.
public Single[] GetEmbeddings(string text, bool addBos)
text String
addBos Boolean
Add bos to the text.
public void Dispose()