Merge branch 'master' into pr/23398

This commit is contained in:
Georgi Gerganov 2026-06-05 17:47:19 +03:00
commit 65eef9549c
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
4 changed files with 20 additions and 4 deletions

View File

@ -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}"

View File

@ -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 {

View File

@ -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).

View File

@ -1 +1,2 @@
engine-strict=true
ignore-scripts=true