text-generation-inference/backends/llamacpp/src/lib.rs
2024-11-14 08:42:01 +01:00

17 lines
472 B
Rust

pub mod backend;
#[cxx::bridge(namespace = "huggingface::tgi::backends::llamacpp::impl")]
mod ffi {
unsafe extern "C++" {
include!("backends/llamacpp/csrc/ffi.hpp");
/// Represent an instance of the llama.cpp backend instance on C++ side
type LlamaCppBackendImpl;
#[rust_name = "create_llamacpp_backend"]
fn CreateLlamaCppBackendImpl(
modelPath: &str,
) -> Result<UniquePtr<LlamaCppBackendImpl>>;
}
}