diff --git a/gpt4all-chat/chatllm.cpp b/gpt4all-chat/chatllm.cpp index 3b6e3c6c..153f5da0 100644 --- a/gpt4all-chat/chatllm.cpp +++ b/gpt4all-chat/chatllm.cpp @@ -37,6 +37,7 @@ using namespace Qt::Literals::StringLiterals; //#define DEBUG //#define DEBUG_MODEL_LOADING +#define GPTJ_INTERNAL_STATE_VERSION 0 // GPT-J is gone but old chats still use this #define LLAMA_INTERNAL_STATE_VERSION 0 class LLModelStore { @@ -1055,6 +1056,7 @@ bool ChatLLM::serialize(QDataStream &stream, int version, bool serializeKV) if (version > 1) { stream << m_llModelType; switch (m_llModelType) { + case GPTJ_: stream << GPTJ_INTERNAL_STATE_VERSION; break; case LLAMA_: stream << LLAMA_INTERNAL_STATE_VERSION; break; default: Q_UNREACHABLE(); } diff --git a/gpt4all-chat/chatllm.h b/gpt4all-chat/chatllm.h index fd3a7a46..252b77bd 100644 --- a/gpt4all-chat/chatllm.h +++ b/gpt4all-chat/chatllm.h @@ -28,9 +28,12 @@ using namespace Qt::Literals::StringLiterals; class QDataStream; +// NOTE: values serialized to disk, do not change or reuse enum LLModelType { - LLAMA_, - API_, + GPTJ_ = 0, // no longer used + LLAMA_ = 1, + API_ = 2, + BERT_ = 3, // no longer used }; class ChatLLM;