diff --git a/.gitmodules b/.gitmodules index 6575f7f..ca613cb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,5 +1,5 @@ [submodule "llama.cpp"] - path = llama.cpp-mainline + path = llama.cpp-old url = https://github.com/ggerganov/llama.cpp.git [submodule "llama.cpp-alibi"] path = llama.cpp-alibi diff --git a/CMakeLists.txt b/CMakeLists.txt index e5cacaf..7a59ee1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ set(LM_PYBIND No CACHE BOOL "If justlm Python bindings should be build") set(LM_COSCHED No CACHE BOOL "If justlm should make use of CoSched") set(LM_NOEXCEPT No CACHE BOOL "If justlm exceptions should be disabled") set(LM_LLAMA Yes CACHE BOOL "If LLaMa model support should be built into justlm") +set(LM_LLAMA_OLD Yes CACHE BOOL "If old LLaMa model support should be built into justlm") set(LM_GPTJ Yes CACHE BOOL "If GPT-J model support should be built into justlm") set(LM_MPT Yes CACHE BOOL "If MPT model support should be built into justlm") @@ -35,11 +36,11 @@ endfunction() include(llama.cpp.cmake) -include_ggml(llama.cpp-mainline _mainline Yes) +include_ggml(llama.cpp-old _old Yes) include_ggml(llama.cpp-alibi _alibi No) -add_library(justlm_g4a_common SHARED g4a-common.cpp g4a-common.hpp) +add_library(justlm_g4a_common SHARED g4a_common.cpp g4a_common.hpp) if (LM_MPT) @@ -50,14 +51,14 @@ endif() if (LM_GPTJ) add_library(justlm_gptj SHARED gptj.cpp justlm_gptj.hpp gptj/gptj.cpp gptj/gptj.hpp) - target_link_libraries(justlm_gptj PRIVATE ggml_mainline justlm_g4a_common) + target_link_libraries(justlm_gptj PRIVATE ggml_old justlm_g4a_common) target_justlm_setup(justlm_gptj) endif() -if (LM_LLAMA) - add_library(justlm_llama SHARED llama.cpp justlm_llama.hpp) - target_link_libraries(justlm_llama PRIVATE ggml_mainline llama_mainline) - target_justlm_setup(justlm_llama) +if (LM_LLAMA_OLD) + add_library(justlm_llama_old SHARED llama_old.cpp justlm_llama_old.hpp) + target_link_libraries(justlm_llama_old PRIVATE ggml_old llama_old) + target_justlm_setup(justlm_llama_old) endif() diff --git a/g4a-common.cpp b/g4a_common.cpp similarity index 99% rename from g4a-common.cpp rename to g4a_common.cpp index b2aaada..93e8845 100644 --- a/g4a-common.cpp +++ b/g4a_common.cpp @@ -1,4 +1,4 @@ -#include "g4a-common.hpp" +#include "g4a_common.hpp" #include #include diff --git a/g4a-common.hpp b/g4a_common.hpp similarity index 100% rename from g4a-common.hpp rename to g4a_common.hpp diff --git a/gptj/gptj.cpp b/gptj/gptj.cpp index 9f4a062..c34d593 100644 --- a/gptj/gptj.cpp +++ b/gptj/gptj.cpp @@ -1,6 +1,6 @@ #include "gptj.hpp" -#include "../g4a-common.hpp" +#include "../g4a_common.hpp" #include #include diff --git a/gptj/gptj.hpp b/gptj/gptj.hpp index c3e71af..713472a 100644 --- a/gptj/gptj.hpp +++ b/gptj/gptj.hpp @@ -5,7 +5,7 @@ #include #include -#include "../g4a-common.hpp" +#include "../g4a_common.hpp" // default hparams (GPT-J 6B) diff --git a/justlm_gptj.hpp b/justlm_gptj.hpp index a5368b5..8d0a25a 100644 --- a/justlm_gptj.hpp +++ b/justlm_gptj.hpp @@ -4,7 +4,7 @@ #include #include #include "gptj/gptj.hpp" -#include "g4a-common.hpp" +#include "g4a_common.hpp" namespace LM { diff --git a/justlm_llama.hpp b/justlm_llama_old.hpp similarity index 100% rename from justlm_llama.hpp rename to justlm_llama_old.hpp diff --git a/justlm_mpt.hpp b/justlm_mpt.hpp index 157ff74..013fef7 100644 --- a/justlm_mpt.hpp +++ b/justlm_mpt.hpp @@ -4,7 +4,7 @@ #include #include #include "mpt/mpt.hpp" -#include "g4a-common.hpp" +#include "g4a_common.hpp" namespace LM { diff --git a/llama.cpp-mainline b/llama.cpp-old similarity index 100% rename from llama.cpp-mainline rename to llama.cpp-old diff --git a/llama.cpp b/llama_old.cpp similarity index 93% rename from llama.cpp rename to llama_old.cpp index 8604d82..145594f 100644 --- a/llama.cpp +++ b/llama_old.cpp @@ -1,4 +1,4 @@ -#include "justlm_llama.hpp" +#include "justlm_llama_old.hpp" #include "justlm.hpp" #include diff --git a/mpt/mpt.cpp b/mpt/mpt.cpp index 0c35579..8979867 100644 --- a/mpt/mpt.cpp +++ b/mpt/mpt.cpp @@ -1,5 +1,5 @@ #include "mpt.hpp" -#include "../g4a-common.hpp" +#include "../g4a_common.hpp" #include #include diff --git a/mpt/mpt.hpp b/mpt/mpt.hpp index 5cb2195..a4d0e13 100644 --- a/mpt/mpt.hpp +++ b/mpt/mpt.hpp @@ -1,6 +1,6 @@ #ifndef MPT_H #define MPT_H -#include "../g4a-common.hpp" +#include "../g4a_common.hpp" #include #include