diff --git a/backends/llamacpp/csrc/ffi.hpp b/backends/llamacpp/csrc/ffi.hpp index a3d14ee5..9daacf2c 100644 --- a/backends/llamacpp/csrc/ffi.hpp +++ b/backends/llamacpp/csrc/ffi.hpp @@ -101,8 +101,7 @@ namespace huggingface::tgi::backends::llamacpp { params.use_mmap = true; auto *model = llama_load_model_from_file(cxxPath.c_str(), params); - auto backend = single_worker_backend_t(model, std::nullopt); - return std::make_unique(std::move(backend)); + return std::make_unique(single_worker_backend_t { model, std::nullopt }); } }