Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
3217633
ci : build only the ggml-hip backend for windows-rocm release (#27753)
harkgill-amd Aug 27, 2026
1844325
server: add ctx-per-slot (--kv-unified-per-slot) (#24124)
bartowski1182 Aug 27, 2026
83d855c
hex-unary: fix RMS_NORM_MUL weight-offset bugs for grouped/broadcast …
aparmp-quic Aug 27, 2026
e70802a
ggml-hexagon: add HTP unary ops for ABS and LOG (#27786)
cqderek Aug 27, 2026
ca3d5a3
model: add DSpark support for Nemotron3.5 (#27804)
ruixiang63 Aug 27, 2026
4e97ac8
tests : run test-save-load-state across all architectures (#27755)
ggerganov Aug 28, 2026
6d6b697
metal : add fa-vec tunings for M4 Pro (#27824)
infinitewarp Aug 28, 2026
8963a9b
metal : add fa-vec tunings for M3 Max, M5 and M5 Pro (#27863)
ggerganov Aug 28, 2026
be87620
sycl: bind the f16 KV cache in place for the oneDNN SDPA path (#27468)
Titaniumtown Aug 28, 2026
d077b4c
sycl: use TILE for quantized KV decode on BMG (#26689)
johnkarlhill Aug 28, 2026
b19cbe9
convert: prevent ndarray conversion in LazyChunkedTensor (#27869)
ngxson Aug 28, 2026
511f9c1
OpenVINO: Update OV to 2026.3.1, whisper.cpp support, Qwen3.5 on NPU,…
wine99 Aug 28, 2026
f5e85d4
metal : add fa-vec tunings for M4 (#27875)
Strongtut Aug 28, 2026
8663224
context : disable non-fused GDN and LID ops (#27877)
ggerganov Aug 28, 2026
90c26fc
Vulkan: add hoisting support for row IDs and expert count in shaders …
ravel7524 Aug 28, 2026
a43c398
ggml : fix conv_transpose_2d for multiple batches (#26132)
tekinertekin Aug 28, 2026
b387ddf
vulkan: fix missing view-alias dependencies in ggml_vk_graph_optimize…
Eric-A-Stalee Aug 28, 2026
6fe7498
model: qwen4exp: reduce number of graph splits (#27880)
ngxson Aug 28, 2026
50f068f
bench: add --tensor-read-lazy (#27881)
ngxson Aug 28, 2026
d7bd3bf
snapdragon: python SDK setup (Windows) (#27903)
kurquhar Aug 28, 2026
77f132c
vulkan: Change mul_mat_id to pad K rather than N (#27925)
jeffbolznv Aug 29, 2026
5ea1b12
metal : add fa-vec tunings for M1 Max (#27932)
jhen0409 Aug 29, 2026
c9ca51c
vulkan: combine duplicated fastdiv functions, rename the one optimizi…
jeffbolznv Aug 29, 2026
cc83d7b
sycl: make --fit respect --fit-target better (#27629)
nicois Aug 29, 2026
17252c7
metal : add remaining fa-vec tunings for M4 Pro (#27915)
nikwen Aug 29, 2026
3173a56
metal : assert shared memory padding (#27951)
ggerganov Aug 29, 2026
c841aee
opencl: use a better matmul path on two Adreno GPU generations (#27640)
wanghqc Aug 29, 2026
c589f0e
metal : add fa-vec tunings for M2 (#27940)
ring2003 Aug 29, 2026
57291f2
ggml: allow passing alloc dependencies in graph_optimize (#27301)
am17an Aug 30, 2026
bdf3955
memory : copy Hadamard matrix to k_rot tensor only if it has buffer a…
fairydreaming Aug 30, 2026
d882575
metal : fix null-pipeline crash for F16 src1 mul_mat/mul_mat_id (#25648)
QuintinShaw Aug 30, 2026
370cb12
sycl: split long rows in TOP_K instead of one work-group per row (#27…
Titaniumtown Aug 30, 2026
9e54e68
hexagon: support for device discovery and create sessions on demand (…
max-krasnyansky Aug 30, 2026
2bf0415
rpc : fix pre-rdma macOS versions (#27815)
ryan5rdx Aug 30, 2026
dc7aecf
vendor : update cpp-httplib to 0.54.0 (#27919)
cabelo Aug 30, 2026
b8b743c
metal : Add fa-vec tuning for M3 Pro (#27963)
addianto Aug 30, 2026
093adb2
metal: add fa-vec tunings for M3 Ultra (#27999)
ngladitz Aug 30, 2026
742347b
rpc: fix apple rdma error spew on teardown (#27908)
ryan5rdx Aug 30, 2026
73f56d1
ggml : add ggml_backend_op_alloc_size_may_expand, use it in RPC (#27960)
ggerganov Aug 30, 2026
bebc935
common: rename --tensor-read-lazy to --lazy-mode, add -lzm shorthand …
ggerganov Aug 30, 2026
816c7bd
experiment: dequant-once FA scratch for all KV quant types (q4_0/q4_1…
Nathanw1014 Jul 13, 2026
0aac213
vulkan : gate FA dequant-once scratch on device-local capacity
Nathanw1014 Jul 14, 2026
c8230e7
vulkan: contiguize strided f16 KV for FA prefill (GGML_VK_FA_KV_CONTI…
Nathanw1014 Jul 28, 2026
40aaa49
tests: dense-permuted K/V option + Strix FA prefill perf/probe cases
Nathanw1014 Jul 28, 2026
e7a0e58
vulkan: enable the f16 KV contiguize pass by default (GGML_VK_FA_KV_C…
Nathanw1014 Jul 28, 2026
bf54e45
vulkan: single source of truth for native FA K/V types + non-native h…
Nathanw1014 Jul 28, 2026
66e7348
vulkan: hoist the coopmat1 FA P-fragment load out of the hsv_tile loop
Nathanw1014 Jul 30, 2026
6a6896c
tests: dense-permuted iq4_nl FA cases (dequant-once route coverage)
Nathanw1014 Jul 28, 2026
306eecf
vulkan: store coopmat1 FA Psh query-major so the GEMM2 A load vectorizes
Nathanw1014 Jul 30, 2026
48407ef
vulkan: bill the FA K/V contiguize pass on its own perf-logger line
Nathanw1014 Jul 31, 2026
d7124e9
vulkan: pin a 32-wide subgroup for coopmat1 FA where narrowing is free
Nathanw1014 Jul 30, 2026
c4444f9
vulkan: scale the FA MMQ dot product in fp32 before narrowing
Nathanw1014 Aug 9, 2026
a94369d
vulkan: enable the coopmat1 FA wave32 narrowing rule by default
Nathanw1014 Aug 30, 2026
41d17f1
vulkan: mul_mat_id per-expert-n tile selection (Stage 2a, env-gated)
Nathanw1014 Jul 14, 2026
7f0c243
vulkan: mul_mat_id small-tile shape probes (env-gated)
Nathanw1014 Jul 14, 2026
afedbab
vulkan: mul_mat_id taller medium tile probe (GGML_VK_MMID_M128, env-g…
Nathanw1014 Jul 14, 2026
7722eb4
vulkan: mmid wave32 probe (GGML_VK_MMID_WAVE32, env-gated)
Nathanw1014 Jul 14, 2026
0986850
vulkan: mul_mat_id f16-B probe (GGML_VK_MMID_F16B, env-gated)
Nathanw1014 Jul 14, 2026
633ab28
vulkan: guard mmid f16-B path on pipeline existence (Q2_0 fallback)
Nathanw1014 Jul 26, 2026
bc235d8
tests: cover MMQ tile boundaries in MUL_MAT and MUL_MAT_ID
Nathanw1014 Aug 6, 2026
3df1fd5
vulkan: create coopmat2 mul_mat_id pipelines with the real param count
Nathanw1014 Aug 8, 2026
266166f
vulkan: enable the Strix mmid tile gates by default
Nathanw1014 Aug 30, 2026
fcf2f38
vulkan : optional f16 B operand for quantized MUL_MAT on coopmat1
Nathanw1014 Aug 16, 2026
74b3efa
vulkan : add auto mode to GGML_VK_DENSE_F16B
Nathanw1014 Aug 16, 2026
bc3638c
vulkan: run the quantised dense coopmat pipelines at wave32
Nathanw1014 Aug 18, 2026
beea09e
vulkan: tune the coopmat matmul LDS pad per path on RADV
Nathanw1014 Aug 18, 2026
73608d2
vulkan: gate the RADV coopmat pad 2 on driver >= 25.3
Nathanw1014 Aug 22, 2026
b9e43c5
vulkan: four env-gated Strix Halo prefill fixes for delta-net MoE
Nathanw1014 Aug 6, 2026
7a1eb6d
vulkan: reject ne[3] > 1 in the mul_mat_id scale epilogue
Nathanw1014 Aug 6, 2026
0d542b8
vulkan : default the transposed-concat path on
Nathanw1014 Aug 17, 2026
ce93d29
vulkan: flush pending compute ctx before perf logger timestamps
Nathanw1014 Aug 2, 2026
8a8c218
vulkan: bound command buffers by memory traffic, not just flops
Nathanw1014 Aug 2, 2026
9125bb2
ggml: cut backend splits on the input constant, not the grown capacity
Nathanw1014 Aug 9, 2026
e4615cc
vulkan : take the copy path for bulk UMA reads from uncached mappings
Nathanw1014 Aug 17, 2026
69e3052
vulkan: DeepSeek V4 lightning indexer kernels + indexed sparse FA
gaetan-puleo Aug 1, 2026
aa04dcc
vulkan: harden the sparse-FA shader and document the top-k API
Nathanw1014 Aug 1, 2026
5046bf6
tests: sparse top-k FA parity + perf coverage (V4 CSA shape)
Nathanw1014 Aug 1, 2026
8a15795
vulkan: gather-to-compact sparse decode FA for DeepSeek V4 top-k sele…
Nathanw1014 Aug 1, 2026
a27636c
vulkan: fused DeepSeek V4 hyper-connection ops (HC pre / comb / post)
Nathanw1014 Aug 2, 2026
631fd48
llama: keep DeepSeek lightning-indexer key cache f16 under quantized …
Nathanw1014 Aug 2, 2026
0e71642
llama: contiguize grouped o-proj input for small multi-token batches …
Nathanw1014 Aug 3, 2026
aca6680
vulkan: accelerate DeepSeek V4 sparse prefill FA
Mushoz Aug 12, 2026
10c5457
vulkan: split sparse prefill attention
Mushoz Aug 13, 2026
aa5085f
vulkan: tile sparse prefill scratch
Mushoz Aug 13, 2026
8a4a20b
vulkan: reuse sparse FA probability fragments
Mushoz Aug 13, 2026
13bedfe
vulkan: cache sparse FA masks per key block
Mushoz Aug 13, 2026
2c79376
vulkan: fix DeepSeek V4 sparse split attention with multiple sequences
Nathanw1014 Aug 13, 2026
9c950c5
vulkan: harden the sparse FA split path and drop its debug scaffolding
Nathanw1014 Aug 13, 2026
09f6a7d
test-backend-ops: cover sparse top-k FA with more than one sequence
Nathanw1014 Aug 13, 2026
932245a
vulkan: let sparse FA query tiling and multiple sequences coexist
Nathanw1014 Aug 13, 2026
ff7ac3d
vulkan: parallelize DSV4 Lightning Indexer prefill
Mushoz Aug 13, 2026
93f18c3
vulkan: extend DeepSeek V4 gather-to-compact to small batches
Nathanw1014 Aug 13, 2026
4c35864
vulkan: record the resource limits behind the two DSV4 prefill kernels
Nathanw1014 Aug 13, 2026
7532a73
vulkan: deduplicated union for DeepSeek V4 small-batch decode
Nathanw1014 Aug 14, 2026
0ff9e37
vulkan: gate the DeepSeek V4 small-batch union on the measured union …
Nathanw1014 Aug 14, 2026
ce9fef7
vulkan: measure the V4 union on real draft tokens, and correct the fi…
Nathanw1014 Aug 14, 2026
7dfe8c8
vulkan: default the DeepSeek V4 small-batch union on
Nathanw1014 Aug 14, 2026
8851c37
vulkan: let the DeepSeek V4 small-batch gather serve quantised K/V
Nathanw1014 Aug 14, 2026
6b7c998
vulkan: dequantise q8_0 K/V inside the DeepSeek V4 small-batch gather
Nathanw1014 Aug 14, 2026
2cd621b
vulkan: decode q4_0 in the V4 gather too, with the real element mapping
Nathanw1014 Aug 14, 2026
7d45323
vulkan : restore the unrolled row copy in the DSV4 gather shaders
Nathanw1014 Aug 17, 2026
14f7c55
vulkan: decode quantised K/V inside the DeepSeek V4 per-token gather
Nathanw1014 Aug 20, 2026
a2b7675
vulkan: dequantise the cache for the DeepSeek V4 sparse prefill
Nathanw1014 Aug 20, 2026
ca50763
vulkan: use small Lightning Indexer CM for batches 4-15
pepuscz Aug 24, 2026
1ca0f9a
vulkan: hoist the Lightning Indexer K fragments out of the head loop
Nathanw1014 Aug 26, 2026
06b89c3
vulkan: route the whole small-batch Lightning Indexer window to the d…
Nathanw1014 Aug 26, 2026
849aca6
vulkan: hoist the Lightning Indexer K fragments out of the CM head loop
Nathanw1014 Aug 26, 2026
e85148e
vulkan: support arbitrary Lightning Indexer head counts via specializ…
Nathanw1014 Aug 26, 2026
46b7ed7
vulkan: N_HEAD spec constant for the scalar-64 lightning indexer
Nathanw1014 Aug 30, 2026
b19d076
Merge branch 'vulkan/dsv4' into stage/strix-stacked
Nathanw1014 Aug 30, 2026
d24b48c
Merge branch 'vulkan/fa-coopmat1-micro' into stage/strix-stacked
Nathanw1014 Aug 30, 2026
3f32113
Merge branch 'vulkan/mmid-stack' into stage/strix-stacked
Nathanw1014 Aug 30, 2026
4366d29
Merge branch 'vulkan/dense-gemm' into stage/strix-stacked
Nathanw1014 Aug 30, 2026
f34e16a
Merge branch 'vulkan/deltanet-prefill' into stage/strix-stacked
Nathanw1014 Aug 30, 2026
a6e38dd
Merge branch 'vulkan/strix-misc' into stage/strix-stacked
Nathanw1014 Aug 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .devops/openvino.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ARG OPENVINO_VERSION_MAJOR=2026.3
ARG OPENVINO_VERSION_FULL=2026.3.0.22451.bd8d6542e3c
ARG OPENVINO_VERSION_MAJOR=2026.3.1
ARG OPENVINO_VERSION_FULL=2026.3.1.22476.56d9685302d
ARG UBUNTU_VERSION=24.04

# Intel GPU driver versions. https://github.com/intel/compute-runtime/releases
ARG IGC_VERSION=v2.38.2
ARG IGC_VERSION_FULL=2_2.38.2+22051
ARG COMPUTE_RUNTIME_VERSION=26.27.39122.11
ARG COMPUTE_RUNTIME_VERSION_FULL=26.27.39122.11-0
ARG IGC_VERSION=v2.40.13
ARG IGC_VERSION_FULL=2_2.40.13+22418
ARG COMPUTE_RUNTIME_VERSION=26.31.39395.13
ARG COMPUTE_RUNTIME_VERSION_FULL=26.31.39395.13-0
ARG IGDGMM_VERSION=22.10.0

# Intel NPU driver versions. https://github.com/intel/linux-npu-driver/releases
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ jobs:

env:
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
OPENVINO_VERSION_MAJOR: "2026.3"
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
OPENVINO_VERSION_MAJOR: "2026.3.1"
OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"

steps:
- name: Clone
Expand All @@ -69,8 +69,8 @@ jobs:

env:
# Sync versions in build.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
OPENVINO_VERSION_MAJOR: "2026.3"
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
OPENVINO_VERSION_MAJOR: "2026.3.1"
OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"

steps:
- name: Clone
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/build-openvino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ env:
LLAMA_ARG_LOG_COLORS: 1
LLAMA_ARG_LOG_PREFIX: 1
LLAMA_ARG_LOG_TIMESTAMPS: 1
# TODO: fix and re-enable the `test-llama-archs` and `test-recurrent-state-rollback`
CTEST_EXCLUDE: "test-llama-archs|^test-recurrent-state-rollback"

jobs:
ubuntu-24-openvino:
runs-on: [self-hosted, Linux, Intel, OpenVINO]

env:
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
OPENVINO_VERSION_MAJOR: "2026.3"
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
OPENVINO_VERSION_MAJOR: "2026.3.1"
OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"

steps:
- name: Clone
Expand Down Expand Up @@ -78,26 +80,24 @@ jobs:

- name: Test (CPU)
id: cmake_test_cpu
# TODO: fix and re-enable the `test-llama-archs` test below
run: |
cd ${{ github.workspace }}
ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" --verbose --timeout 2000
ctest --test-dir build/ReleaseOV -L main -E "${{ env.CTEST_EXCLUDE }}" --verbose --timeout 3000

- name: Test (GPU)
id: cmake_test_gpu
# TODO: fix and re-enable the `test-llama-archs` test below
run: |
cd ${{ github.workspace }}
export GGML_OPENVINO_DEVICE=GPU
ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" --verbose --timeout 3000
ctest --test-dir build/ReleaseOV -L main -E "${{ env.CTEST_EXCLUDE }}" --verbose --timeout 3000

openvino-windows-2022:
runs-on: windows-2022

env:
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
OPENVINO_VERSION_MAJOR: "2026.3"
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
OPENVINO_VERSION_MAJOR: "2026.3.1"
OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"

steps:
- name: Clone
Expand Down Expand Up @@ -159,14 +159,13 @@ jobs:
- name: Test (CPU)
id: cmake_test_cpu
shell: cmd
# TODO: fix and re-enable the `test-llama-archs` test below
run: |
REM Find extracted OpenVINO folder dynamically
for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
call "%OPENVINO_ROOT%\setupvars.bat"

cd build
ctest --test-dir ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" -C Release --verbose --timeout 3000
ctest --test-dir ReleaseOV -L main -E "${{ env.CTEST_EXCLUDE }}" -C Release --verbose --timeout 3000

- name: ccache-clear
uses: ./.github/actions/ccache-clear
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-self-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ jobs:

env:
# Sync versions in build.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
OPENVINO_VERSION_MAJOR: "2026.3"
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
OPENVINO_VERSION_MAJOR: "2026.3.1"
OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"

steps:
- name: Clone
Expand Down
33 changes: 14 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,8 @@ jobs:

env:
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
OPENVINO_VERSION_MAJOR: "2026.3"
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
OPENVINO_VERSION_MAJOR: "2026.3.1"
OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"

steps:
- name: Set OpenVINO version output
Expand Down Expand Up @@ -529,8 +529,8 @@ jobs:

env:
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
OPENVINO_VERSION_MAJOR: "2026.3"
OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
OPENVINO_VERSION_MAJOR: "2026.3.1"
OPENVINO_VERSION_FULL: "2026.3.1.22476.56d9685302d"

steps:
- name: Set OpenVINO version output
Expand Down Expand Up @@ -714,10 +714,10 @@ jobs:
with:
key: release-windows-2025-vs2026-${{ matrix.arch }}-cpu

# TODO: build only the ggml-hip backend like the other windows backend jobs
# (windows-cuda, windows-sycl), then drop the ui-build dependency
# note: builds only the ggml-hip backend - llama-server is injected from the
# windows-cpu zip during the release "Merge artifacts" step
windows-rocm:
needs: [check-release, ui-build]
needs: [check-release]
if: ${{ needs.check-release.outputs.should_release == 'true' }}

runs-on: windows-2022
Expand All @@ -736,12 +736,6 @@ jobs:
with:
fetch-depth: 0

- name: Download UI build
uses: actions/download-artifact@v7
with:
name: llama-ui.zip
path: tools/ui/dist

- name: Install Ninja
run: |
choco install ninja
Expand Down Expand Up @@ -804,17 +798,15 @@ jobs:
-DCMAKE_PREFIX_PATH="${env:HIP_PATH}" `
-DGGML_BACKEND_DL=ON `
-DGGML_NATIVE=OFF `
-DGGML_CPU=ON `
-DGGML_CPU_ALL_VARIANTS=ON `
-DGGML_CPU=OFF `
-DGGML_HIP=ON `
-DCMAKE_C_COMPILER="${env:HIP_PATH}\lib\llvm\bin\clang.exe" `
-DCMAKE_CXX_COMPILER="${env:HIP_PATH}\lib\llvm\bin\clang++.exe" `
-DCMAKE_C_FLAGS="-Wno-error=incompatible-pointer-types" `
-DCMAKE_HIP_COMPILER="${env:HIP_PATH}\lib\llvm\bin\clang.exe" `
-DHIP_PATH="${env:HIP_PATH}" `
-DGGML_HIP_ROCWMMA_FATTN=ON `
-DAMDGPU_TARGETS="${{ matrix.gpu_targets }}"
cmake --build build --config Release --parallel ${env:NUMBER_OF_PROCESSORS}
cmake --build build --config Release --parallel ${env:NUMBER_OF_PROCESSORS} --target ggml-hip

- name: Verify HIP backend was built
run: |
Expand Down Expand Up @@ -866,8 +858,11 @@ jobs:

- name: Pack artifacts
run: |
cp "LICENSE" "build\bin\Release\"
7z a -snl llama-bin-win-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.zip .\build\bin\Release\*
7z a -snl llama-bin-win-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.zip `
.\build\bin\Release\ggml-hip.dll `
.\build\bin\Release\amdhip64_7.dll `
.\build\bin\Release\rocm_kpack.dll `
.\build\bin\Release\amd_comgr.dll

- name: Upload artifacts
uses: actions/upload-artifact@v6
Expand Down
4 changes: 2 additions & 2 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ if [ ! -z ${GG_BUILD_OPENVINO} ]; then
fi
CMAKE_EXTRA="${CMAKE_EXTRA} -DGGML_OPENVINO=ON"

# TODO: fix and re-enable the `test-llama-archs` test below
CTEST_EXTRA="-E test-llama-archs|test-recurrent-state-rollback-nemotron-h"
# TODO: fix and re-enable the `test-llama-archs` and `test-recurrent-state-rollback*`
CTEST_EXTRA="-E test-llama-archs|^test-recurrent-state-rollback"
fi

## helpers
Expand Down
18 changes: 13 additions & 5 deletions common/arg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1643,6 +1643,14 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
}
}
).set_env("LLAMA_ARG_CTX_SIZE"));
add_opt(common_arg(
{ "--kv-unified-per-slot" }, "N",
"context limit per parallel slot (default: unset, behavior unchanged).\n"
"when set without -c/--ctx-size, the shared KV pool is sized to n_parallel*N",
[](common_params & params, int value) {
params.kv_unified_per_slot = value;
}
).set_env("LLAMA_ARG_KV_UNIFIED_PER_SLOT").set_examples({ LLAMA_EXAMPLE_SERVER }));
add_opt(common_arg(
{"-n", "--predict", "--n-predict"}, "N",
string_format(
Expand Down Expand Up @@ -2721,18 +2729,18 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
}
).set_env("LLAMA_ARG_LOAD_MODE"));
add_opt(common_arg(
{"--tensor-read-lazy"}, "MODE",
{"-lzm", "--lazy-mode"}, "MODE",
"on-demand reading of certain tensors, for example per-layer embeddings (default: auto)\n"
"- on: read the rows of such tensors from disk on demand instead of keeping them resident (requires mmap)\n"
"- auto: on, but only for tensors larger than 4 GiB\n"
"- off: always keep them resident",
[](common_params & params, const std::string & value) {
/**/ if (value == "on") { params.tensor_read_lazy = LLAMA_TENSOR_READ_LAZY_ON; }
else if (value == "auto") { params.tensor_read_lazy = LLAMA_TENSOR_READ_LAZY_AUTO; }
else if (value == "off") { params.tensor_read_lazy = LLAMA_TENSOR_READ_LAZY_OFF; }
/**/ if (value == "on") { params.lazy_mode = LLAMA_LAZY_MODE_ON; }
else if (value == "auto") { params.lazy_mode = LLAMA_LAZY_MODE_AUTO; }
else if (value == "off") { params.lazy_mode = LLAMA_LAZY_MODE_OFF; }
else { throw std::invalid_argument("invalid value"); }
}
).set_env("LLAMA_ARG_TENSOR_READ_LAZY"));
).set_env("LLAMA_ARG_LAZY_MODE"));
add_opt(common_arg(
{"--numa"}, "TYPE",
"attempt optimizations that help on some NUMA systems\n"
Expand Down
2 changes: 1 addition & 1 deletion common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,7 @@ struct llama_model_params common_model_params_to_llama(common_params & params) {
mparams.main_gpu = params.main_gpu;
mparams.split_mode = params.split_mode;
mparams.load_mode = params.load_mode;
mparams.tensor_read_lazy = params.tensor_read_lazy;
mparams.lazy_mode = params.lazy_mode;
mparams.tensor_split = params.tensor_split;
mparams.check_tensors = params.check_tensors;
mparams.use_extra_bufts = !params.no_extra_bufts;
Expand Down
3 changes: 2 additions & 1 deletion common/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ struct common_params {
enum llama_split_mode split_mode = LLAMA_SPLIT_MODE_LAYER; // how to split the model across GPUs
enum llama_load_mode load_mode = LLAMA_LOAD_MODE_AUTO; // how to load the model

enum llama_tensor_read_lazy tensor_read_lazy = LLAMA_TENSOR_READ_LAZY_AUTO; // on-demand reading of tensors marked by the arch
enum llama_lazy_mode lazy_mode = LLAMA_LAZY_MODE_AUTO; // on-demand reading of tensors marked by the arch

common_cpu_params cpuparams;
common_cpu_params cpuparams_batch;
Expand Down Expand Up @@ -649,6 +649,7 @@ struct common_params {
bool cache_prompt = true; // whether to enable prompt caching
bool cache_idle_slots = true; // save and clear idle slots upon starting a new task
int32_t n_ctx_checkpoints = 32; // max number of context checkpoints per slot
int32_t kv_unified_per_slot = 0; // max context per parallel slot; 0 = unset
int32_t checkpoint_min_step = 8192; // minimum spacing between context checkpoints
int32_t cache_ram_mib = 8192; // -1 = no limit, 0 - disable, 1 = 1 MiB, etc.

Expand Down
18 changes: 17 additions & 1 deletion common/speculative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,9 @@ struct common_speculative_impl_draft_dflash : public common_speculative_impl {
// dspark speculators
bool sample_from_anchor = true;

// block-internal attention
bool causal_attn = false;

const int32_t * target_layer_ids = nullptr; // model_dft's extract layer indices
uint32_t target_layer_ids_n = 0;

Expand Down Expand Up @@ -1053,12 +1056,25 @@ struct common_speculative_impl_draft_dflash : public common_speculative_impl {
if (llama_model_meta_val_str(model_dft, "dflash.sample_from_anchor", buf, sizeof(buf)) >= 0) {
sample_from_anchor = std::strcmp(buf, "true") == 0;
}
if (llama_model_meta_val_str(model_dft, "dflash.attention.causal", buf, sizeof(buf)) >= 0) {
causal_attn = std::strcmp(buf, "true") == 0;
}
}

selector_top_k = llama_model_dflash_selector_top_k(model_dft);
is_dflash2 = selector_top_k > 0;
mask_token_id = llama_vocab_mask(llama_model_get_vocab(model_dft));

if (is_dspark && this->params.p_min > 0.0f) {
char buf[16] = {};
const bool has_conf =
llama_model_meta_val_str(model_dft, "dflash.has_confidence_head", buf, sizeof(buf)) < 0 ||
std::strcmp(buf, "true") == 0;
if (!has_conf) {
throw std::runtime_error("DSpark draft has no confidence head: please set --spec-draft-p-min 0");
}
}

LOG_INF("%s: adding speculative implementation '%s'\n", __func__, common_speculative_type_to_str(type).c_str());
adaptive_n = this->params.adaptive;
LOG_INF("%s: - n_max=%d, n_min=%d, p_min=%.2f\n", __func__, this->params.n_max, this->params.n_min, this->params.p_min);
Expand Down Expand Up @@ -1118,7 +1134,7 @@ struct common_speculative_impl_draft_dflash : public common_speculative_impl {

// DFlash2 reads its selector lattice from h_nextn and never consumes raw logits.
llama_set_embeddings_nextn(ctx_dft, true, /*masked*/ !is_dflash2);
llama_set_causal_attn(ctx_dft, false); // DFlash needs non-causal attention
llama_set_causal_attn(ctx_dft, causal_attn); // DFlash needs non-causal attention unless the model says otherwise
}

~common_speculative_impl_draft_dflash() override {
Expand Down
18 changes: 15 additions & 3 deletions conversion/qwen.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,20 @@ def set_gguf_parameters(self):
extract_layer_ids = [i + 1 for i in target_layer_ids]
self.gguf_writer.add_target_layers(extract_layer_ids)

use_sliding_window = self.hparams.get("use_sliding_window", False)
sliding_window = self.hparams.get("sliding_window")
use_sliding_window = self.hparams.get("use_sliding_window", False) or dflash_config.get("use_swa", False)
sliding_window = dflash_config.get("swa_window_size") or self.hparams.get("sliding_window")
layer_types = self.hparams.get("layer_types")
if use_sliding_window and sliding_window and layer_types:
is_swa = [lt == "sliding_attention" for lt in layer_types]
self.gguf_writer.add_sliding_window(sliding_window)
self.gguf_writer.add_sliding_window_pattern(is_swa)

causal = self.hparams.get("is_causal")
if causal is None:
causal = dflash_config.get("causal")
if causal is not None:
self.gguf_writer.add_causal_attention(bool(causal))

# M-RoPE target: the draft ropes on the temporal dim only, so write
# degenerate sections [n_rot/2, 0, 0, 0]
if self._target_uses_mrope():
Expand All @@ -737,6 +743,8 @@ def filter_tensors(cls, item: tuple[str, Callable[[], Tensor]]) -> tuple[str, Ca
name, gen = item
if not name.startswith("model."):
name = "model." + name
if "sink" in name and not name.endswith(".weight"):
name += ".weight"
return super().filter_tensors((name, gen))

_ROPE_PERMUTE_SUFFIXES = (
Expand Down Expand Up @@ -815,6 +823,10 @@ def set_gguf_parameters(self):
super().set_gguf_parameters()
self.gguf_writer.add_sample_from_anchor(self._sample_from_anchor)

# confidence head is optional: vanilla-markov exports ship without it
has_conf = any("confidence_head.proj" in name for name in self.model_tensors)
self.gguf_writer.add_has_confidence_head(has_conf)

@classmethod
def filter_tensors(cls, item: tuple[str, Callable[[], Tensor]]) -> tuple[str, Callable[[], Tensor]] | None:
if item[0] == "t2d": # not used at runtime
Expand All @@ -833,7 +845,7 @@ def modify_tensors(self, data_torch: Tensor, name: str, bid: int | None) -> Iter
self._d2t = data_torch
return

if self._n_vocab_draft == self.hparams["vocab_size"] and name.endswith(("embed_tokens.weight", "lm_head.weight")):
if self._n_vocab_draft == self.hparams["vocab_size"] and name.endswith("lm_head.weight"):
return

# interleaved-rope checkpoints (rope_is_neox_style = false) -> NeoX layout: per head, even dims first then odd
Expand Down
Loading
Loading