]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
2 months agowasm : fix fallback symbol collision (#24639)
Andrei [Mon, 15 Jun 2026 07:11:59 +0000 (00:11 -0700)]
wasm : fix fallback symbol collision (#24639)

2 months agoSYCL: use native subgroup size for K-quant DMMV (#21700)
Katostrofik [Mon, 15 Jun 2026 07:10:53 +0000 (03:10 -0400)]
SYCL: use native subgroup size for K-quant DMMV (#21700)

2 months agosycl: fix soft_max_f32 max reduction (#24451)
someoneinjd [Mon, 15 Jun 2026 07:10:12 +0000 (15:10 +0800)]
sycl: fix soft_max_f32 max reduction (#24451)

2 months agosycl : fix reorder function; add fp32/fp16 in build script (#24578)
Neo Zhang [Mon, 15 Jun 2026 07:08:34 +0000 (15:08 +0800)]
sycl : fix reorder function; add fp32/fp16 in build script (#24578)

2 months agosycl : enhance set_rows to support q1_0, mxfp4, nvfp4 (#24564)
Neo Zhang [Mon, 15 Jun 2026 07:01:40 +0000 (15:01 +0800)]
sycl : enhance set_rows to support q1_0, mxfp4, nvfp4 (#24564)

2 months ago[SYCL] add to support pool_1d, move pool_1d/2d code to pool.cpp/hpp (#24584)
Neo Zhang [Mon, 15 Jun 2026 07:01:07 +0000 (15:01 +0800)]
[SYCL] add to support pool_1d, move pool_1d/2d code to pool.cpp/hpp (#24584)

* add to support pool_1d, move pool_1d/2d code to pool.cpp/hpp

* update ops.md

2 months ago[SYCL]: Remove per-allocation Level Zero runtime checks (#23399)
Alexey Kopytko [Mon, 15 Jun 2026 06:58:42 +0000 (15:58 +0900)]
[SYCL]: Remove per-allocation Level Zero runtime checks (#23399)

* [SYCL] Centralize Level Zero detection in ggml_sycl_init

* use the same wording

* get back the warning

* [SYCL] Remove per-allocation getenv() for GGML_SYCL_ENABLE_LEVEL_ZERO

* bring back the comment

* move it up to make sure devices call the shots

* move the env detection early

* replace g_ggml_sycl_enable_level_zero with a direct call to .ext_oneapi_level_zero

* update the comment

* switch back to g_ggml_sycl_enable_level_zero with a sentinel

* remove the check

* Reduce the diff

* reword, move lower

* move things aroudn

* remove forward declaration if favor of a full replace

* pre-cache results of zeDeviceGetProperties

* put ggml_sycl_get_env back

* replace get_sycl_env with ggml_sycl_get_env

* add whitespace back

* Apply suggestion from @sanmai

2 months agometal : add repeat bf16 (#24638)
Georgi Gerganov [Mon, 15 Jun 2026 06:57:16 +0000 (09:57 +0300)]
metal : add repeat bf16 (#24638)

2 months agochat: fix whitespace problems once and for all (#24624)
Piotr Wilkin (ilintar) [Mon, 15 Jun 2026 06:27:10 +0000 (08:27 +0200)]
chat: fix whitespace problems once and for all (#24624)

* chat: fix whitespace problems once and for all

* Purge trailing spaces from grammar generation

* Revert "Purge trailing spaces from grammar generation"

This reverts commit b0827ecb7d4767f37cefd751b3646f98d5303891.

2 months agoUI/svg block rendering (#24080)
Pascal [Mon, 15 Jun 2026 06:11:36 +0000 (08:11 +0200)]
UI/svg block rendering (#24080)

* ui: add svg block visualizer based on allozaur's mermaid PR

* ui: rationalise diagram block styling and pre transforms shared by mermaid and svg

* ui: live render streaming svg blocks

* ui: also render svg authored in xml code fences

* ui: refactor svg block rendering, address review from allozaur

- Move the svg size ceiling and DOMPurify config out of sanitize-svg.ts into /constants.
- Rename the svg-diagram class to svg-block so the name no longer implies diagrams only.
- Replace the svg, xml and svg tag magic strings in the markdown pipeline with shared constants.
- Promote the data-svg-rendered marker and its sibling data attributes to constants.

* ui: render svg blocks in a shadow root for animation and live zoom

Mount each sanitized svg inside an open shadow root so author <style> and
keyframe or smil animations run while staying scoped to the host element.
Relax the sanitizer to forbid only foreignObject and script, which lets
animation, href and external resource refs through for wider compatibility.
Render the inline block and the zoom dialog from the same reactive source,
so a streaming svg keeps drawing live inside the open zoom popup.

2 months agoCUDA: only support F32/F16 for GGML_OP_REPEAT (#24533)
leonardHONG [Mon, 15 Jun 2026 06:11:00 +0000 (14:11 +0800)]
CUDA: only support F32/F16 for GGML_OP_REPEAT (#24533)

2 months agoggml-webgpu: improve i-quants mul_mat performance and speed up prefill (#24530)
Masashi Yoshimura [Mon, 15 Jun 2026 01:15:30 +0000 (10:15 +0900)]
ggml-webgpu: improve i-quants mul_mat performance and speed up prefill (#24530)

* Improve prefill speeds for i-quants

* Fix #if defined() usage in preprocessor guards.

2 months agoconvert : fix lora base model arch retrieval (#24621)
Sigbjørn Skjæret [Sun, 14 Jun 2026 22:55:26 +0000 (00:55 +0200)]
convert : fix lora base model arch retrieval (#24621)

2 months agofix(ui): render thinking/reasoning block content as markdown (#24611)
franitel [Sun, 14 Jun 2026 20:56:56 +0000 (22:56 +0200)]
fix(ui): render thinking/reasoning block content as markdown (#24611)

* fix(ui): render thinking/reasoning block content as markdown

* feat(ui): add toggle setting for thinking block markdown rendering

2 months agoui: Add HEIC/HEIF image support (#24137)
Nicolas Mowen [Sun, 14 Jun 2026 18:42:16 +0000 (12:42 -0600)]
ui: Add HEIC/HEIF image support (#24137)

* Add boilerplate for file types

* Add heic-to and implement conversion

* Load heic library from CDN

* Use jpg instead of png for conversion

* Move const to constants file

2 months agochat: add dedicated Cohere2MoE (North Code) parser (#24615)
Piotr Wilkin (ilintar) [Sun, 14 Jun 2026 18:17:40 +0000 (20:17 +0200)]
chat: add dedicated Cohere2MoE (North Code) parser (#24615)

* chat: add dedicated Cohere2MoE (North Code) parser

* Some renames to make @CISC happy :>

2 months agodocs : fix typos in CUDA-FEDORA.md and grammars/README.md (#24459)
Mohammad Athar [Sun, 14 Jun 2026 17:33:38 +0000 (23:03 +0530)]
docs : fix typos in CUDA-FEDORA.md and grammars/README.md (#24459)

2 months agodocker: specify registry to simplify Podman builds (#24607)
Alexander Batischev [Sun, 14 Jun 2026 17:27:20 +0000 (20:27 +0300)]
docker: specify registry to simplify Podman builds (#24607)

2 months agoUI/mobile keyboard and pwa popup fixes (#24610)
Pascal [Sun, 14 Jun 2026 16:35:00 +0000 (18:35 +0200)]
UI/mobile keyboard and pwa popup fixes (#24610)

* ui: make mobile layout keyboard-aware via interactive-widget and dvh shell anchor

* ui: fix duplicate PWA refresh popup by scoping the storage check to non-PWA pages

2 months agoui : fix ui clipping in mobile due to incorrect height setup (#24605)
Amos Wong [Sun, 14 Jun 2026 14:15:51 +0000 (22:15 +0800)]
ui : fix ui clipping in mobile due to incorrect height setup (#24605)

2 months agojinja : add count/d/e filter aliases (#24606)
Sigbjørn Skjæret [Sun, 14 Jun 2026 13:07:31 +0000 (15:07 +0200)]
jinja : add count/d/e filter aliases (#24606)

2 months agocli : fix not copying preserved tokens (#24258)
Michael Wand [Sun, 14 Jun 2026 09:52:15 +0000 (02:52 -0700)]
cli : fix not copying preserved tokens (#24258)

2 months agoAdd cohere2moe to llama-vocab for TINY_AYA (#24601)
Bartowski [Sun, 14 Jun 2026 07:04:46 +0000 (03:04 -0400)]
Add cohere2moe to llama-vocab for TINY_AYA (#24601)

2 months agoci : use CUDA label for cuda backend (#24594)
Sigbjørn Skjæret [Sun, 14 Jun 2026 06:27:52 +0000 (08:27 +0200)]
ci : use CUDA label for cuda backend (#24594)

2 months agoadd sycl to check-release (#24583)
Sigbjørn Skjæret [Sun, 14 Jun 2026 01:42:26 +0000 (03:42 +0200)]
add sycl to check-release (#24583)

2 months agoui : fix llama-ui-embed crash when no asset dir is given (#24597)
Aldehir Rojas [Sat, 13 Jun 2026 22:53:30 +0000 (17:53 -0500)]
ui : fix llama-ui-embed crash when no asset dir is given (#24597)

2 months agoAdd arch support for cohere2-MoE (#24260)
Michael Wand [Sat, 13 Jun 2026 17:49:00 +0000 (10:49 -0700)]
Add arch support for cohere2-MoE (#24260)

* Add arch support for cohere2-MoE

* Removed redundant gating_func checks

* Changed ffn lookup to prefer prefix_dense_intermediate_size

* Renamed arch to cohere2moe

* Removed redundant lmhead check and chat template changes

* Removed lm_head.weight check from modify tensors, load output tensor not required, fallback to token_embd.weight

* Changed to (routed+shared)*0.5 for shared expert combined avg

* fixed sliding_window_pattern issue and pattern

* Fixed transformers crash 'first_k_dense_replace' error

* Remove comment

* Removed cohere2-moe as a tokenizer type and kept as tiny_aya.  Renamed North-Mini-Code-1.0.

* Fixed MTP fail, changed to use iSWA

* Fixed remaining todos: cohere2moe renamed, changed swa parsing to use get_key_or_arr, removed extra get_arr use

* Force metadata usage

Co-authored-by: Sigbjørn Skjæret <redacted>
* Remove Cohere2 checkpoint comment

Co-authored-by: Sigbjørn Skjæret <redacted>
* Remove MTP comment

Co-authored-by: Sigbjørn Skjæret <redacted>
* Regenerate cohere2moe tokenizer hash

* Add cohere2moe to Llama Model Saver supported list

* Check for zerobios tensors and add support for Command to use LayerNorm

* Map expert_selection_fn to sigmoid in base.py instead of command.py

* use bools for foundnorm/foundnormrms

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

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agojinja : fix negative step slice with start/stop values (#24580)
Sigbjørn Skjæret [Sat, 13 Jun 2026 16:28:40 +0000 (18:28 +0200)]
jinja : fix negative step slice with start/stop values (#24580)

2 months agoui: build-time gzip compression (#24571)
Xuan-Son Nguyen [Sat, 13 Jun 2026 14:57:27 +0000 (16:57 +0200)]
ui: build-time gzip compression (#24571)

* ui: keep original file name and path

* fix nocache

* ui: build-time gzip compression

2 months agojinja : fix split and replace with empty first arg (#24574)
Sigbjørn Skjæret [Sat, 13 Jun 2026 14:56:59 +0000 (16:56 +0200)]
jinja : fix split and replace with empty first arg (#24574)

* fix split and replace with empty first arg

* fix reserve size

2 months agovulkan: support non-contig unary/glu ops (#24215)
Jeff Bolz [Sat, 13 Jun 2026 13:44:15 +0000 (08:44 -0500)]
vulkan: support non-contig unary/glu ops (#24215)

* vulkan: support non-contig unary/glu ops

Change unary/glu ops to pass in all strides and use fastdiv for the index
calculation. Put all unary ops in one file, similar to glu, to share the
code. codex went ahead and added expm1 without me asking, but I had to
make it do a real precision analysis rather than just making stuff up.

unary.comp initially couldn't use generic_unary_head because there wasn't
space for xielu's additional constants. Fixing this required packing the
fastdiv 'L' values.

* attempt to workaround compiler bug

* resolve conflict from #23991

* use expm1

2 months agoui: keep original file name and path (#24568)
Xuan-Son Nguyen [Sat, 13 Jun 2026 12:31:41 +0000 (14:31 +0200)]
ui: keep original file name and path (#24568)

* ui: keep original file name and path

* fix nocache

2 months agoserver: clean up static assets handling (#24550)
Xuan-Son Nguyen [Sat, 13 Jun 2026 09:51:20 +0000 (11:51 +0200)]
server: clean up static assets handling (#24550)

* server: clean up static assets handling

* nits

* simplify file name handling, use static file name everywhere

* cmake/ui : bundle UI assets in an archive

* ui : run prettier on post-build.js

---------

Co-authored-by: Alde Rojas <redacted>
2 months agofit : wrap llama_device_memory_data (#24522)
Georgi Gerganov [Sat, 13 Jun 2026 05:09:52 +0000 (08:09 +0300)]
fit : wrap llama_device_memory_data (#24522)

2 months agofix sycl links in release notes (#24527)
Muhammad Salem [Sat, 13 Jun 2026 00:37:55 +0000 (03:37 +0300)]
fix sycl links in release notes (#24527)

* fix sycl links in release notes

* remove extra line

2 months agomtmd: add batching API (#24384)
Xuan-Son Nguyen [Fri, 12 Jun 2026 22:10:29 +0000 (00:10 +0200)]
mtmd: add batching API (#24384)

* mtmd: add batching API

* wip

* first working version (gemma4v)

* add arg

* nits

* wire up support_batch()

* fix 0.0 output embd

* fix audio

* nits

* refactor a bit

* nits

* fix non-batching case

* fix comment

2 months agoci : unbreak release harder (#24545)
Sigbjørn Skjæret [Fri, 12 Jun 2026 21:49:36 +0000 (23:49 +0200)]
ci : unbreak release harder (#24545)

* unbreak release harder

* missed one

* remove missing test for now

2 months agoci : unbreak release (#24544)
Sigbjørn Skjæret [Fri, 12 Jun 2026 20:29:49 +0000 (22:29 +0200)]
ci : unbreak release (#24544)

2 months agoserver : fix reasoning budget WebUI precedence over model.ini (#24517)
Georgi Gerganov [Fri, 12 Jun 2026 14:59:56 +0000 (17:59 +0300)]
server : fix reasoning budget WebUI precedence over model.ini (#24517)

When reasoning-budget is set in model.ini, the per-request
thinking_budget_tokens from the WebUI was ignored because the
model.ini value took unconditional precedence.

Swap the precedence so the WebUI per-request value is checked
first, with the model.ini value serving as a fallback default.

Assisted-by: pi:llama.cpp/Qwen3.6-27B
2 months agovulkan: add pipeline barriers for memcpy read operations (#23770)
Ruben Ortlam [Fri, 12 Jun 2026 14:43:50 +0000 (16:43 +0200)]
vulkan: add pipeline barriers for memcpy read operations (#23770)

* vulkan: add pipeline barriers for memcpy read/write operations

* remove unnecessary host write pipeline barriers

2 months agoui: PWA support (#23871)
Aleksander Grygier [Fri, 12 Jun 2026 13:53:26 +0000 (15:53 +0200)]
ui: PWA support (#23871)

* feat: Add basic PWA support and service worker for offline caching

* feat: Vite PWA implementation WIP

* feat: Improve PWA icons generation

* feat: Add PWA workbox to server routes

* feat: Include `version.json` in static assets

* feat: Add HTTP cache headers for PWA static assets

* feat: Update app name for `apple-mobile-web-app-title`

* feat: Implement PWA versioning and automatic update detection

* chore: Update `.gitignore` files

* feat: Splash Screens

* feat: Add dark mode favicon support

* refactor: Cleanup

* fix: Use dark logo for dark splash screens

* refactor: Simplify favicons SVG code

* fix: Adjust caching and polling for reliable service worker updates

* fix: Add missing favicon entry

* fix: Align PWA service worker configuration with SvelteKit build structure

* fix: Replace hashed bundle paths with versioned static paths

* test: Add PWA tests

* ci: Add build output for unit tests

* refactor: Cleanup

* fix: Server build & release versioning

* chore: Update package-lock.json

* chore: Increase PWA cache size

* chore: Update packages

* feat: Update favicons

* refactor: Post-merge fix

* feat: support explicit build version for PWA cache busting

* fix: CI

* feat: Improve PWA Refresh Alert UI

* feat: Add toggleable build version display

* refactor: Cleanup

* feat: Add version mismatch detection and manual app reload

* refactor: replace dynamic imports with static

* refactor: Cleanup

* feat: Add safe space for `pwa-<size>.png` rendered icons

* fix: use relative paths for PWA assets to support base path deployment

* feat: add PWA mode detection via URL query parameter

* feat: Use ?cache=true for SW-cached PWA assets

* refactor: Build process cleanup

* refactor: Decouple PWA versioning and remove ?cache=true workaround

* chore: Update README logo

* feat: Include PWA Assets generation in build script

* refactor: `usePwa` hook for core layout

* fix: Relativize base vite plugin

* fix: remove unnecessary backslash escapes in test regexes

* test: update static asset paths for API Key test

* refactor: Move SvelteKit PWA Options config to constants

* ui: fix update notification never appearing

Keep the PWA hook object intact instead of destructuring needRefreshByStorage,
which freezes the reactive getter. Also exclude loading.html from PWA
precache to prevent 404 errors and broken SW installation.

2 months agofit : avoid including llama-ext.h in fit.h (#24506)
Georgi Gerganov [Fri, 12 Jun 2026 12:57:05 +0000 (15:57 +0300)]
fit : avoid including llama-ext.h in fit.h (#24506)

2 months agosync : ggml
Georgi Gerganov [Fri, 12 Jun 2026 12:55:01 +0000 (15:55 +0300)]
sync : ggml

2 months agoggml : bump version to 0.15.1 (ggml/1541)
Georgi Gerganov [Fri, 12 Jun 2026 12:32:00 +0000 (15:32 +0300)]
ggml : bump version to 0.15.1 (ggml/1541)

2 months agovendor : update cpp-httplib to 0.47.0 (#24395)
Adrien Gallouët [Fri, 12 Jun 2026 09:34:44 +0000 (11:34 +0200)]
vendor : update cpp-httplib to 0.47.0 (#24395)

Signed-off-by: Adrien Gallouët <redacted>
2 months agoUI/jpeg exif orientation (#24196)
Pascal [Fri, 12 Jun 2026 08:20:27 +0000 (10:20 +0200)]
UI/jpeg exif orientation (#24196)

* ui: bake jpeg exif orientation into uploaded images

stb_image in mtmd ignores exif metadata, so rotated smartphone photos
reach the model with raw pixel orientation. The webui now reads the
exif orientation tag at send time and feeds it into the existing
capImageDataURLSize canvas pass: the browser applies the rotation when
decoding, so capped images come out upright for free, and images under
the cap threshold get a single plain redraw when orientation > 1.

At most one re-encode ever happens per image. Upright jpegs with
capping disabled pass through untouched, bit perfect.

Adds jpeg-orientation.ts with a minimal exif parser working on a
bounded base64 prefix (both endianness, returns 1 on any malformed
input) and unit tests against handcrafted jpeg byte streams.

* ui: move jpeg exif constants into lib/constants

* ui: add browser test for jpeg orientation and capping

Covers capImageDataURLSize end to end in chromium with real Pillow
generated jpeg fixtures across exif orientations 1/3/5/6/8: upright
quadrant colors checked pixel-wise, expected dimensions with and
without capping, no orientation tag left in the output, and strict
passthrough when nothing needs rewriting.

2 months agospec: add EAGLE3 speculative decoding support (#18039)
Ruixiang Wang [Fri, 12 Jun 2026 07:21:06 +0000 (09:21 +0200)]
spec: add EAGLE3 speculative decoding support (#18039)

* llama : enable layer input extraction

* spec: support eagle3

* eagle3: fix params bug

* eagle3: support Gemma4 eagle3 from RedHatAI

* eagle3: set sync when get features from target

Co-authored-by: tnhnyzc <redacted>
* eagle3 : fix ubatch handling in embd_layer_inp extraction and encoder

Co-authored-by: Doğaç Eldenk <redacted>
* eagle3: adapt to upstream changes

* eagle3: fix rebase issues and adapt to upstream changes

* eagle3:exclude the eagle3 arch from test-llama-archs

* eagle3: fix editorconfig check failures

* eagle3: fix multi-seq issue in d2t vocab mapping

* cont : minor style / clean-up

* spec : remove `common_speculative_setup_draft_model()`

* llama : clean-up unused API

* eagle3: set d2t vocab mapping in decode graph

* cont : assert layer inputs are configured

* hparams : use n_embd_inp instead of n_embd_target_features

* eagle3: make output.weight optional and inherit from target model when needed

* haparams : generic norm-before-residual param

* llama-ext : consistent names

* cont : fix

* hparams : remove target_hidden_size

* cparams : rename output_layer_inp -> embeddings_layer_inp

* arch : reuse ATTN_NORM_2 instead of adding new hidden norm

* llama : clean-up names

* cont : add assert + comment

* Update conversion/llama.py

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

Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: tnhnyzc <redacted>
Co-authored-by: Doğaç Eldenk <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoggml: support concat for scalar types at cuda backend (#24011)
ZihaoMu [Fri, 12 Jun 2026 06:32:44 +0000 (14:32 +0800)]
ggml: support concat for scalar types at cuda backend (#24011)

* cuda: support concat for scalar types

* Update concat.cu

* fix metal ci issue

2 months ago[SYCL] Fix CI build & release for SYCL backend (#24387)
Neo Zhang [Fri, 12 Jun 2026 06:30:24 +0000 (14:30 +0800)]
[SYCL] Fix CI build & release for SYCL backend (#24387)

* restore SYCL build and release, remove github cache

* modify for test only

* verify the ccache is used

* remove debug code change

* rm duplicate action, update key in ccache

* add action ccache-clear after building in both ubuntu and windows

* set %NUMBER_OF_PROCESSORS% in widnows build

2 months agoopencl: add q5_0/q5_1 gemm and gemv kernels for Adreno (#24319)
shaofeiqi [Fri, 12 Jun 2026 04:43:09 +0000 (21:43 -0700)]
opencl: add q5_0/q5_1 gemm and gemv kernels for Adreno (#24319)

* opencl: add q5_0 adreno support

* opencl: add q5_1 adreno support

* opencl: cosmetic fix

---------

Co-authored-by: Li He <redacted>
2 months agodocker : support specifying the GCC version for CUDA (#24447)
wencan [Thu, 11 Jun 2026 21:12:09 +0000 (05:12 +0800)]
docker : support specifying the GCC version for CUDA (#24447)

2 months agovulkan: ifdef eMesaHoneykrisp (build fix) (#24479)
Jeff Bolz [Thu, 11 Jun 2026 18:22:17 +0000 (13:22 -0500)]
vulkan: ifdef eMesaHoneykrisp (build fix) (#24479)

Fixes build/CI after #24306.

2 months agosync : ggml
Georgi Gerganov [Thu, 11 Jun 2026 16:33:33 +0000 (19:33 +0300)]
sync : ggml

2 months agoggml : bump version to 0.15.0 (ggml/1539)
Georgi Gerganov [Thu, 11 Jun 2026 16:32:38 +0000 (19:32 +0300)]
ggml : bump version to 0.15.0 (ggml/1539)

2 months agovulkan: add fast path for contiguous buffer transfers (#23973)
Winston Ma [Thu, 11 Jun 2026 13:46:25 +0000 (21:46 +0800)]
vulkan: add fast path for contiguous buffer transfers (#23973)

2 months agovulkan: use medium matmul tile on Asahi Linux (#24306)
Kevin Liu [Thu, 11 Jun 2026 13:43:04 +0000 (09:43 -0400)]
vulkan: use medium matmul tile on Asahi Linux (#24306)

* vulkan: use medium matmul tile on Asahi Linux

* vulkan: switch Apple detection to Honeykrisp driver id

2 months agoserver: skip unused log lines on router mode (#24463)
Xuan-Son Nguyen [Thu, 11 Jun 2026 09:36:35 +0000 (11:36 +0200)]
server: skip unused log lines on router mode (#24463)

2 months agovocab : adopt leading TemplateProcessing special token as BOS (#24428)
o7si [Thu, 11 Jun 2026 07:37:23 +0000 (15:37 +0800)]
vocab : adopt leading TemplateProcessing special token as BOS (#24428)

2 months agovocab : refactor normalizer flags into options struct, add strip_accents (#24371)
o7si [Thu, 11 Jun 2026 07:36:50 +0000 (15:36 +0800)]
vocab : refactor normalizer flags into options struct, add strip_accents (#24371)

* vocab : refactor normalizer flags into options struct, add strip_accents

* Update src/llama-vocab.h

Co-authored-by: Sigbjørn Skjæret <redacted>
* Update src/llama-vocab.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
2 months agoserver : skip checkpoints beyond pos_next (#24411)
Aldehir Rojas [Thu, 11 Jun 2026 07:18:12 +0000 (02:18 -0500)]
server : skip checkpoints beyond pos_next (#24411)

* server : skip checkpoints beyond pos_next

* cont : update comment + TODO + ref

---------

Co-authored-by: Georgi Gerganov <redacted>
2 months agovendor : update LibreSSL to 4.3.2 (#24397)
Adrien Gallouët [Wed, 10 Jun 2026 20:28:03 +0000 (22:28 +0200)]
vendor : update LibreSSL to 4.3.2 (#24397)

Signed-off-by: Adrien Gallouët <redacted>
2 months agoRemove padding and multiple D2D copies for MTP (#24086)
Gaurav Garg [Wed, 10 Jun 2026 17:51:16 +0000 (23:21 +0530)]
Remove padding and multiple D2D copies for MTP (#24086)

* Make ggml_gated_delta_net take only the initial recurrent state (D, 1, n_seqs) and passes the snapshot count K as an op parameter instead of inferring it from state->ne[1].

Remove the padding hack and copy all emitted snapshots into the recurrent cache with a single strided ggml_cpy

* Make GDN changes in all backends. Address review comments.

* Fix CI build errors

2 months agochat: fix LFM2/LFM2.5 ignoring json_schema (#24377)
Tarek Dakhran [Wed, 10 Jun 2026 12:41:41 +0000 (14:41 +0200)]
chat: fix LFM2/LFM2.5 ignoring json_schema (#24377)

The LFM2 specialized template handler only built a grammar for tool-calling,
silently ignoring json_schema from response_format.

2 months agoCUDA: Fix ssm_scan_f32 data-races (#24360)
Oliver Simons [Wed, 10 Jun 2026 12:27:08 +0000 (14:27 +0200)]
CUDA: Fix ssm_scan_f32 data-races (#24360)

* Add missing syncthreads before resuing cub_temp_storage

__syncthreads() is required before being allowed to resue TempStorage
smem:
https://nvidia.github.io/cccl/unstable/cub/api/classcub_1_1BlockLoad.html#_CPPv4I0EN3cub9BlockLoad4LoadEv20RandomAccessIteratorRA14ItemsPerThread_1Ti

* Add one more missing __syncthreads

Could also double-buffer, but alternative is to simply ensure all
threads have read smem* before writing to it again in the next loop
iteration

* Remove unused smem from ssm_scan_f32

3 months agoci : bump komac version (#24396)
Sigbjørn Skjæret [Wed, 10 Jun 2026 07:45:20 +0000 (09:45 +0200)]
ci : bump komac version (#24396)

3 months agospeculative : fix "ngram-map-k4v" name in logging (#24253)
ddh0 [Wed, 10 Jun 2026 07:31:35 +0000 (02:31 -0500)]
speculative : fix "ngram-map-k4v" name in logging (#24253)

This is a non-functional change.

When using `--spec-type ngram-map-k4v`, the log messages at startup and
runtime say `ngram-map-k`. Added logic in the in the constructor of
`common_speculative_impl_ngram_map_k` to pass the correct
`COMMON_SPECULATIVE_TYPE_NGRAM_MAP_K4V` when `config.key_only` is
`false`.

After this change, the log messages use the correct name.

3 months agowebui: implement pinned conversations support (#21387)
Rémy Mathieu [Tue, 9 Jun 2026 19:33:22 +0000 (21:33 +0200)]
webui: implement pinned conversations support (#21387)

* webui: implement pinned conversations support

* webui: linter/prettier pass

* Fix the unused handleMobileSidebarItemClick from the component.

* the search should find pinned conversations as well

Co-authored-by: Pascal <redacted>
---------

Co-authored-by: Pascal <redacted>
3 months agograph: Fix granite speech model inference by applying embedding scale when deepstack...
Aarnav Pai [Tue, 9 Jun 2026 17:46:27 +0000 (23:16 +0530)]
graph: Fix granite speech model inference by applying embedding scale when deepstack is not used (#24357)

* llama-graph : apply embedding scale when deepstack is not used

* nits: remove non-existant hunyuan-vl from the tests

* apply suggestion from @gabe-l-hart

---------

Co-authored-by: Xuan Son Nguyen <redacted>
3 months agoci : fix windows release (#24369)
Sigbjørn Skjæret [Tue, 9 Jun 2026 16:42:23 +0000 (18:42 +0200)]
ci : fix windows release (#24369)

3 months agoui: add opt-in run_javascript frontend tool (#24244)
Pascal [Tue, 9 Jun 2026 16:02:31 +0000 (18:02 +0200)]
ui: add opt-in run_javascript frontend tool (#24244)

* ui: add opt-in run_javascript frontend tool

Expose a run_javascript tool to the model, executed entirely in the
browser through the existing agentic loop. Code runs in a Web Worker
inside a sandboxed iframe with an opaque origin, isolated from the
WebUI and its API. Console output, errors and the return value are
fed back as the tool result. The parent enforces a hard timeout by
removing the iframe, which terminates the worker.

Disabled by default, toggle in Settings > Developer.

* ui: address review feedback from allozaur

Use the JsonSchemaType enum for the tool definition parameter types
instead of raw string literals, extending it with STRING and NUMBER.

Move the worker shim and the iframe harness html into their own files
so the service no longer carries inline source blobs.

Replace the remaining magic strings with constants: SANDBOX_EMPTY_OUTPUT
and SANDBOX_TRUNCATION_NOTICE, and reuse NEWLINE_SEPARATOR for joins.

* ui: move sandbox worker shim to a raw imported file

Replace the inline worker template string with a real sandbox-worker.js
imported as raw text, and build the iframe harness from it in
sandbox-harness.ts. The raw worker ships as a string, not a module, so
it is excluded from eslint and the typecheck program.

3 months agomtmd: build_vit batching (#24352)
Saba Fallah [Tue, 9 Jun 2026 14:32:08 +0000 (16:32 +0200)]
mtmd: build_vit batching (#24352)

3 months agovulkan: reduce iq1 shared memory usage for mul_mm (#24287)
Jeff Bolz [Tue, 9 Jun 2026 11:27:38 +0000 (06:27 -0500)]
vulkan: reduce iq1 shared memory usage for mul_mm (#24287)

3 months agovulkan: add `v_dot2_f32_f16` support in matrix-matrix multiplication and Flash Attent...
Ruben Ortlam [Tue, 9 Jun 2026 11:27:04 +0000 (13:27 +0200)]
vulkan: add `v_dot2_f32_f16` support in matrix-matrix multiplication and Flash Attention (#24123)

* vulkan: add support for valve fp16 dot2 extension

* use macro for dot2 path choice

* properly check for the feature

* add dot_product abstraction to reduce preprocessor branching

3 months agoui: Fix excessive style recalculation on hover (#24243)
Nick Towle [Tue, 9 Jun 2026 10:52:20 +0000 (03:52 -0700)]
ui: Fix excessive style recalculation on hover (#24243)

3 months agomtmd: refactor video subproc handling (#24316)
Xuan-Son Nguyen [Tue, 9 Jun 2026 10:15:12 +0000 (12:15 +0200)]
mtmd: refactor video subproc handling (#24316)

* mtmd: refactor video subproc handling

* Update tools/mtmd/mtmd-helper.cpp

Co-authored-by: Mikko Juola <redacted>
---------

Co-authored-by: Mikko Juola <redacted>
3 months agoserver: log prompts to directory (#22031)
jacekpoplawski [Tue, 9 Jun 2026 10:09:07 +0000 (12:09 +0200)]
server: log prompts to directory (#22031)

* server: log prompts to directory

Add `--log-prompts-dir` to write each prompt to a separate text file in
the specified directory.

* Apply suggestion from @ngxson

---------

Co-authored-by: Xuan-Son Nguyen <redacted>
3 months agoui: fix mobile chat form overflow and bust stale bundle cache (#24158)
Pascal [Tue, 9 Jun 2026 09:12:58 +0000 (11:12 +0200)]
ui: fix mobile chat form overflow and bust stale bundle cache (#24158)

3 months agoggml : add GGML_OP_COL2IM_1D (#24206)
Pascal [Tue, 9 Jun 2026 09:01:37 +0000 (11:01 +0200)]
ggml : add GGML_OP_COL2IM_1D (#24206)

* cpu: add GGML_OP_COL2IM_1D

Add the overlap-add (scatter-add) step of a 1D transposed convolution.
A ConvTranspose1d factorizes as a GEMM followed by col2im: a weight
pre-permuted to [IC, K*OC] is contracted against the [IC, T_in] input
with mul_mat to produce a column matrix [K*OC, T_in], and col2im_1d
scatters those columns back into the [T_out, OC] signal, with
T_out = (T_in - 1)*s0 + K - 2*p0.

Keeping the contraction as a plain mul_mat leaves the heavy work on the
optimized (and quantizable) matmul kernels, so col2im_1d only does the
cheap overlap-add.

CPU uses a gather formulation parallelized over output channels,
supporting F32, F16 and BF16 with an F32 accumulator.

* tests: add backend coverage for GGML_OP_COL2IM_1D

Add test_col2im_1d next to the conv_transpose_1d cases, covering F32,
F16 and BF16 across eight geometries: the canonical kernel = 2*stride
DAC upsampling shape, overlap, no overlap, cropping (p0 = 1 and
p0 = stride/2), kernel < stride with zeroed gaps, kernel not a
multiple of stride, and a single column unfold.

Perf mode gets three real vocoder stage shapes reporting memory
bandwidth. max_nmse_err relaxes to 5e-4 for F16 and BF16.

* cpu: harden GGML_OP_COL2IM_1D

ggml_col2im_1d validates s0, oc, p0 and input contiguity at graph
build time, before the oc division, protecting every backend at once.
The kernel asserts the contiguity its flat indexing assumes and its
doc states the full output length including the crop term.

The kernel parallelizes over the time axis: the split stays balanced
down to OC = 1, where the previous channel split was single threaded.
Values are bit identical on the three real vocoder chains, two out of
three improve.

* tests: extend the GGML_OP_COL2IM_1D grid

The eval grid grows to eleven geometries: OC = 1 (mono output stage),
K = 1 with stride > 1 (sparse scatter, every gap position zeroed) and
a crop down to T_out = 2 where all the gather bounds act at once.

* tests: add col2im_1d equivalence test

tests/test-col2im-1d.cpp proves mul_mat + col2im_1d matches the
native ggml_conv_transpose_1d on the CPU backend, F32 bit exact, F16
and BF16 through casts of the column matrix. test-backend-ops cannot
cover this for a CPU only op since the CPU backend is its own
reference there.

* rpc: bump protocol patch version for GGML_OP_COL2IM_1D

GGML_OP_COUNT goes from 96 to 97 with the new op, which trips the
static_assert in ggml-rpc.h. Bump RPC_PROTO_PATCH_VERSION since the
op is appended and no existing op code shifts.

3 months agoserver : do not clear slots without unified KV cache (#24190)
fiesh [Tue, 9 Jun 2026 07:45:16 +0000 (09:45 +0200)]
server : do not clear slots without unified KV cache (#24190)

* Always export idle slots to RAM

Without this, a slot's VRAM cache may not be written to RAM.  If this
slot happens to be busy then later on, this triggers needless
preprocessing in another slot.

* cont : clean-up

---------

Co-authored-by: Christoph Weiss <redacted>
Co-authored-by: Georgi Gerganov <redacted>
3 months agomodels : fix plamo2 attention_key/value_length regression (#24317)
Sigbjørn Skjæret [Tue, 9 Jun 2026 07:26:44 +0000 (09:26 +0200)]
models : fix plamo2 attention_key/value_length regression (#24317)

3 months agoggml-cpu : fix rms_norm_back wrong output under in-place aliasing (#24305)
Yash Raj Pandey [Tue, 9 Jun 2026 07:24:27 +0000 (03:24 -0400)]
ggml-cpu : fix rms_norm_back wrong output under in-place aliasing (#24305)

* ggml-cpu : fix rms_norm_back wrong output under in-place aliasing

* cont : clean-up comment

---------

Co-authored-by: Georgi Gerganov <redacted>
3 months agoRemove case for GGML_TYPE_Q4_K in mvvq.cu (#23528)
ravel7524 [Tue, 9 Jun 2026 05:46:23 +0000 (07:46 +0200)]
Remove case for GGML_TYPE_Q4_K in mvvq.cu (#23528)

3 months agoggml-webgpu: Add clang-format job (#24308)
Reese Levine [Tue, 9 Jun 2026 03:54:24 +0000 (20:54 -0700)]
ggml-webgpu: Add clang-format job (#24308)

* Add clang-format job

* try local formatting

3 months agoggml-webgpu: Improve prefill speeds for k-quants + refactor matmul for Q4/Q5/Q8 and...
Masashi Yoshimura [Mon, 8 Jun 2026 22:19:56 +0000 (07:19 +0900)]
ggml-webgpu: Improve prefill speeds for k-quants + refactor matmul for Q4/Q5/Q8 and k-quants (#24225)

* ggml-webgpu: Improve prefill speeds + refactor matmul for quants

* Fixes for editroconfig checker

3 months agomtp: support for gemma-4 E2B and E4B assistants (#24282)
Max Krasnyansky [Mon, 8 Jun 2026 20:48:52 +0000 (13:48 -0700)]
mtp: support for gemma-4 E2B and E4B assistants (#24282)

* models: update converter to support smaller assistants

* models: add masked_embd tensors to gemma4-assist arch

* gemma-4: remove temp debug for conversion

* gemma-4-mtp: filter out masked_embedding tensors during conversion

3 months agoserver : do not parse when flushing http headers (#24281)
Aldehir Rojas [Mon, 8 Jun 2026 18:32:41 +0000 (13:32 -0500)]
server : do not parse when flushing http headers (#24281)

3 months agograph: guard iswa kq_mask on its own buffer (#24294)
Pascal [Mon, 8 Jun 2026 17:20:28 +0000 (19:20 +0200)]
graph: guard iswa kq_mask on its own buffer (#24294)

A SWA-only draft head (e.g. StepFun MTP) leaves the base sub-cache
empty, so its kq_mask buffer stays null and asserts at load. Guard
each mask on its own buffer in set_input and can_reuse, base and swa.

Co-authored-by: Georgi Gerganov <redacted>
3 months ago[ggml-webgpu] Handle buffer overlap / buffer aliasing for concat operator (#24000)
Nikhil Jain [Mon, 8 Jun 2026 15:07:31 +0000 (08:07 -0700)]
[ggml-webgpu] Handle buffer overlap / buffer aliasing for concat operator (#24000)

* Only run webgpu CI on my fork

* Add webgpu only workflow

* handle buffer overlap case for concat operator

* restore build-webgpu.yml

Co-Authored-By: Claude Sonnet 4.6 <redacted>
* Run clang-format

* Update ggml/src/ggml-webgpu/wgsl-shaders/concat.wgsl

---------

Co-authored-by: Claude Sonnet 4.6 <redacted>
Co-authored-by: Reese Levine <redacted>
3 months ago[ggml-webgpu] Implement 2D workgroups for scale, binary, and unary ops (#24044)
Nikhil Jain [Mon, 8 Jun 2026 15:07:15 +0000 (08:07 -0700)]
[ggml-webgpu] Implement 2D workgroups for scale, binary, and unary ops (#24044)

* Only run webgpu CI on my fork

* Add webgpu only workflow

* Implement 2d workgroups for more operations

* fix

* Fix type

* Move back to global_invocation_id

3 months agodocker: install ffmpeg in the released image (#24302)
Xuan-Son Nguyen [Mon, 8 Jun 2026 14:59:57 +0000 (16:59 +0200)]
docker: install ffmpeg in the released image (#24302)

3 months agomtmd : add video input support (#24269)
Xuan-Son Nguyen [Mon, 8 Jun 2026 11:40:12 +0000 (13:40 +0200)]
mtmd : add video input support (#24269)

* wip

* ok: lazy bitmap API

* remember to free lazy text

* wip

* add mtmd_helper_video

* support video input on server (base64 input)

* add MTMD_VIDEO config

* add timestamp

* update CLI

* cli: allow auto-completion for video

* add --video arg

* fix build

* update docs

* rename as suggested

3 months agosync : ggml
Georgi Gerganov [Mon, 8 Jun 2026 09:56:07 +0000 (12:56 +0300)]
sync : ggml

3 months agoggml : bump version to 0.14.0 (ggml/1533)
Georgi Gerganov [Mon, 8 Jun 2026 09:51:59 +0000 (12:51 +0300)]
ggml : bump version to 0.14.0 (ggml/1533)

3 months agocli: fix spinner not show during prompt processing (#24283)
Xuan-Son Nguyen [Mon, 8 Jun 2026 09:11:45 +0000 (11:11 +0200)]
cli: fix spinner not show during prompt processing (#24283)

3 months agovulkan: Use cm2 decode_vector for mul_mat_id B matrix loads (#23991)
Jeff Bolz [Mon, 8 Jun 2026 08:40:37 +0000 (03:40 -0500)]
vulkan: Use cm2 decode_vector for mul_mat_id B matrix loads (#23991)

This allows vec4 loads of the B elements. Also increase BK to 64 when this is
enabled. Neither of these alone is consistently faster, but together these give
a nice speedup.

In ggml-vulkan.cpp, we need to make sure the B matrix alignment and stride are
multiples of 4.

3 months agocuda: reset cuda context after reading memory size (#23935)
Ruben Ortlam [Mon, 8 Jun 2026 08:22:44 +0000 (10:22 +0200)]
cuda: reset cuda context after reading memory size (#23935)

* cuda: reset device in get_memory function if no backend is active

* also count device and host buffers

* exclude hip and musa from counting and device reset

* use device mutex instead of atomic

* undo backend_free function move

3 months agoHIP: add gfx1152 and gfx1153 to RDNA3.5 (#24129)
Harkirat Gill [Mon, 8 Jun 2026 06:33:23 +0000 (02:33 -0400)]
HIP: add gfx1152 and gfx1153 to RDNA3.5 (#24129)

3 months agometal : fix im2col 1D case (audio models) (#24220)
Xuan-Son Nguyen [Mon, 8 Jun 2026 06:03:18 +0000 (08:03 +0200)]
metal : fix im2col 1D case (audio models) (#24220)

3 months ago[SYCL] Update compute runtime version to 26.x in docker (#24070)
Neo Zhang [Mon, 8 Jun 2026 02:35:18 +0000 (10:35 +0800)]
[SYCL] Update compute runtime version to 26.x in docker (#24070)

* update compute runtime from 25 to 26 in docker

* add comment with old driver for multiple GPUs

3 months agocommon : relax sampler name matching (#23744)
ddh0 [Sun, 7 Jun 2026 20:48:11 +0000 (15:48 -0500)]
common : relax sampler name matching (#23744)

* common : relax sampler name matching

Currently, in some cases, the alternative names for samplers (like
`top-k` and `min-p` instead of the canonical `top_k` and `min_p`) are
not always recognized by the `common_sampler_types_from_names` function
in `common/sampling.cpp`.

This PR changes the signature of this function to remove the `bool
allow_alt_names` flag, and removes all occurences of the flag from call
sites. Therefore, the function will now always match all known names.

I also changed the logic of the function to unconditionally check the
provided sampler names against both the canonical and alternative names,
and to be case-insensitive.

This fixes an issue I was seeing wherein samplers specified in the
`llama-server` UI were not recognized as valid when the alternative
names were used.

* add more alt names

* cont. fix

* cast to unsigned char for correctness

* common : unify sampler name mapping

* annotate canonical vs. alt sampler name mappings per @CISC

* Update common/sampling.cpp

Co-authored-by: Sigbjørn Skjæret <redacted>
* common : auto-generate sampler name aliases per @ngxson

* use merged map for matching

* use `.merge` instead of iterating

* nit: simplify comment

* nit: use insert everywhere, not index assignment

---------

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