mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-06-27 23:50:20 -05:00
Merge branch 'master' into pr/23398
This commit is contained in:
commit
65eef9549c
@ -126,8 +126,22 @@ function(npm_build out_var)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${UI_SOURCE_DIR}/node_modules")
|
||||
message(STATUS "UI: running npm install (first time)")
|
||||
# npm writes node_modules/.package-lock.json on every successful install,
|
||||
# so a package-lock.json newer than this marker means node_modules is stale
|
||||
set(NPM_MARKER "${UI_SOURCE_DIR}/node_modules/.package-lock.json")
|
||||
set(need_install FALSE)
|
||||
if(NOT EXISTS "${NPM_MARKER}")
|
||||
set(need_install TRUE)
|
||||
else()
|
||||
file(TIMESTAMP "${UI_SOURCE_DIR}/package-lock.json" lock_ts)
|
||||
file(TIMESTAMP "${NPM_MARKER}" marker_ts)
|
||||
if(lock_ts STRGREATER marker_ts)
|
||||
set(need_install TRUE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(need_install)
|
||||
message(STATUS "UI: running npm install")
|
||||
execute_process(
|
||||
COMMAND ${NPM_EXECUTABLE} install
|
||||
WORKING_DIRECTORY "${UI_SOURCE_DIR}"
|
||||
|
||||
@ -1638,7 +1638,8 @@ const float * llama_model::tensor_split() const {
|
||||
}
|
||||
|
||||
uint32_t llama_model::n_gpu_layers() const {
|
||||
return params.n_gpu_layers >= 0 ? params.n_gpu_layers : hparams.n_layer() + 1;
|
||||
// note: plus 1 for the "output" layer
|
||||
return params.n_gpu_layers >= 0 ? params.n_gpu_layers : hparams.n_layer_all + 1;
|
||||
}
|
||||
|
||||
llama_split_mode llama_model::split_mode() const {
|
||||
|
||||
@ -1870,4 +1870,4 @@ You can specify default preferences for the web UI using `--ui-config <JSON conf
|
||||
|
||||
> **Note:** The old flags `--webui-config` and `--webui-config-file` are deprecated but still work as aliases.
|
||||
|
||||
You may find available preferences in [settings-config.ts](../ui/src/lib/constants/settings-config.ts).
|
||||
You may find available preferences in [settings-keys.ts](../ui/src/lib/constants/settings-keys.ts).
|
||||
|
||||
@ -1 +1,2 @@
|
||||
engine-strict=true
|
||||
ignore-scripts=true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user