]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/log
pkg/ggml/sources/llama.cpp
3 weeks agoFix ARM flags
Mathieu Baudier [Mon, 29 Dec 2025 10:23:25 +0000 (11:23 +0100)]
Fix ARM flags

3 weeks agoOptimize ARM build
Mathieu Baudier [Mon, 29 Dec 2025 10:17:51 +0000 (11:17 +0100)]
Optimize ARM build

4 weeks agoUpdate upstream
Mathieu Baudier [Sat, 27 Dec 2025 11:02:13 +0000 (12:02 +0100)]
Update upstream

4 weeks agoMerge tag 'upstream/0.0.7446' into debian/latest
Mathieu Baudier [Sat, 27 Dec 2025 11:00:44 +0000 (12:00 +0100)]
Merge tag 'upstream/0.0.7446' into debian/latest

Upstream release

5 weeks agollama.android : Rewrite Android binding (w/o cpu_features dep) (#17413) upstream/0.0.7446
Naco Siren [Wed, 17 Dec 2025 08:14:47 +0000 (00:14 -0800)]
llama.android : Rewrite Android binding (w/o cpu_features dep) (#17413)

* UI: implement basic UI components

* util: implement performance monitor; wrap it with a viewmodel

* util: implement user preferences utility

* UI: implement core flow's screens

* UI: add a new MainActivity; update manifest

* [WIP] DI: implement simple local vm factory provider

* UI: disable triggering drawer via gesture; enable alert dialog on back navigation inside conversation and benchmark

* UI: allow drawer's gesture control only on Home and Settings screens; enable alert dialog on back navigation inside conversation and benchmark

* UI: split a nested parent settings screen into separate child settings screens

* UI: polish system prompt setup UI

* Deps: bump Kotlin plugin; introduce KSP; apply in :app subproject

* DB: setup Room database

* data: introduce repo for System Prompt; flow data from Room to VM

* bugfix: properly handle user's quitting conversation screen while tokens in generation

* UI: rename `ModeSelection` to `ModelLoading` for better clarity

* UI: update app name to be more Arm

* UI: polish conversation screen

* data: code polish

* UI: code polish

* bugfix: handle user quitting on model loading

* UI: locks user in alert dialog when model is unloading

* vm: replace token metrics stubs with actual implementation

* UI: refactor top app bars

* nit: combine temperatureMetrics and useFahrenheit

* DI: introduce Hilt plugin + processor + lib dependencies

* DI: make app Hilt injectable

* DI: make viewmodels Hilt injectable

* DI: replace manual DI with Hilt DI

* UI: optimize AppContent's composing

* bugfix: wait for model to load before navigating to benchmark screen; use NavigationActions instead of raw navController

* UI: navigation with more natural animated transitions

* DI: Optimize AppModule

* Feature: Introduce ModelRepository and ModelsManagementViewModel; update AppModule

* UI: polish UI for ModelsManagementScreen; inject ModelsManagementVieModel

* DI: abstract the protocol of SystemPromptRepository; update AppModule

* data: [WIP] prepare for ModelRepository refactor & impl

* data: introduce Model entity and DAO; update DI module

* UI: replace Models Management screen's stubbing with instrumentation

* UI: polish sort order menu

* data: import local model with file picker

* bugfix: use List instead of Collection for ModelDao's deletion

* data: add a util file for extracting file name & size and model metadata

* UI: enrich ModelManagementState; extract filename to show correct importing UI

* UI: implement multiple models deletion; update Models Management screen

* UI: handle back navigation when user is in multi-selection mode

* util: extract file size formatting into ModelUtils

* UI: add a confirmation step when user picks a file; refactor model import overlay into AlertDialog

* UI: extract a shared ModelCard component

* UI: replace model selection screen's data stubbing; add empty view

* nit: tidy SystemPromptViewModel

* Util: split FileUtils from ModelUtils; extract copy methods into FileUtils

* data: pass through getModelById from ModelDao into ModelRepository

* core: extract conversation and benchmark logics into InferenceManager; add logs and missing state updates in stub InferenceEngine

* vm: split mono MainViewModel into separate individual ViewModels

* vm: merge SystemPromptViewModel into ModelLoadingViewModel

* core: break down InferenceManager due to Interface Segregation Principle

* UI: show model card in Model Loading screen

* UI: show model card in Conversation screen

* UI: unify Model Card components

* core: swap in LLamaAndroid and mark stub engine for testing only

* data: allow canceling the ongoing model import

* UI: update UI ongoing model import's cancellation

* LLama: update engine state after handling the cancellation of sendUserPrompt

* VM: handle the cancellation of ongoing token generation

* LLama: refactor loadModel by splitting the system prompt setting into a separate method

* feature: check for available space before copying local model

* UI: centralize the AppScaffold and modularize its configs

* UI: refactor BottomBarConfig.ModelsManagement APIs

* UI: combine TopBarConfig and BottomBarConfig into each route's ScaffoldConfig

* UI: replace ugly optional as casts in AppScaffold with extension functions

* UI: fix the typo `totalGb` in `StorageMetrics`

* UI: remove code duplication in sort menu

* LLama: add ModelUnloadingState to engine State; add missing state checks in stub engine; fix instrumentation engine's error messages

* UI: refactor back handling by removing centralized BackHandlerSetup and UnloadModelConfirmationDialog from AppContent

* UI: implement BenchmarkScreen's individual back handling

* LLama: add a new Initializing state; ; add two extension properties; rename LibraryLoaded state to Initialized

* UI: Introduce an abstract ViewModel to handle additional model unloading logics

* UI: expose a single facade ModelUnloadDialogHandler; move UnloadModelState into ModelUnloadingViewModel.kt

* UI: migrate ModelLoadingScreen onto ModelLoadingViewModel; update & refine ModelLoadingScreen

* UI: migrate ConversationViewModel onto ModelLoadingViewModel; update & refine ConversationScreen

* nit: extract app name into a constant value; remove unused onBackPressed callbacks

* UI: update AppContent to pass in correct navigation callbacks

* nit: polish ModelLoadingScreen UI

* core: throw Exception instead of returning null if model fails to load

* navigation: sink model loading state management from AppContent down into ModelLoadingScreen; pass ModelLoadingMetrics to Benchmark and Conversation screens

* gguf: add GGUF metadata data holder and its corresponding extractor implementation

* DB: introduce Kotlin serialization extension's library and plugin; add Room runtime library

* GGUF: make GgufMetadata serializable in order to be compatible with Room

* nit: refactor data.local package structure

* nit: rename lastUsed field to dateLastUsed; add dateAdded field

* UI: refactor ModelCard UI to show GGUF metadata

* UI: update ModelSelectionScreen with a preselect mechanism

* UI: polish model card

* nit: allow deselect model on Model Selection screen

* nit: revert accidental committing of debug code

* UI: polish ModelLoading screen

* util: extract formatting helper functions from FileUtils into a new FormatUtils

* UI: polish model cards on Benchmark and Conversation screens to show model loading metrics

* UI: show a Snack bar to warn user that system prompt is not always supported

* UI: handle back press on Model Selection screen

* UI: finally support theme modes; remove hardcoded color schemes, default to dynamic color scheme implementation

* feature: support searching on Model Selection screen

* nit: move scaffold related UI components into a separate package

* UI: extract InfoView out into a separate file for reusability

* data: move Model related actions (query, filter, sort) into ModelInfo file

* UI: animate FAB on model preselection states

* feature: support filtering in Model Management screen

* ui: show empty models info in Model Management screen

* ui: add filter off icon to "Clear filters" menu item

* [WIP] ui: polish Benchmark screen; implement its bottom app bar

* ui: polish Benchmark screen; implement its bottom app bar's rerun and share

* nit: disable mode selection's radio buttons when loading model

* feature: implement Conversation screen's bottom app bar

* pkg: restructure BottomAppBars into separate files in a child package

* pkg: restructure TopBarApps into separate files in a child package

* pkg: restructure system metrics into a separate file

* UI: polish Conversation screen

* data: update system prompt presets

* UI: allow hide or show model card on Conversation & Benchmark screens; fix message arrangement

* data: update & enhance system prompt presets

* deps: introduce Retrofit2

* data: implement HuggingFace data model, data source with Retrofit API

* data: update Model data repository to support fetching HuggingFace models

* [WIP] UI: replace the HuggingFace stub in Model Management screen with actual API call

* UI: map language codes into country Emojis

* ui: add "clear results" action to Benchmark screen

* nit: print current pp & tg in llama-bench

* UI: disable landscape mode; prevent duplicated benchmark running

* llama: migrate C/CXX flags into CMakeList

* [WIP] llama: ABI split builds five .so artifacts.

However, all .so are performing on SVE level

* [WIP] llama: ABI split where five tiers are built sequentially.

* [WIP] llama: disable OpenMP in ABI split since most SoCs are big.LITTLE

* [WIP] llama: enable KleidiAI and disable tier 4 due to `+sve+sve2` bug caused by `ggml_add_cpu_backend_variant_impl` as explained below

```CMake
if (NOT SME_ENABLED MATCHES -1)
...
    set(PRIVATE_ARCH_FLAGS "-fno-tree-vectorize;${PRIVATE_ARCH_FLAGS}+sve+sve2")
...
```

* core: add Google's cpu_features as a submodule

* core: implement cpu_detector native lib

* core: swap out hardcoded LlamaAndroid library loading

* core: add back OpenMP due to huge perf loss on TG128

* misc: reorg the pkg structure

* misc: rename LlamaAndroid related class to InferenceEngine prefixes

* [WIP] lib: move GgufMetadata into the lib submodule

* lib: expose GgufMetadataReader as interface only

* lib: replace the naive & plain SharedPreferences with DataStore implementation

* lib: hide the internal implementations, only expose a facade and interfaces

* lib: expose Arm features

* di: add a stub TierDetection; provide both actual impl and stub in AppModule

* UI: add visualizer UI for Arm features

* misc: UI polish

* lib: refactored InferenceEngineLoader; added a `NONE` Llama Tier

* UI: support `NONE` Llama Tier in general settings

* lib: optimize engine loader; always perform a fresh detection when cache is null

* remote: add HuggingFaceModelDetails data class

* remote: refine HuggingFaceModel data class

* nit: remove `trendingScore` field from HuggingFace model entities, weird...

* remote: refactor HuggingFaceApiService; implement download feature in HuggingFaceRemoteDataSource

* remote: fix the incorrect parse of HuggingFace's inconsistent & weird JSON response

* UI: scaffold Models Management screen and view model

* UI: implement a dialog UI to show fetched HuggingFace models.

* UI: use a broadcast receiver to listen for download complete events and show local import dialog.

* data: handle network exceptions elegantly

* pkg: restructure `data`'s packages

* data: extract local file info, copy and cleanup logics into LocalFileDataSource

* nit: minor UI patch; add missing comments

* bugfix: tapping "Home" in navigation drawer should simply close it without any navigation action.

* UI: improve autoscroll during token generation

* lib: tested on JFrog Artifactory for Maven publishing

* UI: show RAM warning if model too large

* UI: polish model management screen's error dialog

* util: add more items into the mapping table of ISO 639-1 language code to ISO 3166-1 country code

* llm: properly propagate error to UI upon failing to load selected model

* UI: avoid duplicated calculation of token metrics

* lib: read & validate the magic number from the picked source file before executing the import

* UI: add "Learn More" hyperlinks to Error dialog upon model import failures

* lib: refactor the GgufMetadataReader to take  InputStream instead of absolute path as argument

* lib: fix the `SIMD` typo in Tier description

* core: verify model file path is readable

* lib: add UnsupportedArchitectureException for triaged error message

* util: split FormatUtils into multiple utils for better readability

* UI: change benchmark screen from raw markdown to table view

* bugfix: reset preselection upon running the preselected model

* misc: linter issue

* bugfix: fix the malfunctioning monitoring switch

* UI: update Arm features indicator; fix the broken hyperlinks

* UI: add quick action buttons to benchmark screen's result card

* UI: hide share fab after clearing all benchmark results

* UI: fix the model unload dialog message; elevate the model card and hide it by default on Conversation screen;

* UI: hide the stubbing actions in Conversation screen

* UI: add show/hide stats control to conversation screen's assistant message bubble; fix placeholder

* UI: add a info button to explain token metrics

* misc: remove the redundant `Companion` added due to refactoring

* UI: show corresponding system metrics detailed info upon tapping RAM / storage / temperature indicator

* UI: add info button to System Prompt switch; expand the model card by default

* UI: disable tag & language chips; add section headers to explain what they are

* misc: replace top bar indicator's spacer with padding

* UI: merge the Model Selection and Model Management into a unified Models screen

* UI: split the ModelsManagementViewModel from a unified ModelsViewModel due to huge complexity

* UI: add model loading in progress view; polish the empty model info view

* UI: polish the bottom bars and info view when no models found; show loading in progress while fetching models

* build: [BREAKING] bump the versions of libraries and plugins

* UI: fix the breaking build

* UI: add Tooltip on Import FAB for user onboarding

* UI: adds AppPreferences to track user onboarding status

* UI: tracks user's first success on importing a model

* data: add hand crafted rules to filter the models fetched from HuggingFace API

* UI: update app name & about; polish top bars' indicators & buttons

* UI: polish Hugging Face download dialog UI

* UX: implement onboarding tooltips for model import and onboarding

* misc: use sentence case for CTA button labels

* [WIP] UI: add Arm color palette from Philip.Watson3

* UI: address Rojin's UX feedbacks

* UI: address Rojin's UX feedbacks - part 2

* UI: update Arm color palette from Philip.Watson3

* data: make sure fetch preselected models in the same order of their IDs

* UI: fix UI issues in the generic settings screen and navigation drawer

* nit: address Rojin's feedbacks on model import message again

* nit: append `®` to all `Arm` labels

* UI: extract a reusable InfoAlertDialog

* core: support GGML_CPU_ALL_VARIANTS on Android!

* core: restructure Kleidi-Llama library

* core: organizing cmake arguments

* data: sort preselected models according to device's available RAM

* app: update adaptive + themed + legacy icons and app name

* UI: fix the font size auto scaling for ArmFeaturesVisualizer

* core: further improve the performance on native methods

* UI: minor color palette changes; emphasize the bottom bar FABs; fix Settings Screen menu item label

* UI: make more room for assistant message bubble's width

* UI: better usage of tertiary colors to highlight model cards but not for warnings

* UI: fix the layout issue on large font sizes

* lib: support x86-64 by dynamically set Arm related definitions

* lib: replace the factory pattern for  deprecated tiered lib loading with single instance pattern

* llama: update the library name in JNI and CMake project

* llama: update the library's package name and namespace

* llama: update the app's package name and namespace

* app: bump ksp version

* app: remove deprecated SystemUIController from accompanist by migrating to EdgeToEdge

* app: extract AppContent from MainActivity to a separate file in ui package

* lib: add File version for GGUF Magic number verification

* lib: perform engine state check inclusively instead of exclusively

* lib: change `LlamaTier` to `ArmCpuTier`

* lib: remove kleidi-llama related namings

* cleanup: remove Arm AI Chat/Playground app source code; replace with the basic sample app from https://github.com/hanyin-arm/Arm-AI-Chat-Sample

Note: the full Google Play version of AI Chat app will be open will be open sourced in another repo soon, therefore didn't go through the trouble of pruning the history using `git filter-repo` here.

* [WIP] doc: update main and Android README docs; add self to code owners

* lib: revert System.load back to System.loadLibrary

* jni: introduce a logging util to filter different logging levels on different build types

* lib: enable app optimization

* doc: replace stub Google Play app URL with the actual link add screenshots; add my GitHub ID to maintainer list

* Remove cpu_features

* Fix linters issues in editorconfig-checker job

https://github.com/ggml-org/llama.cpp/actions/runs/19548770247/job/55974800633?pr=17413

* Remove unnecessary Android CMake flag

* purge include/cpu_features directory

---------

Co-authored-by: Han Yin <redacted>
5 weeks agoarg: allow -kvu flag for llama-perplexity (#18117)
TrevorS [Wed, 17 Dec 2025 06:33:02 +0000 (22:33 -0800)]
arg: allow -kvu flag for llama-perplexity (#18117)

The -kvu (--kv-unified) flag is required for hellaswag and winogrande
benchmarks which use coupled sequences. Without unified KV cache,
these benchmarks fail with:

  split_equal: sequential split is not supported when there are
  coupled sequences in the input batch (you may need to use the -kvu flag)

This change adds LLAMA_EXAMPLE_PERPLEXITY to the allowed examples for
the -kvu argument, enabling its use with llama-perplexity.

5 weeks agoggml : use WARP_SIZE/2 for argmax reduction offset (#18092)
Aadeshveer Singh [Wed, 17 Dec 2025 03:47:01 +0000 (09:17 +0530)]
ggml : use WARP_SIZE/2 for argmax reduction offset (#18092)

5 weeks agogguf-py : allow converting multi-tensor models from read-only locations (#18100)
Yuri Khrustalev [Wed, 17 Dec 2025 01:27:03 +0000 (20:27 -0500)]
gguf-py : allow converting multi-tensor models from read-only locations (#18100)

5 weeks agollama-fit-params: force disable mlock (#18103)
Johannes Gäßler [Tue, 16 Dec 2025 23:50:12 +0000 (00:50 +0100)]
llama-fit-params: force disable mlock (#18103)

5 weeks agollama-fit-params: lower ctx size for multi GPU (#18101)
Johannes Gäßler [Tue, 16 Dec 2025 23:49:34 +0000 (00:49 +0100)]
llama-fit-params: lower ctx size for multi GPU (#18101)

5 weeks agollama-fit-params: fix underflow for dense models (#18095)
Johannes Gäßler [Tue, 16 Dec 2025 23:47:37 +0000 (00:47 +0100)]
llama-fit-params: fix underflow for dense models (#18095)

5 weeks agollama-fit-params: QoL impr. for prints/errors (#18089)
Johannes Gäßler [Tue, 16 Dec 2025 23:03:19 +0000 (00:03 +0100)]
llama-fit-params: QoL impr. for prints/errors (#18089)

5 weeks agomodel: fix LFM2 missing tensors (#18105)
Xuan-Son Nguyen [Tue, 16 Dec 2025 18:07:43 +0000 (19:07 +0100)]
model: fix LFM2 missing tensors (#18105)

5 weeks agollama: fix early stop in params_fit if ctx is set (#18070)
Johannes Gäßler [Tue, 16 Dec 2025 13:24:00 +0000 (14:24 +0100)]
llama: fix early stop in params_fit if ctx is set (#18070)

5 weeks agoserver: fix crash when batch > ubatch with embeddings (#17912)
yifant-code [Tue, 16 Dec 2025 12:27:36 +0000 (07:27 -0500)]
server: fix crash when batch > ubatch with embeddings (#17912)

* server: fix crash when batch > ubatch with embeddings (#12836)

Fixes #12836 where the server crashes with GGML_ASSERT failure when
running with embeddings enabled and n_batch > n_ubatch.

Root cause: Embeddings use non-causal attention which requires all
tokens to be processed within a single ubatch. When n_batch > n_ubatch,
the server attempts to split processing, causing assertion failure.

Solution:
- Add parameter validation in main() after common_params_parse()
- When embeddings enabled and n_batch > n_ubatch:
  * Log warnings explaining the issue
  * Automatically set n_batch = n_ubatch
  * Prevent server crash

This follows the approach suggested by @ggerganov in issue #12836.

Note: This supersedes stalled PR #12940 which attempted a runtime fix
in the old examples/server/server.cpp location. This implementation
validates at startup in tools/server/server.cpp (current location).

Testing:
- Build: Compiles successfully
- Validation triggers: Warns when -b > -ub with --embedding
- Auto-correction works: Adjusts n_batch = n_ubatch
- No false positives: Valid params don't trigger warnings
- Verified on macOS M3 Pro with embedding model

* Update tools/server/server.cpp

---------

Co-authored-by: ytian218 <redacted>
Co-authored-by: Georgi Gerganov <redacted>
5 weeks agomodel-conversion : remove -fa option in model card template [no ci] (#18088)
Daniel Bevenius [Tue, 16 Dec 2025 12:25:09 +0000 (13:25 +0100)]
model-conversion : remove -fa option in model card template [no ci] (#18088)

This commit updates the causal model card template and removes the
-fa option as it is no longer required (fa is auto detected).

5 weeks agoarch: refactor LLM_TENSOR_NAMES (#18051)
Xuan-Son Nguyen [Tue, 16 Dec 2025 12:22:30 +0000 (13:22 +0100)]
arch: refactor LLM_TENSOR_NAMES (#18051)

* arch: refactor LLM_TENSOR_NAMES

* update docs

* typo

* fix LLM_ARCH_NEMOTRON_H_MOE

* show more meaningful error message on missing tensor

* fix and tested LLM_ARCH_NEMOTRON_H_MOE

5 weeks agoarg: clarify auto kvu/np being set on server (#17997)
Xuan-Son Nguyen [Tue, 16 Dec 2025 11:01:27 +0000 (12:01 +0100)]
arg: clarify auto kvu/np being set on server (#17997)

* arg: clarify auto kvu/np being set on server

* improve docs

* use invalid_argument

5 weeks agoOptimization: Qwen3 next autoregressive pass (#17996)
Piotr Wilkin (ilintar) [Tue, 16 Dec 2025 10:59:53 +0000 (11:59 +0100)]
Optimization: Qwen3 next autoregressive pass (#17996)

* It's Qwen3 Next, the lean mean token generation machine!

* Apply patches from thread

* Remove recurrent version, only keep chunked and autoregressive

* Remove unnecessary conts and asserts

* Remove more extra conts and asserts

* Cleanup masking

5 weeks agoCLI: fixed adding cli and completion into docker containers, improved docs (#18003)
Andrew Aladjev [Tue, 16 Dec 2025 10:52:23 +0000 (13:52 +0300)]
CLI: fixed adding cli and completion into docker containers, improved docs (#18003)

Co-authored-by: Andrew Aladjev <redacted>
5 weeks agoserver: Update README.md incorrect argument (#18073)
2114L3 [Tue, 16 Dec 2025 10:50:43 +0000 (20:50 +1000)]
server: Update README.md incorrect argument (#18073)

n-gpu-layer is incorrect
argument is n-gpu-layers with the 's'

5 weeks agomodel: support GLM4V vision encoder (#18042)
Xuan-Son Nguyen [Tue, 16 Dec 2025 10:25:26 +0000 (11:25 +0100)]
model: support GLM4V vision encoder (#18042)

* convert ok

* no deepstack

* less new tensors

* cgraph ok

* add mrope for text model

* faster patch merger

* add GGML_ROPE_TYPE_MRNORM

* add support for metal

* move glm4v do dedicated graph

* convert: add norm_embd

* clip: add debugging fn

* working correctly

* fix style

* use bicubic

* fix mrope metal

* improve cpu

* convert to neox ordering on conversion

* revert backend changes

* force stop if using old weight

* support moe variant

* fix conversion

* fix convert (2)

* Update tools/mtmd/clip-graph.h

Co-authored-by: Georgi Gerganov <redacted>
* process mrope_section on TextModel base class

* resolve conflict merge

---------

Co-authored-by: Georgi Gerganov <redacted>
5 weeks agomodel-conversion : add note about verifying previous models (#18082)
Daniel Bevenius [Tue, 16 Dec 2025 10:17:40 +0000 (11:17 +0100)]
model-conversion : add note about verifying previous models (#18082)

This commit adds a note to the README in the model-conversion
examples, advising developers to verify that previous versions of models
pass logits verification before adding new models from the same family.

5 weeks agomodel-conversion : use CONVERTED_EMBEDDING_MODEL for embedding_verify_logits (#18079)
Daniel Bevenius [Tue, 16 Dec 2025 10:17:20 +0000 (11:17 +0100)]
model-conversion : use CONVERTED_EMBEDDING_MODEL for embedding_verify_logits (#18079)

This commit updates the embedding model verification script to use the
CONVERTED_EMBEDDING_MODEL environment variable instead of using the
EMBEDDING_MODEL_PATH (the original embedding model path) as the basis
for the converted model file name.

The motivation for this that currently if the converted embedding model
file name differs from the original embedding model directory/name the
verification script will look for the wrong .bin files that were
generating when running the models.

5 weeks agocommon : add nemotron 3 parsing (#18077)
Aldehir Rojas [Tue, 16 Dec 2025 10:05:23 +0000 (04:05 -0600)]
common : add nemotron 3 parsing (#18077)

* common : expose json-schema functionality to extract type info

* common : fix peg parser negation during needs_more_input

* common : add some defensive measures in constructed peg parser

* common : add nemotron nano 3 support

* common : add nemotron nano 3 tests

* remove debug line

5 weeks agoadded note for old Intel hardware pre sycl (#18017)
Francisco Herrera [Tue, 16 Dec 2025 09:45:09 +0000 (04:45 -0500)]
added note for old Intel hardware pre sycl (#18017)

* added note for old Intel hardware pre sycl

Older hardware used opencl

* typo

* use consistent terms

5 weeks agosecurity : add collaborator guidance (#18081)
Georgi Gerganov [Tue, 16 Dec 2025 09:17:11 +0000 (11:17 +0200)]
security : add collaborator guidance (#18081)

5 weeks agollama: Include algorithm header needed for C++23 (#18078)
Chris Peterson [Tue, 16 Dec 2025 07:37:55 +0000 (23:37 -0800)]
llama: Include algorithm header needed for C++23 (#18078)

5 weeks agograph : reuse SSM graphs (#16490)
Georgi Gerganov [Tue, 16 Dec 2025 07:36:21 +0000 (09:36 +0200)]
graph : reuse SSM graphs (#16490)

* graph : reuse hybrid graphs

* graph : reuse recurrent graphs

* graph : fix reuse check for recurrent inputs

* memory : move the recurrent state into the memory context

* Revert "memory : move the recurrent state into the memory context"

This reverts commit 00f115fe810815d4a22a6dee0acc346131e970e1.

* cont : fix build

5 weeks agoci : separate webui from server (#18072)
Sigbjørn Skjæret [Tue, 16 Dec 2025 07:17:26 +0000 (08:17 +0100)]
ci : separate webui from server (#18072)

* separate webui from server

* add public to path

5 weeks agowebui: Improve copy to clipboard with text attachments (#17969)
Aleksander Grygier [Tue, 16 Dec 2025 06:38:46 +0000 (07:38 +0100)]
webui: Improve copy to clipboard with text attachments (#17969)

* feat: Create copy/paste user message including "pasted text" attachments

* chore: update webui build output

* chore: update webui static output

* fix: UI issues

* chore: update webui static output

* fix: Decode HTML entities using `DOMParser`

* chore: update webui build output

* chore: update webui static output

5 weeks agowebui: Add setting to always show sidebar on Desktop (#17809)
Aleksander Grygier [Tue, 16 Dec 2025 06:31:37 +0000 (07:31 +0100)]
webui: Add setting to always show sidebar on Desktop (#17809)

* feat: Add setting to always show Sidebar on Desktop

* chore: update webui build output

* feat: Add auto-show sidebar setting

* fix: Mobile settings dialog UI

* chore: update webui build output

* feat: UI label update

* chore: update webui build output

* chore: update webui build output

* chore: update webui build output

* refactor: Cleanup

* chore: update webui build output

5 weeks agollama : add support for NVIDIA Nemotron 3 Nano (#18058)
Daniel Bevenius [Tue, 16 Dec 2025 06:19:26 +0000 (07:19 +0100)]
llama : add support for NVIDIA Nemotron 3 Nano (#18058)

* llama : add support for NVIDIA Nemotron Nano 3

This commit adds support for the NVIDIA Nemotron Nano 3 model, enabling
the conversion and running of this model.

Co-authored-by: Georgi Gerganov <redacted>
5 weeks agoWebui: Disable attachment button and model selector button when prompt textbox is...
Darius Lukas [Tue, 16 Dec 2025 06:15:49 +0000 (01:15 -0500)]
Webui: Disable attachment button and model selector button when prompt textbox is disabled. (#17925)

* Pass disabled state to the file attachments button and the model
selector button.

* Update index.html.gz

* Fix model info card in non-router mode.

* Update index.html.gz

5 weeks agoconvert : move rope_parameters to TextModel class (#18061)
Sigbjørn Skjæret [Mon, 15 Dec 2025 21:03:16 +0000 (22:03 +0100)]
convert : move rope_parameters to TextModel class (#18061)

* make sure to search text_config for rope parameters

* move rope_parameters to TextModel class

5 weeks agoggml-hexagon: mm for mtmd (#17894)
Shouyu [Mon, 15 Dec 2025 18:53:56 +0000 (13:53 -0500)]
ggml-hexagon: mm for mtmd  (#17894)

* feat: add run_mtmd script for hexagon

* fix: fix issue in fp16xfp32 mm

* fix: remove opt_experiment for fp16xfp32 mm

* fix: ggml-hexagon: matmul fp16xfp32 support non-contigious src0

* fix: fix syntax check for run-mtmd.sh for cli

5 weeks agomodel : add KORMo model (#18032)
HelloKS [Mon, 15 Dec 2025 17:51:43 +0000 (02:51 +0900)]
model : add KORMo model (#18032)

* vocab: add KORMo Tokenizer

* model: add KORMoForCausalLM

* vocab: change pretokenizer to qwen2

* lint: fix unintended line removal

* model: make qwen2 bias tensor optional

* model: use qwen2 architecture for KORMo

5 weeks agokv-cache: Fix state restore fragmented cache (#17982)
ssweens [Mon, 15 Dec 2025 17:28:35 +0000 (09:28 -0800)]
kv-cache: Fix state restore fragmented cache (#17982)

* kv-cache : fix state restore with fragmented cache (#17527)

Change find_slot to allow non-contiguous allocation during state restore. Fixes 'failed to find available cells in kv cache' error when restoring state to fragmented cache.

* tests : update logic

* cleanup: tightened state_read_meta sig, added is_contiguous case

* fix: state_read_meta arg reorder loose ends

---------

Co-authored-by: Georgi Gerganov <redacted>
5 weeks agoFix unreadable user markdown colors and truncate long texts in deletion dialogs ...
Pascal [Mon, 15 Dec 2025 15:34:53 +0000 (16:34 +0100)]
Fix unreadable user markdown colors and truncate long texts in deletion dialogs (#17555)

* webui: limit conversation name length in dialogs

* webui: fix unreadable colors on links and table cell hover in user markdown

* webui: keep table borders visible in user markdown

* webui: updating unified exports

* Update tools/server/webui/src/lib/components/app/chat/ChatAttachments/ChatAttachmentThumbnailFile.svelte

Co-authored-by: Aleksander Grygier <redacted>
* chore: update webui build output

* chore: update webui build output

* chore: update webui build output

---------

Co-authored-by: Aleksander Grygier <redacted>
5 weeks agometal: use shared buffers on eGPU (#17866)
Jeremy Demeule [Mon, 15 Dec 2025 14:14:49 +0000 (15:14 +0100)]
metal: use shared buffers on eGPU (#17866)

* metal: use shared buffers on eGPU

With #15906, I noticed on important regression when using metal backend on eGPU.
This commit restore the previous behavior and add an option to force its activation.

* metal: use shared buffers on eGPU

* metal: use shared buffers on eGPU

5 weeks agomtmd: refactor audio preprocessing (#17978)
Xuan-Son Nguyen [Mon, 15 Dec 2025 13:16:52 +0000 (14:16 +0100)]
mtmd: refactor audio preprocessing (#17978)

* mtmd: refactor audio preprocessing

* refactor

Co-authored-by: Tarek <redacted>
* wip

* wip (2)

* improve constructor

* fix use_natural_log

* fix padding for short input

* clean up

* remove need_chunking

---------

Co-authored-by: Tarek <redacted>
5 weeks agocli: fixed dead links to tools/main for cli and completion, fixed code owners (#17993)
Andrew Aladjev [Mon, 15 Dec 2025 10:47:04 +0000 (13:47 +0300)]
cli: fixed dead links to tools/main for cli and completion, fixed code owners (#17993)

Co-authored-by: Andrew Aladjev <redacted>
5 weeks agowebui: add "delete all conversations" button to import/export tab (#17444)
Thomas Jarosch [Mon, 15 Dec 2025 10:29:29 +0000 (11:29 +0100)]
webui: add "delete all conversations" button to import/export tab (#17444)

* webui: add "delete all conversations" button to import/export tab

- Add 'Delete all conversations' functionality with confirmation dialog
- Add Trash icon and destructive styling for clear visual indication
- Redirects to "?new_chat=true#/" by using conversationsStore.deleteAll()

* chore: update webui build output

5 weeks agollama: automatically set parameters not set by the user in such a way that maximizes...
Johannes Gäßler [Mon, 15 Dec 2025 08:24:59 +0000 (09:24 +0100)]
llama: automatically set parameters not set by the user in such a way that maximizes GPU utilization (#16653)

* llama: automatically fit args to free memory

llama-fit-params tool

* fix CI

* hints for bug reports, ensure no reallocation

* fix segfault with Vulkan

* add llama-fit-params to CI

* fix CI

* fix CI

* fix CI

* minor adjustments

* fix assignment of 1 dense layer

* fix logger not being reset on model load failure

* remove --n-gpu-layer hint on model load failure

* fix llama-fit-params verbosity

* fix edge case

* fix typo [no ci]

5 weeks ago[SYCL] Support gpt-oss by OPs add-id, mul_mat for mxfp4, swiglu_oai (#17826)
Neo Zhang Jianyu [Mon, 15 Dec 2025 02:35:15 +0000 (10:35 +0800)]
[SYCL] Support gpt-oss by OPs add-id, mul_mat for mxfp4, swiglu_oai (#17826)

* support gpt-oss GPU by OP add-id, mul_mat for mxfp4, swiglu_oai, fix warning

* fix fault ut case, update ops.md

* rebase, fix format issue

5 weeks agomodel : add glm-asr support (#17901)
piDack [Mon, 15 Dec 2025 02:18:46 +0000 (10:18 +0800)]
model : add glm-asr support (#17901)

* [model] add glm-asr support

* fix format for ci

* fix convert format for ci

* update glm_asr convert script & use build_ffn for glm_asr clip & use build_stack for padding and review

* check root architecture for convert hf script

* fix conficlt with upstream

* fix convert script for glm asr & format clip-impl

* format

* restore hparams text

* improved conversion

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agopreset: handle negated arg, reverse the meaning if needed (#18041)
Xuan-Son Nguyen [Sun, 14 Dec 2025 21:08:10 +0000 (22:08 +0100)]
preset: handle negated arg, reverse the meaning if needed (#18041)

6 weeks agoconvert : refactor rope scaling handling (#18013)
Sigbjørn Skjæret [Sun, 14 Dec 2025 15:04:37 +0000 (16:04 +0100)]
convert : refactor rope scaling handling (#18013)

* refactor rope scaling handling

* ws--

* missed a couple

* use find_hparam

6 weeks agomtmd: enhance image resizing in llava_uhd (#18014)
Haowei Wu [Sun, 14 Dec 2025 14:57:52 +0000 (22:57 +0800)]
mtmd: enhance image resizing in llava_uhd (#18014)

6 weeks agovulkan: fix mul_mat_vec_iq1_s formatting (#18026)
Ruben Ortlam [Sun, 14 Dec 2025 13:52:46 +0000 (14:52 +0100)]
vulkan: fix mul_mat_vec_iq1_s formatting (#18026)

6 weeks agograph: add f_attn_temp_offset (#18025)
Xuan-Son Nguyen [Sun, 14 Dec 2025 12:05:59 +0000 (13:05 +0100)]
graph: add f_attn_temp_offset (#18025)

6 weeks agocommon : refactor common_sampler + grammar logic changes (#17937)
Georgi Gerganov [Sun, 14 Dec 2025 08:11:13 +0000 (10:11 +0200)]
common : refactor common_sampler + grammar logic changes (#17937)

* common : refactor common_sampler + grammar logic changes

* tests : increase max_tokens to get needed response

* batched : fix uninitialized samplers

6 weeks agovulkan: Fix data race/hang in scalar/cm1 flash attention (#17887)
Jeff Bolz [Sun, 14 Dec 2025 08:00:00 +0000 (02:00 -0600)]
vulkan: Fix data race/hang in scalar/cm1 flash attention (#17887)

6 weeks agovulkan: improve mul_mat_vec_iq1_s speed (#17874)
lovedheart [Sun, 14 Dec 2025 07:47:49 +0000 (08:47 +0100)]
vulkan: improve mul_mat_vec_iq1_s speed (#17874)

6 weeks agovulkan: faster q6_k matmul (#17813)
Eve [Sun, 14 Dec 2025 07:29:37 +0000 (07:29 +0000)]
vulkan: faster q6_k matmul (#17813)

* q6_k faster mul mat

* 8 values

* fix comment

* switch to two at a time

* start ci for .glsl files

6 weeks agomodel-conversion : cast logits to float32 (#18009)
Georgi Gerganov [Sun, 14 Dec 2025 06:58:13 +0000 (08:58 +0200)]
model-conversion : cast logits to float32 (#18009)

6 weeks agomodels : fix YaRN regression + consolidate logic (#18006)
Georgi Gerganov [Sun, 14 Dec 2025 06:34:56 +0000 (08:34 +0200)]
models : fix YaRN regression + consolidate logic (#18006)

* models : fix YaRN regression + consolidate logic

* cont : fix the fix

* cont : remove header

* cont : add header

6 weeks agoggml : arm repack fix build
Georgi Gerganov [Sat, 13 Dec 2025 20:54:14 +0000 (22:54 +0200)]
ggml : arm repack fix build

6 weeks agosync : ggml
Georgi Gerganov [Sat, 13 Dec 2025 08:07:07 +0000 (10:07 +0200)]
sync : ggml

6 weeks agoggml : arm repack fix build (whisper/0)
Georgi Gerganov [Sat, 13 Dec 2025 06:04:09 +0000 (08:04 +0200)]
ggml : arm repack fix build (whisper/0)

6 weeks agocmake : set `CMAKE_RUNTIME_OUTPUT_DIRECTORY` for non standalone build (ggml/1394)
Congcong Cai [Fri, 12 Dec 2025 14:37:38 +0000 (22:37 +0800)]
cmake : set `CMAKE_RUNTIME_OUTPUT_DIRECTORY` for non standalone build (ggml/1394)

Some backend depends on CMAKE_RUNTIME_OUTPUT_DIRECTORY to create temporary file like metal backened.
Missing CMAKE_RUNTIME_OUTPUT_DIRECTORY will cause some cmake error like permission denied (try to copy file to root).
This PR wants to setup a default path for CMAKE_RUNTIME_OUTPUT_DIRECTORY when it does not exist.

6 weeks agoscripts: add script to compare logprobs of llama.cpp against other frameworks (#17947)
Xuan-Son Nguyen [Sat, 13 Dec 2025 21:33:29 +0000 (22:33 +0100)]
scripts: add script to compare logprobs of llama.cpp against other frameworks (#17947)

* scripts: add script to compare logits of llama.cpp against other frameworks

* accept custom prompt file

* fix code style

* clarify endpoint

* fix displaying

* use abs for diff

* fix vllm case

* rm output file

* rename to compare-logprobs

* add "pattern"

6 weeks agoserver-models.cpp: add missing <filesystem> (#18000)
Sergey Fedorov [Sat, 13 Dec 2025 21:02:43 +0000 (05:02 +0800)]
server-models.cpp: add missing <filesystem> (#18000)

Fixes: https://github.com/ggml-org/llama.cpp/issues/17999
6 weeks agollama_context: synchronize before reallocating output buffer (#17974)
Jeff Bolz [Sat, 13 Dec 2025 15:19:51 +0000 (09:19 -0600)]
llama_context: synchronize before reallocating output buffer (#17974)

6 weeks agoarg: fix common_params_parse not accepting negated arg (#17991)
Xuan-Son Nguyen [Sat, 13 Dec 2025 11:53:37 +0000 (12:53 +0100)]
arg: fix common_params_parse not accepting negated arg (#17991)

6 weeks agocmake: correct scope - link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17972)
Gustavo Rocha Dias [Sat, 13 Dec 2025 11:46:36 +0000 (08:46 -0300)]
cmake: correct scope - link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17972)

* fix - w64devkit build

* fix - w64devkit build private scope

6 weeks agovulkan: support get_rows for i32 (#17941)
Jeff Bolz [Sat, 13 Dec 2025 09:12:53 +0000 (03:12 -0600)]
vulkan: support get_rows for i32 (#17941)

6 weeks agovulkan: support GGML_OP_DIAG (#17893)
Jeff Bolz [Sat, 13 Dec 2025 09:07:49 +0000 (03:07 -0600)]
vulkan: support GGML_OP_DIAG (#17893)

6 weeks agovulkan: Multi-pass softmax for large number of cols (#17892)
Jeff Bolz [Sat, 13 Dec 2025 09:04:29 +0000 (03:04 -0600)]
vulkan: Multi-pass softmax for large number of cols (#17892)

When the number of cols is large, split each row across multiple workgroups.
There are three phases that communicate partial results through temp buffers:
(1) compute max partials
(2) take max of partials, compute sum(exp(x-max)) partials
(3) sum partials, compute scaled result

6 weeks agospeculative-simple : free batch on exit (#17985)
Georgi Gerganov [Sat, 13 Dec 2025 07:48:34 +0000 (09:48 +0200)]
speculative-simple : free batch on exit (#17985)

6 weeks agocommon : skip model validation when --completion-bash is requested (#17975)
Sigbjørn Skjæret [Sat, 13 Dec 2025 07:40:50 +0000 (08:40 +0100)]
common : skip model validation when --completion-bash is requested (#17975)

6 weeks agovulkan: Allow non-pow2 n_experts in topk_moe (#17872)
Jeff Bolz [Sat, 13 Dec 2025 07:40:04 +0000 (01:40 -0600)]
vulkan: Allow non-pow2 n_experts in topk_moe (#17872)

6 weeks agoadd llama-completion to completion-bash executables (#17976)
Sigbjørn Skjæret [Sat, 13 Dec 2025 07:35:50 +0000 (08:35 +0100)]
add llama-completion to completion-bash executables (#17976)

6 weeks agomodel-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984)
Daniel Bevenius [Sat, 13 Dec 2025 07:34:26 +0000 (08:34 +0100)]
model-conversion : use CONVERTED_MODEL value for converted model [no ci] (#17984)

* model-conversion : use CONVERTED_MODEL value for converted model [no ci]

This commit updates the model verification scripts to use the
CONVERTED_MODEL environment variable instead of using the MODEL_PATH
(the original model path) as the basis for the converted model file
name.

The motivation for this that currently if the converted model file name
differs from the original model directory/name the verification scripts
will look for the wrong .bin files that were generating when running the
models.
For example, the following steps were not possible:
```console
(venv) $ huggingface-cli download google/gemma-3-270m-it --local-dir ggml-org/gemma-3-270m
(venv) $ python3 convert_hf_to_gguf.py ggml-org/gemma-3-270m --outfile test-bf16.gguf --outtype bf16
(venv) $ cd examples/model-conversion/
(venv) $ export MODEL_PATH=../../ggml-org/gemma-3-270m
(venv) $ export CONVERTED_MODEL=../../test-bf16.gguf
(venv) $ make causal-verify-logits
...
Data saved to data/llamacpp-test-bf16.bin
Data saved to data/llamacpp-test-bf16.txt
Error: llama.cpp logits file not found: data/llamacpp-gemma-3-270m.bin
Please run scripts/run-converted-model.sh first to generate this file.
make: *** [Makefile:62: causal-verify-logits] Error 1
```

With the changes in this commit, the above steps will now work as
expected.

6 weeks agocommon: support negated args (#17919)
Xuan-Son Nguyen [Fri, 12 Dec 2025 22:58:53 +0000 (23:58 +0100)]
common: support negated args (#17919)

* args: support negated args

* update docs

* fix typo

* add more neg options

* Apply suggestions from code review

Co-authored-by: Sigbjørn Skjæret <redacted>
* rm duplicated arg

* fix LLAMA_ARG_NO_HOST

* add test

---------

Co-authored-by: Sigbjørn Skjæret <redacted>
6 weeks agoclip: move model cgraphs into their own files (#17965)
Xuan-Son Nguyen [Fri, 12 Dec 2025 20:14:48 +0000 (21:14 +0100)]
clip: move model cgraphs into their own files (#17965)

* clip: move model cgraphs into their own files

* more explicit enums

* fix linux build

* fix naming

* missing headers

* nits: add comments for contributors

6 weeks agoci : change the cann version and the container pull method (#17953)
jiahao su [Fri, 12 Dec 2025 19:43:00 +0000 (03:43 +0800)]
ci : change the cann version and the container pull method (#17953)

fix error format

Update build.yml

Remove unnecessary zip files

fix

update

6 weeks agodocker : include legacy llama-completion binary (#17964)
Sigbjørn Skjæret [Fri, 12 Dec 2025 18:39:23 +0000 (19:39 +0100)]
docker : include legacy llama-completion binary (#17964)

6 weeks agoCUDA: fix overflow in MMA kernel without stream-k (#17939)
Johannes Gäßler [Fri, 12 Dec 2025 16:43:58 +0000 (17:43 +0100)]
CUDA: fix overflow in MMA kernel without stream-k (#17939)

6 weeks agomodels : fix the attn_factor for mistral3 graphs + improve consistency (#17945)
Georgi Gerganov [Fri, 12 Dec 2025 15:12:40 +0000 (17:12 +0200)]
models : fix the attn_factor for mistral3 graphs + improve consistency (#17945)

* models : fix the attn_factor for mistral3 graphs

* cont : rework attn_factor correction logic

* cont : make deepseek2 consistent

* cont : add TODO

* cont : special-case DSv2

* cont : revert Mistral 3 Large changes

* cont : fix DS2 to use the original attn_factor

* cont : minor comments

6 weeks agocann : fix ops broken by circular padding guard (#17825)
Sigbjørn Skjæret [Fri, 12 Dec 2025 14:49:27 +0000 (15:49 +0100)]
cann : fix ops broken by circular padding guard (#17825)

6 weeks agoggml-cpu : fix RISC-V Q4_0 repack select and RVV feature reporting (#17951)
ixgbe [Fri, 12 Dec 2025 14:26:03 +0000 (22:26 +0800)]
ggml-cpu : fix RISC-V Q4_0 repack select and RVV feature reporting (#17951)

* ggml-cpu:fix RISC-V Q4_0 repack select and RVV feature reporting

Signed-off-by: Wang Yang <redacted>
* using the name VLEN instead of CNT

* Update ggml/include/ggml-cpu.h

---------

Signed-off-by: Wang Yang <redacted>
Co-authored-by: Georgi Gerganov <redacted>
6 weeks agomtmd: explicitly forbidden inclusion of private header and libcommon (#17946)
Xuan-Son Nguyen [Fri, 12 Dec 2025 14:16:06 +0000 (15:16 +0100)]
mtmd: explicitly forbidden inclusion of private header and libcommon (#17946)

6 weeks agowebui: Fix parsing non-LaTeX occurrencies of `\(` or `\)` (#17810)
Aleksander Grygier [Fri, 12 Dec 2025 14:13:36 +0000 (15:13 +0100)]
webui: Fix parsing non-LaTeX occurrencies of `\(` or `\)` (#17810)

* fix: Improve latex protection logic to prevent turning non-latex `\(` into `$`

* chore: update webui build output

6 weeks agoarg: add -mm and -mmu as short form of --mmproj and --mmproj-url (#17958)
Xuan-Son Nguyen [Fri, 12 Dec 2025 13:06:06 +0000 (14:06 +0100)]
arg: add -mm and -mmu as short form of --mmproj and --mmproj-url (#17958)

* arg: add -mm and -mmu as short form of --mmproj and --mmproj-url

* correct order

* update docs

6 weeks agomodel-conversion : remove max diff check in compare-logits [no ci] (#17954)
Daniel Bevenius [Fri, 12 Dec 2025 12:25:16 +0000 (13:25 +0100)]
model-conversion : remove max diff check in compare-logits [no ci] (#17954)

This commit removes the maximum difference check from the
compare-logits.py which would stop early if the difference between
the logits exceeded a threshold.

The motivation for removing this is that it can be useful to be able to
get the complete log for debugging/reporting purposes.

6 weeks agocommon : add minimalist multi-thread progress bar (#17602)
Adrien Gallouët [Fri, 12 Dec 2025 11:44:35 +0000 (12:44 +0100)]
common : add minimalist multi-thread progress bar (#17602)

Signed-off-by: Adrien Gallouët <redacted>
6 weeks agocmake: link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17949)
Gustavo Rocha Dias [Fri, 12 Dec 2025 11:02:28 +0000 (08:02 -0300)]
cmake: link ws2_32 for MinGW/w64devkit builds in cpp-httplib (#17949)

6 weeks agoHIP: enable mmf for RDNA3 (#17879)
yulo [Fri, 12 Dec 2025 10:34:33 +0000 (18:34 +0800)]
HIP: enable mmf for RDNA3 (#17879)

* enable mmf for RDNA3

* disable mmf for some shape

* move some mmvf to mmf

* more mmfv to mmf

* 3 is good in mmvf

---------

Co-authored-by: zhang hui <redacted>
6 weeks agoAdd a search field on model selector / improve mobile display (#17765)
Pascal [Thu, 11 Dec 2025 17:21:21 +0000 (18:21 +0100)]
Add a search field on model selector / improve mobile display (#17765)

* webui: add search field to model selector and fixes mobile viewport overflow

* webui: simplify model search style and code

* refacor: Search Input component & consistent UI for Models Selector search

* feat: Use Popover component + improve interactions

* fix: Fetching props for only loaded models in ROUTER mode

* webui: prevent models selector popover from overflowing viewport

Use Floating UI's auto-positioning with 50dvh height limit and proper
collision detection instead of forcing top positioning. Fixes overflow
on desktop and mobile keyboard issues

* webui: keep search field near trigger in models selector

Place search at the 'near end' (closest to trigger) by swapping layout
with CSS flexbox order based on popover direction. Prevents input from
moving during typing as list shrinks

* chore: update webui build output

---------

Co-authored-by: Aleksander Grygier <redacted>
6 weeks agoSOLVE_TRI extension to more dimensions (#17793)
Piotr Wilkin (ilintar) [Thu, 11 Dec 2025 16:20:43 +0000 (17:20 +0100)]
SOLVE_TRI extension to more dimensions (#17793)

* Extended TRI

* Fix whitespace

* chore: update webui build output

* Just use cuBLAS for everything...

* Merge both versions

* Remove incorrect imports causing failures for CI

* Still failing... remove all direct cublas imports and rely on common imports from "common.cuh"

* Defines for hipBlas

* Aaaand MUSA defines...

* I hate this job...

* Stupid typo...

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

Co-authored-by: Johannes Gäßler <redacted>
---------

Co-authored-by: Johannes Gäßler <redacted>
6 weeks agoggml-alloc : fix reuse-parent logic for misaligned sizes (#17884)
Georgi Gerganov [Thu, 11 Dec 2025 12:30:10 +0000 (14:30 +0200)]
ggml-alloc : fix reuse-parent logic for misaligned sizes (#17884)

6 weeks agobatch : fix sequence id ownership (#17915)
Georgi Gerganov [Thu, 11 Dec 2025 12:29:47 +0000 (14:29 +0200)]
batch : fix sequence id ownership (#17915)

* batch : fix sequence id ownage

* cont : reduce allocations

6 weeks agodocs: use port 8080 in Docker examples (#17903)
Yuichiro Utsumi [Thu, 11 Dec 2025 09:12:07 +0000 (18:12 +0900)]
docs: use port 8080 in Docker examples (#17903)

6 weeks agoggml-hexagon: fix `rope` failure at `test-backend-ops` (#17565)
nullname [Wed, 10 Dec 2025 22:45:43 +0000 (06:45 +0800)]
ggml-hexagon: fix `rope` failure at `test-backend-ops` (#17565)

* fix test failure

* fix: correct scaling calculations in rope_cache_init

* fix: optimize element copying in rope_hex_f32 using memcpy

* fix: optimize loop boundaries in rope_hex_f32 for better performance

* feat: add profiling macros for performance measurement in operations

6 weeks agoci: fix riscv64-native build (#17916)
Sigbjørn Skjæret [Wed, 10 Dec 2025 22:24:31 +0000 (23:24 +0100)]
ci: fix riscv64-native build (#17916)

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