]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
2 months agocodeowners: add yomaytk to ggml-webgpu (#24930)
Masashi Yoshimura [Tue, 23 Jun 2026 06:19:34 +0000 (15:19 +0900)]
codeowners: add yomaytk to ggml-webgpu (#24930)

2 months agoserver: improve user message detection and create checkpoints at every user message...
Aldehir Rojas [Tue, 23 Jun 2026 05:27:28 +0000 (00:27 -0500)]
server: improve user message detection and create checkpoints at every user message (#24176)

* server : improve message span logic

* cont : cast size_t to int32_t in comparisons

* server : create checkpoints before every user msg

* chat : remove \n in gemma4 delimiters

* chat : merge msg delimiter structs into one

* cont : reword comment

* cont : initialize tokens in delimiter

* cont : add server_tokens::get_raw_tokens() for mtmd

* cont : move message finding to server_tokens and skip mtmd tokens

* cont : update cohere2moe parser

* cont : increase min-step to 8192 and always produce a chkpt for last user message

2 months agoopencl: q8_0 gemv precision improvement (#24923)
Shawn Gu [Tue, 23 Jun 2026 05:25:21 +0000 (22:25 -0700)]
opencl: q8_0 gemv precision improvement (#24923)

2 months agoserver : Add id to tool call responses api (#24882)
Matt Thompson [Mon, 22 Jun 2026 21:03:12 +0000 (14:03 -0700)]
server : Add id to tool call responses api (#24882)

2 months agoui: Prioritize favorite models in model selection (#24766)
Mahdiou Diallo [Mon, 22 Jun 2026 19:00:21 +0000 (21:00 +0200)]
ui: Prioritize favorite models in model selection (#24766)

Updated model selection prioritization to include favorite models.

2 months agoserver: (router) move model downloading to dedicated process (#24834)
Xuan-Son Nguyen [Mon, 22 Jun 2026 16:24:04 +0000 (18:24 +0200)]
server: (router) move model downloading to dedicated process (#24834)

* server: real-time model load progress tracking via /models/sse

* update docs

* server: move model download to child process

* rm unused

* fix most problems

* clean up

* nit fixes

* fix test case

* do not detact() thread

* shorter MODEL_DOWNLOAD_TIMEOUT in test

* throttle

2 months agoserver: refactor/generalize input file schema (#24299)
Xuan-Son Nguyen [Mon, 22 Jun 2026 14:42:47 +0000 (16:42 +0200)]
server: refactor/generalize input file schema (#24299)

* server: refactor/generalize input file schema

* wire up input_video, accept raw base64

* nits

* nits (2)

* fix windows

2 months agoui: model status and load progress via /models/sse feed (#24878)
Pascal [Mon, 22 Jun 2026 13:55:30 +0000 (15:55 +0200)]
ui: model status and load progress via /models/sse feed (#24878)

* ui: model status and load progress via /models/sse feed

* ui: centralize SSE wire-format delimiters into shared constants for the chat and /models/sse parsers

* ui: type /models/sse event names as a ServerModelsSseEventType enum

Address review from allozaur

2 months ago[SYCL] support bf16 on bin_bcast OP and unary OPs (#24838)
Neo Zhang [Mon, 22 Jun 2026 11:09:02 +0000 (19:09 +0800)]
[SYCL] support bf16 on bin_bcast OP and unary OPs (#24838)

* support bf16 on bin_bcast OP and unary OPs

* support the older Intel compiler than 2026.0

2 months agosampling : remove unconditional softmax+sort in top-n-sigma sampler (#22645)
Tim Neumann [Mon, 22 Jun 2026 11:08:32 +0000 (13:08 +0200)]
sampling : remove unconditional softmax+sort in top-n-sigma sampler (#22645)

2 months agoserver: fix edit_file crash on append at end of file (line_start -1) (#24893)
Pascal [Mon, 22 Jun 2026 08:55:28 +0000 (10:55 +0200)]
server: fix edit_file crash on append at end of file (line_start -1) (#24893)

line_start -1 normalized to n+1, so append inserted at lines.begin() + n + 1,
one past end() -> heap-buffer-overflow in vector::_M_range_insert.

Normalize -1 to n (insert at end()), restrict -1 to append mode and reject it
for replace/delete instead of silently clobbering the last line. Parenthesize
the insert offset so empty-file append computes the position as int first,
avoiding a transient begin() - 1 on a null vector data pointer.

2 months agodocs/android.md: Add dependency `libandroid-spawn` for building in termux (#21812)
aafsmarak [Mon, 22 Jun 2026 03:48:31 +0000 (09:18 +0530)]
docs/android.md: Add dependency `libandroid-spawn` for building in termux (#21812)

Fixes https://github.com/ggml-org/llama.cpp/issues/18615

2 months agocommon/peg : implement ac parser for stricter grammar generation (#24869)
Aldehir Rojas [Sun, 21 Jun 2026 21:20:58 +0000 (16:20 -0500)]
common/peg : implement ac parser for stricter grammar generation (#24869)

* common/peg : implement ac parser

* cont : extract functions

* cont : tidy up

* cont : remove a test

* cont : move ac() def

2 months agoserver: fix report progress for loading spec models, add "stages" list (#24870)
Xuan-Son Nguyen [Sun, 21 Jun 2026 15:36:52 +0000 (17:36 +0200)]
server: fix report progress for loading spec models, add "stages" list (#24870)

* server: fix report progress for loading spec models, add "stages" list

* improve

* nits

* nits 2

2 months agoserver: refactor batch construction (#24843)
Xuan-Son Nguyen [Sun, 21 Jun 2026 12:16:11 +0000 (14:16 +0200)]
server: refactor batch construction (#24843)

* server: refactor batch construction

* wip

* wip 2

* wip 3

* wip 4

* add abort_all_slots

* handle batch full more carefully

* fix assert

* rm debug log

* small nits

* (debug) add timings

* debug: force llama_synchronize for accurate timings

* address comments

* disable DEBUG_TIMINGS

2 months agomtmd: fix mtmd_get_memory_usage (#24867)
Xuan-Son Nguyen [Sun, 21 Jun 2026 12:12:15 +0000 (14:12 +0200)]
mtmd: fix mtmd_get_memory_usage (#24867)

2 months agojinja : implement call statement (#24847)
Sigbjørn Skjæret [Sun, 21 Jun 2026 12:04:52 +0000 (14:04 +0200)]
jinja : implement call statement (#24847)

* implement call statement

* undo unintended change

* de-lambda

* simplify

* move caller context inside function handler

2 months agomtmd: add load progress callback (#24865)
Xuan-Son Nguyen [Sun, 21 Jun 2026 11:40:52 +0000 (13:40 +0200)]
mtmd: add load progress callback (#24865)

2 months agoserver: add "verbose" field to schema (#24864)
Xuan-Son Nguyen [Sun, 21 Jun 2026 11:03:14 +0000 (13:03 +0200)]
server: add "verbose" field to schema (#24864)

2 months agoserver: real-time model load progress tracking via /models/sse (#24828)
Xuan-Son Nguyen [Sun, 21 Jun 2026 09:58:14 +0000 (11:58 +0200)]
server: real-time model load progress tracking via /models/sse (#24828)

* server: real-time model load progress tracking via /models/sse

* update docs

* add mutex for notify_to_router

* correct docs

2 months agominor : clean-up whitespaces (#24862)
Georgi Gerganov [Sun, 21 Jun 2026 08:37:12 +0000 (11:37 +0300)]
minor : clean-up whitespaces (#24862)

[no ci]

2 months agospec : Support Step3.5/3.7 flash mtp3 (#24340)
YiChen Lv [Sun, 21 Jun 2026 08:33:18 +0000 (16:33 +0800)]
spec : Support Step3.5/3.7 flash mtp3 (#24340)

* add mtp_layer_offset + include nextn flags in graph reuse

* add llama_set_mtp_layer_offset + llama_model_n_nextn_layer API

* offset head select + require all MTP blocks

* speculative multi-head process()

* speculative multi-head draft()

* gather outputs via inp_out_ids

* cleanup

* fix core

* minor cleanup

* merged draft_multi_head into draft()

* mtp rename nextn

* Apply suggestions from code review

Co-authored-by: Aman Gupta <redacted>
* clean-up comments

* fix for multi seq

* apply suggestions && chain-heads comment

* add a reference for chain_heads discussion

---------

Co-authored-by: Aman Gupta <redacted>
2 months agocommon/peg : refactor until gbnf grammar generation (#24839)
Aldehir Rojas [Sun, 21 Jun 2026 02:15:06 +0000 (21:15 -0500)]
common/peg : refactor until gbnf grammar generation (#24839)

* common/peg : refactor until gbnf grammar into an ac automaton

* cont : add a test with multiple strings

* cont : pad state with 0s so rules line up

* cont : clean up comments

* cont : use set everywhere

* cont : inline state num string padding

* cont : add a ref to PR

* cont : fix regression in server-tools.cpp

2 months agocommon/json-schema-to-grammar : align spacing rules with parsers (#24835)
Aldehir Rojas [Sat, 20 Jun 2026 22:43:04 +0000 (17:43 -0500)]
common/json-schema-to-grammar : align spacing rules with parsers (#24835)

2 months agofix(hexagon): use padded stride for ssm-conv weights (#24470)
Guanhuai Zhang [Sat, 20 Jun 2026 21:58:49 +0000 (05:58 +0800)]
fix(hexagon): use padded stride for ssm-conv weights (#24470)

2 months agollama : use LLM_KV for quantization_version & file_type (#24802)
Adrien Gallouët [Sat, 20 Jun 2026 18:07:01 +0000 (20:07 +0200)]
llama : use LLM_KV for quantization_version & file_type (#24802)

Signed-off-by: Adrien Gallouët <redacted>
2 months agoarg: try fixing test-args-parser randomly fails (#24826)
Xuan-Son Nguyen [Sat, 20 Jun 2026 17:45:27 +0000 (19:45 +0200)]
arg: try fixing test-args-parser randomly fails (#24826)

* arg: try fixing test-args-parser randomly fails

* return ref

* try triggering the workflow

* exception wrapper

* wip

* test

* test 2

* arg: guard win32 utf8 argv override

make_utf8_argv rebuilds argv from GetCommandLineW to fix utf8 handling of
non ascii arguments on windows. the override runs unconditionally inside
common_params_parse, so it also clobbers a programmatic argv passed by a
caller. test-arg-parser builds a synthetic argv but then sees the real
process command line instead, the model argument is never parsed, and the
assert that expects success aborts via fastfail (0xC0000409). this shows up
as a random failure in the openvino windows workflow.

only override argv when its length matches the caller argc, so the utf8
repair still applies to real binaries while a programmatic argv stays intact.

---------

Co-authored-by: Pascal <redacted>
2 months agorelease: add missing link for win opencl adreno arm64 (#24809)
Muhammad Salem [Sat, 20 Jun 2026 15:08:59 +0000 (18:08 +0300)]
release: add missing link for win opencl adreno arm64 (#24809)

2 months agoserver: avoid forwarding auth headers in CORS proxy (#24373)
Matti4 [Sat, 20 Jun 2026 13:34:47 +0000 (15:34 +0200)]
server: avoid forwarding auth headers in CORS proxy (#24373)

* server: avoid forwarding auth headers in CORS proxy

* format

* fix test

* fix e2e test

---------

Co-authored-by: Xuan Son Nguyen <redacted>
2 months agodocker : prebuild web UI for s390x build [no release] (#24829)
Aldehir Rojas [Sat, 20 Jun 2026 10:54:42 +0000 (05:54 -0500)]
docker : prebuild web UI for s390x build [no release] (#24829)

2 months agomodel : glm-dsa load DSA indexer tensors as optional (#24770)
davidrhodus [Sat, 20 Jun 2026 10:48:24 +0000 (03:48 -0700)]
model : glm-dsa load DSA indexer tensors as optional (#24770)

GLM-5.2 ships the DSA "lightning indexer" on only a subset of layers (the
"full" layers; others omit it), but the GLM_DSA loader created the five
indexer tensors on every layer as required, so loading any GLM-5.2 GGUF
failed with e.g. `missing tensor 'blk.3.indexer.k_norm.weight'`.

GLM_DSA's graph is llama_model_deepseek2::graph (plain MLA) and does not use
the indexer tensors (indexer runtime not yet implemented), so they are
loaded-but-unused. Marking them TENSOR_NOT_REQUIRED lets layers without an
indexer load as nullptr and the model runs as full MLA attention.

DeepSeek-V3.2 (uniform indexer on all layers) is unaffected.

2 months agoggml : optimize AMX (#24806)
Adrien Gallouët [Sat, 20 Jun 2026 10:43:06 +0000 (12:43 +0200)]
ggml : optimize AMX (#24806)

Flatten the partition over n_batch * M so every thread participates in
the quantization

    | CPU                             | Model                         | Test   |   t/s OLD |   t/s NEW |   Speedup |
    |:--------------------------------|:------------------------------|:-------|----------:|----------:|----------:|
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B IQ4_NL - 4.5 bpw  | pp512  |    730.71 |    779.86 |      1.07 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B IQ4_NL - 4.5 bpw  | tg128  |     87.88 |     86.79 |      0.99 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B IQ4_XS - 4.25 bpw | pp512  |    725.09 |   1023.31 |      1.41 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B IQ4_XS - 4.25 bpw | tg128  |     83.64 |     83.62 |      1.00 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_0              | pp512  |    820.51 |    924.05 |      1.13 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_0              | tg128  |     90.59 |     92.46 |      1.02 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_1              | pp512  |    776.88 |    872.79 |      1.12 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_1              | tg128  |     89.39 |     90.94 |      1.02 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_K_M            | pp512  |    719.28 |   1009.27 |      1.40 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_K_M            | tg128  |     80.62 |     80.86 |      1.00 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_K_S            | pp512  |    732.29 |   1077.29 |      1.47 |
    | Intel(R) Xeon(R) Platinum 8488C | qwen35 0.8B Q4_K_S            | tg128  |     86.42 |     83.53 |      0.97 |

Signed-off-by: Adrien Gallouët <redacted>
2 months agoconvert : more consistent handling of rope_parameters (#24833)
Sigbjørn Skjæret [Sat, 20 Jun 2026 10:42:36 +0000 (12:42 +0200)]
convert : more consistent handling of rope_parameters (#24833)

2 months agoggml-webgpu: add adapter toggles for F16 on Vulkan + NVIDIA
Masashi Yoshimura [Fri, 19 Jun 2026 23:12:32 +0000 (08:12 +0900)]
ggml-webgpu: add adapter toggles for F16 on Vulkan + NVIDIA

2 months agoserver: refactor child --> router communication (#24821)
Xuan-Son Nguyen [Fri, 19 Jun 2026 23:02:26 +0000 (01:02 +0200)]
server: refactor child --> router communication (#24821)

* server: refactor child --> router communication

* fix wakeup case

* add docs

* improve update_status()

* nits

2 months agoserver : optimize get_token_probabilities (#24796)
Adrien Gallouët [Fri, 19 Jun 2026 21:26:54 +0000 (23:26 +0200)]
server : optimize get_token_probabilities (#24796)

Use std::partial_sort to order only the requested top-n tokens instead
of the full vocabulary

    logprobs sort: vocab=128000 n_top=0 iters=100
    full    sort:   8555.6 us/op
    partial sort:    704.3 us/op

Signed-off-by: Adrien Gallouët <redacted>
2 months agomtmd, arg: fix utf8 handling on windows (#24779)
Xuan-Son Nguyen [Fri, 19 Jun 2026 20:28:38 +0000 (22:28 +0200)]
mtmd, arg: fix utf8 handling on windows (#24779)

* mtmd, arg: fix utf8 handling on windows

* also fix ggml_fopen

* fix build fail

* also fix CLI

2 months agoserver: remove all internal mentions about "webui" (#24817)
Xuan-Son Nguyen [Fri, 19 Jun 2026 20:12:46 +0000 (22:12 +0200)]
server: remove all internal mentions about "webui" (#24817)

2 months agoarg: Add comment line support to --api-key-file (#23168)
Mikolaj Kucharski [Fri, 19 Jun 2026 15:33:54 +0000 (15:33 +0000)]
arg: Add comment line support to --api-key-file (#23168)

2 months agovendor : update cpp-httplib to 0.48.0 (#24787)
Alessandro de Oliveira Faria (A.K.A.CABELO) [Fri, 19 Jun 2026 14:16:35 +0000 (11:16 -0300)]
vendor : update cpp-httplib to 0.48.0 (#24787)

2 months agoserver: add --agent arg, remove redundant webui naming compat (#24801)
Xuan-Son Nguyen [Fri, 19 Jun 2026 14:06:13 +0000 (16:06 +0200)]
server: add --agent arg, remove redundant webui naming compat (#24801)

* server: add --agent arg, remove redundant webui naming compat

* corrent env

* fix the test

* llama-gen-docs

* nits: wordings

2 months agodocker : build the UI (#24794)
Aldehir Rojas [Fri, 19 Jun 2026 13:32:31 +0000 (08:32 -0500)]
docker : build the UI (#24794)

* docker : build the UI

* cont : use existing APP_VERSION

2 months agomtmd: several bug fixes (#24784)
Xuan-Son Nguyen [Fri, 19 Jun 2026 10:18:36 +0000 (12:18 +0200)]
mtmd: several bug fixes (#24784)

* mtmd: several bug fixes

* fix build

* fix gemma4ua

* add sanity check in get_u32()

* fix build (2)

* area() avoid overflow

2 months agospec: support eagle3 for qwen3.5 & 3.6 (#24593)
Ruixiang Wang [Fri, 19 Jun 2026 10:08:50 +0000 (12:08 +0200)]
spec: support eagle3 for qwen3.5 & 3.6 (#24593)

* spec: support qwen3.5 & 3.6 eagle3 draft

* eagle3: Add deferred boundary checkpoints restore support for hybrid models

* apply suggestions

Co-authored-by: Georgi Gerganov <redacted>
* spec: adapt to API change

* spec: fix naming

* cont : add TODO

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoserver: fix non-bound n_discard value (ctx shifting) (#24786)
Xuan-Son Nguyen [Fri, 19 Jun 2026 08:53:44 +0000 (10:53 +0200)]
server: fix non-bound n_discard value (ctx shifting) (#24786)

* server: fix non-bound n_discard value

* Update tools/server/server-context.cpp

Co-authored-by: Georgi Gerganov <redacted>
---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agosync : ggml
Georgi Gerganov [Fri, 19 Jun 2026 07:18:14 +0000 (10:18 +0300)]
sync : ggml

2 months agoggml : bump version to 0.15.2 (ggml/1548)
Georgi Gerganov [Fri, 19 Jun 2026 07:14:26 +0000 (10:14 +0300)]
ggml : bump version to 0.15.2 (ggml/1548)

2 months agopi : remove docs from system prompt (#24791)
Georgi Gerganov [Fri, 19 Jun 2026 06:34:00 +0000 (09:34 +0300)]
pi : remove docs from system prompt (#24791)

2 months agoserver : consolidate slot selection into get_available_slot (#24755)
Georgi Gerganov [Fri, 19 Jun 2026 06:22:34 +0000 (09:22 +0300)]
server : consolidate slot selection into get_available_slot (#24755)

Absorb get_slot_by_id logic into get_available_slot so slot selection
is handled by a single function call. When a specific slot id is
requested, the LCP similarity check still runs to enable proper
prompt cache updates.

Assisted-by: pi:llama.cpp/Qwen3.6-27B
2 months agoggml-cpu: support K tails in power10 Q8/Q4 MMA matmul (#24753)
shalinib-ibm [Fri, 19 Jun 2026 05:55:38 +0000 (11:25 +0530)]
ggml-cpu: support K tails in power10 Q8/Q4 MMA matmul (#24753)

* ggml-cpu: support K tails in Power10 MMA Q8/Q4 matmul

This patch removes the requirement that K be divisible by kc in the tinyBlas_Q0_PPC tiled matmul path. Process the final K panel using its actual depth and pass the reduced panel size through packing and kernel execution.  This allows more workloads to use the MMA kernel and reduces fallback to mnpack.

* Apply suggestion from @taronaeo

Co-authored-by: Aaron Teo <redacted>
---------

Co-authored-by: Aaron Teo <redacted>
2 months agomtmd: add batching support for internvl (#24775)
Xuan-Son Nguyen [Thu, 18 Jun 2026 23:16:16 +0000 (01:16 +0200)]
mtmd: add batching support for internvl (#24775)

2 months agoGgml/cuda col2im 1d (#24417)
Pascal [Thu, 18 Jun 2026 20:23:01 +0000 (22:23 +0200)]
Ggml/cuda col2im 1d (#24417)

* cuda: add GGML_OP_COL2IM_1D, follow-up to the CPU op

* cuda: col2im_1d use fast_div_modulo for the index decomposition

* cuda: col2im_1d tighten supports_op, type match and contiguous dst

2 months agoserver: add "X-Accel-Buffering": "no" header to streaming endpoints (#24774)
Reguna [Thu, 18 Jun 2026 20:01:24 +0000 (04:01 +0800)]
server: add "X-Accel-Buffering": "no" header to streaming endpoints (#24774)

* server: add "X-Accel-Buffering": "no" header to streaming endpoints

This header tells Nginx (as a reverse proxy) to NOT buffer responses. (only affects streaming endpoints)
Without it, Nginx will break streaming with certain applications (notably the Pi coding harness).

2 months agomtmd: add batching for mtmd-cli, add video tests (#24778)
Xuan-Son Nguyen [Thu, 18 Jun 2026 19:55:04 +0000 (21:55 +0200)]
mtmd: add batching for mtmd-cli, add video tests (#24778)

2 months agocmake : fix ui build with read-only source (#24752)
o7si [Thu, 18 Jun 2026 16:59:18 +0000 (00:59 +0800)]
cmake : fix ui build with read-only source (#24752)

2 months agomtmd: refactor llava-uhd overview image handling (always use ov_img_first) (#24769)
Xuan-Son Nguyen [Thu, 18 Jun 2026 16:53:49 +0000 (18:53 +0200)]
mtmd: refactor llava-uhd overview image handling (always use ov_img_first) (#24769)

* add dedicated "overview" for mtmd_image_preproc_out

* corrections

* correct (again)

* nits

* nits (2)

2 months agohexagon: support for op-trace (fine-grain tracing of HVX/HMX/DMA events) (#24592)
Max Krasnyansky [Thu, 18 Jun 2026 15:35:02 +0000 (08:35 -0700)]
hexagon: support for  op-trace (fine-grain tracing of HVX/HMX/DMA events) (#24592)

* hex-optrace: add support for optrace and instrument matmul and flash-atten code

* hex-trace: improve trace event and prefetto generator

* hex-trace: add new script dedicated to handling traces, specifically perfetto traces

* hex-trace: add --head/--tail options to profile and trace tools

* hex-trace: fix whitespaces

* hex-trace: fix flake8 warnings

* hex-trace: fix flake8 warnings

* hmx-fa: restore q_tiles clearing

* hex-profile: remove circular dep in includes

* hex-trace: simplify trace sizing check

* hex-profile: sort events in the summary by name

2 months agodocs: fix export-lora --lora-scaled syntax [no release] (#24703)
Kangjia Gao [Thu, 18 Jun 2026 14:46:17 +0000 (22:46 +0800)]
docs: fix export-lora --lora-scaled syntax [no release] (#24703)

Assisted-by: Codex
2 months agoserver: (router) fix stopping_thread potentially hang (#24728)
Xuan-Son Nguyen [Thu, 18 Jun 2026 13:41:09 +0000 (15:41 +0200)]
server: (router) fix stopping_thread potentially hang (#24728)

* server: (router) fix stopping_thread potentially hang

* fix windows build

2 months agoserver: add "schema" and validation (#24150)
Xuan-Son Nguyen [Thu, 18 Jun 2026 13:40:58 +0000 (15:40 +0200)]
server: add "schema" and validation (#24150)

* wip

* working

* correct some limits

* add field name to error message

2 months agoserver : add last-5-seconds generation speed display (#24291)
Aarni Koskela [Thu, 18 Jun 2026 12:02:20 +0000 (15:02 +0300)]
server : add last-5-seconds generation speed display (#24291)

* server : add last-5-seconds generation speed display

* cont : clean-up

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agoui: provide touch accessible model selection UI (#24604)
Amos Wong [Thu, 18 Jun 2026 11:14:20 +0000 (19:14 +0800)]
ui: provide touch accessible model selection UI (#24604)

* ui : add model selector storybook stories

Covers list, favorites, single-model, all status states
(loading/loaded/sleeping/failed/idle), and selection states.

* ui : improve model selector mobile UX with hover media queries

Use @media (hover:none) to show action buttons directly on touch
devices and color-code them by model status (amber=sleeping,
green=loaded, muted=idle). Status dots hidden on touch. Desktop
hover behavior unchanged.

2 months agoserver : return HTTP 400 on invalid grammar (#24144) (#24154)
Anuj Attri [Thu, 18 Jun 2026 10:49:14 +0000 (06:49 -0400)]
server : return HTTP 400 on invalid grammar (#24144) (#24154)

Throw on grammar parse failure so the server returns HTTP 400
instead of silently dropping the constraint.
Add a regression test for the invalid-grammar response.

Fixes #24144

2 months agoserver: (router) rework -hf preset repo (#24739)
Xuan-Son Nguyen [Thu, 18 Jun 2026 10:45:23 +0000 (12:45 +0200)]
server: (router) rework -hf preset repo (#24739)

* server: temporary remove HF remote preset

* rework remove preset.ini support

* rm unused get_remote_preset_whitelist()

* print warning

* add docs

* rm stray file

2 months agoserver: fix router args not being forwarded to child instances (#24760)
Xuan-Son Nguyen [Thu, 18 Jun 2026 10:15:46 +0000 (12:15 +0200)]
server: fix router args not being forwarded to child instances (#24760)

2 months agomtmd: refactor preprocessor, add mtmd_image_preproc_out (#24736)
Xuan-Son Nguyen [Thu, 18 Jun 2026 10:04:39 +0000 (12:04 +0200)]
mtmd: refactor preprocessor, add mtmd_image_preproc_out (#24736)

* add mtmd_image_preproc_out

* add dev docs

* remove unused clip API

* rm unused clip_image_f32_batch::grid

* change preprocess() call signature

2 months ago[SYCL] rename GGML_SYCL_SUPPORT_LEVEL_ZERO (#24719)
Neo Zhang [Thu, 18 Jun 2026 08:18:26 +0000 (16:18 +0800)]
[SYCL] rename GGML_SYCL_SUPPORT_LEVEL_ZERO (#24719)

* rename GGML_SYCL_SUPPORT_LEVEL_ZERO to GGML_SYCL_SUPPORT_LEVEL_ZERO_API, and GGML_SYCL_ENABLE_LEVEL_ZERO to  GGML_SYCL_USE_LEVEL_ZERO_API

* fix code format

* fix error when rebase

2 months agosycl : support MUL_MAT and OUT_PROD with Q1_0 (#24721)
Neo Zhang [Thu, 18 Jun 2026 08:17:37 +0000 (16:17 +0800)]
sycl : support MUL_MAT and OUT_PROD with Q1_0 (#24721)

2 months agoapp : enable self-update only when built with llama-install.sh (#24754)
Adrien Gallouët [Thu, 18 Jun 2026 07:57:59 +0000 (09:57 +0200)]
app : enable self-update only when built with llama-install.sh (#24754)

Signed-off-by: Adrien Gallouët <redacted>
2 months agoci : fix check-release message parsing (#24751)
Sigbjørn Skjæret [Thu, 18 Jun 2026 07:32:56 +0000 (09:32 +0200)]
ci : fix check-release message parsing (#24751)

2 months ago[SYCL] support OPs: conv_2d, conv_2d_dw, conv2d_transpose (#24600)
Neo Zhang [Thu, 18 Jun 2026 06:40:03 +0000 (14:40 +0800)]
[SYCL] support OPs: conv_2d, conv_2d_dw, conv2d_transpose (#24600)

* fix conflict

* fix format issue, rename

* rm debug code

* correct the file name

2 months agoui: Update code formatting command in pre-commit hook (#24685)
Aleksander Grygier [Thu, 18 Jun 2026 06:33:50 +0000 (08:33 +0200)]
ui: Update code formatting command in pre-commit hook (#24685)

2 months agoci : fix Windows x64 (OpenVINO) release link (#24731)
Ravi Panchumarthy [Thu, 18 Jun 2026 06:30:08 +0000 (23:30 -0700)]
ci : fix Windows x64 (OpenVINO) release link (#24731)

2 months agometal : check for BF16 support in concat kernel (#24747)
Georgi Gerganov [Thu, 18 Jun 2026 06:16:06 +0000 (09:16 +0300)]
metal : check for BF16 support in concat kernel (#24747)

2 months agomtmd: llava_uhd should no longer use batch dim (#24732)
Xuan-Son Nguyen [Wed, 17 Jun 2026 20:40:50 +0000 (22:40 +0200)]
mtmd: llava_uhd should no longer use batch dim (#24732)

2 months agoggml-cpu: Conditionally enable power11 backend based on compiler support (#24687)
shalinib-ibm [Wed, 17 Jun 2026 18:45:19 +0000 (00:15 +0530)]
ggml-cpu: Conditionally enable power11 backend based on compiler support (#24687)

* ggml: Conditionally enable power11 backend based on compiler support

Guard POWER11 backend creation behind a compiler flag check for -mcpu=power11. This avoids build failures on current GCC/Clang toolchains while preserving forward compatibility once POWER11 support becomes available.

* Update CMakeLists.txt

ggml-cpu: Use -mcpu=power10 for P10 and P11

2 months agometal : implement rope_back operator (#24725)
Georgi Gerganov [Wed, 17 Jun 2026 17:36:05 +0000 (20:36 +0300)]
metal : implement rope_back operator (#24725)

Reuse existing rope kernels with a function constant to toggle forward/backward
rotation, avoiding duplicate kernel code.

Assisted-by: pi:llama.cpp/Qwen3.6-27B
2 months agometal : add f16 and bf16 support for concat operator (#24724)
Georgi Gerganov [Wed, 17 Jun 2026 16:38:55 +0000 (19:38 +0300)]
metal : add f16 and bf16 support for concat operator (#24724)

* metal : add f16 and bf16 support for concat operator

Extend the Metal backend concat operator to support f16 and bf16 tensor
types in addition to the existing f32 and i32 support.

- Template kernel_concat on type T with specializations for float, half,
  bfloat, and int
- Add type-specific pipeline getter ggml_metal_library_get_pipeline_concat()
- Update device support check to allow f16 unconditionally and bf16 when
  device supports bfloat16
- Update dispatch to select the correct kernel specialization by type

Assisted-by: pi:llama.cpp/Qwen3.6-27B
* metal : extend concat operator to support f16, bf16, i8, i16 and i64

Assisted-by: pi:llama.cpp/Qwen3.6-27B
2 months agoserver: (router) add model management API (#23976)
Xuan-Son Nguyen [Wed, 17 Jun 2026 16:04:58 +0000 (18:04 +0200)]
server: (router) add model management API (#23976)

* wip

* server: (router) add SSE realtime updates API

* nits

* wip

* add download API

* add download api

* update docs

* add delete endpoint

* fix std::terminate

* fix crash

* fix 2

* add tests

* nits

2 months agollama : skip main_gpu validation when no devices are available (#23405)
Dev-iL [Wed, 17 Jun 2026 14:30:26 +0000 (17:30 +0300)]
llama : skip main_gpu validation when no devices are available (#23405)

2 months agospec: fix segfault error on long prompts for eagle3 (#24707)
Ruixiang Wang [Wed, 17 Jun 2026 14:29:49 +0000 (16:29 +0200)]
spec: fix segfault error on long prompts for eagle3 (#24707)

2 months ago[SYCL] add dev2dev memcpy by SYCL API (#24476)
Neo Zhang [Wed, 17 Jun 2026 14:21:34 +0000 (22:21 +0800)]
[SYCL] add dev2dev memcpy by SYCL API (#24476)

* add dev2dev memcpy by SYCL API

* mv GGML_SYCL_DEV2DEV_MEMCPY to runntime table

* update the detect method for p2p comm

* fix the erro created during fix confilct

---------

Co-authored-by: Neo Zhang <NA>
2 months ago[SYCL] Add conv_3d (#24691)
Neo Zhang [Wed, 17 Jun 2026 14:20:01 +0000 (22:20 +0800)]
[SYCL] Add conv_3d (#24691)

* add conv_3d

* optimize

* update ops.md

* restore test script

* rm unused code

* rm copyright notes

2 months agowebui: export conversations as jsonl (#24688)
Julien Chaumond [Wed, 17 Jun 2026 11:25:47 +0000 (13:25 +0200)]
webui: export conversations as jsonl (#24688)

* webui: export conversations as jsonl

each session is one jsonl file, a session header line followed by one line per message
exporting multiple conversations bundles them into a zip, one jsonl file each

* webui: import jsonl and zip conversation exports

parse the new jsonl session format and zip archives on import
keep supporting the legacy json format

2 months agovulkan: record actual memory properties during buffer creation (#24326)
Winston Ma [Wed, 17 Jun 2026 09:14:48 +0000 (17:14 +0800)]
vulkan: record actual memory properties during buffer creation (#24326)

2 months agoRevert "cuda: reset cuda context after reading memory size (#23935)" (#24715)
Ruben Ortlam [Wed, 17 Jun 2026 08:59:35 +0000 (10:59 +0200)]
Revert "cuda: reset cuda context after reading memory size (#23935)" (#24715)

This reverts commit 0f7fada56bea32c9e0db3874b801d887ff6c4529.

2 months agoci: fix vulkan docker images (#24595)
kononnable [Wed, 17 Jun 2026 07:43:45 +0000 (09:43 +0200)]
ci: fix vulkan docker images (#24595)

* Update vulkan-shaders-gen.cpp

* Update vulkan-shaders-gen.cpp

add comment describing code change intention

* Update vulkan-shaders-gen.cpp

fix potential UB

2 months agoUI : fix SSE transport detection and routing through CORS proxy. Assi… (#24500)
Harapan Rachman [Wed, 17 Jun 2026 06:26:30 +0000 (13:26 +0700)]
UI : fix SSE transport detection and routing through CORS proxy. Assi… (#24500)

* UI : fix SSE transport detection and routing through CORS proxy. Assisted-by: Antigravity

* ui : replace magic strings with constants in MCP transport handling

2 months agoopencl: optimize mul_mat_f16_f32_l4 for decode (#24504)
lhez [Wed, 17 Jun 2026 06:21:26 +0000 (23:21 -0700)]
opencl: optimize mul_mat_f16_f32_l4 for decode (#24504)

2 months agocommon: update logging to enforce max_capacity and optimize queue resizing (#24490)
Max Krasnyansky [Wed, 17 Jun 2026 06:19:11 +0000 (23:19 -0700)]
common: update logging to enforce max_capacity and optimize queue resizing (#24490)

* common: update logging to enforce max_capacity and optimize queue resizing logic

* common/log: remove queue expansion logic

2 months agoopenvino: OV 2026.2, context-shift, Q5_1 support, gemma4 dense/embedding, and -fa...
Zijun Yu [Wed, 17 Jun 2026 06:11:21 +0000 (14:11 +0800)]
openvino: OV 2026.2, context-shift, Q5_1 support, gemma4 dense/embedding, and -fa off (#24503)

* Add interface is_model_splitted() to check the c-graph is splited or not

* Infer and propagate dynamic-dimension indices for all tensors in the GGML graph in api compute_model_outputs()

* Only do this for fallback sub graph

* Move dynamic dims compute in graph missmatch

* ggml-openvino: fix tensor data handling for PERMUTE/VIEW ops in split models

* ggml-openvino:add comments

* ggml-openvino: override VIEW op_case to 0 for split model inputs

* openvino backend: Handle unsupported VIEW shape-mismatch in OpenVINO backend

* Enable additional mul_mat tests and add tensor data saving function (#81)

* ggml-openvino: fix CONT/TRANSPOSE mapping and improve dynamic-dimension handling

* OpenVINO: add NORM/TANH support and rework SOFT_MAX translation

* ggml-openvino: extend VIEW handling

* Enable -fa off (#118)

* Enable --context-shift

* Fix llm param compute error for normal softmax not the softmax in attention

* OpenVINO backend: fix error for attention size compute in llm param

* use tensor->extra in infer_request i/o

* OpenVINO backend: refacter the compute_llm_params() func add get_attention_pattern_case to easy extand

* OpenVINO backend: clean unused code

* 1to1 match op update (#146)

* added translate_1to1_match_1_input function and updated gelu and tanh translations

* Remove unused translation function calls

---------

Co-authored-by: Mustafa Cavus <redacted>
* initial gemma4 support

* removed hardcoded names for kv cache slicing

* OpenVINO backend: Add new attention pattern for llm parameters compute

* flash attn Q shape static conversion

* Remove slice in permute translation when n_seq is 1

* return optional in extract_layer_from_name

* OpenVINO backend: refactor VIEW related operation (#148)

* OpenVINO backend: refactor VIEW related operation

* Enable VIEW handling in following ops

* OpenVINO backend does not support GGML_OP_NORM & GGML_OP_L2_NORM with VIEW input accuracy issue from OpenVINO

* OpenVINO backend: Add ops l2_norm & pad

* OpenVINO backend does not support CPY with non-contiguous data or mismatched types

* add op SSM_CONV GATED_DELTA_NET

* OpenVINO backend: fix error for bf16 in OV gpu plugin

* reverted static Q input shape for attention layer

* OpenVINO backend: remove hardcode name inp_tokens, which ignore some leaf case

* Disable remote tensor due to bug in ov gpu

* Disable n_token > 1 GATED_DELTA_NET on gpu

* OpenVINO backend: fix the view op dynamic handling issue in gemma4 & enable view + get_row

* OpenVINO backend: clean code

* OpenVINO backend: enable view + norm/rms_norm

* OpenVINO backend: concat op

* OpenVINO backend: argsort op

* OpenVINO backend: enable unary + view & GGML_UNARY_OP_SOFTPLUS

* Fix issue for test-backend-ops in TOPK_MOE, which compare VIEW ops result, VIEW node in OpenVINO no need compare, the whole graph result is correct

* OpenVINO backend: enable sum_rows

* OpenVINO backend: enable clamp

* OpenVINO backend: enable DIV

* OpenVINO backend: enable GGML_OP_MUL_MAT_ID

* OpenVINO backend: disable MUL_MAT_ID_FUSION case with large mem needed

* OpenVINO backend: Disable GGML_OP_ARGSORT, cause test_backend-ops failed

* OpenVINO backend: fix issue in mul_mat_id

* OpenVINO backend: Disable DIV with broadcast on GPU

* OpenVINO backend: update DIV

* use ov internal op GatedDeltaNet

* OpenVINO backend: enable llama erch test qwen3next

* OpenVINO backend: enable RMS_NORM + VIEW & remove op_case 2 for rope

* OpenVINO backend: fix error

* suggested changes, need review

* suggested changes, need review

* OpenVINO backend: clean unused code & fix build warning

* OpenVINO backend: enable minicpm3 for arch test

* Disable GDN op (#177)

* disable gated_delta_net

* update stateful_kv_size correctly in mismatch case

* OpenVINO backend: enable arch test for qwen3vl

* OpenVINO backend: enable cohere2 for arch test

* OpenVINO backend: enable t5 for arch test

* OpenVINO backend: enable jamba for arch test

* OpenVINO backend: remove warning for tmp

* OpenVINO backend: enable kimi-linear for arch test

* Remove unused

* Fix gpt-oss accuracy issue

* OpenVINO backend: enable arctic for arch test

* OpenVINO backend: enable grok for arch test

* Gemma4 initial npu support (#179)

* Initiall gemma4 npu support

* temp. fix for gemma4 accuracy bug on npu

* Remove hardcoded names for npu-fold handling

* revert static n tokens for cont translation as it is not needed

* removed unused variable

* ggml-openvino: add GGML_OPENVINO_ENABLE_CACHE env var to control decoder cache. Add environment variable GGML_OPENVINO_ENABLE_CACHE (default: YES). When set to NO, the decoder_cache is bypassed and models are rebuilt from the cgraph on every inference call in both dynamic and static compute paths. This is useful for debugging and verifying correctness without caching interference.

* Revert "Gemma4 initial npu support (#179)"

This reverts commit 0d29a9c4a52dc2c8aa52990f1a3854cfb01768ad.

* OpenVINO backend: disable debug log print

* Update TBB discovery. Delegated to OpenVINOs own config.

* OpenVINO backend: GGML_OPENVINO_ENABLE_CACHE YES -> 1

* OpenVINO backend: fallback FLASH_ATTN_EXT in gemma3n to CPU backend

* Add raw ov infer profiling metric

* Add OV raw infer time metric to static compute path

Co-authored-by: virajwad <redacted>
* Modify precision of static profiling

* update to OV 2026.2, add OV windows CI

* fix editorconfig-checks

* Initiall gemma4 npu support

* temp. fix for gemma4 accuracy bug on npu

* Remove hardcoded names for npu-fold handling

* revert static n tokens for cont translation as it is not needed

* removed unused variable

* test-llama-archs fix

* Fix gemma4 flash_attn fallback

* support im2col

* fix code style

* disable add_rope_sin_cos optimization

* stateless boradcast and rope optimizations

* Enable manual gqa attn by default for stateless gpu

* manual gqa: fixed static batch

* gemma4 llama-bench ctx update fix

* Update OV win CI

* stateful rope fusion temp. fix

* OpenVINO backend: Conslolidate supported ops

* Exclude unsupported GGML_OP_SUB cases

* Exclude unsupported TOPK_MOE cases

* OpenVINO Backend: MUL_MAT enhancements

* Update OV CI

* support f16 mask input for npu

* Make GGML_OPENVINO_* env vars usage uniform

Standardize all GGML_OPENVINO_* env flags:
positive integers >0 to enable. Unset, empty, =0, or non-numeric values to disable.
This fixes cases where text values or empty strings enabled features.

* OpenVINO backend: Enhance envvar handling

* more cleanup

* move ggml_openvino_env_flag to appropriate place

* OpenVINO backend: add REPEAT translator, Q5_1 weights, and GLU view-input fix

* ggml-openvino: fix -Werror=cast-qual in extract_q5_1_data

* Update openvino.Dockerfile

Use BuildKit cache mounts for faster Docker rebuilds.
Use apt instead of dpkg, remove unused .ddeb downloads, add DLLAMA_BUILD_TESTS=OFF.

* ggml-openvino: centralize env var access via *getenv_str/getenv_int helpers

Replace getenv and legacy flags with _str and _int helpers.Minor cleanup, doc updates.

* OpenVINO backend: Enable GGML_OP_ADD_ID

* Uptade openvino backend clamg-format

* clang-format

* Update OPENVINO.md (#211)

* OpenVINO backend: fix accuracy issue for op CONCAT with i64 precision

* Remove strict concurrency for gpu-openvino-low-perf

* Update openvino CI keynames; add ccache-clear

* Apply suggestions from code review

Co-authored-by: Sigbjørn Skjæret <redacted>
* Fix formatting

---------

Co-authored-by: Xuejun Zhai <redacted>
Co-authored-by: Mustafa Cavus <redacted>
Co-authored-by: Mustafa Cavus <redacted>
Co-authored-by: Xuejun <redacted>
Co-authored-by: Wang Yang <redacted>
Co-authored-by: Ravi Panchumarthy <redacted>
Co-authored-by: virajwad <redacted>
Co-authored-by: copilot-swe-agent[bot] <redacted>
Co-authored-by: Mostafa Faheem <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agosycl : Enable to support fp16 by OPs: SQR, SQRT, LOG, SIN, COS, CLAMP (#24692)
Neo Zhang [Wed, 17 Jun 2026 05:58:03 +0000 (13:58 +0800)]
sycl : Enable to support fp16 by OPs: SQR, SQRT, LOG, SIN, COS, CLAMP (#24692)

2 months agoSYCL: fix use-after-free bug with async memcpy in MoE prefill (#24676)
Alexey Kopytko [Wed, 17 Jun 2026 05:57:29 +0000 (14:57 +0900)]
SYCL: fix use-after-free bug with async memcpy in MoE prefill (#24676)

* SYCL: fix a bug with async memcpy

* make mmid_row_mapping_host persistent

* comment on stream->wait

* Apply suggestion from @sanmai

* Apply suggestion from @sanmai

* Apply suggestion from @sanmai

2 months agosycl: Add optional USM system allocations (#22526)
Francois Dugast [Wed, 17 Jun 2026 05:54:21 +0000 (07:54 +0200)]
sycl: Add optional USM system allocations (#22526)

This introduces an optional feature to allocate large GPU buffers (≥ 1GB)
using USM system allocations if supported by the device. It allows using
buffers from the system allocator then letting the system manage memory
migrations between host and device as necessary.

This feature is disabled by default and requires the GGML_SYCL_USM_SYSTEM
environment variable to enable. If USM system allocations are not supported
by the device or the system, we fallback to regular allocations.

This feature can allow VRAM overcommit. For example, the test below fails
on B580 due to lack of memory for allocation, but it passes when enabling
USM system allocations:

  ./examples/sycl/test.sh -m Qwen3.5-27B-Q3_K_M.gguf -lv 4

Signed-off-by: Francois Dugast <redacted>
2 months agovendor : update BoringSSL to 0.20260616.0 (#24693)
Alessandro de Oliveira Faria (A.K.A.CABELO) [Tue, 16 Jun 2026 18:24:28 +0000 (15:24 -0300)]
vendor : update BoringSSL to 0.20260616.0 (#24693)

2 months agoui: add source toggle to mermaid and svg blocks (#24652)
Pascal [Tue, 16 Jun 2026 12:14:22 +0000 (14:14 +0200)]
ui: add source toggle to mermaid and svg blocks (#24652)

* ui: add source toggle to mermaid and svg blocks

Add a toggle button next to copy and preview that switches a rendered
mermaid or svg block to its source code and back. The button is shared by
both block types and the rendered view stays the default.

The source view reuses the code block scroll container and the highlighted
code element captured at transform time, so it matches the app code blocks
without highlighting again.

Make tall diagrams scroll like text code blocks: safe centering keeps the
diagram centered when it fits and falls back to start alignment when it
overflows, so the top stays reachable instead of clipping above.

Keep the block header opaque and layered above the scrolled diagram, and
ignore header clicks in the zoom handler, so a button click never falls
through to the zoom dialog.

* ui: transparent diagram block header, address review from @allozaur

2 months agoFix and restrict NVFP4 edge-cases in llama-graph (#24331)
Oliver Simons [Tue, 16 Jun 2026 09:52:38 +0000 (11:52 +0200)]
Fix and restrict NVFP4 edge-cases in llama-graph (#24331)

* Move post-GEMM MUL required for dequant b4 lora and bias add

see https://github.com/ggml-org/llama.cpp/pull/23484 :
1. For lora, I would presume we want fully dequantized values before
   doing the residuals, but this depends on how the LORAs were
generated. Literature tells me LORA happens post-mul but pre-bias add https://github.com/ggml-org/llama.cpp/pull/8332
2. For ModelOPT, bias-add should happen on [fully-dequantized
   values](https://github.com/NVIDIA/Model-Optimizer/blob/b49f9b9e2d747af992d78a3aa7f10efe5a8847e1/modelopt/torch/quantization/backends/nvfp4_gemm.py#L59-L64)

* Restrict build_ffn for NVFP4 to supported combinations

2 months agospec: add backend sampling support for eagle3 (#24655)
Ruixiang Wang [Tue, 16 Jun 2026 09:05:52 +0000 (11:05 +0200)]
spec: add backend sampling support for eagle3 (#24655)

2 months agovulkan: prefer host-visible memory buffers on UMA devices (#22930)
Winston Ma [Tue, 16 Jun 2026 07:36:52 +0000 (15:36 +0800)]
vulkan: prefer host-visible memory buffers on UMA devices (#22930)

* implement UMA host-visible memory

* update based on 0cc4m's suggestion

2 months agovulkan: Support gated_delta_net with S_v=16 (#24581)
Jeff Bolz [Tue, 16 Jun 2026 07:26:57 +0000 (02:26 -0500)]
vulkan: Support gated_delta_net with S_v=16 (#24581)