Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: cortex-cpp with cortex.tensorrt-llm #719

Merged
merged 4 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cortex-cpp/controllers/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ namespace {
constexpr static auto kLlamaEngine = "cortex.llamacpp";
constexpr static auto kPythonRuntimeEngine = "cortex.python";
constexpr static auto kOnnxEngine = "cortex.onnx";
constexpr static auto kTensorrtLlmEngine = "cortex.tensorrt-llm";
} // namespace

server::server(){
Expand Down Expand Up @@ -264,6 +265,8 @@ void server::LoadModel(const HttpRequestPtr& req,
return cortex_utils::kLlamaLibPath;
} else if(e == kOnnxEngine) {
return cortex_utils::kOnnxLibPath;
} else if(e == kTensorrtLlmEngine) {
return cortex_utils::kTensorrtLlmPath;
}
return cortex_utils::kLlamaLibPath;
};
Expand Down Expand Up @@ -371,4 +374,4 @@ void server::UnloadEngines() {
}
}

} // namespace inferences
} // namespace inferences
2 changes: 1 addition & 1 deletion cortex-cpp/controllers/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ class server : public drogon::HttpController<server>,
std::unordered_map<std::string, EngineInfo> engines_;
std::string cur_engine_type_;
};
}; // namespace inferences
}; // namespace inferences
1 change: 1 addition & 0 deletions cortex-cpp/utils/cortex_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace cortex_utils {
constexpr static auto kLlamaLibPath = "/engines/cortex.llamacpp";
constexpr static auto kPythonRuntimeLibPath = "/engines/cortex.python";
constexpr static auto kOnnxLibPath = "/engines/cortex.onnx";
constexpr static auto kTensorrtLlmPath = "/engines/cortex.tensorrt-llm";

inline std::string models_folder = "./models";

Expand Down
Loading