mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
don't use ranges::contains due to clang incompatibility
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
parent
c950fdd84e
commit
f2cd6493b4
@ -33,7 +33,7 @@ set(LLMODEL_VERSION_PATCH 0)
|
|||||||
set(LLMODEL_VERSION "${LLMODEL_VERSION_MAJOR}.${LLMODEL_VERSION_MINOR}.${LLMODEL_VERSION_PATCH}")
|
set(LLMODEL_VERSION "${LLMODEL_VERSION_MAJOR}.${LLMODEL_VERSION_MINOR}.${LLMODEL_VERSION_PATCH}")
|
||||||
project(llmodel VERSION ${LLMODEL_VERSION} LANGUAGES CXX C)
|
project(llmodel VERSION ${LLMODEL_VERSION} LANGUAGES CXX C)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||||
set(BUILD_SHARED_LIBS ON)
|
set(BUILD_SHARED_LIBS ON)
|
||||||
|
@ -302,7 +302,7 @@ void LLModel::generateResponse(std::function<bool(int32_t, const std::string&)>
|
|||||||
if (match == 0) break;
|
if (match == 0) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ranges::contains(stopSequences, new_piece)) {
|
} else if (ranges::find(stopSequences, new_piece) < std::end(stopSequences)) {
|
||||||
// Special tokens must exactly match a stop sequence
|
// Special tokens must exactly match a stop sequence
|
||||||
stop = true;
|
stop = true;
|
||||||
lengthLimit = cachedResponse.size() - new_piece.size();
|
lengthLimit = cachedResponse.size() - new_piece.size();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
Loading…
Reference in New Issue
Block a user