This repository was archived by the owner on Jul 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,16 @@ set(OPENSSL_USE_STATIC_LIBS TRUE)
2020set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
2121set (CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR} /build_deps/_install) # This is the critical line for installing another package
2222
23+ if (LLAMA_CUBLAS)
24+ cmake_minimum_required (VERSION 3.17)
25+
26+ find_package (CUDAToolkit)
27+ if (CUDAToolkit_FOUND)
28+ message (STATUS "cuBLAS found" )
29+ add_compile_definitions (GGML_USE_CUBLAS)
30+ endif ()
31+ endif ()
32+
2333add_subdirectory (llama.cpp)
2434add_executable (${PROJECT_NAME} main.cc)
2535
Original file line number Diff line number Diff line change 44#include < chrono>
55#include < cstring>
66#include < thread>
7+ #include < regex>
8+
79std::string create_return_json (const std::string &id, const std::string &model,
810 const std::string &content,
911 Json::Value finish_reason = Json::Value()) {
Original file line number Diff line number Diff line change 77#include " llama.h"
88#include " build-info.h"
99#include " grammar-parser.h"
10+ #include < regex>
1011
1112#ifndef NDEBUG
1213// crash the server in debug mode, otherwise send an http 500 error
@@ -1385,6 +1386,10 @@ class llamaCPP : public drogon::HttpSimpleController<llamaCPP> {
13851386 params.model = conf[" llama_model_path" ].asString ();
13861387 params.n_gpu_layers = conf[" ngl" ].asInt ();
13871388 params.n_ctx = conf[" ctx_len" ].asInt ();
1389+ #ifdef GGML_USE_CUBLAS
1390+ LOG_INFO << " Setting up GGML CUBLAS PARAMS" ;
1391+ params.mul_mat_q = false ;
1392+ #endif // GGML_USE_CUBLAS
13881393 if (params.model_alias == " unknown" ) {
13891394 params.model_alias = params.model ;
13901395 }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ inline void nitro_logo(){
5050 std::cout << resetColor << c;
5151 colorIndex = 0 ;
5252 } else {
53- std::cout << rainbowColors[colorIndex % 6 ] << c;
53+ std::cout << rainbowColors[colorIndex % 2 ] << c;
5454 colorIndex++;
5555 }
5656 }
You can’t perform that action at this time.
0 commit comments