Repository navigation
Merge ggml-org master 8ca5a8008 - #92
Merged
Merged
Conversation
* cpu: accumulate flash attention V in F32 in the one-chunk kernel The one-chunk kernel accumulated an F16 V cache in an F16 running sum that is only normalized at the end, which overflows past 65504 on long contexts: inf, then NaN on every following token. Every V type now accumulates in F32, like the tiled kernel. F16 rows go through ggml_vec_mad_f16_f32, which converts and multiplies in the same register (F16C/AVX512, NEON, RVV) with no round trip through a temporary F32 row, so decode keeps master speed on x86 and loses about 4% at 4k context on ARM, where master used native F16 FMA. * cpu: widen the F16 V rows like ggml_vec_dot_f16_f32 ggml_vec_mad_f16_f32 required F16C and FMA, so AVX builds without FMA fell back to a scalar loop and ran 3x slower than master. It now follows the guards of ggml_vec_dot_f16_f32: AVX512, then AVX with F16C through GGML_F32x8_FMA, then NEON and RVV, then the scalar loop.
…call (ggml-org#31838) * ROCm/HIP: fixed BLAS workspace instead of rocBLAS allocating one per call Assisted-by: Claude Opus 5 * ROCm/HIP: corrected by only setting the workspace on ROCm 7.0 or newer
…l change (ggml-org#31284) * CUDA: re-instantiate graphs when the cluster dims of a kernel change * CUDA: keep the cluster dims with the graph instance, check them only on Hopper+ Assisted-by: Claude Opus 5.5 * CUDA: use CUDA_CHECK and a helper struct for the graph cluster dims Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * CUDA: add a TODO for the graph cluster dims test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…kage (ggml-org#32005) ggml-sycl.dll built with oneAPI 2026.2 imports mkl_intel_thread.3.dll and libimalloc.dll, which are not part of the release package. LoadLibrary fails and the SYCL backend is silently skipped, llama.cpp falls back to CPU. Adding both DLLs fixes the load: measured on Arc B570 with LFM2.5-8B-A1B Q4_K_M, pp4096 goes from 404 t/s (CPU fallback) to 2232 t/s (SYCL) with the extracted b12244 package. Assisted-by: GLM (z-ai/glm-5.3-flash) Co-authored-by: Asahi-Prv <Asahi-Prv@users.noreply.github.com>
…rg#32078) - remove build_delta_net_chunking and build_delta_net_autoregressive - always use the fused gated delta net - make graph_max_nodes independent of the ubatch size - drop the fused GDN probes and fused node tags Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB)
…ml-org#32053) * chat: allow TTS model to provide custom text normalizer via jinja * rm tts_norm_is_reserved_name
…org#32089) Allocate gf_res_reserve and both gf_res_prev entries once in the llama_context constructor. Add llm_graph_result::set_max_nodes() and reset the existing instances in sched_reserve() instead of recreating them. get_gf_res_prev() now only selects the arena for the current batch. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB)
Co-authored-by: Alessandro de Oliveira Faria (A.K.A.CABELO) <cabelo@multicortex.ai>
* vulkan: support batched tensor copy API * allocate staging buffer only for copies that actually need it
* ci: move test models to ggml-org-dev * fix test spec
…gml-org#32098) * server: fix --cors-origins localhost handling * server: validate Host on loopback connections against DNS rebinding A page whose own name resolves to 127.0.0.1 reaches the server with that name in Host and a matching Origin, so the same-origin shortcut let it through. On a loopback connection, Host must now name loopback or the host of an allowed --cors-origins entry. The LAN tests reach the server through a real interface instead of a forged Host. * fix python type check --------- Co-authored-by: Pascal <admin@serveurperso.com>
…#32039) * ui : take the logo and favicons from llama-brand The web UI's logo mark and favicons now come from llama-brand, added as a dev dependency from GitHub and pinned to a commit, so the UI draws the same icon as the README cover instead of its own copy of an older one. Logo.svelte inlines the brand's icon and fills it with currentColor, and the PWA asset generator starts from the brand's web favicons, which carry their own margin and optical centring, so the UI's colouring and padding script, its test and its logo.svg go. Assisted-by: Claude (Opus 5.5 Medium) * ui : follow llama-brand's master instead of a pinned commit Assisted-by: Claude (Opus 5.5 Medium)
…ith a draft (ggml-org#31467) * ui : keep downloads in Discover sidebar during search, sort base-org repos first - Show the sticky Downloading section regardless of an active search query - Order search results so repos published by their base model's org lead Assisted-by: Claude (Opus 5.5 Medium) * server : throttle download progress per file Files of a download run in parallel threads, but progress updates were throttled with one shared timer. A small draft sidecar reports far more often than the main weights, so it took nearly every slot and the main file's updates, including the first one carrying its total size, were dropped until the draft finished. The UI then showed the draft's progress first and restarted from 0% for the model. Throttle each file on its own and always pass a file's first update. Assisted-by: Claude (Opus 5.5 Medium) * ui: list a downloading repo once and match base orgs case-insensitively A search hit that is downloading already shows under Downloading, so the results leave it out. Base model orgs compare without case, as the hub treats them. Assisted-by: Claude (Opus 5.5 Medium) * server : tell clients a download stopped on request When a client paused or cancelled a download, every other client following /models/sse got a bare download_failed and could not tell it from an error, so the web UI showed "Download failed" for a pause made in the Llama app. A stop asked for through unload or delete now fails with {"stopped": true}. Deleting a paused download, which has no instance left, now sends model_remove as deleting a running one does, so other clients drop its row. Assisted-by: Claude (Opus 5.5 Medium) * ui : follow downloads other clients start, pause or cancel A download another client started (e.g. the Llama app) already showed up from the feed; it now also picks up the sidecars the list reports for it. A stop another client asked for reads as a pause instead of a failure, and a removal clears the download row even when the list does not carry it yet. Assisted-by: Claude (Opus 5.5 Medium)
* Update image link in README.md I guess the image in the main README is now this one https://github.com/ggml-org/llama-brand/blob/master/logo/svg/cover/llama-cpp/cover-llama-cpp-dark.svg * Fix image link in README.md * Update image alt text in README.md
* ui: move js sandbox setting out of "developer" * make js sandbox enabled by default
* opencl: add decomposed FA Assisted-by: Claude Opus 5.5 Co-authored-by: Hongqiang Wang <wangh@qti.qualcomm.com> Co-authored-by: Shaofei Qi <shaoqi@qti.qualcomm.com> * opencl: build FA MQ kernel on first FA call * so allows warmup to early build neccessary kernels Assisted-by: Claude Opus 5.5 * opencl: handle inf for fully masked row * opencl: refine condition for using fa decomp * opencl: support dp4a for PV mm Assisted-by: Codex * opencl: add direct PV for FA decomp to avoid V transpose for small batch Assisted-by: Codex * opencl: enable direct pv by default * opencl: expand X2E decomposed FA to smaller heads and batches - Lower the default head dimension threshold from 256 to 128 on X2E. - Allow DK64 with P8, no attention sinks, GQA >= 2 and n_kv >= max(1024, 2*n_q). - Allow P8 with V transpose for 2-31 queries when direct PV is unavailable, DK >= 128 and n_kv >= 1024. Assisted-by: Codex * opencl: adjust format --------- Co-authored-by: Li He <lih@qti.qualcomm.com> Co-authored-by: Hongqiang Wang <wangh@qti.qualcomm.com>
* CUDA: skip empty MoE tiles in MMQ stream-k fixup mul_mat_q_stream_k_fixup loads ids_dst[col_low + j] for all j < J before checking j_sup. mul_mat_q returns early on col_low == col_high, the fixup kernel did not. mm_ids_helper emits one extra tile per expert that may be empty; for trailing experts col_low == ncols_dst, so the load reads one element past the J_best-1 padding added in ggml-org#29953. The kernel returns at j >= j_sup before storing anything, so results are unaffected. Return early when j_sup <= 0, like the main kernel. The return is block-uniform (tsj is loaded once per block) and precedes __syncthreads(). Add test_mul_mat_id_unused_tail to test-backend-ops: only the first n_mats/2 experts are selected, so the trailing experts have zero rows and their tiles are empty; m=33, k=512 keeps tile efficiency low enough that stream-k splits along K and launches the fixup kernel. * CUDA: drop the extra MUL_MAT_ID test case and the explanatory comment (review)
…a7_bin` (ggml-org#30947) * opencl: add A7 Q4_0 non-MoE binary kernel * opencl: refactor --------- Co-authored-by: Li He <lih@qti.qualcomm.com>
* CUDA: add cuda debug buffer pool * CUDA: add code comment for debug pool with compute-sanitizer
ggml_sycl_set_main_device() runs at the start of every graph compute. Its early-return check called dpct::get_current_device_id(), which locks the device manager mutex and looks up the thread-to-device map. Use the thread-local cached id that the rest of the backend already uses. Assisted-by: Claude Code Co-authored-by: zhaoyshine <zhaoyshine@users.noreply.github.com>
* fix aot for >4g garbage output issue; add --aot in build script * correct the aot flag * support no-xmx build, update the code for no-xmx building, rename nossl to no-ssl
Each graph result reserves metadata for max_nodes, but many graphs use only a fraction of that capacity. The vector resize initializes the whole reserve and makes otherwise unused pages resident. Allocate the reserve with new uint8_t[] instead.
* CUDA: few-row MMQ for 2-24 src1 columns New int8 MMA kernel for quantized mat-muls with 2-24 src1 columns, e.g. speculative decoding verify passes. Supports Q8_0, Q3_K, Q4_K, Q5_K, Q6_K, IQ3_S, IQ4_NL and IQ4_XS on NVIDIA GPUs from Ampere on. * nit fixes * CUDA-only guard for few-row MMQ, weights flag in test_mul_mat * few-row quantize: DS4 sum from the quantized values, as in ggml-org#31247 * few-row MMQ: clearer HIP/MUSA abort, test_mul_mat two-context build * few-row MMQ: dispatch order MMVQ, few-row, MMQ
* qwen3.5: merge tensors on convert also * Remove conversion test for qwen3.5
…org#32025) * server : cancel MCP tool calls on client disconnect or timeout * server : shorten MCP cancellation tests and fix a type-check error
* hexagon: add q5_0 and q5_1 support * hex-mm: dedicated q5_0 kernels
* ggml : prune deprecated API * cont : bump RPC version * cont : minor * ggml : remove outdated documentation from ggml.h The 172-line comment block at the top of the header has not been updated in a substantive way since the backend v2 split (Nov 2023) and now documents APIs that no longer exist: - `ggml_set_f32()`, `ggml_get_f32_1d()`, `ggml_set_f32_1d()` were removed - `ggml_conv_1d_1s()`, `ggml_conv_1d_2s()` ops no longer exist - `ggml_set_param()` no longer takes a context argument - `ggml_graph_compute_with_ctx()` moved to the CPU backend header - the optimization API now lives in `ggml-opt.h` The block also ended with 5 empty `TODO` sections. Assisted-by: dsh:llama.cpp/ggml-org/Qwen3.8-Flash-Next-GGUF (MacBook, M5 Max, 128GB) * ggml : remove DIAG_MASK_INF and DIAG_MASK_ZERO (ggml-org#31946) * rpc : bump RPC protocol major version The tensor op enum is sent over the wire, so removing GGML_OP_ADD1, GGML_OP_DIAG_MASK_INF and GGML_OP_DIAG_MASK_ZERO shifts the value of every op that follows them and peers built before and after this change would misinterpret each other's ops. The handshake compares the major version for exact equality and ignores the patch version, so bumping the major version is what rejects incompatible peers instead of silently misbehaving. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB) --------- Co-authored-by: losewayy <1134285612@qq.com>
* llama : remove deprecated `llama_set_warmup` Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB) * llama : remove remaining deprecated API Drop the APIs marked DEPRECATED in llama.h, the deprecated llama_context_params::defrag_thold field and the --defrag-thold option. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB) * fit-params : remove stale `llama-ext.h` include Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB) * llama : document `llama_model_dflash_selector_top_k` Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB) * llama : promote the NextN / speculative API from `llama-ext.h` Move the NextN, layer input, embd row and state row APIs to `llama.h` and rename `llama_set_embd_state_src` to `llama_set_ctx_state_src`, with the internal `llama_context::set_state_src` following the same name. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB) * llama : polish the NextN API promotion Move the NextN draft model queries next to the Adapters section, rename the `src` parameters of `llama_set_ctx_state_src` and `llama_context::set_ctx_state_src` to `ctx_src`, and drop the now-redundant `llama-ext.h` includes from `common/speculative.cpp` and `tools/imatrix`. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB)
Conflicts in ggml-cuda.cu, llama-context.cpp and qwen35.cpp resolved as on the tested branch rdna3-rebased-on-8ca5a8008, with its two adaptations: the delta net state is always read in place (upstream removed the non-fused path) and graph_max_nodes() takes no batch size. Assisted-by: Claude Opus 5.5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges ggml-org/llama.cpp master at 8ca5a80 (55 upstream commits since the fork point): server security fixes (SSRF in the CORS proxy and media URLs, DNS rebinding protection, router child instances not reachable from a browser, explicit opt-in for server tools on non-loopback addresses), keep-awake while a request uses the server state, gemma4 chat parser rework, HIP fixed BLAS workspace, updated LibreSSL and cpp-httplib.
Conflicts (ggml-cuda.cu, llama-context.cpp, qwen35.cpp) are resolved as on the branch
rdna3-rebased-on-8ca5a8008; the merged tree is identical to that branch, which was tested on an RX 7900 XT (ROCm 10.1):test-backend-opsfor every op the fork touches (MUL_MAT 2720, MUL_MAT_ID 1112, FLASH_ATTN_EXT 4452, MUL_MAT_FUSION 1601, ...): all passtest-fattn-masked0 of 3024 fail,test-batch-alloc57 pass, server state and stale-cache tests passTwo adaptations to upstream changes: the delta net state is always read in place (upstream removed the non-fused path), and
graph_max_nodes()no longer takes a batch size.Merged as a merge commit (not squashed) to keep upstream's history.
AI disclosure: conflicts resolved and tested with Claude Code; the user started the merge.
🤖 Generated with Claude Code