mirror of
https://github.com/mudler/LocalAI.git
synced 2026-05-04 05:57:10 -04:00
feat(llama.cpp): allow to set kv-overrides (#5745)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
committed by
GitHub
parent
dbcf5fb4fc
commit
dfadc3696e
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "backend.pb.h"
|
||||
#include "backend.grpc.pb.h"
|
||||
#include "common.h"
|
||||
#include <getopt.h>
|
||||
#include <grpcpp/ext/proto_server_reflection_plugin.h>
|
||||
#include <grpcpp/grpcpp.h>
|
||||
@@ -260,6 +261,13 @@ static void params_parse(const backend::ModelOptions* request,
|
||||
}
|
||||
}
|
||||
|
||||
// Add kv_overrides
|
||||
if (request->overrides_size() > 0) {
|
||||
for (int i = 0; i < request->overrides_size(); i++) {
|
||||
string_parse_kv_override(request->overrides(i).c_str(), params.kv_overrides);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Add yarn
|
||||
|
||||
if (!request->tensorsplit().empty()) {
|
||||
|
||||
Reference in New Issue
Block a user