mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 18:45:00 +00:00
feat(llama.cpp): add reranking
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
41e239c67e
commit
5bf05cec1f
5 changed files with 105 additions and 0 deletions
|
@ -58,6 +58,9 @@ func (llm *LLM) Load(opts *pb.ModelOptions) error {
|
|||
if opts.Embeddings {
|
||||
llamaOpts = append(llamaOpts, llama.EnableEmbeddings)
|
||||
}
|
||||
if opts.Reranking {
|
||||
llamaOpts = append(llamaOpts, llama.EnableReranking)
|
||||
}
|
||||
if opts.NGPULayers != 0 {
|
||||
llamaOpts = append(llamaOpts, llama.SetGPULayers(int(opts.NGPULayers)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue