node-llama-cpp 3.3.2 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/bindings/AddonTypes.d.ts +12 -4
- package/dist/bindings/Llama.d.ts +9 -0
- package/dist/bindings/Llama.js +52 -28
- package/dist/bindings/Llama.js.map +1 -1
- package/dist/bindings/getLlama.d.ts +2 -1
- package/dist/bindings/getLlama.js +19 -9
- package/dist/bindings/getLlama.js.map +1 -1
- package/dist/bindings/utils/asyncSome.js +2 -0
- package/dist/bindings/utils/asyncSome.js.map +1 -1
- package/dist/bindings/utils/compileLLamaCpp.d.ts +1 -1
- package/dist/bindings/utils/compileLLamaCpp.js +115 -34
- package/dist/bindings/utils/compileLLamaCpp.js.map +1 -1
- package/dist/bindings/utils/detectAvailableComputeLayers.d.ts +1 -0
- package/dist/bindings/utils/detectAvailableComputeLayers.js +4 -4
- package/dist/bindings/utils/detectAvailableComputeLayers.js.map +1 -1
- package/dist/bindings/utils/detectBuildTools.d.ts +14 -0
- package/dist/bindings/utils/detectBuildTools.js +149 -0
- package/dist/bindings/utils/detectBuildTools.js.map +1 -0
- package/dist/bindings/utils/resolveActualBindingBinaryPath.d.ts +1 -0
- package/dist/bindings/utils/resolveActualBindingBinaryPath.js +18 -0
- package/dist/bindings/utils/resolveActualBindingBinaryPath.js.map +1 -0
- package/dist/bindings/utils/testBindingBinary.d.ts +1 -1
- package/dist/bindings/utils/testBindingBinary.js +58 -5
- package/dist/bindings/utils/testBindingBinary.js.map +1 -1
- package/dist/chatWrappers/AlpacaChatWrapper.d.ts +4 -0
- package/dist/chatWrappers/AlpacaChatWrapper.js +4 -0
- package/dist/chatWrappers/AlpacaChatWrapper.js.map +1 -1
- package/dist/chatWrappers/FalconChatWrapper.d.ts +4 -0
- package/dist/chatWrappers/FalconChatWrapper.js +4 -0
- package/dist/chatWrappers/FalconChatWrapper.js.map +1 -1
- package/dist/chatWrappers/GeneralChatWrapper.d.ts +4 -0
- package/dist/chatWrappers/GeneralChatWrapper.js +4 -0
- package/dist/chatWrappers/GeneralChatWrapper.js.map +1 -1
- package/dist/chatWrappers/utils/resolveChatWrapper.d.ts +2 -0
- package/dist/chatWrappers/utils/resolveChatWrapper.js +8 -27
- package/dist/chatWrappers/utils/resolveChatWrapper.js.map +1 -1
- package/dist/cli/commands/ChatCommand.d.ts +4 -0
- package/dist/cli/commands/ChatCommand.js +158 -13
- package/dist/cli/commands/ChatCommand.js.map +1 -1
- package/dist/cli/commands/CompleteCommand.d.ts +4 -0
- package/dist/cli/commands/CompleteCommand.js +143 -10
- package/dist/cli/commands/CompleteCommand.js.map +1 -1
- package/dist/cli/commands/DebugCommand.js +5 -5
- package/dist/cli/commands/DebugCommand.js.map +1 -1
- package/dist/cli/commands/InfillCommand.d.ts +4 -0
- package/dist/cli/commands/InfillCommand.js +142 -10
- package/dist/cli/commands/InfillCommand.js.map +1 -1
- package/dist/cli/commands/OnPostInstallCommand.js +12 -2
- package/dist/cli/commands/OnPostInstallCommand.js.map +1 -1
- package/dist/cli/commands/inspect/commands/InspectEstimateCommand.d.ts +1 -0
- package/dist/cli/commands/inspect/commands/InspectEstimateCommand.js +14 -7
- package/dist/cli/commands/inspect/commands/InspectEstimateCommand.js.map +1 -1
- package/dist/cli/commands/inspect/commands/InspectGgufCommand.js +13 -3
- package/dist/cli/commands/inspect/commands/InspectGgufCommand.js.map +1 -1
- package/dist/cli/commands/inspect/commands/InspectGpuCommand.js +20 -10
- package/dist/cli/commands/inspect/commands/InspectGpuCommand.js.map +1 -1
- package/dist/cli/commands/inspect/commands/InspectMeasureCommand.d.ts +2 -0
- package/dist/cli/commands/inspect/commands/InspectMeasureCommand.js +234 -77
- package/dist/cli/commands/inspect/commands/InspectMeasureCommand.js.map +1 -1
- package/dist/cli/recommendedModels.js +11 -1
- package/dist/cli/recommendedModels.js.map +1 -1
- package/dist/cli/utils/ConsoleTable.d.ts +1 -0
- package/dist/cli/utils/ConsoleTable.js +5 -1
- package/dist/cli/utils/ConsoleTable.js.map +1 -1
- package/dist/cli/utils/interactivelyAskForModel.d.ts +2 -1
- package/dist/cli/utils/interactivelyAskForModel.js +16 -13
- package/dist/cli/utils/interactivelyAskForModel.js.map +1 -1
- package/dist/cli/utils/isRunningUnderRosetta.d.ts +1 -0
- package/dist/cli/utils/isRunningUnderRosetta.js +20 -0
- package/dist/cli/utils/isRunningUnderRosetta.js.map +1 -0
- package/dist/cli/utils/printCommonInfoLines.d.ts +4 -2
- package/dist/cli/utils/printCommonInfoLines.js +67 -5
- package/dist/cli/utils/printCommonInfoLines.js.map +1 -1
- package/dist/cli/utils/resolveCommandGgufPath.d.ts +3 -1
- package/dist/cli/utils/resolveCommandGgufPath.js +6 -5
- package/dist/cli/utils/resolveCommandGgufPath.js.map +1 -1
- package/dist/cli/utils/toBytes.d.ts +1 -0
- package/dist/cli/utils/toBytes.js +5 -0
- package/dist/cli/utils/toBytes.js.map +1 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.js +3 -0
- package/dist/config.js.map +1 -1
- package/dist/evaluator/LlamaChat/LlamaChat.d.ts +12 -3
- package/dist/evaluator/LlamaChat/LlamaChat.js +21 -7
- package/dist/evaluator/LlamaChat/LlamaChat.js.map +1 -1
- package/dist/evaluator/LlamaChatSession/LlamaChatSession.d.ts +6 -2
- package/dist/evaluator/LlamaChatSession/LlamaChatSession.js +3 -0
- package/dist/evaluator/LlamaChatSession/LlamaChatSession.js.map +1 -1
- package/dist/evaluator/LlamaCompletion.d.ts +3 -0
- package/dist/evaluator/LlamaCompletion.js +5 -0
- package/dist/evaluator/LlamaCompletion.js.map +1 -1
- package/dist/evaluator/LlamaContext/LlamaContext.d.ts +81 -38
- package/dist/evaluator/LlamaContext/LlamaContext.js +678 -132
- package/dist/evaluator/LlamaContext/LlamaContext.js.map +1 -1
- package/dist/evaluator/LlamaContext/TokenPredictor.d.ts +55 -0
- package/dist/evaluator/LlamaContext/TokenPredictor.js +20 -0
- package/dist/evaluator/LlamaContext/TokenPredictor.js.map +1 -0
- package/dist/evaluator/LlamaContext/tokenPredictors/DraftSequenceTokenPredictor.d.ts +56 -0
- package/dist/evaluator/LlamaContext/tokenPredictors/DraftSequenceTokenPredictor.js +266 -0
- package/dist/evaluator/LlamaContext/tokenPredictors/DraftSequenceTokenPredictor.js.map +1 -0
- package/dist/evaluator/LlamaContext/tokenPredictors/InputLookupTokenPredictor.d.ts +58 -0
- package/dist/evaluator/LlamaContext/tokenPredictors/InputLookupTokenPredictor.js +138 -0
- package/dist/evaluator/LlamaContext/tokenPredictors/InputLookupTokenPredictor.js.map +1 -0
- package/dist/evaluator/LlamaContext/types.d.ts +198 -5
- package/dist/evaluator/LlamaEmbeddingContext.d.ts +3 -0
- package/dist/evaluator/LlamaEmbeddingContext.js +3 -0
- package/dist/evaluator/LlamaEmbeddingContext.js.map +1 -1
- package/dist/evaluator/LlamaGrammar.d.ts +7 -1
- package/dist/evaluator/LlamaGrammar.js +6 -0
- package/dist/evaluator/LlamaGrammar.js.map +1 -1
- package/dist/evaluator/LlamaGrammarEvaluationState.d.ts +4 -4
- package/dist/evaluator/LlamaGrammarEvaluationState.js +16 -8
- package/dist/evaluator/LlamaGrammarEvaluationState.js.map +1 -1
- package/dist/evaluator/LlamaJsonSchemaGrammar.d.ts +5 -0
- package/dist/evaluator/LlamaJsonSchemaGrammar.js +7 -0
- package/dist/evaluator/LlamaJsonSchemaGrammar.js.map +1 -1
- package/dist/evaluator/LlamaModel/LlamaModel.d.ts +19 -11
- package/dist/evaluator/LlamaModel/LlamaModel.js +23 -29
- package/dist/evaluator/LlamaModel/LlamaModel.js.map +1 -1
- package/dist/evaluator/LlamaRankingContext.d.ts +76 -0
- package/dist/evaluator/LlamaRankingContext.js +158 -0
- package/dist/evaluator/LlamaRankingContext.js.map +1 -0
- package/dist/evaluator/TokenBias.d.ts +3 -0
- package/dist/evaluator/TokenBias.js +3 -0
- package/dist/evaluator/TokenBias.js.map +1 -1
- package/dist/evaluator/utils/chunkDocument.d.ts +86 -0
- package/dist/evaluator/utils/chunkDocument.js +212 -0
- package/dist/evaluator/utils/chunkDocument.js.map +1 -0
- package/dist/gguf/insights/GgufInsights.d.ts +3 -1
- package/dist/gguf/insights/GgufInsights.js +114 -8
- package/dist/gguf/insights/GgufInsights.js.map +1 -1
- package/dist/gguf/insights/GgufInsightsConfigurationResolver.d.ts +6 -3
- package/dist/gguf/insights/GgufInsightsConfigurationResolver.js +11 -7
- package/dist/gguf/insights/GgufInsightsConfigurationResolver.js.map +1 -1
- package/dist/gguf/insights/utils/resolveModelGpuLayersOption.d.ts +2 -1
- package/dist/gguf/insights/utils/resolveModelGpuLayersOption.js +13 -7
- package/dist/gguf/insights/utils/resolveModelGpuLayersOption.js.map +1 -1
- package/dist/gguf/parser/GgufV2Parser.js +29 -8
- package/dist/gguf/parser/GgufV2Parser.js.map +1 -1
- package/dist/gguf/parser/parseGguf.js +11 -11
- package/dist/gguf/parser/parseGguf.js.map +1 -1
- package/dist/gguf/readGgufFileInfo.js +8 -3
- package/dist/gguf/readGgufFileInfo.js.map +1 -1
- package/dist/gguf/types/GgufFileInfoTypes.d.ts +1 -0
- package/dist/gguf/types/GgufMetadataTypes.d.ts +9 -9
- package/dist/gguf/types/GgufMetadataTypes.js +1 -1
- package/dist/gguf/types/GgufMetadataTypes.js.map +1 -1
- package/dist/gguf/types/GgufTensorInfoTypes.d.ts +13 -0
- package/dist/gguf/types/GgufTensorInfoTypes.js.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/LlamaText.d.ts +4 -1
- package/dist/utils/LlamaText.js +4 -1
- package/dist/utils/LlamaText.js.map +1 -1
- package/dist/utils/cmake.js +23 -0
- package/dist/utils/cmake.js.map +1 -1
- package/dist/utils/pushAll.d.ts +1 -1
- package/dist/utils/pushAll.js.map +1 -1
- package/dist/utils/tokenizerUtils.js +1 -1
- package/dist/utils/utilTypes.d.ts +5 -0
- package/llama/CMakeLists.txt +25 -8
- package/llama/addon/AddonContext.cpp +196 -22
- package/llama/addon/AddonContext.h +1 -0
- package/llama/addon/AddonGrammar.cpp +1 -4
- package/llama/addon/AddonGrammarEvaluationState.cpp +16 -5
- package/llama/addon/AddonModel.cpp +31 -39
- package/llama/addon/AddonModel.h +1 -1
- package/llama/addon/AddonModelLora.cpp +2 -2
- package/llama/addon/AddonModelLora.h +1 -1
- package/llama/addon/AddonSampler.cpp +7 -12
- package/llama/addon/addon.cpp +26 -7
- package/llama/addon/globals/getGpuInfo.cpp +30 -5
- package/llama/addon/globals/getGpuInfo.h +6 -1
- package/llama/addon/globals/getMemoryInfo.cpp +63 -0
- package/llama/addon/globals/getMemoryInfo.h +4 -0
- package/llama/binariesGithubRelease.json +1 -1
- package/llama/cmake/win32.ensureNinjaPath.cmake +68 -0
- package/llama/cmake/win32.ensureNodeLib.cmake +34 -0
- package/llama/cmake/win32.llvmApplyGnuModeAdaptations.cmake +12 -0
- package/llama/cmake/win32.llvmEnsureCmakeAr.cmake +37 -0
- package/llama/cmake/win32.llvmUseGnuModeCompilers.cmake +87 -0
- package/llama/cmake/win32.programFilesPaths.cmake +35 -0
- package/llama/gitRelease.bundle +0 -0
- package/llama/gpuInfo/vulkan-gpu-info.cpp +29 -2
- package/llama/gpuInfo/vulkan-gpu-info.h +1 -0
- package/llama/llama.cpp.info.json +1 -1
- package/llama/profiles/llvm.win32.host-arm64.target-arm64.cmake +14 -0
- package/llama/profiles/llvm.win32.host-x64.target-arm64.cmake +14 -0
- package/llama/profiles/llvm.win32.host-x64.target-x64.cmake +14 -0
- package/llama/toolchains/llvm.win32.host-x64.target-x64.cmake +20 -0
- package/llama/toolchains/win32.host-arm64.target-arm64.cmake +21 -0
- package/llama/toolchains/win32.host-x64.target-arm64.cmake +14 -34
- package/package.json +47 -44
- package/templates/README.md +1 -1
- package/templates/packed/electron-typescript-react.json +1 -1
- package/templates/packed/node-typescript.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.programFilesPaths.cmake")
|
|
2
|
+
setProgramFilesPaths("arm64")
|
|
3
|
+
|
|
4
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNodeLib.cmake")
|
|
5
|
+
ensureNodeLib("arm64" "arm64")
|
|
6
|
+
|
|
7
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmApplyGnuModeAdaptations.cmake")
|
|
8
|
+
llvmApplyGnuModeAdaptations()
|
|
9
|
+
|
|
10
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmEnsureCmakeAr.cmake")
|
|
11
|
+
llvmEnsureCmakeAr("arm64")
|
|
12
|
+
|
|
13
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNinjaPath.cmake")
|
|
14
|
+
ensureNinjaPath()
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.programFilesPaths.cmake")
|
|
2
|
+
setProgramFilesPaths("x64")
|
|
3
|
+
|
|
4
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNodeLib.cmake")
|
|
5
|
+
ensureNodeLib("x64" "arm64")
|
|
6
|
+
|
|
7
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmApplyGnuModeAdaptations.cmake")
|
|
8
|
+
llvmApplyGnuModeAdaptations()
|
|
9
|
+
|
|
10
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmEnsureCmakeAr.cmake")
|
|
11
|
+
llvmEnsureCmakeAr("x64")
|
|
12
|
+
|
|
13
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNinjaPath.cmake")
|
|
14
|
+
ensureNinjaPath()
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.programFilesPaths.cmake")
|
|
2
|
+
setProgramFilesPaths("x64")
|
|
3
|
+
|
|
4
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNodeLib.cmake")
|
|
5
|
+
ensureNodeLib("x64" "x64")
|
|
6
|
+
|
|
7
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmApplyGnuModeAdaptations.cmake")
|
|
8
|
+
llvmApplyGnuModeAdaptations()
|
|
9
|
+
|
|
10
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmEnsureCmakeAr.cmake")
|
|
11
|
+
llvmEnsureCmakeAr("x64")
|
|
12
|
+
|
|
13
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNinjaPath.cmake")
|
|
14
|
+
ensureNinjaPath()
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
set(CMAKE_SYSTEM_NAME Windows)
|
|
2
|
+
set(CMAKE_SYSTEM_PROCESSOR x86_64)
|
|
3
|
+
|
|
4
|
+
set(target x86_64-pc-windows-msvc)
|
|
5
|
+
set(CMAKE_C_COMPILER_TARGET ${target})
|
|
6
|
+
set(CMAKE_CXX_COMPILER_TARGET ${target})
|
|
7
|
+
|
|
8
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.programFilesPaths.cmake")
|
|
9
|
+
setProgramFilesPaths("x64")
|
|
10
|
+
|
|
11
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmUseGnuModeCompilers.cmake")
|
|
12
|
+
llvmUseGnuModeCompilers("x64")
|
|
13
|
+
|
|
14
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNinjaPath.cmake")
|
|
15
|
+
ensureNinjaPath()
|
|
16
|
+
|
|
17
|
+
set(arch_c_flags "-march=native")
|
|
18
|
+
|
|
19
|
+
set(CMAKE_C_FLAGS_INIT "${arch_c_flags}")
|
|
20
|
+
set(CMAKE_CXX_FLAGS_INIT "${arch_c_flags}")
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
set(CMAKE_SYSTEM_NAME Windows)
|
|
2
|
+
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
|
3
|
+
|
|
4
|
+
set(target arm64-pc-windows-msvc)
|
|
5
|
+
set(CMAKE_C_COMPILER_TARGET ${target})
|
|
6
|
+
set(CMAKE_CXX_COMPILER_TARGET ${target})
|
|
7
|
+
|
|
8
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.programFilesPaths.cmake")
|
|
9
|
+
setProgramFilesPaths("arm64")
|
|
10
|
+
|
|
11
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmUseGnuModeCompilers.cmake")
|
|
12
|
+
llvmUseGnuModeCompilers("arm64")
|
|
13
|
+
|
|
14
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNinjaPath.cmake")
|
|
15
|
+
ensureNinjaPath()
|
|
16
|
+
|
|
17
|
+
set(arch_c_flags "-march=armv8.7-a -fvectorize -ffp-model=fast -fno-finite-math-only")
|
|
18
|
+
set(warn_c_flags "-Wno-format -Wno-unused-variable -Wno-unused-function -Wno-gnu-zero-variadic-macro-arguments")
|
|
19
|
+
|
|
20
|
+
set(CMAKE_C_FLAGS_INIT "${arch_c_flags} ${warn_c_flags}")
|
|
21
|
+
set(CMAKE_CXX_FLAGS_INIT "${arch_c_flags} ${warn_c_flags}")
|
|
@@ -1,41 +1,21 @@
|
|
|
1
1
|
set(CMAKE_SYSTEM_NAME Windows)
|
|
2
|
-
set(CMAKE_SYSTEM_PROCESSOR
|
|
2
|
+
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
set(
|
|
6
|
-
set(
|
|
4
|
+
set(target arm64-pc-windows-msvc)
|
|
5
|
+
set(CMAKE_C_COMPILER_TARGET ${target})
|
|
6
|
+
set(CMAKE_CXX_COMPILER_TARGET ${target})
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"${PROGRAMFILES}/Microsoft Visual Studio"
|
|
11
|
-
"C:/Program Files (x86)/Microsoft Visual Studio"
|
|
12
|
-
"C:/Program Files/Microsoft Visual Studio"
|
|
13
|
-
)
|
|
14
|
-
foreach(PATH IN LISTS VS_INSTALL_PATHS)
|
|
15
|
-
if(CL_EXE_PATH)
|
|
16
|
-
break()
|
|
17
|
-
endif()
|
|
8
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.programFilesPaths.cmake")
|
|
9
|
+
setProgramFilesPaths("x64")
|
|
18
10
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
list(GET FOUND_CL_EXE 0 CL_EXE_PATH)
|
|
22
|
-
break()
|
|
23
|
-
endif()
|
|
11
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.llvmUseGnuModeCompilers.cmake")
|
|
12
|
+
llvmUseGnuModeCompilers("x64")
|
|
24
13
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
endif()
|
|
14
|
+
include("${CMAKE_CURRENT_LIST_DIR}/../cmake/win32.ensureNinjaPath.cmake")
|
|
15
|
+
ensureNinjaPath()
|
|
28
16
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
list(GET FOUND_CL_EXE 0 CL_EXE_PATH)
|
|
32
|
-
break()
|
|
33
|
-
endif()
|
|
34
|
-
endforeach()
|
|
17
|
+
set(arch_c_flags "-march=armv8.7-a -fvectorize -ffp-model=fast -fno-finite-math-only")
|
|
18
|
+
set(warn_c_flags "-Wno-format -Wno-unused-variable -Wno-unused-function -Wno-gnu-zero-variadic-macro-arguments")
|
|
35
19
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
else()
|
|
39
|
-
set(CMAKE_C_COMPILER "${CL_EXE_PATH}")
|
|
40
|
-
set(CMAKE_CXX_COMPILER "${CL_EXE_PATH}")
|
|
41
|
-
endif()
|
|
20
|
+
set(CMAKE_C_FLAGS_INIT "${arch_c_flags} ${warn_c_flags}")
|
|
21
|
+
set(CMAKE_CXX_FLAGS_INIT "${arch_c_flags} ${warn_c_flags}")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-llama-cpp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Run AI models locally on your machine with node.js bindings for llama.cpp. Enforce a JSON schema on the model output on the generation level",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -91,11 +91,14 @@
|
|
|
91
91
|
"vulkan",
|
|
92
92
|
"grammar",
|
|
93
93
|
"embedding",
|
|
94
|
+
"rerank",
|
|
95
|
+
"reranking",
|
|
94
96
|
"json-grammar",
|
|
95
97
|
"json-schema-grammar",
|
|
96
98
|
"functions",
|
|
97
99
|
"function-calling",
|
|
98
|
-
"
|
|
100
|
+
"token-prediction",
|
|
101
|
+
"speculative-decoding",
|
|
99
102
|
"temperature",
|
|
100
103
|
"minP",
|
|
101
104
|
"topK",
|
|
@@ -127,59 +130,59 @@
|
|
|
127
130
|
},
|
|
128
131
|
"homepage": "https://node-llama-cpp.withcat.ai",
|
|
129
132
|
"devDependencies": {
|
|
130
|
-
"@commitlint/cli": "^19.6.
|
|
133
|
+
"@commitlint/cli": "^19.6.1",
|
|
131
134
|
"@commitlint/config-conventional": "^19.6.0",
|
|
132
|
-
"@eslint/compat": "^1.2.
|
|
133
|
-
"@fontsource/inter": "^5.1.
|
|
134
|
-
"@nolebase/vitepress-plugin-git-changelog": "^2.
|
|
135
|
-
"@nolebase/vitepress-plugin-og-image": "^2.
|
|
135
|
+
"@eslint/compat": "^1.2.4",
|
|
136
|
+
"@fontsource/inter": "^5.1.1",
|
|
137
|
+
"@nolebase/vitepress-plugin-git-changelog": "^2.12.0",
|
|
138
|
+
"@nolebase/vitepress-plugin-og-image": "^2.12.0",
|
|
136
139
|
"@resvg/resvg-js": "^2.6.2",
|
|
137
140
|
"@semantic-release/exec": "^6.0.3",
|
|
138
141
|
"@semantic-release/github": "11.0.1",
|
|
139
142
|
"@semantic-release/npm": "12.0.1",
|
|
140
|
-
"@shikijs/vitepress-twoslash": "^1.
|
|
141
|
-
"@stylistic/eslint-plugin": "^2.
|
|
143
|
+
"@shikijs/vitepress-twoslash": "^1.26.1",
|
|
144
|
+
"@stylistic/eslint-plugin": "^2.12.1",
|
|
142
145
|
"@types/async-retry": "^1.4.9",
|
|
143
|
-
"@types/bytes": "^3.1.
|
|
144
|
-
"@types/cross-spawn": "^6.0.
|
|
146
|
+
"@types/bytes": "^3.1.5",
|
|
147
|
+
"@types/cross-spawn": "^6.0.6",
|
|
145
148
|
"@types/fs-extra": "^11.0.4",
|
|
146
|
-
"@types/node": "^22.10.
|
|
149
|
+
"@types/node": "^22.10.5",
|
|
147
150
|
"@types/proper-lockfile": "^4.1.4",
|
|
148
151
|
"@types/semver": "^7.5.8",
|
|
149
152
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
150
153
|
"@types/which": "^3.0.4",
|
|
151
154
|
"@types/yargs": "^17.0.33",
|
|
152
|
-
"@vitest/coverage-v8": "^2.1.
|
|
153
|
-
"@vitest/ui": "^2.1.
|
|
154
|
-
"electron": "^33.
|
|
155
|
-
"eslint": "^9.
|
|
156
|
-
"eslint-import-resolver-typescript": "^3.
|
|
155
|
+
"@vitest/coverage-v8": "^2.1.8",
|
|
156
|
+
"@vitest/ui": "^2.1.8",
|
|
157
|
+
"electron": "^33.3.1",
|
|
158
|
+
"eslint": "^9.17.0",
|
|
159
|
+
"eslint-import-resolver-typescript": "^3.7.0",
|
|
157
160
|
"eslint-plugin-import": "^2.31.0",
|
|
158
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
159
|
-
"eslint-plugin-n": "^17.
|
|
161
|
+
"eslint-plugin-jsdoc": "^50.6.1",
|
|
162
|
+
"eslint-plugin-n": "^17.15.1",
|
|
160
163
|
"feed": "^4.2.2",
|
|
161
164
|
"husky": "^9.1.7",
|
|
162
|
-
"rehype": "^13.0.
|
|
165
|
+
"rehype": "^13.0.2",
|
|
163
166
|
"rimraf": "^6.0.1",
|
|
164
|
-
"semantic-release": "^24.2.
|
|
167
|
+
"semantic-release": "^24.2.1",
|
|
165
168
|
"sharp": "^0.33.5",
|
|
166
169
|
"tslib": "^2.8.1",
|
|
167
|
-
"typedoc": "^0.27.
|
|
168
|
-
"typedoc-plugin-markdown": "^4.
|
|
169
|
-
"typedoc-plugin-mdn-links": "^4.0.
|
|
170
|
-
"typedoc-vitepress-theme": "^1.1.
|
|
170
|
+
"typedoc": "^0.27.6",
|
|
171
|
+
"typedoc-plugin-markdown": "^4.4.1",
|
|
172
|
+
"typedoc-plugin-mdn-links": "^4.0.7",
|
|
173
|
+
"typedoc-vitepress-theme": "^1.1.2",
|
|
171
174
|
"typescript": "^5.7.2",
|
|
172
|
-
"typescript-eslint": "^8.
|
|
173
|
-
"vite-node": "^2.1.
|
|
175
|
+
"typescript-eslint": "^8.19.1",
|
|
176
|
+
"vite-node": "^2.1.8",
|
|
174
177
|
"vitepress": "^1.5.0",
|
|
175
|
-
"vitest": "^2.1.
|
|
176
|
-
"zx": "^8.
|
|
178
|
+
"vitest": "^2.1.8",
|
|
179
|
+
"zx": "^8.3.0"
|
|
177
180
|
},
|
|
178
181
|
"dependencies": {
|
|
179
182
|
"@huggingface/jinja": "^0.3.2",
|
|
180
183
|
"async-retry": "^1.3.3",
|
|
181
184
|
"bytes": "^3.1.2",
|
|
182
|
-
"chalk": "^5.
|
|
185
|
+
"chalk": "^5.4.1",
|
|
183
186
|
"chmodrp": "^1.0.2",
|
|
184
187
|
"cmake-js": "^7.3.0",
|
|
185
188
|
"cross-env": "^7.0.3",
|
|
@@ -187,14 +190,14 @@
|
|
|
187
190
|
"env-var": "^7.5.0",
|
|
188
191
|
"filenamify": "^6.0.0",
|
|
189
192
|
"fs-extra": "^11.2.0",
|
|
190
|
-
"ignore": "^
|
|
193
|
+
"ignore": "^7.0.0",
|
|
191
194
|
"ipull": "^3.9.2",
|
|
192
195
|
"is-unicode-supported": "^2.1.0",
|
|
193
|
-
"lifecycle-utils": "^
|
|
196
|
+
"lifecycle-utils": "^2.0.0",
|
|
194
197
|
"log-symbols": "^7.0.0",
|
|
195
198
|
"nanoid": "^5.0.9",
|
|
196
199
|
"node-addon-api": "^8.3.0",
|
|
197
|
-
"octokit": "^4.0.
|
|
200
|
+
"octokit": "^4.0.3",
|
|
198
201
|
"ora": "^8.1.1",
|
|
199
202
|
"pretty-ms": "^9.2.0",
|
|
200
203
|
"proper-lockfile": "^4.1.2",
|
|
@@ -216,16 +219,16 @@
|
|
|
216
219
|
}
|
|
217
220
|
},
|
|
218
221
|
"optionalDependencies": {
|
|
219
|
-
"@node-llama-cpp/linux-arm64": "3.
|
|
220
|
-
"@node-llama-cpp/linux-armv7l": "3.
|
|
221
|
-
"@node-llama-cpp/linux-x64": "3.
|
|
222
|
-
"@node-llama-cpp/linux-x64-cuda": "3.
|
|
223
|
-
"@node-llama-cpp/linux-x64-vulkan": "3.
|
|
224
|
-
"@node-llama-cpp/mac-arm64-metal": "3.
|
|
225
|
-
"@node-llama-cpp/mac-x64": "3.
|
|
226
|
-
"@node-llama-cpp/win-arm64": "3.
|
|
227
|
-
"@node-llama-cpp/win-x64": "3.
|
|
228
|
-
"@node-llama-cpp/win-x64-cuda": "3.
|
|
229
|
-
"@node-llama-cpp/win-x64-vulkan": "3.
|
|
222
|
+
"@node-llama-cpp/linux-arm64": "3.4.1",
|
|
223
|
+
"@node-llama-cpp/linux-armv7l": "3.4.1",
|
|
224
|
+
"@node-llama-cpp/linux-x64": "3.4.1",
|
|
225
|
+
"@node-llama-cpp/linux-x64-cuda": "3.4.1",
|
|
226
|
+
"@node-llama-cpp/linux-x64-vulkan": "3.4.1",
|
|
227
|
+
"@node-llama-cpp/mac-arm64-metal": "3.4.1",
|
|
228
|
+
"@node-llama-cpp/mac-x64": "3.4.1",
|
|
229
|
+
"@node-llama-cpp/win-arm64": "3.4.1",
|
|
230
|
+
"@node-llama-cpp/win-x64": "3.4.1",
|
|
231
|
+
"@node-llama-cpp/win-x64-cuda": "3.4.1",
|
|
232
|
+
"@node-llama-cpp/win-x64-vulkan": "3.4.1"
|
|
230
233
|
}
|
|
231
234
|
}
|
package/templates/README.md
CHANGED
|
@@ -3,4 +3,4 @@ Use the following command to scaffold a project from a template:
|
|
|
3
3
|
npm create node-llama-cpp@latest
|
|
4
4
|
```
|
|
5
5
|
|
|
6
|
-
> Don't use the templates in this repository directly. They are built to be used with `npm create` command ([learn more](https://node-llama-cpp.withcat.ai/guide/))
|
|
6
|
+
> Don't use the templates in this repository directly. They are built to be used with the `npm create` command ([learn more](https://node-llama-cpp.withcat.ai/guide/))
|