Constructor Reranker
- Namespace
- LMKit.Embeddings
- Assembly
- LM-Kit.NET.dll
Reranker(LM)
Initializes a new instance of the Reranker class with the specified embedding-capable language model.
public Reranker(LM model)
Parameters
modelLMThe LM instance to use for embedding computations. Must not be
nulland must support embeddings.
Examples
using LMKit.Model;
using LMKit.Embeddings;
using System;
// Load an embedding model
LM embeddingModel = LM.LoadFromModelID("embeddinggemma-300m");
// Create the reranker
Reranker reranker = new Reranker(embeddingModel);
Console.WriteLine($"Reranker initialized with model: {reranker.Model.Name}");
Exceptions
- ArgumentNullException
Thrown when
modelisnull.- InvalidModelException
Thrown when
modeldoes not support embeddings.