]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
6 weeks agomtmd: some small clean up (#17909)
Xuan-Son Nguyen [Wed, 10 Dec 2025 21:20:06 +0000 (22:20 +0100)]
mtmd: some small clean up (#17909)

* clip: add support for fused qkv in build_vit

* use bulid_ffn whenever possible

* fix internvl

* mtmd-cli: move image to beginning

* test script: support custom args

6 weeks agocli: enable jinja by default (#17911)
Xuan-Son Nguyen [Wed, 10 Dec 2025 21:19:42 +0000 (22:19 +0100)]
cli: enable jinja by default (#17911)

* cli: enable jinja by default

* Update common/arg.cpp

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

Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agoserver: add presets (config) when using multiple models (#17859)
Pascal [Wed, 10 Dec 2025 21:18:21 +0000 (22:18 +0100)]
server: add presets (config) when using multiple models (#17859)

* llama-server: recursive GGUF loading

Replace flat directory scan with recursive traversal using
std::filesystem::recursive_directory_iterator. Support for
nested vendor/model layouts (e.g. vendor/model/*.gguf).
Model name now reflects the relative path within --models-dir
instead of just the filename. Aggregate files by parent
directory via std::map before constructing local_model

* server : router config POC (INI-based per-model settings)

* server: address review feedback from @aldehir and @ngxson

PEG parser usage improvements:
- Simplify parser instantiation (remove arena indirection)
- Optimize grammar usage (ws instead of zero_or_more, remove optional wrapping)
- Fix last line without newline bug (+ operator instead of <<)
- Remove redundant end position check

Feature scope:
- Remove auto-reload feature (will be separate PR per @ngxson)
- Keep config.ini auto-creation and template generation
- Preserve per-model customization logic

Co-authored-by: aldehir <redacted>
Co-authored-by: ngxson <redacted>
* server: adopt aldehir's line-oriented PEG parser

Complete rewrite of INI parser grammar and visitor:
- Use p.chars(), p.negate(), p.any() instead of p.until()
- Support end-of-line comments (key=value # comment)
- Handle EOF without trailing newline correctly
- Strict identifier validation ([a-zA-Z_][a-zA-Z0-9_.-]*)
- Simplified visitor (no pending state, no trim needed)
- Grammar handles whitespace natively via eol rule

Business validation preserved:
- Reject section names starting with LLAMA_ARG_*
- Accept only keys starting with LLAMA_ARG_*
- Require explicit section before key-value pairs

Co-authored-by: aldehir <redacted>
* server: fix CLI/env duplication in child processes

Children now receive minimal CLI args (executable, model, port, alias)
instead of inheriting all router args. Global settings pass through
LLAMA_ARG_* environment variables only, eliminating duplicate config
warnings.

Fixes: Router args like -ngl, -fa were passed both via CLI and env,
causing 'will be overwritten' warnings on every child spawn

* add common/preset.cpp

* fix compile

* cont

* allow custom-path models

* add falsey check

* server: fix router model discovery and child process spawning

- Sanitize model names: replace / and \ with _ for display
- Recursive directory scan with relative path storage
- Convert relative paths to absolute when spawning children
- Filter router control args from child processes
- Refresh args after port assignment for correct port value
- Fallback preset lookup for compatibility
- Fix missing argv[0]: store server binary path before base_args parsing

* Revert "server: fix router model discovery and child process spawning"

This reverts commit e3832b42eeea7fcb108995966c7584479f745857.

* clarify about "no-" prefix

* correct render_args() to include binary path

* also remove arg LLAMA_ARG_MODELS_PRESET for child

* add co-author for ini parser code

Co-authored-by: aldehir <redacted>
* also set LLAMA_ARG_HOST

* add CHILD_ADDR

* Remove dead code

---------

Co-authored-by: aldehir <redacted>
Co-authored-by: ngxson <redacted>
Co-authored-by: Xuan Son Nguyen <redacted>
Co-authored-by: aldehir <redacted>
6 weeks agoFix race conditions in threadpool when dealing with dynamic/frequent n_threads change...
Max Krasnyansky [Wed, 10 Dec 2025 20:32:23 +0000 (12:32 -0800)]
Fix race conditions in threadpool when dealing with dynamic/frequent n_threads changes (#17748)

* tests: update barrier test to check for race condition in active threads

* cpu: combine n_graph and n_threads into a single atomic update

* tests: add multi-graph test for test_barrier

6 weeks agoggml : remove GGML_KQ_MASK_PAD constant (#17910)
Georgi Gerganov [Wed, 10 Dec 2025 18:53:16 +0000 (20:53 +0200)]
ggml : remove GGML_KQ_MASK_PAD constant (#17910)

* ggml : remove GGML_KQ_MASK_PAD constant

* cont : remove comment

6 weeks agocuda : add missing support check for xielu (#17895)
Sigbjørn Skjæret [Wed, 10 Dec 2025 15:16:20 +0000 (16:16 +0100)]
cuda : add missing support check for xielu (#17895)

6 weeks agocli: new CLI experience (#17824)
Xuan-Son Nguyen [Wed, 10 Dec 2025 14:28:59 +0000 (15:28 +0100)]
cli: new CLI experience (#17824)

* wip

* wip

* fix logging, add display info

* handle commands

* add args

* wip

* move old cli to llama-completion

* rm deprecation notice

* move server to a shared library

* move ci to llama-completion

* add loading animation

* add --show-timings arg

* add /read command, improve LOG_ERR

* add args for speculative decoding, enable show timings by default

* add arg --image and --audio

* fix windows build

* support reasoning_content

* fix llama2c workflow

* color default is auto

* fix merge conflicts

* properly fix color problem

Co-authored-by: bandoti <redacted>
* better loading spinner

* make sure to clean color on force-exit

* also clear input files on "/clear"

* simplify common_log_flush

* add warning in mtmd-cli

* implement console writter

* fix data race

* add attribute

* fix llama-completion and mtmd-cli

* add some notes about console::log

* fix compilation

---------

Co-authored-by: bandoti <redacted>
6 weeks agomodel : Qwen3-Next-80B-A3B has 48 layers (#17898)
Eric Zhang [Wed, 10 Dec 2025 14:22:40 +0000 (22:22 +0800)]
model : Qwen3-Next-80B-A3B has 48 layers (#17898)

* model : Qwen3-Next-80B-A3B has 48 layers

* model : Add 80B-A3B type name

6 weeks agodocs : update opencl ops (#17904)
lhez [Wed, 10 Dec 2025 14:20:00 +0000 (06:20 -0800)]
docs : update opencl ops (#17904)

6 weeks agoCUDA: fix unpadded strides in MMA FA kernel (#17891)
Johannes Gäßler [Wed, 10 Dec 2025 11:39:56 +0000 (12:39 +0100)]
CUDA: fix unpadded strides in MMA FA kernel (#17891)

6 weeks agoconvert: allow using quantized Mistral weight (#17889)
Xuan-Son Nguyen [Wed, 10 Dec 2025 09:26:22 +0000 (10:26 +0100)]
convert: allow using quantized Mistral weight (#17889)

* convert: allow using quantized Mistral weight

* data_torch.ndim

* update dequant fn

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

Co-authored-by: compilade <redacted>
6 weeks agofix softmax for iGPU (#17838)
Neo Zhang Jianyu [Wed, 10 Dec 2025 08:59:57 +0000 (16:59 +0800)]
fix softmax for iGPU (#17838)

6 weeks agocommon : add parser for ministral/mistral large 3/devstral 2 (#17713)
Aldehir Rojas [Tue, 9 Dec 2025 23:31:04 +0000 (17:31 -0600)]
common : add parser for ministral/mistral large 3/devstral 2 (#17713)

6 weeks agodocs : update cpu and cuda ops (#17890)
Sigbjørn Skjæret [Tue, 9 Dec 2025 22:31:29 +0000 (23:31 +0100)]
docs : update cpu and cuda ops (#17890)

* update cuda ops

* update CPU as well

6 weeks agometal: SSM kernel improvements (#17876)
Gabe Goodhart [Tue, 9 Dec 2025 19:30:02 +0000 (12:30 -0700)]
metal: SSM kernel improvements (#17876)

* feat: Add a batched version of ssm_conv

This was done using Claude Code. It found a number of optimizations around
how the threads were organized, resulting in a huge performance boost!

Branch: Mamba2SSD

Signed-off-by: Gabe Goodhart <redacted>
* feat: Optimized SSM_SCAN kernel for metal

This used Claude Code and resulted in a modest performance improvement
while maintaining correctness.

Branch: Mamba2SSD

Signed-off-by: Gabe Goodhart <redacted>
* test: Add test-backend-ops perf tests for SSM_CONV

Branch: SSMKernelImprovements

Signed-off-by: Gabe Goodhart <redacted>
* test: Real representitive tests for SSM_CONV

Branch: SSMKernelImprovements

Signed-off-by: Gabe Goodhart <redacted>
* refactor: Use function constant for ssm_conv batch size

Branch: SSMKernelImprovements

Signed-off-by: Gabe Goodhart <redacted>
* test: backend op tests for ssm_scan from granite4 1b-h

Branch: SSMKernelImprovements

Signed-off-by: Gabe Goodhart <redacted>
* style: remove commented out templates

Branch: SSMKernelImprovements

Signed-off-by: Gabe Goodhart <redacted>
* feat: float4 version of ssm_conv_batched

Branch: SSMKernelImprovements

Signed-off-by: Gabe Goodhart <redacted>
* fix: Add missing ggml_metal_cv_free

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
---------

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
6 weeks agoAdd DIAG for CUDA (#17873)
Piotr Wilkin (ilintar) [Tue, 9 Dec 2025 19:28:57 +0000 (20:28 +0100)]
Add DIAG for CUDA (#17873)

* Add DIAG for CUDA

* Refactor parameters

6 weeks agodocs: clarify that CPU support should be first (#17886)
Johannes Gäßler [Tue, 9 Dec 2025 19:10:36 +0000 (20:10 +0100)]
docs: clarify that CPU support should be first (#17886)

6 weeks agoggml : Provide macos-specific backtrace printing to avoid terminal death (#17869)
Gabe Goodhart [Tue, 9 Dec 2025 16:29:07 +0000 (09:29 -0700)]
ggml : Provide macos-specific backtrace printing to avoid terminal death (#17869)

* fix: Provide macos-specific backtrace printing to avoid terminal death

Branch: MacOSSafeBacktrace

Signed-off-by: Gabe Goodhart <redacted>
* fix: Add GGML_BACKTRACE_LLDB env var to enable using lldb for backtrace

Branch: MacOSSafeBacktrace

Signed-off-by: Gabe Goodhart <redacted>
---------

Signed-off-by: Gabe Goodhart <redacted>
6 weeks agometal : print node names for debugging (#17882)
Georgi Gerganov [Tue, 9 Dec 2025 13:25:49 +0000 (15:25 +0200)]
metal : print node names for debugging (#17882)

6 weeks agoggml : allow fill node alloc inplace (#17870)
Sigbjørn Skjæret [Tue, 9 Dec 2025 11:23:47 +0000 (12:23 +0100)]
ggml : allow fill node alloc inplace (#17870)

6 weeks agocmake: fix Mach-O current version number (#17877)
Rhys-T [Tue, 9 Dec 2025 11:17:41 +0000 (06:17 -0500)]
cmake: fix Mach-O current version number (#17877)

PR #17091 set the VERSION of various libraries to 0.0.abcd, where abcd
is the LLAMA_BUILD_NUMBER. That build number is too large to fit in the
Mach-O 'current version' field's 'micro' part, which only goes up to
255. This just sets the Mach-O current version to 0 to get it building
properly again.

Fixes #17258.

6 weeks agomodel : nit, DeepSeek V1 MoE is 16B and GigaChat is 20B (#12652)
Sigbjørn Skjæret [Tue, 9 Dec 2025 11:15:06 +0000 (12:15 +0100)]
model : nit, DeepSeek V1 MoE is 16B and GigaChat is 20B (#12652)

* nit, DeepSeek V1 MoE is 16B

* base type on n_ff_exp instead

6 weeks agoconsole: allow using arrow left/right, home/end keys and history mode (#17836)
Xuan-Son Nguyen [Tue, 9 Dec 2025 10:53:59 +0000 (11:53 +0100)]
console: allow using arrow left/right, home/end keys and history mode (#17836)

* console: allow using arrow left/right to edit the line (with UTF-8 support)

* console: fix arrow keys on Windows using private-use Unicode

* console: add Home/End key support for Windows and Linux

* console: add basic Up/Down history navigation

* fix build

* console: allow using arrow left/right to edit the line (with UTF-8 support)

* console: fix arrow keys on Windows using private-use Unicode

* console: add Home/End key support for Windows and Linux

* console: add basic Up/Down history navigation

* console: remove unreachable wc == 0 check after VK switch

* console: add Ctrl+Left/Right word navigation

- Add KEY_CTRL_ARROW_LEFT and KEY_CTRL_ARROW_RIGHT codes
- Windows: detect CTRL modifier via dwControlKeyState
- Linux: parse ANSI sequences with modifier (1;5D/C)
- Implement move_word_left/right with space-skipping logic
- Refactor escape sequence parsing to accumulate params

* console: add Delete key support

- Windows: VK_DELETE detection
- Linux: ESC[3~ sequence parsing
- Forward character deletion with UTF-8 support

* console: implement bash-style history editing

- Edit any history line during UP/DOWN navigation, edits persist
- Pressing Enter appends edited version as new history entry
- Original line stay untouched in their positions

* clean up

* better history impl

* fix decode_utf8

---------

Co-authored-by: Pascal <redacted>
6 weeks agoCANN: add support for partial RoPE and Vision mode (#17543)
Chenguang Li [Tue, 9 Dec 2025 09:53:23 +0000 (17:53 +0800)]
CANN: add support for partial RoPE and Vision mode (#17543)

* cann: add support for partial RoPE and Vision mode

Add support for two important RoPE variants: partial rotation (rope_dims < ne0)
and Vision mode rotation.

1. Support for partial RoPE (rope_dims < ne0):
   - Split tensor into head (first rope_dims dimensions) and tail portions
   - Apply rotation only to head portion using RotaryPositionEmbedding operator
   - Copy unrotated tail portion directly from source to destination
   - Handle both contiguous and non-contiguous tensor layouts

2. Support for Vision mode (GGML_ROPE_TYPE_VISION):
   - Set rope_dims = ne0 for Vision mode to rotate entire tensor
   - Vision mode pairs dimension i with dimension i+n_dims (where n_dims = ne0/2)
   - No tail handling needed since entire tensor is rotated

Implementation details:
   - Use has_tail flag to determine execution path: head/tail splitting when
     rope_dims < ne0, or full tensor rotation when rope_dims == ne0
   - Support both F32 and F16 data types with intermediate F32 conversion
   - Copy non-contiguous tensors to contiguous buffers before calling
     RotaryPositionEmbedding operator for compatibility
   - Improve cache invalidation logic to include rope_dims and indep_sects
     parameters

These enhancements enable CANN backend to handle various RoPE configurations
used in modern vision-language models and models with partial rotation.

* cann: fix review comment

6 weeks agoCUDA: fix FP16 overflow in tile FA kernel (#17875)
Johannes Gäßler [Tue, 9 Dec 2025 08:34:02 +0000 (09:34 +0100)]
CUDA: fix FP16 overflow in tile FA kernel (#17875)

6 weeks agollama : add token matching support to llama-grammar (#17816)
Aldehir Rojas [Tue, 9 Dec 2025 06:32:57 +0000 (00:32 -0600)]
llama : add token matching support to llama-grammar (#17816)

* llama : add token support to llama-grammar

* fix inverse token comment

* refactor trigger_patterns to replay tokens instead of the entire string

* add token documentation

* fix test-llama-grammar

* improve test cases for tokens

6 weeks agomodel : support Rnj-1 (#17811)
philip-essential [Tue, 9 Dec 2025 03:49:03 +0000 (19:49 -0800)]
model : support Rnj-1 (#17811)

* add support for rnj1

* refactor gemma3 to support rnj-1

* address review comments

6 weeks agograph : use fill instead of scale_bias in grouped expert selection (#17867)
Sigbjørn Skjæret [Mon, 8 Dec 2025 20:29:59 +0000 (21:29 +0100)]
graph : use fill instead of scale_bias in grouped expert selection (#17867)

* use fill instead of scale_bias in grouped expert selection

* do not explicitly use _inplace

6 weeks agomodel-conversion : add token ids to prompt token output [no ci] (#17863)
Daniel Bevenius [Mon, 8 Dec 2025 16:13:08 +0000 (17:13 +0100)]
model-conversion : add token ids to prompt token output [no ci] (#17863)

This commit adds the token ids to the printed prompt outputs.

The motivation for this is that is can be useful to see the actual token
ids alongside the token strings for debugging.

6 weeks agoserver: delegate result_state creation to server_task (#17835)
Xuan-Son Nguyen [Mon, 8 Dec 2025 16:04:38 +0000 (17:04 +0100)]
server: delegate result_state creation to server_task (#17835)

* server: delegate result_state creation to server_task

* remove unued states

* add more docs

6 weeks agoci : support bfloat16 SYCL release package (#17855)
Neo Zhang [Mon, 8 Dec 2025 14:09:39 +0000 (22:09 +0800)]
ci : support bfloat16 SYCL release package (#17855)

* support bfloat16 release package

* add fallback file

6 weeks agoserver: improve speed of speculative decoding (#17808)
Xuan-Son Nguyen [Mon, 8 Dec 2025 13:35:28 +0000 (14:35 +0100)]
server: improve speed of speculative decoding (#17808)

* server: improve speed of speculative decoding

* fix small draft case

* add link to the PR

* server : fix generation time measurement

* server : fix draft acceptance logs (add SRV_CNT, SLT_CNT macros)

* server : add comment

* add PR to docs

---------

Co-authored-by: Georgi Gerganov <redacted>
6 weeks agoMake graph_max_nodes vary by ubatch size (#17794)
Piotr Wilkin (ilintar) [Mon, 8 Dec 2025 13:32:41 +0000 (14:32 +0100)]
Make graph_max_nodes vary by ubatch size (#17794)

* Make graph_max_nodes vary by ubatch size for models where chunking might explode the graph

* Update src/llama-context.h

Co-authored-by: Georgi Gerganov <redacted>
* Add missing const

---------

Co-authored-by: Georgi Gerganov <redacted>
6 weeks agoFix Kimi-K2 tool-call parsing issues (#17376)
hksdpc255 [Mon, 8 Dec 2025 13:32:04 +0000 (00:32 +1100)]
Fix Kimi-K2 tool-call parsing issues (#17376)

* Fix kimi-k2 parsing

* fix template & add more tests for kimi-k2

* Another fix for Kimi-K2 chat template.

* enable allow_toolcall_in_think for Kimi-K2

* Refine key-value separator and value end format

* Enable tool call in think for kimi-k2

* allow_toolcall_in_think is now tested with Kimi-K2

* Remove outdated TODO comment in XML tool call parser

Removed TODO comment about untested tool call feature.

* Rename function from "utf8_truncate_safe" to "utf8_truncate_safe_len"

6 weeks agocuda : add FILL op support (#17851)
Jay Zenith [Mon, 8 Dec 2025 13:10:12 +0000 (05:10 -0800)]
cuda : add FILL op support (#17851)

* cuda : add FILL op support

* cuda : add missing FILL op files

6 weeks agoserver : add development documentation (#17760)
Xuan-Son Nguyen [Mon, 8 Dec 2025 12:54:58 +0000 (13:54 +0100)]
server : add development documentation (#17760)

* first draft

* rewrite

* update & remove duplicated sections

6 weeks agoserver : make cache_reuse configurable per request (#17858)
Georgi Gerganov [Mon, 8 Dec 2025 10:43:12 +0000 (12:43 +0200)]
server : make cache_reuse configurable per request (#17858)

6 weeks agocuda: optimize SOLVE_TRI using registers and FMAF (#17703)
wsbagnsv1 [Mon, 8 Dec 2025 09:41:08 +0000 (10:41 +0100)]
cuda: optimize SOLVE_TRI using registers and FMAF (#17703)

* ggml-cuda: optimize solve_tri_f32_fast and fix stride handling

- Switch from using shared memory for the RHS/solution matrix to a register-based approach (x_low, x_high), reducing shared memory pressure and bank conflicts.
- Implement explicit `fmaf` instructions for the reduction loop.
- Update kernel arguments to pass strides in bytes rather than elements to align with standard ggml tensor arithmetic (casting to `char *` before addition).
- Remove unused `MAX_K_FAST` definition.

* Small cleanup

* Remove comments in solve_tri.cu

* Update ggml/src/ggml-cuda/solve_tri.cu

Co-authored-by: Johannes Gäßler <redacted>
* Update ggml/src/ggml-cuda/solve_tri.cu

Co-authored-by: Johannes Gäßler <redacted>
* Update ggml/src/ggml-cuda/solve_tri.cu

Co-authored-by: Johannes Gäßler <redacted>
* Use const for variables in solve_tri.cu

* Replace fmaf with more readable code

* remove last fmaf

---------

Co-authored-by: Johannes Gäßler <redacted>
6 weeks agoggml-cpu: add ggml_thread_cpu_relax with Zihintpause support (#17784)
ixgbe [Mon, 8 Dec 2025 08:41:34 +0000 (16:41 +0800)]
ggml-cpu: add ggml_thread_cpu_relax with Zihintpause support (#17784)

* ggml-cpu: add ggml_thread_cpu_relax with Zihintpause support

Signed-off-by: Wang Yang <redacted>
* cmake: enable RISC-V zihintpause extension for Spacemit builds

* readme : add ZIHINTPAUSE support for RISC-V

---------

Signed-off-by: Wang Yang <redacted>
7 weeks agomodel: add llama 4 scaling for mistral-large (deepseek arch) (#17744)
Xuan-Son Nguyen [Sun, 7 Dec 2025 21:29:54 +0000 (22:29 +0100)]
model: add llama 4 scaling for mistral-large (deepseek arch) (#17744)

7 weeks agoVulkan: improve mul_mat_vec_iq1_m (#16907)
lovedheart [Sun, 7 Dec 2025 17:40:42 +0000 (18:40 +0100)]
Vulkan: improve mul_mat_vec_iq1_m (#16907)

* Optimize Vulkan shader for matrix-vector multiplication

* Revert changes on compute_outputs and main

Refactor compute_outputs to handle remaining rows correctly.

* Fix trailing whitespace

7 weeks agoci : add windows-cuda 13.1 release (#17839)
Sigbjørn Skjæret [Sun, 7 Dec 2025 13:02:04 +0000 (14:02 +0100)]
ci : add windows-cuda 13.1 release (#17839)

7 weeks agocommon : change --color to accept on/off/auto, default to auto (#17827)
Sigbjørn Skjæret [Sun, 7 Dec 2025 02:43:50 +0000 (03:43 +0100)]
common : change --color to accept on/off/auto, default to auto (#17827)

7 weeks agosycl: add missing BF16 conversion support for Intel oneAPI (#17780)
Law Po Ying [Sun, 7 Dec 2025 01:18:18 +0000 (09:18 +0800)]
sycl: add missing BF16 conversion support for Intel oneAPI (#17780)

* sycl: add missing BF16 conversion support for Intel oneAPI

* Fix Line 645: Trailing whitespace

7 weeks agovulkan: perf_logger improvements (#17672)
Jeff Bolz [Sat, 6 Dec 2025 17:46:46 +0000 (11:46 -0600)]
vulkan: perf_logger improvements (#17672)

* vulkan: perf_logger improvements

- Move perf_logger from device to ctx.
- Add an env var to control the frequency we dump the stats. If you set a very
large value, it just dumps when the ctx is destroyed.
- Add a fusion info string to the tracking, only log one item per fused op.
- Fix MUL_MAT_ID flops calculation.

* fix vector sizes

7 weeks agoggml-zendnn : add ZenDNN backend for AMD CPUs (#17690)
Vishal Singh [Sat, 6 Dec 2025 16:13:33 +0000 (21:43 +0530)]
ggml-zendnn : add ZenDNN backend for AMD CPUs (#17690)

* ggml-zennn: add ZenDNN backend support

* ggml-zendnn : address ZenDNN backend review fixes and suggestions

* docs : apply blockquote syntax to ZenDNN docs

---------

Co-authored-by: Manoj Kumar <redacted>
7 weeks agoserver: support multiple generations from one prompt (OAI "n" option) (#17775)
Xuan-Son Nguyen [Sat, 6 Dec 2025 14:54:38 +0000 (15:54 +0100)]
server: support multiple generations from one prompt (OAI "n" option) (#17775)

* backend support

* server: support multiple generations from one prompt (OAI "n" option)

* fix invalid batch

* format oai

* clean up

* disable ctx shift

* add test

* update comments

* fix style

* add n_cmpl to docs [no ci]

* allowing using both n_cmpl and n

7 weeks agoggml : add circular tiling support to pad, for Vulkan, CUDA, and CPU (used for making...
Phylliida Dev [Sat, 6 Dec 2025 14:07:02 +0000 (06:07 -0800)]
ggml : add circular tiling support to pad, for Vulkan, CUDA, and CPU (used for making seamless textures) (#16985)

* Feat: Added vulkan circular tiling support

* Feat: Added cpu circular

* Feat: Added cuda kernels

* Added tests

* Added tests

* Removed non-pad operations

* Removed unneded changes

* removed backend non pad tests

* Update test-backend-ops.cpp

* Fixed comment on pad test

* removed trailing whitespace

* Removed unneded test in test-backend-ops

* Removed removed test from calls

* Update ggml/src/ggml-vulkan/vulkan-shaders/pad.comp

Co-authored-by: Ruben Ortlam <redacted>
* Fixed alignment

* Formatting

Co-authored-by: Aman Gupta <redacted>
* Format pad

* Format

* Clang format

* format

* format

* don't change so much stuff

* clang format and update to bool

* fix duplicates

* don't need to fix the padding

* make circular bool

* duplicate again

* rename vulkan to wrap around

* Don't need indent

* moved to const expr

* removed unneded extra line break

* More readable method calls

* Minor wording changes

* Added final newline

* Update ggml/include/ggml.h

Co-authored-by: Georgi Gerganov <redacted>
* Update ggml/include/ggml.h

Co-authored-by: Georgi Gerganov <redacted>
* Added circular pad ext tests

* Gate non circular pad devices

* Cleaned gating of non-circular pad devices

---------

Co-authored-by: Phylliida <redacted>
Co-authored-by: Ruben Ortlam <redacted>
Co-authored-by: Aman Gupta <redacted>
Co-authored-by: Georgi Gerganov <redacted>
7 weeks agoHIP: fix RDNA3 FP16/BF16 matrix multiplication (#17817)
Johannes Gäßler [Sat, 6 Dec 2025 12:45:36 +0000 (13:45 +0100)]
HIP: fix RDNA3 FP16/BF16 matrix multiplication (#17817)

7 weeks agowebui: Stop generation from chat sidebar (#17806)
Aleksander Grygier [Sat, 6 Dec 2025 12:29:15 +0000 (13:29 +0100)]
webui: Stop generation from chat sidebar (#17806)

* feat: Add stop generation button for Conversation Item

* chore: update webui build output

7 weeks agowebui: Fix context available value in Multi-model Router mode (#17804)
Aleksander Grygier [Sat, 6 Dec 2025 12:23:29 +0000 (13:23 +0100)]
webui: Fix context available value in Multi-model Router mode (#17804)

* fix: Use context size from `/props?model=...` in ROUTER mode

* chore: update webui build output

7 weeks agowebui: Per-conversation system message with UI displaying, edition & branching (...
Aleksander Grygier [Sat, 6 Dec 2025 12:19:05 +0000 (13:19 +0100)]
webui: Per-conversation system message with UI displaying, edition & branching (#17275)

* feat: Per-conversation system message with optional display in UI, edition and branching (WIP)

* chore: update webui build output

7 weeks agoggml : improve error handling for search path existence checks (#17653)
Sky [Sat, 6 Dec 2025 11:28:16 +0000 (19:28 +0800)]
ggml : improve error handling for search path existence checks (#17653)

* Improve error handling for search path existence checks

Refactor existence checks for search paths using std::error_code to handle potential errors.

* Improve cache file existence check with error code

Update fs::exists to use std::error_code for error handling.

* Simplify existence check for search paths

Simplify existence check for search paths

* Fix logging path in error message for posix_stat

* Update ggml/src/ggml-backend-reg.cpp

Co-authored-by: Aman Gupta <redacted>
* Adapt to the coding standard

---------

Co-authored-by: Aman Gupta <redacted>
7 weeks agollama : remove quantization sanity check (#17788)
Daniel Bevenius [Sat, 6 Dec 2025 11:26:20 +0000 (12:26 +0100)]
llama : remove quantization sanity check (#17788)

* llama : remove quantization sanity check

This commit removes the quantization sanity check for attention layers.

The motivation for this is that there are model that are hybrid models
that have recurrent layers, experts layers, and attention layers.  For
these models the current check fails as the experts layers are not
taking into account. After consideration, it was decided that this check
is not strictly necessary, and can be removed to allow for more flexible
model architectures.

* llama : remove unused pruned_attention_w and is_clip_model vars

7 weeks agovulkan: Use one row per workgroup for f32 mmv (#17711)
Jeff Bolz [Sat, 6 Dec 2025 10:12:26 +0000 (04:12 -0600)]
vulkan: Use one row per workgroup for f32 mmv (#17711)

The MoE models have a mul_mat_vec with very small m (32, 64, 128) right before
the topk_moe selection. Running multiple rows per wg doesn't utilize the SMs
well. I think even for larger m, f32 is so bandwidth-limited that running
multiple rows doesn't help.

7 weeks agoconvert: support Mistral 3 Large MoE (#17730)
Xuan-Son Nguyen [Sat, 6 Dec 2025 09:49:33 +0000 (10:49 +0100)]
convert: support Mistral 3 Large MoE (#17730)

* convert: support Mistral 3 Large MoE

* filter out vision tensors, add missing keys

* handle vocab

* add temperature_length

* fix mscale_all_dim

* clean up

* Apply suggestions from code review

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

* Update gguf-py/gguf/tensor_mapping.py

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

Co-authored-by: Sigbjørn Skjæret <redacted>
7 weeks agovulkan: support solve_tri with larger N/K values (#17781)
Jeff Bolz [Sat, 6 Dec 2025 07:56:45 +0000 (01:56 -0600)]
vulkan: support solve_tri with larger N/K values (#17781)

Split N into chunks to fit into shared memory.
If K > 128, use a larger workgroup with enough invocations.
Add perf tests matching qwen3next.

7 weeks agocontrib : stale PRs (#17803)
Georgi Gerganov [Sat, 6 Dec 2025 07:34:18 +0000 (09:34 +0200)]
contrib : stale PRs (#17803)

7 weeks agometal : fix build(#17799)
Georgi Gerganov [Sat, 6 Dec 2025 07:33:59 +0000 (09:33 +0200)]
metal : fix build(#17799)

* metal : fix build

* tests : fix context destruction

7 weeks agovulkan: Replace deprecated VK_EXT_validation_features (#17637)
Masato Nakasaka [Sat, 6 Dec 2025 05:39:42 +0000 (14:39 +0900)]
vulkan: Replace deprecated VK_EXT_validation_features (#17637)

* replaced deprecated VK_EXT_validation_features

* forgot to remove old code

7 weeks agovulkan: Fix mismatch in TOPK_MOE unit test (#17541)
Masato Nakasaka [Sat, 6 Dec 2025 05:23:30 +0000 (14:23 +0900)]
vulkan: Fix mismatch in TOPK_MOE unit test (#17541)

* Fix shader to support 2D workgroup mapping to a single subgroup

* Set required_subgroup_size

topk_moe shader requires static WARP_SIZE and actual subgroup size to match

7 weeks agovulkan: add more num_blocks instantiations in rms_norm (#17701)
Jeff Bolz [Fri, 5 Dec 2025 21:08:56 +0000 (15:08 -0600)]
vulkan: add more num_blocks instantiations in rms_norm (#17701)

7 weeks agovulkan: fix top_k bug when there are ties in the input (#17659)
Jeff Bolz [Fri, 5 Dec 2025 21:03:19 +0000 (15:03 -0600)]
vulkan: fix top_k bug when there are ties in the input (#17659)

* vulkan: Reduce temporary memory usage for TOP_K

- Compute row size for the temp buffer based on the output of the first pass.
- Update shader addressing math to use the output row size
- Pass the output row size as "ncols_output", what used to be "ncols_output" is now "k"

For the common case of K=40 and src0=(200000,1,1,1), this reduces the temporary buffer
from about 3.2MB to 500KB.

* vulkan: fix top_k bug when there are ties in the input

I noticed by inspection a bug in the vulkan top_k shader where if the least
value in the top_k appears multiple times we could end up writing those extra
copies out rather than some larger values (if the larger values are on higher
numbered threads).

I rewrote the test verification to handle this case, where the final index set
is not necessarily the same.

* Update tests/test-backend-ops.cpp

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

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agovulkan : support conv-2d with large output size (#17685)
Acly [Fri, 5 Dec 2025 20:46:39 +0000 (21:46 +0100)]
vulkan : support conv-2d with large output size (#17685)

7 weeks agoggml webgpu: unary op suppport, code refactoring, ops support (#17764)
Reese Levine [Fri, 5 Dec 2025 20:25:51 +0000 (12:25 -0800)]
ggml webgpu: unary op suppport, code refactoring, ops support (#17764)

* Squashed commit of the following:

commit b3c6bf4b0450d8d452b934df27a0fb7cb53cd755
Author: Abhijit Ramesh <redacted>
Date:   Mon Dec 1 18:29:00 2025 -0800

    ggml webgpu: fix xielu parameter passing (#11)

    The XIELU operation was incorrectly using static_cast to convert
    float parameters to uint32_t, which converted numeric values instead
    of preserving IEEE 754 bit patterns. This caused incorrect values
    to be interpreted by the GPU shader.

    * Use reinterpret_cast to preserve float bit patterns when passing
      through uint32_t params buffer
    * Update WGSL shader parameter types from u32 to f32
    * Re-enable XIELU support (was disabled due to numerical issues)

    Fixes NMSE test failures for XIELU operation on WebGPU backend.

commit 5ca9b5e49ea7cddc9ab7c8b43a11a9c76a4dff4a
Author: neha-ha <redacted>
Date:   Tue Nov 18 12:17:00 2025 -0800

    Refactored pipelines and workgroup calculations (#10)

    * refactored pipelines

    * refactored workgroup calculation

    * removed commented out block of prior maps

    * Clean up ceiling division pattern

    ---------

Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Reese Levine <redacted>
Author: James Contini <redacted>
Date:   Wed Oct 29 23:13:06 2025 -0700

    formatted embed wgsl and ggml-webgpu.cpp

commit e1f6baea31645e5d96ad53664acae856f74b96f4
Author: James Contini <redacted>
Date:   Wed Oct 29 23:08:37 2025 -0700

    implemented REPL_Template support and removed bug in unary operators kernel

commit 8c70b8fece445cdc9a8c660dbddbf201e52da2bb
Author: James Contini <redacted>
Date:   Wed Oct 15 16:14:20 2025 -0700

    responded and dealt with PR comments

commit f9282c660c10dec4487d434549bdb707a9cd9f37
Author: James Contini <redacted>
Date:   Sun Oct 12 13:41:41 2025 -0700

    removed unnecesarry checking if node->src[1] exists for unary operators

commit 4cf28d7dec41c29186d66152735b244c5699f9dc
Author: James Contini <redacted>
Date:   Sun Oct 12 13:32:45 2025 -0700

    All operators (inlcluding xielu) working

commit 74c6add1761a59d2c2ff60b60e8ad3c8300f6d3e
Author: James Contini <redacted>
Date:   Fri Oct 10 13:16:48 2025 -0700

    fixed autoconfig

commit 362749910be4f0120c8ffb21ceddeb7d2c088e51
Author: James Contini <redacted>
Date:   Fri Oct 10 13:10:46 2025 -0700

    removed vestigial files

commit cb0858333785757804c5104e59c4981843207c16
Author: James Contini <redacted>
Date:   Fri Oct 10 12:59:32 2025 -0700

    abides by editor-config

commit 5360e2852a4b51197d7d67d0a5d42e908b02d7ed
Author: James Contini <redacted>
Date:   Fri Oct 10 12:45:57 2025 -0700

    rms_norm double declaration bug atoned

commit 7b09baa4aa53711be5a126043670cc182c78bfcd
Merge: 8a6ec843 74b8fc17
Author: James Contini <redacted>
Date:   Fri Oct 10 11:50:03 2025 -0700

    resolving merge conflicts

commit 8a6ec843a50ab82f8cef59b4558eb63f318ba02d
Author: James Contini <redacted>
Date:   Wed Oct 8 18:06:47 2025 -0700

    unary operators pass ggml tests

commit c3ae38278a2db236adc5912c9140e4f0d63f2c19
Author: James Contini <redacted>
Date:   Wed Oct 1 16:22:40 2025 -0700

    neg passes backend test

commit aa1c9b2f8877a405470ca56709c42a1fd43713de
Author: James Contini <redacted>
Date:   Tue Sep 30 23:55:27 2025 -0700

    neg f16xf32xip builds and runs, havent actually ran a model that uses neg kernel yet though

Co-authored-by: James Contini <redacted>
Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Abhijit Ramesh <redacted>
* Remove extra code and format

* Add ops documentation (finally)

* Update ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py

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

Co-authored-by: James Contini <redacted>
Co-authored-by: Neha Abbas <redacted>
Co-authored-by: Abhijit Ramesh <redacted>
Co-authored-by: Sigbjørn Skjæret <redacted>
7 weeks agovulkan: enable mmvq for q2_k on NVIDIA (#17675)
Jeff Bolz [Fri, 5 Dec 2025 20:21:57 +0000 (14:21 -0600)]
vulkan: enable mmvq for q2_k on NVIDIA (#17675)

7 weeks agovulkan: set all memory allocations to high priority (#17624)
Jeff Bolz [Fri, 5 Dec 2025 20:21:04 +0000 (14:21 -0600)]
vulkan: set all memory allocations to high priority (#17624)

* vulkan: set all memory allocations to high priority

* gate by env var

7 weeks agorpc : fix alloc size logic (#17116)
Georgi Gerganov [Fri, 5 Dec 2025 17:39:04 +0000 (19:39 +0200)]
rpc : fix alloc size logic (#17116)

* rpc : fix alloc size logic

* rpc : bump version

7 weeks agometal : add residency sets keep-alive heartbeat (#17766)
Georgi Gerganov [Fri, 5 Dec 2025 17:38:54 +0000 (19:38 +0200)]
metal : add residency sets keep-alive heartbeat (#17766)

* examples : add idle

* metal : attach residency sets to queue

* idle : add link

* idle : adjust intervals

* metal : add residency sets keep-alive heartbeat

* cont : adjust default keep-alive time

7 weeks agoHIP : fix RDNA4 build (#17792)
Johannes Gäßler [Fri, 5 Dec 2025 12:47:52 +0000 (13:47 +0100)]
HIP : fix RDNA4 build (#17792)

7 weeks agofix: prevent segfault in tokenizer on highly repetitive input (#17786)
Pascal [Fri, 5 Dec 2025 11:52:23 +0000 (12:52 +0100)]
fix: prevent segfault in tokenizer on highly repetitive input (#17786)

Add nosubs|optimize flags to std::regex constructors to prevent
catastrophic backtracking when processing prompts with repeated
identical characters (e.g., 'A' * 10000).

The nosubs flag disables subgroup capture, significantly reducing
memory usage and backtracking on uniform token sequences

7 weeks agoci : fix winget workflow (#17790)
Adrien Gallouët [Fri, 5 Dec 2025 11:44:17 +0000 (12:44 +0100)]
ci : fix winget workflow (#17790)

7 weeks agoQ4/Q8 Tiled Gemm Optimization. (#16999)
shalinib-ibm [Fri, 5 Dec 2025 11:41:51 +0000 (17:11 +0530)]
Q4/Q8 Tiled Gemm Optimization. (#16999)

7 weeks agoAdd pwilkin to CODEOWNERS for chat files (#17789)
Piotr Wilkin (ilintar) [Fri, 5 Dec 2025 11:00:57 +0000 (12:00 +0100)]
Add pwilkin to CODEOWNERS for chat files (#17789)

* Add pwilkin to CODEOWNERS for chat files

* Reorder alphabetically

7 weeks agoCUDA: fix FA VKQ accumulator overflow (#17746)
Johannes Gäßler [Fri, 5 Dec 2025 08:18:10 +0000 (09:18 +0100)]
CUDA: fix FA VKQ accumulator overflow (#17746)

7 weeks agoHIP: enable WMMA-MMQ INT kernels for RDNA 3 (#17576)
Jiacheng (Jason) Chen [Fri, 5 Dec 2025 08:17:37 +0000 (03:17 -0500)]
HIP: enable WMMA-MMQ INT kernels for RDNA 3 (#17576)

* enabled wmma instructions for most quantizations other than q2k

* fixed the last q2_k test case failure

* address comments: fix out of bound write for RDNA4, add comments after #endif

* clean up rebase: fix ne error in half2

* fix the EditorConfig CI

7 weeks agoci : transform release binary root dir in tar to llama-bXXXX (#17773)
Sigbjørn Skjæret [Fri, 5 Dec 2025 00:50:19 +0000 (01:50 +0100)]
ci : transform release binary root dir in tar to llama-bXXXX (#17773)

* transform release binary root dir in tar to llama-bXXXX

* bsdtar supports -s instead of --transform

7 weeks agodocs : update ops.md (Metal, BLAS) (#17768)
Gabe Goodhart [Thu, 4 Dec 2025 23:55:34 +0000 (16:55 -0700)]
docs : update ops.md (Metal, BLAS) (#17768)

* docs: Regen Metal.csv

Branch: UpdateOpsMd

Signed-off-by: Gabe Goodhart <redacted>
* docs: Regen BLAS.csv

Branch: UpdateOpsMd

Signed-off-by: Gabe Goodhart <redacted>
* docs: Update ops.md

Branch: UpdateOpsMd

Signed-off-by: Gabe Goodhart <redacted>
---------

Signed-off-by: Gabe Goodhart <redacted>
7 weeks agoAdd support for CUMSUM and TRI for CUDA. (#17584)
Piotr Wilkin (ilintar) [Thu, 4 Dec 2025 21:19:51 +0000 (22:19 +0100)]
Add support for CUMSUM and TRI for CUDA. (#17584)

* Add support for CUMSUM and TRI for CUDA.

* Minor optimizations.

* Correct warp_prefix_inclusive_sum in float2 variant to return float2

* Optimize TRI

* Whitespace

* Fix strides.

* Implement double loop

* Whitespace

* Fix HIP compilation bugs

* Optimizations + big case performance tests

* Implement using CUB with fallback to custom kernel

* Remove error message.

* Fixes from code review

* Comment out CPU-unsupported F16/BF16 cases to fix CI

* Fine, you win :P

* Fix last cast, use NO_DEVICE_CODE and GGML_UNUSED_VARS

* Vary warp-size based on physical warp size

* Add GGML_UNUSED_VARS in tri as well

* Use constexpr and call prefix_inclusive with warp_size template param

* Update ggml/src/ggml-cuda/cumsum.cu

Co-authored-by: Johannes Gäßler <redacted>
* Apply suggestions from code review

Co-authored-by: Johannes Gäßler <redacted>
* Change to tid % warp_size

* Fix strides; hardcode mask; add ggml_lane_mask_t

* Missing renames, remove unused get_warp_mask(), explicit calls to ggml_cuda_info()

* Too hasty...

---------

Co-authored-by: Johannes Gäßler <redacted>
7 weeks agometal: TRI, FILL, EXPM1, SOFTPLUS (#16623)
Gabe Goodhart [Thu, 4 Dec 2025 17:12:19 +0000 (10:12 -0700)]
metal: TRI, FILL, EXPM1, SOFTPLUS (#16623)

* feat(wip): Port initial TRI impl from pervious work

The kernel does not work and is not optimized, but the
code compiles and runs, so this will be the starting point
now that the core op has been merged.

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* fix: Remove argument for constant val override

This was added in the original draft, but later removed. With this, the
kernel now passes tests.

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* feat: Move the ttype conditional to templating to avoid conditional in kernel

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* fix: Type fixes

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Georgi Gerganov <redacted>
* feat: Add softplus for metal

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* feat: Add EXPM1 for metal

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* feat: Add FILL for metal

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* refactor: Branchless version of tri using _ggml_vec_tri_cmp as a mask

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* fix: Remove unused arguments

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* refactor: Use select instead of branch for softplus non-vec

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
---------

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
7 weeks agoserver: strip content-length header on proxy (#17734)
Xuan-Son Nguyen [Thu, 4 Dec 2025 15:32:57 +0000 (16:32 +0100)]
server: strip content-length header on proxy (#17734)

7 weeks agoserver: move msg diffs tracking to HTTP thread (#17740)
Xuan-Son Nguyen [Thu, 4 Dec 2025 14:46:08 +0000 (15:46 +0100)]
server: move msg diffs tracking to HTTP thread  (#17740)

* server: move msg diffs tracking to HTTP thread

* wip

* tool call tests ok

* minor : style

* cont : fix

* move states to server_response_reader

* add safe-guard

* fix

* fix 2

---------

Co-authored-by: Georgi Gerganov <redacted>
7 weeks agoexamples : add missing code block end marker [no ci] (#17756)
Daniel Bevenius [Thu, 4 Dec 2025 13:17:30 +0000 (14:17 +0100)]
examples : add missing code block end marker [no ci] (#17756)

This commit adds the missing code block end marker in simple-cmake-pkg
to correct the formatting.

7 weeks agocommon : skip model validation when --help is requested (#17755)
Daniel Bevenius [Thu, 4 Dec 2025 12:36:50 +0000 (13:36 +0100)]
common : skip model validation when --help is requested (#17755)

This commit skips the model validation check when the user specifies the
--help option.

The motivation for this is that currently and error is thrown before the
--help could be processed. Now skips validation if params.usage is set,
allowing help to display without requiring --model.

Resolves: https://github.com/ggml-org/llama.cpp/issues/17754

7 weeks agoggml-cpu : remove asserts always evaluating to false (#17728)
Alberto Cabrera Pérez [Thu, 4 Dec 2025 12:16:38 +0000 (12:16 +0000)]
ggml-cpu : remove asserts always evaluating to false (#17728)

7 weeks agoconvert: use existing local chat_template if mistral-format model has one. (#17749)
SmartestWashingMachine [Thu, 4 Dec 2025 11:12:45 +0000 (22:12 +1100)]
convert: use existing local chat_template if mistral-format model has one. (#17749)

* conversion: use existing local chat_template.jinja file if mistral-format model has one.

* fix --mistral-format mistakenly assuming some <=v7 chat template names are file paths and reading them.

* Update convert_hf_to_gguf.py - change from exists() to is_file()

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

Co-authored-by: Sigbjørn Skjæret <redacted>
7 weeks agocmake : simplify build info detection using standard variables (#17423)
Adrien Gallouët [Thu, 4 Dec 2025 10:42:13 +0000 (11:42 +0100)]
cmake : simplify build info detection using standard variables (#17423)

The current approach has several drawbacks. Mostly, when
cross-compiling, invoking the compiler binary directly to query the
machine hardware can behave unexpectedly depending on the toolchain
wrapper (using COMPILER_TARGET, CFLAGS, etc).

As CMake is the official tool to build llama.cpp, I propose to only rely
on it to get those variables (`CMAKE_SYSTEM_NAME` and
`CMAKE_SYSTEM_PROCESSOR`).

Signed-off-by: Adrien Gallouët <redacted>
7 weeks agoci : disable ggml-ci-x64-amd-* (#17753)
Sigbjørn Skjæret [Thu, 4 Dec 2025 10:25:08 +0000 (11:25 +0100)]
ci : disable ggml-ci-x64-amd-* (#17753)

7 weeks agocommon: use native MultiByteToWideChar (#17738)
Adrien Gallouët [Thu, 4 Dec 2025 10:06:49 +0000 (11:06 +0100)]
common: use native MultiByteToWideChar (#17738)

`std::codecvt_utf8<wchar_t>` is deprecated and produces warnings:

    common/common.cpp:792:31: warning: 'codecvt_utf8<wchar_t>' is deprecated [-Wdeprecated-declarations]
      792 |     std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
          |

Signed-off-by: Adrien Gallouët <redacted>
7 weeks agometal : use params per pipeline instance (#17739)
Georgi Gerganov [Thu, 4 Dec 2025 08:34:11 +0000 (10:34 +0200)]
metal : use params per pipeline instance (#17739)

7 weeks agollama : fix sanity checks during quantization (#17721)
Georgi Gerganov [Thu, 4 Dec 2025 08:33:42 +0000 (10:33 +0200)]
llama : fix sanity checks during quantization (#17721)

7 weeks agobuild : move _WIN32_WINNT definition to headers (#17736)
Adrien Gallouët [Thu, 4 Dec 2025 06:04:02 +0000 (07:04 +0100)]
build : move _WIN32_WINNT definition to headers (#17736)

Previously, cmake was forcing `_WIN32_WINNT=0x0A00` for MinGW builds,
This caused "macro redefined" warnings with toolchains that define the version.

This also removes the `GGML_WIN_VER` variable as it is no longer needed.

Signed-off-by: Adrien Gallouët <redacted>
7 weeks agobuild: enable parallel builds in msbuild using MTT (#17708)
Jeff Bolz [Thu, 4 Dec 2025 04:42:29 +0000 (22:42 -0600)]
build: enable parallel builds in msbuild using MTT (#17708)

* build: enable parallel builds in msbuild using MTT

* check LLAMA_STANDALONE

7 weeks agoggml-cpu: remove duplicate conditional check 'iid' (#17650)
Herman Semenoff [Wed, 3 Dec 2025 21:03:19 +0000 (00:03 +0300)]
ggml-cpu: remove duplicate conditional check 'iid' (#17650)

7 weeks agoAdd a couple of file types to the text section (#17670)
Piotr Wilkin (ilintar) [Wed, 3 Dec 2025 20:45:06 +0000 (21:45 +0100)]
Add a couple of file types to the text section (#17670)

* Add a couple of file types to the text section

* Format + regenerate index

* Rebuild after rebase

7 weeks agoconvert : support latest mistral-common (fix conversion with --mistral-format) (...
SmartestWashingMachine [Wed, 3 Dec 2025 20:15:04 +0000 (07:15 +1100)]
convert : support latest mistral-common (fix conversion with --mistral-format) (#17712)

* fix convert_hf_to_gguf.py failing with --mistral-format using later mistral-common versions.

* use get_one_valid_tokenizer_file from mistral-common if available and fallback to old logic otherwise.

* use file name instead of file path for get_one_valid_tokenizer_file.

* fix --mistral-format tokenizer file failing for tokenizers in subdirectories.

* move get_one_valid_tokenizer_file import to avoid nested try-except.

7 weeks agoUse OpenAI-compatible `/v1/models` endpoint by default (#17689)
Aleksander Grygier [Wed, 3 Dec 2025 19:49:09 +0000 (20:49 +0100)]
Use OpenAI-compatible `/v1/models` endpoint by default (#17689)

* refactor: Data fetching via stores

* chore: update webui build output

* refactor: Use OpenAI compat `/v1/models` endpoint by default to list models

* chore: update webui build output

* chore: update webui build output

7 weeks agowebui: Fix zero pasteLongTextToFileLen to disable conversion being overridden (#17445)
Andika Wasisto [Wed, 3 Dec 2025 19:45:17 +0000 (02:45 +0700)]
webui: Fix zero pasteLongTextToFileLen to disable conversion being overridden (#17445)

* webui: Fix zero pasteLongTextToFileLen to disable conversion being overridden

Zero pasteLongTextToFileLen should disable the conversion, but it was
overwritten with 2500.

* Apply suggestions from code review

* Update webui build

7 weeks agoCUDA: generalized (mma) FA, add Volta support (#17505)
Johannes Gäßler [Wed, 3 Dec 2025 15:57:05 +0000 (16:57 +0100)]
CUDA: generalized (mma) FA, add Volta support (#17505)

* CUDA: generalized (mma) FA, add Volta support

* use struct for MMA FA kernel config

---------

Co-authored-by: Aman Gupta <aman>
7 weeks agochat : reserve memory in compute_diffs and improve naming (#17729)
Georgi Gerganov [Wed, 3 Dec 2025 15:22:10 +0000 (17:22 +0200)]
chat : reserve memory in compute_diffs and improve naming (#17729)