diff --git a/.devops/cann.Dockerfile b/.devops/cann.Dockerfile
index 9df86d0489..36cee7bdb6 100644
--- a/.devops/cann.Dockerfile
+++ b/.devops/cann.Dockerfile
@@ -13,6 +13,20 @@ ARG APP_REVISION=N/A
# BUILD STAGE
# Compile all binary files and libraries
# ==============================================================================
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
FROM ${CANN_BASE_IMAGE} AS build
# -- Install build dependencies --
@@ -26,6 +40,8 @@ WORKDIR /app
# -- Copy project files --
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
# -- Set CANN environment variables (required for compilation) --
# Using ENV instead of `source` allows environment variables to persist across the entire image layer
ENV ASCEND_TOOLKIT_HOME=/usr/local/Ascend/ascend-toolkit/latest
@@ -129,7 +145,7 @@ ENTRYPOINT ["/app/tools.sh"]
# ==============================================================================
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
ENTRYPOINT [ "/app/llama-cli" ]
@@ -140,7 +156,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
HEALTHCHECK --interval=5m CMD [ "curl", "-f", "http://localhost:8080/health" ]
diff --git a/.devops/cpu.Dockerfile b/.devops/cpu.Dockerfile
index a6dd6a516b..cb92343d6c 100644
--- a/.devops/cpu.Dockerfile
+++ b/.devops/cpu.Dockerfile
@@ -3,7 +3,21 @@ ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
-FROM ubuntu:$UBUNTU_VERSION AS build
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
+FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
ARG TARGETARCH
@@ -16,6 +30,8 @@ WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
RUN if [ "$TARGETARCH" = "amd64" ] || [ "$TARGETARCH" = "arm64" ]; then \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON; \
else \
@@ -37,7 +53,7 @@ RUN mkdir -p /app/full \
&& cp .devops/tools.sh /app/full/tools.sh
## Base image
-FROM ubuntu:$UBUNTU_VERSION AS base
+FROM docker.io/ubuntu:$UBUNTU_VERSION AS base
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
@@ -88,7 +104,7 @@ ENTRYPOINT ["/app/tools.sh"]
### Light, CLI only
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
@@ -99,7 +115,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
WORKDIR /app
diff --git a/.devops/cuda.Dockerfile b/.devops/cuda.Dockerfile
index 825df2a582..c9a498d538 100644
--- a/.devops/cuda.Dockerfile
+++ b/.devops/cuda.Dockerfile
@@ -1,29 +1,47 @@
ARG UBUNTU_VERSION=24.04
# This needs to generally match the container host's environment.
ARG CUDA_VERSION=12.8.1
+ARG GCC_VERSION=14
# Target the CUDA build image
-ARG BASE_CUDA_DEV_CONTAINER=nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
+ARG BASE_CUDA_DEV_CONTAINER=docker.io/nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
-ARG BASE_CUDA_RUN_CONTAINER=nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
+ARG BASE_CUDA_RUN_CONTAINER=docker.io/nvidia/cuda:${CUDA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
FROM ${BASE_CUDA_DEV_CONTAINER} AS build
+ARG GCC_VERSION
# CUDA architecture to build for (defaults to all supported archs)
ARG CUDA_DOCKER_ARCH=default
RUN apt-get update && \
- apt-get install -y gcc-14 g++-14 build-essential cmake python3 python3-pip git libssl-dev libgomp1
+ apt-get install -y gcc-${GCC_VERSION} g++-${GCC_VERSION} build-essential cmake python3 python3-pip git libssl-dev libgomp1
-ENV CC=gcc-14 CXX=g++-14 CUDAHOSTCXX=g++-14
+ENV CC=gcc-${GCC_VERSION} CXX=g++-${GCC_VERSION} CUDAHOSTCXX=g++-${GCC_VERSION}
WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
RUN if [ "${CUDA_DOCKER_ARCH}" != "default" ]; then \
export CMAKE_ARGS="-DCMAKE_CUDA_ARCHITECTURES=${CUDA_DOCKER_ARCH}"; \
fi && \
@@ -95,7 +113,7 @@ ENTRYPOINT ["/app/tools.sh"]
### Light, CLI only
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
@@ -106,7 +124,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
WORKDIR /app
diff --git a/.devops/intel.Dockerfile b/.devops/intel.Dockerfile
index 93fd4fa5a3..b4bcd94b92 100644
--- a/.devops/intel.Dockerfile
+++ b/.devops/intel.Dockerfile
@@ -5,9 +5,23 @@ ARG APP_REVISION=N/A
## Build Image
-FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS build
+ARG NODE_VERSION=24
-ARG GGML_SYCL_F16=OFF
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
+FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION AS build
+
+ARG GGML_SYCL_F16=ON
ARG LEVEL_ZERO_VERSION=1.28.2
ARG LEVEL_ZERO_UBUNTU_VERSION=u24.04
RUN apt-get update && \
@@ -22,9 +36,12 @@ WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
RUN if [ "${GGML_SYCL_F16}" = "ON" ]; then \
echo "GGML_SYCL_F16 is set" \
- && export OPT_SYCL_F16="-DGGML_SYCL_F16=ON"; \
+ && export OPT_SYCL_F16="-DGGML_SYCL_F16=ON" \
+ && export SYCL_PROGRAM_COMPILE_OPTIONS="-cl-fp32-correctly-rounded-divide-sqrt"; \
fi && \
echo "Building with dynamic libs" && \
cmake -B build -DGGML_NATIVE=OFF -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DLLAMA_BUILD_TESTS=OFF ${OPT_SYCL_F16} && \
@@ -42,7 +59,7 @@ RUN mkdir -p /app/full \
&& cp requirements.txt /app/full \
&& cp .devops/tools.sh /app/full/tools.sh
-FROM intel/deep-learning-essentials:$ONEAPI_VERSION AS base
+FROM docker.io/intel/deep-learning-essentials:$ONEAPI_VERSION AS base
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
@@ -124,7 +141,7 @@ ENTRYPOINT ["/app/tools.sh"]
FROM base AS light
COPY --from=build /app/lib/ /app
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
@@ -136,7 +153,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
COPY --from=build /app/lib/ /app
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
WORKDIR /app
diff --git a/.devops/llama-cli-cann.Dockerfile b/.devops/llama-cli-cann.Dockerfile
index 447d871ac4..096151f1af 100644
--- a/.devops/llama-cli-cann.Dockerfile
+++ b/.devops/llama-cli-cann.Dockerfile
@@ -3,7 +3,7 @@ ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
-FROM ascendai/cann:$ASCEND_VERSION AS build
+FROM docker.io/ascendai/cann:$ASCEND_VERSION AS build
WORKDIR /app
@@ -30,7 +30,7 @@ RUN echo "Building with static libs" && \
cmake --build build --config Release --target llama-completion
# TODO: use image with NNRT
-FROM ascendai/cann:$ASCEND_VERSION AS runtime
+FROM docker.io/ascendai/cann:$ASCEND_VERSION AS runtime
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
diff --git a/.devops/musa.Dockerfile b/.devops/musa.Dockerfile
index ddc29b2786..d30a70bb36 100644
--- a/.devops/musa.Dockerfile
+++ b/.devops/musa.Dockerfile
@@ -2,14 +2,28 @@ ARG UBUNTU_VERSION=22.04
# This needs to generally match the container host's environment.
ARG MUSA_VERSION=rc4.3.0
# Target the MUSA build image
-ARG BASE_MUSA_DEV_CONTAINER=mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_VERSION}-amd64
+ARG BASE_MUSA_DEV_CONTAINER=docker.io/mthreads/musa:${MUSA_VERSION}-devel-ubuntu${UBUNTU_VERSION}-amd64
-ARG BASE_MUSA_RUN_CONTAINER=mthreads/musa:${MUSA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}-amd64
+ARG BASE_MUSA_RUN_CONTAINER=docker.io/mthreads/musa:${MUSA_VERSION}-runtime-ubuntu${UBUNTU_VERSION}-amd64
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
FROM ${BASE_MUSA_DEV_CONTAINER} AS build
# MUSA architecture to build for (defaults to all supported archs)
@@ -29,6 +43,8 @@ WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
RUN if [ "${MUSA_DOCKER_ARCH}" != "default" ]; then \
export CMAKE_ARGS="-DMUSA_ARCHITECTURES=${MUSA_DOCKER_ARCH}"; \
fi && \
@@ -99,7 +115,7 @@ ENTRYPOINT ["/app/tools.sh"]
### Light, CLI only
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
@@ -110,7 +126,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
WORKDIR /app
diff --git a/.devops/openvino.Dockerfile b/.devops/openvino.Dockerfile
index ab14288ce1..a43e5c4993 100644
--- a/.devops/openvino.Dockerfile
+++ b/.devops/openvino.Dockerfile
@@ -1,18 +1,18 @@
-ARG OPENVINO_VERSION_MAJOR=2026.0
-ARG OPENVINO_VERSION_FULL=2026.0.0.20965.c6d6a13a886
+ARG OPENVINO_VERSION_MAJOR=2026.3
+ARG OPENVINO_VERSION_FULL=2026.3.0.22451.bd8d6542e3c
ARG UBUNTU_VERSION=24.04
# Intel GPU driver versions. https://github.com/intel/compute-runtime/releases
-ARG IGC_VERSION=v2.30.1
-ARG IGC_VERSION_FULL=2_2.30.1+20950
-ARG COMPUTE_RUNTIME_VERSION=26.09.37435.1
-ARG COMPUTE_RUNTIME_VERSION_FULL=26.09.37435.1-0
-ARG IGDGMM_VERSION=22.9.0
+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 IGDGMM_VERSION=22.10.0
# Intel NPU driver versions. https://github.com/intel/linux-npu-driver/releases
-ARG NPU_DRIVER_VERSION=v1.32.0
-ARG NPU_DRIVER_FULL=v1.32.0.20260402-23905121947
-ARG LIBZE1_VERSION=1.27.0-1~24.04~ppa2
+ARG NPU_DRIVER_VERSION=v1.35.0
+ARG NPU_DRIVER_FULL=v1.35.0.20260722-29947505341
+ARG LIBZE1_VERSION=1.28.2-1~24.04~ppa1
# Optional proxy build arguments
ARG http_proxy=
@@ -22,8 +22,22 @@ ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
## Build Image
-FROM ubuntu:${UBUNTU_VERSION} AS build
+FROM docker.io/ubuntu:${UBUNTU_VERSION} AS build
# Pass proxy args to build stage
ARG http_proxy
@@ -46,13 +60,18 @@ RUN apt-get update && \
intel-opencl-icd && \
rm -rf /var/lib/apt/lists/*
-# Install OpenVINO for Ubuntu 24.04
+# OpenVINO toolkit and GPU/NPU drivers are cached via BuildKit cache mounts to avoid re-downloading on rebuilds.
+# Install OpenVINO for Ubuntu 24.04.
ARG OPENVINO_VERSION_MAJOR
ARG OPENVINO_VERSION_FULL
-RUN mkdir -p /opt/intel && \
- wget https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION_MAJOR}/linux/openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64.tgz && \
- tar -xf openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64.tgz && \
- mv openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64 /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} && \
+RUN --mount=type=cache,target=/var/cache/openvino,sharing=locked \
+ mkdir -p /opt/intel && \
+ TGZ=/var/cache/openvino/openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64.tgz && \
+ if [ ! -f "$TGZ" ]; then \
+ wget -O "$TGZ" https://storage.openvinotoolkit.org/repositories/openvino/packages/${OPENVINO_VERSION_MAJOR}/linux/openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64.tgz; \
+ fi && \
+ tar -xf "$TGZ" -C /opt/intel/ && \
+ mv /opt/intel/openvino_toolkit_ubuntu24_${OPENVINO_VERSION_FULL}_x86_64 /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} && \
cd /opt/intel/openvino_${OPENVINO_VERSION_MAJOR} && \
echo "Y" | ./install_dependencies/install_openvino_dependencies.sh && \
cd - && \
@@ -64,18 +83,23 @@ WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
# Build Stage
RUN bash -c "source ${OpenVINO_DIR}/setupvars.sh && \
cmake -B build/ReleaseOV -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
+ -DLLAMA_BUILD_TESTS=OFF \
+ -DGGML_NATIVE=OFF \
+ -DGGML_BACKEND_DL=ON \
+ -DGGML_CPU_ALL_VARIANTS=ON \
-DGGML_OPENVINO=ON && \
- cmake --build build/ReleaseOV -j$(nproc)"
+ cmake --build build/ReleaseOV --parallel "
-# Copy all necessary libraries
+# Copy all necessary libraries (build outputs + OpenVINO runtime libs)
RUN mkdir -p /app/lib && \
- find build/ReleaseOV -name '*.so*' -exec cp {} /app/lib \; && \
- find ${OpenVINO_DIR}/runtime/lib/intel64 -name '*.so*' -exec cp -P {} /app/lib \; 2>/dev/null || \
- find ${OpenVINO_DIR}/lib/intel64 -name '*.so*' -exec cp -P {} /app/lib \;
+ find build/ReleaseOV -name '*.so*' -exec cp -P {} /app/lib \; && \
+ find "${OpenVINO_DIR}/runtime/lib/intel64" -name '*.so*' -exec cp -P {} /app/lib \;
# Create runtime directories and copy binaries
RUN mkdir -p /app/full \
@@ -88,7 +112,7 @@ RUN mkdir -p /app/full \
&& cp .devops/tools.sh /app/full/tools.sh
## Base Runtime Image
-FROM ubuntu:${UBUNTU_VERSION} AS base
+FROM docker.io/ubuntu:${UBUNTU_VERSION} AS base
# Pass proxy args to runtime stage
ARG http_proxy
@@ -120,33 +144,41 @@ ARG IGC_VERSION_FULL
ARG COMPUTE_RUNTIME_VERSION
ARG COMPUTE_RUNTIME_VERSION_FULL
ARG IGDGMM_VERSION
-RUN mkdir /tmp/neo/ && cd /tmp/neo/ \
- && wget https://github.com/intel/intel-graphics-compiler/releases/download/${IGC_VERSION}/intel-igc-core-${IGC_VERSION_FULL}_amd64.deb \
- && wget https://github.com/intel/intel-graphics-compiler/releases/download/${IGC_VERSION}/intel-igc-opencl-${IGC_VERSION_FULL}_amd64.deb \
- && wget https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/intel-ocloc-dbgsym_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.ddeb \
- && wget https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/intel-ocloc_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.deb \
- && wget https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/intel-opencl-icd-dbgsym_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.ddeb \
- && wget https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/intel-opencl-icd_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.deb \
- && wget https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/libigdgmm12_${IGDGMM_VERSION}_amd64.deb \
- && wget https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/libze-intel-gpu1-dbgsym_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.ddeb \
- && wget https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/libze-intel-gpu1_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.deb \
- && dpkg --install *.deb \
- && rm -rf /tmp/neo/
+RUN --mount=type=cache,target=/var/cache/intel-gpu,sharing=locked \
+ set -eux; \
+ cd /var/cache/intel-gpu; \
+ for url in \
+ https://github.com/intel/intel-graphics-compiler/releases/download/${IGC_VERSION}/intel-igc-core-${IGC_VERSION_FULL}_amd64.deb \
+ https://github.com/intel/intel-graphics-compiler/releases/download/${IGC_VERSION}/intel-igc-opencl-${IGC_VERSION_FULL}_amd64.deb \
+ https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/intel-ocloc_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.deb \
+ https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/intel-opencl-icd_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.deb \
+ https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/libigdgmm12_${IGDGMM_VERSION}_amd64.deb \
+ https://github.com/intel/compute-runtime/releases/download/${COMPUTE_RUNTIME_VERSION}/libze-intel-gpu1_${COMPUTE_RUNTIME_VERSION_FULL}_amd64.deb ; do \
+ f=$(basename "$url"); \
+ [ -f "$f" ] || wget -q -O "$f" "$url"; \
+ done; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends ./*.deb; \
+ rm -rf /var/lib/apt/lists/*
# Install NPU drivers
ARG NPU_DRIVER_VERSION
ARG NPU_DRIVER_FULL
ARG LIBZE1_VERSION
-RUN mkdir /tmp/npu/ && cd /tmp/npu/ \
- && wget https://github.com/intel/linux-npu-driver/releases/download/${NPU_DRIVER_VERSION}/linux-npu-driver-${NPU_DRIVER_FULL}-ubuntu2404.tar.gz \
- && tar -xf linux-npu-driver-${NPU_DRIVER_FULL}-ubuntu2404.tar.gz \
- && dpkg --install *.deb \
- && rm -rf /tmp/npu/
-
-RUN cd /tmp \
- && wget https://snapshot.ppa.launchpadcontent.net/kobuk-team/intel-graphics/ubuntu/20260324T100000Z/pool/main/l/level-zero-loader/libze1_${LIBZE1_VERSION}_amd64.deb \
- && dpkg --install libze1_${LIBZE1_VERSION}_amd64.deb \
- && rm libze1_${LIBZE1_VERSION}_amd64.deb
+RUN --mount=type=cache,target=/var/cache/intel-npu,sharing=locked \
+ set -eux; \
+ TGZ=/var/cache/intel-npu/linux-npu-driver-${NPU_DRIVER_FULL}-ubuntu2404.tar.gz; \
+ if [ ! -f "$TGZ" ]; then \
+ wget -q -O "$TGZ" https://github.com/intel/linux-npu-driver/releases/download/${NPU_DRIVER_VERSION}/linux-npu-driver-${NPU_DRIVER_FULL}-ubuntu2404.tar.gz; \
+ fi; \
+ DEB=/var/cache/intel-npu/libze1_${LIBZE1_VERSION}_amd64.deb; \
+ if [ ! -f "$DEB" ]; then \
+ wget -q -O "$DEB" https://snapshot.ppa.launchpadcontent.net/kobuk-team/intel-graphics/ubuntu/20260606T100000Z/pool/main/l/level-zero-loader/libze1_${LIBZE1_VERSION}_amd64.deb; \
+ fi; \
+ mkdir /tmp/npu/ && cd /tmp/npu/ && tar -xf "$TGZ" && cp "$DEB" .; \
+ apt-get update; \
+ apt-get install -y --no-install-recommends ./*.deb; \
+ rm -rf /tmp/npu/ /var/lib/apt/lists/*
COPY --from=build /app/lib/ /app/
@@ -166,22 +198,26 @@ RUN apt-get update && \
python3 \
python3-venv \
python3-pip && \
- python3 -m venv /ov-venv && \
- /ov-venv/bin/pip install --no-cache-dir --upgrade pip setuptools wheel && \
- /ov-venv/bin/pip install --no-cache-dir -r requirements.txt && \
+ python3 -m venv /openvino-venv && \
+ /openvino-venv/bin/pip install --no-cache-dir --upgrade pip setuptools wheel && \
+ /openvino-venv/bin/pip install --no-cache-dir -r requirements.txt && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /tmp/* /var/tmp/* && \
find /var/cache/apt/archives /var/lib/apt/lists -not -name lock -type f -delete && \
find /var/cache -type f -delete
-ENTRYPOINT ["/bin/bash", "-c", "source /ov-venv/bin/activate && exec /app/tools.sh \"$@\"", "--"]
+# Activate the venv
+ENV VIRTUAL_ENV=/openvino-venv \
+ PATH=/openvino-venv/bin:$PATH
+
+ENTRYPOINT ["/app/tools.sh"]
### Light, CLI only
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app/
WORKDIR /app
@@ -192,7 +228,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app/
+COPY --from=build /app/full/llama /app/full/llama-server /app/
WORKDIR /app
diff --git a/.devops/rocm.Dockerfile b/.devops/rocm.Dockerfile
index 2209ab661f..20f6ad6360 100644
--- a/.devops/rocm.Dockerfile
+++ b/.devops/rocm.Dockerfile
@@ -5,12 +5,26 @@ ARG ROCM_VERSION=7.2.1
ARG AMDGPU_VERSION=7.2.1
# Target the ROCm build image
-ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
+ARG BASE_ROCM_DEV_CONTAINER=docker.io/rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
### Build image
FROM ${BASE_ROCM_DEV_CONTAINER} AS build
@@ -38,10 +52,11 @@ WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
RUN HIPCXX="$(hipconfig -l)/clang" HIP_PATH="$(hipconfig -R)" \
cmake -S . -B build \
-DGGML_HIP=ON \
- -DGGML_HIP_ROCWMMA_FATTN=ON \
-DAMDGPU_TARGETS="$ROCM_DOCKER_ARCH" \
-DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON \
-DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=OFF \
@@ -111,7 +126,7 @@ ENTRYPOINT ["/app/tools.sh"]
### Light, CLI only
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
@@ -122,7 +137,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
WORKDIR /app
diff --git a/.devops/s390x.Dockerfile b/.devops/s390x.Dockerfile
index 31c2fa902d..94a715ff2d 100644
--- a/.devops/s390x.Dockerfile
+++ b/.devops/s390x.Dockerfile
@@ -5,7 +5,7 @@ ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
### Build Llama.cpp stage
-FROM gcc:${GCC_VERSION} AS build
+FROM docker.io/gcc:${GCC_VERSION} AS build
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
@@ -55,7 +55,7 @@ COPY --from=build /opt/llama.cpp/conversion /llama.cpp/conversion
### Base image
-FROM ubuntu:${UBUNTU_VERSION} AS base
+FROM docker.io/ubuntu:${UBUNTU_VERSION} AS base
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
@@ -124,7 +124,7 @@ WORKDIR /llama.cpp/bin
# Copy llama.cpp binaries and libraries
COPY --from=collector /llama.cpp/bin/*.so /llama.cpp/bin
-COPY --from=collector /llama.cpp/bin/llama-cli /llama.cpp/bin/llama-completion /llama.cpp/bin
+COPY --from=collector /llama.cpp/bin/llama /llama.cpp/bin/llama-cli /llama.cpp/bin/llama-completion /llama.cpp/bin
ENTRYPOINT [ "/llama.cpp/bin/llama-cli" ]
@@ -138,7 +138,7 @@ WORKDIR /llama.cpp/bin
# Copy llama.cpp binaries and libraries
COPY --from=collector /llama.cpp/bin/*.so /llama.cpp/bin
-COPY --from=collector /llama.cpp/bin/llama-server /llama.cpp/bin
+COPY --from=collector /llama.cpp/bin/llama /llama.cpp/bin/llama-server /llama.cpp/bin
EXPOSE 8080
diff --git a/.devops/vulkan.Dockerfile b/.devops/vulkan.Dockerfile
index f26c7c45b8..d3599ffb82 100644
--- a/.devops/vulkan.Dockerfile
+++ b/.devops/vulkan.Dockerfile
@@ -3,7 +3,21 @@ ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
-FROM ubuntu:$UBUNTU_VERSION AS build
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
+FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
# Install build tools
RUN apt update && apt install -y git build-essential cmake wget xz-utils
@@ -17,6 +31,8 @@ WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
RUN cmake -B build -DGGML_NATIVE=OFF -DGGML_VULKAN=ON -DLLAMA_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON && \
cmake --build build --config Release -j$(nproc)
@@ -33,7 +49,7 @@ RUN mkdir -p /app/full \
&& cp .devops/tools.sh /app/full/tools.sh
## Base image
-FROM ubuntu:$UBUNTU_VERSION AS base
+FROM docker.io/ubuntu:$UBUNTU_VERSION AS base
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
@@ -91,7 +107,7 @@ ENTRYPOINT ["/app/tools.sh"]
### Light, CLI only
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
@@ -102,7 +118,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
WORKDIR /app
diff --git a/.devops/zendnn.Dockerfile b/.devops/zendnn.Dockerfile
index c25d7e4d3d..8a50b3ef6a 100644
--- a/.devops/zendnn.Dockerfile
+++ b/.devops/zendnn.Dockerfile
@@ -3,7 +3,21 @@ ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
ARG APP_REVISION=N/A
-FROM ubuntu:$UBUNTU_VERSION AS build
+ARG NODE_VERSION=24
+
+FROM docker.io/node:$NODE_VERSION AS web
+
+ARG APP_VERSION
+
+WORKDIR /app/tools/ui
+
+COPY tools/ui/package.json tools/ui/package-lock.json ./
+RUN npm ci
+
+COPY tools/ui/ ./
+RUN LLAMA_BUILD_NUMBER="$APP_VERSION" npm run build
+
+FROM docker.io/ubuntu:$UBUNTU_VERSION AS build
RUN apt-get update && \
apt-get install -y gcc-13 g++-13 build-essential git cmake libssl-dev libomp-dev libnuma-dev python3 ca-certificates
@@ -14,6 +28,8 @@ WORKDIR /app
COPY . .
+COPY --from=web /app/tools/ui/dist tools/ui/dist
+
RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_TESTS=OFF -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_ZENDNN=ON && \
cmake --build build -j $(nproc)
@@ -30,7 +46,7 @@ RUN mkdir -p /app/full \
&& cp .devops/tools.sh /app/full/tools.sh
## Base image
-FROM ubuntu:$UBUNTU_VERSION AS base
+FROM docker.io/ubuntu:$UBUNTU_VERSION AS base
ARG BUILD_DATE=N/A
ARG APP_VERSION=N/A
@@ -81,7 +97,7 @@ ENTRYPOINT ["/app/tools.sh"]
### Light, CLI only
FROM base AS light
-COPY --from=build /app/full/llama-cli /app/full/llama-completion /app
+COPY --from=build /app/full/llama /app/full/llama-cli /app/full/llama-completion /app
WORKDIR /app
@@ -92,7 +108,7 @@ FROM base AS server
ENV LLAMA_ARG_HOST=0.0.0.0
-COPY --from=build /app/full/llama-server /app
+COPY --from=build /app/full/llama /app/full/llama-server /app
WORKDIR /app
diff --git a/.dockerignore b/.dockerignore
index 064b7c7be8..0b81e83bf5 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -10,6 +10,8 @@
build*/
+tools/ui/node_modules/
+
models/*
/llama-cli
diff --git a/.github/actions/ccache-buckets/action.yml b/.github/actions/ccache-buckets/action.yml
new file mode 100644
index 0000000000..eaa8d164eb
--- /dev/null
+++ b/.github/actions/ccache-buckets/action.yml
@@ -0,0 +1,95 @@
+name: "ccache-buckets"
+description: "Save/restore latest GitHub Actions ccache matching a key prefix to/from HF buckets"
+inputs:
+ key:
+ description: "Cache key prefix to match and load"
+ required: true
+ folder:
+ description: "Bucket folder containing ccache files"
+ required: true
+ evict-old-files:
+ description: "Corresponds to the ccache --evict-older-than AGE option, where AGE is the number of seconds or days followed by the 's' or 'd' suffix respectively."
+ default: ''
+ save:
+ description: "Save ccache"
+ required: false
+ default: false
+ type: boolean
+ hf_bucket:
+ description: 'Hugging Face buckets path'
+ required: true
+
+runs:
+ using: "composite"
+ steps:
+ - name: Install Hugging Face Hub CLI
+ shell: bash
+ run: |
+ python3 -m venv .venv-hf
+ .venv-hf/bin/pip install -U huggingface_hub==1.28.0
+
+ - name: Restore ccache from buckets
+ if: ${{ inputs.save != 'true' }}
+ shell: bash
+ run: |
+ set +e -uo pipefail
+ source .venv-hf/bin/activate
+ CCACHE_DIR=$(ccache -k cache_dir)
+ if [[ -d "$CCACHE_DIR" ]]; then
+ CACHE_PATH=$(hf buckets list "hf://buckets/${{ inputs.hf_bucket }}/${{ inputs.folder }}" --json | jq -r '[.[] | select(.type == "file") | select(.path | startswith("${{ inputs.folder }}/${{ inputs.key }}") and endswith(".tar.gz"))] | sort_by(.path) | last | .path // ""')
+ if [[ -n "$CACHE_PATH" ]]; then
+ echo "Restoring ccache from '$CACHE_PATH'."
+ hf buckets cp "hf://buckets/${{ inputs.hf_bucket }}/$CACHE_PATH" ccache_bucket.tar.gz
+ mkdir -p ccache_bucket
+ if tar -xzf ccache_bucket.tar.gz -C ccache_bucket; then
+ rm -rf "$CCACHE_DIR"
+ mv ccache_bucket "$CCACHE_DIR"
+ ccache -z
+ fi
+ rm ccache_bucket.tar.gz
+ else
+ echo "No ccache found."
+ fi
+ else
+ echo "'$CCACHE_DIR' not found."
+ fi
+
+ - name: Save ccache to buckets
+ if: ${{ inputs.save == 'true' }}
+ shell: bash
+ run: |
+ if [[ -n "$HF_TOKEN" ]]; then
+ set +e -uo pipefail
+ source .venv-hf/bin/activate
+ CCACHE_DIR=$(ccache -k cache_dir)
+ if [[ -d "$CCACHE_DIR" ]]; then
+ ccache -s
+ if [[ -n "${{ inputs.evict-old-files }}" ]]; then
+ ccache --evict-older-than "${{ inputs.evict-old-files }}"
+ fi
+ DATESTAMP=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
+ CACHEFILE="${{ inputs.key }}-$DATESTAMP.tar.gz"
+ if tar -czf ccache_bucket.tar.gz -C "$CCACHE_DIR" .; then
+ hf buckets cp ccache_bucket.tar.gz "hf://buckets/${{ inputs.hf_bucket }}/${{ inputs.folder }}/$CACHEFILE"
+ fi
+ rm ccache_bucket.tar.gz
+ else
+ echo "'$CCACHE_DIR' not found."
+ fi
+ fi
+
+ - name: Remove old ccache files from buckets
+ if: ${{ inputs.save == 'true' }}
+ shell: bash
+ run: |
+ if [[ -n "$HF_TOKEN" ]]; then
+ set +e -uo pipefail
+ source .venv-hf/bin/activate
+ CACHE_FILES=$(hf buckets list "hf://buckets/${{ inputs.hf_bucket }}/${{ inputs.folder }}" --json | jq -r '[.[] | select(.type == "file") | select((.uploaded_at | .[:19]+"Z" | fromdateiso8601) < (now - 5 * 60)) | select(.path | startswith("${{ inputs.folder }}/${{ inputs.key }}") and endswith(".tar.gz"))] | sort_by(.path)[:-1] | .[] | [.path // ""] | @tsv')
+ if [[ -n "$CACHE_FILES" ]]; then
+ echo "Removing old ccache files..."
+ while IFS=$'\t' read -r CACHE_PATH; do
+ hf buckets rm "hf://buckets/${{ inputs.hf_bucket }}/$CACHE_PATH" -y
+ done <<< "$CACHE_FILES"
+ fi
+ fi
diff --git a/.github/actions/ccache-clear/action.yml b/.github/actions/ccache-clear/action.yml
index d38587efaf..fc5da4f6ed 100644
--- a/.github/actions/ccache-clear/action.yml
+++ b/.github/actions/ccache-clear/action.yml
@@ -1,22 +1,50 @@
+# note: place this as the last step of the job, so the new cache is saved by "Post ccache" right after the old one is cleared
name: "ccache-clear"
-description: "Delete all GitHub Actions caches matching a key prefix"
+description: "Delete GitHub Actions caches matching a key prefix, oldest first"
inputs:
key:
description: "Cache key prefix to match and delete"
required: true
+ older:
+ description: "Only delete caches created more than this long ago (e.g. 90m, 1h, 1d). By default all matching caches are deleted"
+ required: false
+ default: ""
+ min:
+ description: "Stop deleting if fewer than this many caches would remain (e.g. 1). By default there is no minimum"
+ required: false
+ default: "0"
+ dry-run:
+ description: "Only print the caches that would be deleted, without deleting them"
+ required: false
+ default: "false"
runs:
using: "composite"
steps:
+ - name: Install GitHub CLI if missing
+ shell: bash
+ run: |
+ # e.g. in container jobs, where it is not preinstalled
+ if ! command -v gh >/dev/null 2>&1; then
+ echo "GitHub CLI not found, installing..."
+ if ! command -v curl >/dev/null 2>&1; then
+ apt-get update >/dev/null 2>&1 || true
+ apt-get install -y curl >/dev/null 2>&1 || true
+ fi
+ mkdir -p -m 755 /etc/apt/keyrings
+ curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg >/dev/null
+ chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg
+ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" > /etc/apt/sources.list.d/github-cli.list
+ apt-get update >/dev/null 2>&1 || true
+ apt-get install -y gh || { echo "Failed to install GitHub CLI (gh)" >&2; exit 1; }
+ fi
+ command -v gh >/dev/null 2>&1 || { echo "GitHub CLI (gh) is required but could not be installed" >&2; exit 1; }
+
- name: Clear caches
shell: bash
run: |
- CACHES=$(gh cache list --key "ccache-${{ inputs.key }}" --json id,key --jq '.[] | "\(.id) \(.key)"' 2>/dev/null)
- if [ -z "$CACHES" ]; then
- echo "No caches found with key prefix: ${{ inputs.key }}"
- exit 0
- fi
- while read -r id key; do
- echo "Deleting cache: $id ($key)"
- gh cache delete "$id"
- done <<< "$CACHES"
+ bash scripts/ccache-clear.sh \
+ --key "${{ inputs.key }}" \
+ --older "${{ inputs.older }}" \
+ --min "${{ inputs.min }}" \
+ ${{ inputs.dry-run == 'true' && '--dry-run' || '' }}
diff --git a/.github/actions/linux-setup-vulkan/action.yml b/.github/actions/linux-setup-vulkan/action.yml
deleted file mode 100644
index 4d29837feb..0000000000
--- a/.github/actions/linux-setup-vulkan/action.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: "Linux - Setup Vulkan SDK"
-description: "Setup Vulkan SDK for Linux"
-inputs:
- path:
- description: "Installation path"
- required: true
- version:
- description: "Vulkan SDK version"
- required: true
-
-runs:
- using: "composite"
- steps:
- - name: Setup Vulkan SDK
- id: setup
- uses: ./.github/actions/unarchive-tar
- with:
- url: https://sdk.lunarg.com/sdk/download/${{ inputs.version }}/linux/vulkan_sdk.tar.xz
- path: ${{ inputs.path }}
- strip: 1
diff --git a/.github/actions/windows-setup-cuda/action.yml b/.github/actions/windows-setup-cuda/action.yml
index 43c63ce44f..917513b85e 100644
--- a/.github/actions/windows-setup-cuda/action.yml
+++ b/.github/actions/windows-setup-cuda/action.yml
@@ -4,6 +4,9 @@ inputs:
cuda_version:
description: "CUDA toolkit version"
required: true
+ cuda_arch:
+ description: "CUDA target architecture"
+ required: true
runs:
using: "composite"
@@ -127,3 +130,26 @@ runs:
echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.3\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.3" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
echo "CUDA_PATH_V13_3=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.3" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
+
+ - name: Install Cuda Toolkit 13.4 for ARM64
+ if: ${{ inputs.cuda_version == '13.4' && inputs.cuda_arch == 'arm64' }}
+ shell: pwsh
+ run: |
+ mkdir -p "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4"
+ choco install unzip -y
+ curl -O "https://packages.nvidia.com/bin-archive/pool/windows-x86_64/5B515474-7E78-11F1-8656-C51E4F4B317F/cccl-windows-x86_64-13.3.4.1.2-archive.zip"
+ curl -O "https://packages.nvidia.com/bin-archive/pool/windows-x86_64/5B515474-7E78-11F1-8656-C51E4F4B317F/cuda_crt-windows-x86_64-13.4.46-archive.zip"
+ curl -O "https://packages.nvidia.com/bin-archive/pool/windows-x86_64/5B515474-7E78-11F1-8656-C51E4F4B317F/cuda_nvcc-windows-x86_64-13.4.46-archive.zip"
+ curl -O "https://packages.nvidia.com/bin-archive/pool/windows-x86_64/5B515474-7E78-11F1-8656-C51E4F4B317F/libnvvm-windows-x86_64-13.4.46-archive.zip"
+ curl -O "https://packages.nvidia.com/bin-archive/pool/windows-arm64/5B515474-7E78-11F1-8656-C51E4F4B317F/cuda_cudart-windows-arm64-13.4.46-archive.zip"
+ curl -O "https://packages.nvidia.com/bin-archive/pool/windows-arm64/5B515474-7E78-11F1-8656-C51E4F4B317F/libcublas-windows-arm64-13.7.0.10-archive.zip"
+ unzip '*.zip' -d "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4"
+ xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4\cccl-windows-x86_64-13.3.4.1.2-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" /E /I /H /Y
+ xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4\cuda_crt-windows-x86_64-13.4.46-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" /E /I /H /Y
+ xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4\cuda_nvcc-windows-x86_64-13.4.46-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" /E /I /H /Y
+ xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4\libnvvm-windows-x86_64-13.4.46-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" /E /I /H /Y
+ xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4\cuda_cudart-windows-arm64-13.4.46-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" /E /I /H /Y
+ xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4\libcublas-windows-arm64-13.7.0.10-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" /E /I /H /Y
+ echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
+ echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
+ echo "CUDA_PATH_V13_4=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
diff --git a/.github/actions/windows-setup-openvino/action.yml b/.github/actions/windows-setup-openvino/action.yml
new file mode 100644
index 0000000000..f983df5602
--- /dev/null
+++ b/.github/actions/windows-setup-openvino/action.yml
@@ -0,0 +1,24 @@
+name: "Windows - Setup OpenVINO Toolkit"
+description: "Setup OpenVINO Toolkit for Windows"
+inputs:
+ path:
+ description: "Installation path"
+ required: true
+ version_major:
+ description: "OpenVINO major version (e.g., 2026.2)"
+ required: true
+ version_full:
+ description: "OpenVINO full version"
+ required: true
+
+runs:
+ using: "composite"
+ steps:
+ - name: Download and extract OpenVINO Runtime
+ shell: powershell
+ run: |
+ $url = "https://storage.openvinotoolkit.org/repositories/openvino/packages/${{ inputs.version_major }}/windows/openvino_toolkit_windows_${{ inputs.version_full }}_x86_64.zip"
+ $out = "openvino.zip"
+ Invoke-WebRequest -Uri $url -OutFile $out
+ Expand-Archive -Path $out -DestinationPath ${{ inputs.path }} -Force
+ Remove-Item $out
diff --git a/.github/actions/windows-setup-rocm/action.yml b/.github/actions/windows-setup-rocm/action.yml
index fd9f8e5a41..aecbcf14f5 100644
--- a/.github/actions/windows-setup-rocm/action.yml
+++ b/.github/actions/windows-setup-rocm/action.yml
@@ -8,8 +8,26 @@ inputs:
runs:
using: "composite"
steps:
- - name: Setup ROCm
- uses: ./.github/actions/install-exe
- with:
- url: https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ inputs.version }}-Win11-For-HIP.exe
- args: -install
+ - name: Install ROCm with Wheels
+ shell: pwsh
+ run: |
+ $ErrorActionPreference = "Stop"
+ write-host "Setting up Python virtual environment"
+
+ # Create the venv directly at the cache location to avoid relocation issues
+ New-Item -Path "C:\TheRock\build" -ItemType Directory -Force | Out-Null
+ python -m venv C:\TheRock\build\.venv
+ & C:\TheRock\build\.venv\Scripts\Activate.ps1
+
+ write-host "Upgrading pip"
+ python -m pip install --upgrade pip
+
+ write-host "Installing ROCm wheels for multi-arch support"
+ # Install ROCm wheels for multi-arch support (this may take several minutes)
+ python -m pip install --index-url https://repo.amd.com/rocm/whl-multi-arch/ "rocm[libraries,devel]==${{ inputs.version }}"
+
+ # Pre-expand the devel tree so it is included in the cache
+ write-host "Initializing ROCm devel tree"
+ rocm-sdk init
+ if ($LASTEXITCODE -ne 0) { throw "rocm-sdk init failed with exit code $LASTEXITCODE" }
+ write-host "Completed ROCm wheel installation to C:\TheRock\build"
diff --git a/.github/labeler.yml b/.github/labeler.yml
index 60aa51d2cc..20e19c3523 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -12,7 +12,7 @@ SYCL:
- ggml/src/ggml-sycl/**
- docs/backend/SYCL.md
- examples/sycl/**
-Nvidia GPU:
+CUDA:
- changed-files:
- any-glob-to-any-file:
- ggml/include/ggml-cuda.h
@@ -35,8 +35,20 @@ AMD ZenDNN:
documentation:
- changed-files:
- any-glob-to-any-file:
+ - "**/*.md"
- docs/**
- media/**
+examples:
+ - all:
+ - changed-files:
+ - any-glob-to-any-file:
+ - app/**
+ - examples/**
+ - tools/**
+ - all-globs-to-all-files:
+ - '!tools/server/**'
+ - '!tools/mtmd/**'
+ - '!tools/ui/**'
testing:
- changed-files:
- any-glob-to-any-file:
@@ -47,28 +59,12 @@ build:
- cmake/**
- CMakeLists.txt
- CMakePresets.json
-examples:
- - changed-files:
- - any-glob-to-any-file:
- - examples/**
- - tools/**
devops:
- changed-files:
- any-glob-to-any-file:
- .devops/**
- .github/**
- ci/**
-python:
- - changed-files:
- - any-glob-to-any-file:
- - "**/*.py"
- - requirements/**
- - gguf-py/**
- - .flake8
-script:
- - changed-files:
- - any-glob-to-any-file:
- - scripts/**
android:
- changed-files:
- any-glob-to-any-file:
@@ -81,9 +77,20 @@ server:
- changed-files:
- any-glob-to-any-file:
- tools/server/**
-
-
-
+mtmd:
+ - changed-files:
+ - any-glob-to-any-file:
+ - tools/mtmd/**
+conversion:
+ - changed-files:
+ - any-glob-to-any-file:
+ - conversion/**
+ - convert_*.py
+ - gguf-py/**
+vendor:
+ - changed-files:
+ - any-glob-to-any-file:
+ - vendor/**
ggml:
- changed-files:
- any-glob-to-any-file:
diff --git a/.github/workflows/build-apple.yml b/.github/workflows/build-apple.yml
index 2b3d14d1f3..55f4bcad61 100644
--- a/.github/workflows/build-apple.yml
+++ b/.github/workflows/build-apple.yml
@@ -22,7 +22,8 @@ on:
types: [opened, synchronize, reopened]
paths: [
'.github/workflows/build-apple.yml',
- 'ggml/src/ggml-metal/**'
+ 'ggml/src/ggml-metal/**',
+ 'ggml/src/ggml-rpc/**'
]
concurrency:
@@ -60,10 +61,10 @@ jobs:
-DCMAKE_BUILD_RPATH="@loader_path" \
-DLLAMA_FATAL_WARNINGS=ON \
-DLLAMA_BUILD_BORINGSSL=ON \
- -DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=OFF \
-DGGML_METAL_SHADER_DEBUG=ON \
- -DGGML_RPC=ON
+ -DGGML_RPC=ON \
+ -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
time cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
leaks -atExit -- ./build/bin/test-thread-safety -hf ggml-org/gemma-3-270m-qat-GGUF -ngl 99 -p "$(printf 'hello %.0s' {1..128})" -n 16 -c 512 -ub 32 -np 2 -t 2 -lv 1
@@ -73,6 +74,16 @@ jobs:
cd build
ctest -L main -E "test-llama-archs" --verbose --timeout 900
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: apple-arm64
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
+
macos-latest-x64:
runs-on: macos-15-intel
@@ -109,6 +120,16 @@ jobs:
cd build
ctest -L main --verbose --timeout 900
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: apple-x64
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
+
macos-latest-ios-xcode:
runs-on: macos-latest
@@ -126,7 +147,6 @@ jobs:
run: |
sysctl -a
cmake -B build -G Xcode \
- -DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=ON \
-DLLAMA_OPENSSL=OFF \
-DLLAMA_BUILD_APP=OFF \
@@ -164,20 +184,11 @@ jobs:
id: checkout
uses: actions/checkout@v6
- # TODO: this likely does not do anything - if yes, remove it
- - name: ccache
- uses: ggml-org/ccache-action@v1.2.21
- with:
- key: apple-tvos
- evict-old-files: 1d
- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
-
- name: Build
id: cmake_build
run: |
sysctl -a
cmake -B build -G Xcode \
- -DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=ON \
-DLLAMA_BUILD_COMMON=OFF \
-DLLAMA_BUILD_APP=OFF \
@@ -198,20 +209,11 @@ jobs:
id: checkout
uses: actions/checkout@v6
- # TODO: this likely does not do anything - if yes, remove it
- - name: ccache
- uses: ggml-org/ccache-action@v1.2.21
- with:
- key: apple-visionos
- evict-old-files: 1d
- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
-
- name: Build
id: cmake_build
run: |
sysctl -a
cmake -B build -G Xcode \
- -DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=ON \
-DLLAMA_BUILD_COMMON=OFF \
-DLLAMA_BUILD_APP=OFF \
@@ -237,14 +239,6 @@ jobs:
id: checkout
uses: actions/checkout@v6
- # TODO: this likely does not do anything - if yes, remove it
- - name: ccache
- uses: ggml-org/ccache-action@v1.2.21
- with:
- key: apple-swift
- evict-old-files: 1d
- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
-
- name: Download xcframework artifact
uses: actions/download-artifact@v7
with:
@@ -256,7 +250,6 @@ jobs:
run: |
sysctl -a
cmake -B build -G Xcode \
- -DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=ON \
-DLLAMA_OPENSSL=OFF \
-DLLAMA_BUILD_APP=OFF \
diff --git a/.github/workflows/build-cache.yml b/.github/workflows/build-cache.yml
index 53d65f3768..187427a8d4 100644
--- a/.github/workflows/build-cache.yml
+++ b/.github/workflows/build-cache.yml
@@ -10,33 +10,6 @@ concurrency:
cancel-in-progress: true
jobs:
- ubuntu-24-vulkan-cache:
- runs-on: ubuntu-24.04
-
- steps:
- - name: Clone
- id: checkout
- uses: actions/checkout@v6
-
- - name: Get latest Vulkan SDK version
- id: vulkan_sdk_version
- run: |
- echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
-
- - name: Setup Cache
- uses: actions/cache@v5
- id: cache-sdk
- with:
- path: ./vulkan_sdk
- key: cache-gha-vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
-
- - name: Setup Vulkan SDK
- if: steps.cache-sdk.outputs.cache-hit != 'true'
- uses: ./.github/actions/linux-setup-vulkan
- with:
- path: ./vulkan_sdk
- version: ${{ env.VULKAN_SDK_VERSION }}
-
#ubuntu-24-spacemit-cache:
# runs-on: ubuntu-24.04
@@ -67,9 +40,9 @@ jobs:
runs-on: ubuntu-24.04
env:
- # Sync versions in build.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
- OPENVINO_VERSION_MAJOR: "2026.0"
- OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886"
+ # 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"
steps:
- name: Clone
@@ -91,12 +64,13 @@ jobs:
version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
version_full: ${{ env.OPENVINO_VERSION_FULL }}
- windows-2022-rocm-cache:
+ windows-2022-openvino-cache:
runs-on: windows-2022
env:
- # Make sure this is in sync with build.yml
- HIPSDK_INSTALLER_VERSION: "26.Q1"
+ # 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"
steps:
- name: Clone
@@ -105,13 +79,40 @@ jobs:
- name: Setup Cache
uses: actions/cache@v5
- id: cache-rocm
+ id: cache-openvino
with:
- path: C:\Program Files\AMD\ROCm
- key: cache-gha-rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
+ path: ./openvino_toolkit
+ key: cache-gha-openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
- - name: Setup ROCm
- if: steps.cache-rocm.outputs.cache-hit != 'true'
- uses: ./.github/actions/windows-setup-rocm
+ - name: Setup OpenVINO Toolkit
+ if: steps.cache-openvino.outputs.cache-hit != 'true'
+ uses: ./.github/actions/windows-setup-openvino
with:
- version: ${{ env.HIPSDK_INSTALLER_VERSION }}
+ path: ./openvino_toolkit
+ version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
+ version_full: ${{ env.OPENVINO_VERSION_FULL }}
+
+ # windows-2022-rocm-cache:
+ # runs-on: windows-2022
+
+ # env:
+ # # Make sure this is in sync with release.yml and build-cuda-windows.yml
+ # ROCM_VERSION: "7.14.0"
+
+ # steps:
+ # - name: Clone
+ # id: checkout
+ # uses: actions/checkout@v6
+
+ # - name: Setup Cache
+ # uses: actions/cache@v5
+ # id: cache-rocm
+ # with:
+ # path: C:\TheRock\build
+ # key: rocm-wheels-${{ env.ROCM_VERSION }}-multi-arch-${{ runner.os }}
+
+ # - name: Setup ROCm
+ # if: steps.cache-rocm.outputs.cache-hit != 'true'
+ # uses: ./.github/actions/windows-setup-rocm
+ # with:
+ # version: ${{ env.ROCM_VERSION }}
diff --git a/.github/workflows/build-cmake-pkg.yml b/.github/workflows/build-cmake-pkg.yml
index 5becff09c1..c44fba2c69 100644
--- a/.github/workflows/build-cmake-pkg.yml
+++ b/.github/workflows/build-cmake-pkg.yml
@@ -5,7 +5,7 @@ on:
jobs:
linux:
- runs-on: [self-hosted, Linux, CPU]
+ runs-on: [self-hosted, Linux]
steps:
- uses: actions/checkout@v6
with:
@@ -21,31 +21,33 @@ jobs:
-DLLAMA_BUILD_TOOLS=OFF \
-DLLAMA_BUILD_EXAMPLES=OFF \
-DLLAMA_BUILD_APP=OFF \
+ -DLLAMA_BUILD_IS_DEV=OFF \
-DCMAKE_BUILD_TYPE=Release
- cmake --build build --config Release
+ cmake --build build --config Release -j $(nproc)
cmake --install build --prefix "$PREFIX" --config Release
export LLAMA_CONFIG="$PREFIX"/lib/cmake/llama/llama-config.cmake
- tclsh <<'EOF'
- set build(commit) [string trim [exec git rev-parse --short HEAD]]
- set build(number) [string trim [exec git rev-list --count HEAD]]
- set build(version) "0.0.$build(number)"
+ build_commit=$(git rev-parse --short HEAD | xargs)
+ build_number=$(git rev-list --count HEAD | xargs)
- set llamaconfig [read [open "$env(LLAMA_CONFIG)" r]]
- set checks [list "set\\(LLAMA_VERSION \\s+$build(version)\\)" \
- "set\\(LLAMA_BUILD_COMMIT\\s+$build(commit)\\)" \
- "set\\(LLAMA_BUILD_NUMBER\\s+$build(number)\\)"]
+ major=$(grep -oE "set\(LLAMA_VERSION_MAJOR[[:space:]]+[0-9]+" CMakeLists.txt | grep -oE "[0-9]+$")
+ minor=$(grep -oE "set\(LLAMA_VERSION_MINOR[[:space:]]+[0-9]+" CMakeLists.txt | grep -oE "[0-9]+$")
+ patch=$(grep -oE "set\(LLAMA_VERSION_PATCH[[:space:]]+[0-9]+" CMakeLists.txt | grep -oE "[0-9]+$")
+ build_version="$major.$minor.$patch"
- puts -nonewline "Checking llama-config.cmake version... "
- foreach check $checks {
- if {![regexp -expanded -- $check $llamaconfig]} {
- puts "\"$check\" failed!"
+ checks=("set\(LLAMA_VERSION[[:space:]]+$build_version\)"
+ "set\(LLAMA_BUILD_COMMIT[[:space:]]+$build_commit\)"
+ "set\(LLAMA_BUILD_NUMBER[[:space:]]+$build_number\)")
+
+ for check in "${checks[@]}"; do
+ if ! grep -qE "$check" "$LLAMA_CONFIG"; then
+ echo "Checking llama-config.cmake version... \"$check\" failed!"
exit 1
- }
- }
- puts "success."
- EOF
+ fi
+ done
+
+ echo "Checking llama-config.cmake version... success."
cd examples/simple-cmake-pkg
cmake -S . -B build -DCMAKE_PREFIX_PATH="$PREFIX"/lib/cmake
- cmake --build build
+ cmake --build build -j $(nproc)
diff --git a/.github/workflows/build-cpu.yml b/.github/workflows/build-cpu.yml
index 8f62e1a177..b62fe55d6c 100644
--- a/.github/workflows/build-cpu.yml
+++ b/.github/workflows/build-cpu.yml
@@ -21,6 +21,7 @@ on:
paths: [
'.github/workflows/build-cpu.yml',
'.github/workflows/build-cmake-pkg.yml',
+ 'ggml/src/ggml-rpc/**',
'**/CMakeLists.txt',
'**/.cmake',
'**/*.h',
@@ -94,6 +95,7 @@ jobs:
id: cmake_build
run: |
cmake -B build \
+ -DGGML_NATIVE=OFF \
-DLLAMA_FATAL_WARNINGS=ON \
-DGGML_RPC=ON
time cmake --build build --config Release -j $(nproc)
@@ -115,29 +117,38 @@ jobs:
./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
+ # note: real deletion only on push to master (same condition as the ccache save),
+ # dry-run otherwise (the token is read-only on PRs from forks)
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: cpu-${{ matrix.os }}
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
+
windows:
+ name: windows / ${{ matrix.build }}
runs-on: windows-2025
env:
OPENBLAS_VERSION: 0.3.23
SDE_VERSION: 9.33.0-2024-01-07
- VULKAN_VERSION: 1.4.313.2
strategy:
matrix:
include:
- build: 'x64-cpu-static'
arch: 'x64'
- defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF'
+ defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DGGML_OPENMP_FETCH=ON -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF'
- build: 'x64-openblas'
arch: 'x64'
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
- - build: 'x64-vulkan'
- arch: 'x64'
- defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON'
- build: 'arm64'
arch: 'arm64'
- defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
+ defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DGGML_OPENMP_FETCH=ON -DLLAMA_BUILD_SERVER=ON'
steps:
- name: Clone
@@ -165,15 +176,6 @@ jobs:
$lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe')
& $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll
- - name: Install Vulkan SDK
- id: get_vulkan
- if: ${{ matrix.build == 'x64-vulkan' }}
- run: |
- curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/vulkansdk-windows-X64-${env:VULKAN_VERSION}.exe"
- & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
- Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
- Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
-
- name: Install Ninja
id: install_ninja
run: |
@@ -213,3 +215,13 @@ jobs:
# cd build
# $env:LLAMA_SKIP_TESTS_SLOW_ON_EMULATOR = 1
# & $sde -future -- ctest -L main -C Release --verbose --timeout 900
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: cpu-windows-2025-${{ matrix.build }}
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/build-cuda-ubuntu.yml b/.github/workflows/build-cuda-ubuntu.yml
index 6271b22cbd..80bd782095 100644
--- a/.github/workflows/build-cuda-ubuntu.yml
+++ b/.github/workflows/build-cuda-ubuntu.yml
@@ -50,14 +50,22 @@ jobs:
DEBIAN_FRONTEND: noninteractive
run: |
apt update
- apt install -y cmake build-essential ninja-build libgomp1 git libssl-dev
+ apt install -y cmake build-essential ninja-build libgomp1 git libssl-dev jq python3 python3-venv python3-pip
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: cuda-ubuntu-24.04-cuda
- evict-old-files: 1d
- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ save: false
+
+ - name: ccache-buckets-restore
+ uses: ./.github/actions/ccache-buckets
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
+ with:
+ key: cuda-ubuntu-24.04-cuda
+ folder: llama.cpp
+ hf_bucket: ggml-org/cache
- name: Build with CMake
# TODO: Remove GGML_CUDA_CUB_3DOT2 flag once CCCL 3.2 is bundled within CTK and that CTK version is used in this project
@@ -72,6 +80,18 @@ jobs:
-DGGML_CUDA_CUB_3DOT2=ON
cmake --build build
+ - name: ccache-buckets-save
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ uses: ./.github/actions/ccache-buckets
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
+ with:
+ key: cuda-ubuntu-24.04-cuda
+ folder: llama.cpp
+ evict-old-files: 1d
+ hf_bucket: ggml-org/cache
+ save: true
+
hip:
runs-on: ubuntu-22.04
container: rocm/dev-ubuntu-22.04:6.1.2
@@ -85,25 +105,44 @@ jobs:
id: depends
run: |
sudo apt-get update
- sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev rocwmma-dev
+ sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libssl-dev rocwmma-dev jq python3-venv
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: cuda-ubuntu-22.04-hip
- evict-old-files: 1d
- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ save: false
+
+ - name: ccache-buckets-restore
+ uses: ./.github/actions/ccache-buckets
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
+ with:
+ key: cuda-ubuntu-22.04-hip
+ folder: llama.cpp
+ hf_bucket: ggml-org/cache
- name: Build with native CMake HIP support
id: cmake_build
run: |
cmake -B build -S . \
-DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
- -DGGML_HIP_ROCWMMA_FATTN=ON \
-DGPU_TARGETS="gfx1030" \
-DGGML_HIP=ON
cmake --build build --config Release -j $(nproc)
+ - name: ccache-buckets-save
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ uses: ./.github/actions/ccache-buckets
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
+ with:
+ key: cuda-ubuntu-22.04-hip
+ folder: llama.cpp
+ evict-old-files: 1d
+ hf_bucket: ggml-org/cache
+ save: true
+
musa:
runs-on: ubuntu-22.04
container: mthreads/musa:rc4.3.0-devel-ubuntu22.04-amd64
@@ -117,14 +156,22 @@ jobs:
id: depends
run: |
apt-get update
- apt-get install -y build-essential git cmake libssl-dev
+ apt-get install -y build-essential git cmake libssl-dev jq
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
key: cuda-ubuntu-22.04-musa
- evict-old-files: 1d
- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ save: false
+
+ - name: ccache-buckets-restore
+ uses: ./.github/actions/ccache-buckets
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
+ with:
+ key: cuda-ubuntu-22.04-musa
+ folder: llama.cpp
+ hf_bucket: ggml-org/cache
- name: Build with native CMake MUSA support
id: cmake_build
@@ -132,3 +179,15 @@ jobs:
cmake -B build -S . \
-DGGML_MUSA=ON
time cmake --build build --config Release -j $(nproc)
+
+ - name: ccache-buckets-save
+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+ uses: ./.github/actions/ccache-buckets
+ env:
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CACHE_OUTPUT }}
+ with:
+ key: cuda-ubuntu-22.04-musa
+ folder: llama.cpp
+ evict-old-files: 1d
+ hf_bucket: ggml-org/cache
+ save: true
diff --git a/.github/workflows/build-cuda-windows.yml b/.github/workflows/build-cuda-windows.yml
index e9e941421b..95843946f5 100644
--- a/.github/workflows/build-cuda-windows.yml
+++ b/.github/workflows/build-cuda-windows.yml
@@ -22,6 +22,7 @@ env:
jobs:
cuda:
+ name: windows-cuda (${{ matrix.cuda }}, ${{ matrix.arch }})
runs-on: windows-2022
permissions:
@@ -29,7 +30,16 @@ jobs:
strategy:
matrix:
- cuda: ['12.4', '13.3']
+ include:
+ - cuda: '12.4'
+ arch: x64
+ defines: '-DGGML_CUDA_CUB_3DOT2=ON'
+ - cuda: '13.3'
+ arch: x64
+ defines: ''
+ - cuda: '13.4'
+ arch: arm64
+ defines: '-DCMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-msvc-cuda.cmake'
steps:
- name: Clone
@@ -39,12 +49,13 @@ jobs:
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
- key: release-windows-2022-x64-cuda-${{ matrix.cuda }}
+ key: release-windows-2022-${{ matrix.arch }}-cuda-${{ matrix.cuda }}
- name: Install Cuda Toolkit
uses: ./.github/actions/windows-setup-cuda
with:
cuda_version: ${{ matrix.cuda }}
+ cuda_arch: ${{ matrix.arch }}
- name: Install Ninja
id: install_ninja
@@ -54,26 +65,21 @@ jobs:
- name: Build
id: cmake_build
shell: cmd
- # TODO: Remove GGML_CUDA_CUB_3DOT2 flag once CCCL 3.2 is bundled within CTK and that CTK version is used in this project
run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch == 'x64' && 'x64' || 'amd64_arm64' }}
cmake -S . -B build -G "Ninja Multi-Config" ^
- -DLLAMA_BUILD_SERVER=ON ^
- -DLLAMA_BUILD_BORINGSSL=ON ^
- -DGGML_NATIVE=OFF ^
-DGGML_BACKEND_DL=ON ^
- -DGGML_CPU_ALL_VARIANTS=ON ^
+ -DGGML_NATIVE=OFF ^
+ -DGGML_CPU=OFF ^
-DGGML_CUDA=ON ^
- -DGGML_RPC=ON ^
- -DGGML_CUDA_CUB_3DOT2=ON
+ -DLLAMA_BUILD_BORINGSSL=ON ${{ matrix.defines }}
set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1
- cmake --build build --config Release -j %NINJA_JOBS% -t ggml
- cmake --build build --config Release
+ cmake --build build --config Release -j %NINJA_JOBS% --target ggml-cuda
- name: ccache-clear
uses: ./.github/actions/ccache-clear
with:
- key: release-windows-2022-x64-cuda-${{ matrix.cuda }}
+ key: release-windows-2022-${{ matrix.arch }}-cuda-${{ matrix.cuda }}
hip:
runs-on: windows-2022
@@ -83,7 +89,7 @@ jobs:
env:
# Make sure this is in sync with build-cache.yml
- HIPSDK_INSTALLER_VERSION: "26.Q1"
+ ROCM_VERSION: "7.14.0"
strategy:
matrix:
@@ -97,36 +103,53 @@ jobs:
id: checkout
uses: actions/checkout@v6
- - name: Grab rocWMMA package
- id: grab_rocwmma
- run: |
- curl -o rocwmma.deb "https://repo.radeon.com/rocm/apt/7.2.1/pool/main/r/rocwmma-dev/rocwmma-dev_2.2.0.70201-81~24.04_amd64.deb"
- 7z x rocwmma.deb
- 7z x data.tar
-
- - name: Use ROCm Installation Cache
- uses: actions/cache@v5
- id: cache-rocm
- with:
- path: C:\Program Files\AMD\ROCm
- key: cache-gha-rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
+ # - name: Cache ROCm Installation
+ # uses: actions/cache@v5
+ # id: cache-rocm
+ # with:
+ # path: C:\TheRock\build
+ # key: rocm-wheels-${{ env.ROCM_VERSION }}-multi-arch-${{ runner.os }}
- name: Setup ROCm
- if: steps.cache-rocm.outputs.cache-hit != 'true'
+ # if: steps.cache-rocm.outputs.cache-hit != 'true'
uses: ./.github/actions/windows-setup-rocm
with:
- version: ${{ env.HIPSDK_INSTALLER_VERSION }}
+ version: ${{ env.ROCM_VERSION }}
+
+ - name: Setup ROCm Environment
+ run: |
+ $ErrorActionPreference = "Stop"
+
+ # Activate venv from cache or fresh install
+ & C:\TheRock\build\.venv\Scripts\Activate.ps1
+
+ # Expand the devel tree (idempotent; no-op if already done during install)
+ rocm-sdk init
+ if ($LASTEXITCODE -ne 0) { throw "rocm-sdk init failed with exit code $LASTEXITCODE" }
+
+ # Get ROCm installation paths using the rocm-sdk CLI tool
+ $rocmPath = (rocm-sdk path --root)
+ if (-not $rocmPath) { throw "rocm-sdk path --root returned empty - devel package may not be installed" }
+ $rocmPath = $rocmPath.Trim()
+ $cmakePath = (rocm-sdk path --cmake).Trim()
+ $binPath = (rocm-sdk path --bin).Trim()
+ write-host "ROCm root: $rocmPath"
+
+ echo "HIP_PATH=$rocmPath" >> $env:GITHUB_ENV
+ echo "CMAKE_PREFIX_PATH=$cmakePath" >> $env:GITHUB_ENV
+ echo "HIP_DEVICE_LIB_PATH=$rocmPath\lib\llvm\amdgcn\bitcode" >> $env:GITHUB_ENV
+ echo "HIP_PLATFORM=amd" >> $env:GITHUB_ENV
+ echo "LLVM_PATH=$rocmPath\lib\llvm" >> $env:GITHUB_ENV
+ echo "$binPath" >> $env:GITHUB_PATH
+
+ # Keep venv in PATH for subsequent steps
+ echo "C:\TheRock\build\.venv\Scripts" >> $env:GITHUB_PATH
- name: Verify ROCm
id: verify
run: |
- # Find and test ROCm installation
- $clangPath = Get-ChildItem 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | Select-Object -First 1
- if (-not $clangPath) {
- Write-Error "ROCm installation not found"
- exit 1
- }
- & $clangPath.FullName --version
+ # Test the ROCm clang shipped in the installed wheel
+ & "${env:HIP_PATH}\lib\llvm\bin\clang.exe" --version
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
@@ -134,29 +157,27 @@ jobs:
# TODO: this build does not match the build in release.yml, so we use a different cache key
# ideally, the builds should match, similar to the CUDA build above so that we would be able
# to populate the ccache for the release with manual runs of this workflow
- #key: release-windows-2022-x64-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}
- key: cuda-windows-2022-x64-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}
+ #key: release-windows-2022-x64-hip-${{ env.ROCM_VERSION }}-${{ matrix.name }}
+ key: cuda-windows-2022-x64-hip-${{ env.ROCM_VERSION }}-${{ matrix.name }}
- name: Build
id: cmake_build
run: |
- $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
- $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
cmake -G "Unix Makefiles" -B build -S . `
- -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
- -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
- -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/opt/rocm-7.2.1/include/" `
+ -DCMAKE_PREFIX_PATH="${env:HIP_PATH}" `
+ -DCMAKE_C_COMPILER="${env:HIP_PATH}\lib\llvm\bin\clang.exe" `
+ -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\lib\llvm\bin\clang++.exe" `
+ -DCMAKE_HIP_COMPILER="${env:HIP_PATH}\lib\llvm\bin\clang.exe" `
-DCMAKE_BUILD_TYPE=Release `
-DLLAMA_BUILD_BORINGSSL=ON `
- -DROCM_DIR="${env:HIP_PATH}" `
+ -DHIP_PATH="${env:HIP_PATH}" `
-DGGML_HIP=ON `
- -DGGML_HIP_ROCWMMA_FATTN=ON `
- -DGPU_TARGETS="gfx1100" `
+ -DGPU_TARGETS="gfx1100" `
-DGGML_RPC=ON
cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
- name: ccache-clear
uses: ./.github/actions/ccache-clear
with:
- #key: release-windows-2022-x64-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}
- key: cuda-windows-2022-x64-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}
+ #key: release-windows-2022-x64-hip-${{ env.ROCM_VERSION }}-${{ matrix.name }}
+ key: cuda-windows-2022-x64-hip-${{ env.ROCM_VERSION }}-${{ matrix.name }}
diff --git a/.github/workflows/build-opencl.yml b/.github/workflows/build-opencl.yml
index 251b1f8d59..c0adc7e496 100644
--- a/.github/workflows/build-opencl.yml
+++ b/.github/workflows/build-opencl.yml
@@ -80,3 +80,13 @@ jobs:
run: |
cmake -S . -B build -G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON -DLLAMA_BUILD_BORINGSSL=ON
cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: opencl-windows-2025-x64
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/build-openvino.yml b/.github/workflows/build-openvino.yml
index ddcbc66974..0316e7ad97 100644
--- a/.github/workflows/build-openvino.yml
+++ b/.github/workflows/build-openvino.yml
@@ -37,14 +37,10 @@ jobs:
ubuntu-24-openvino:
runs-on: [self-hosted, Linux, Intel, OpenVINO]
- concurrency:
- group: openvino-gpu-${{ github.head_ref || github.ref }}
- cancel-in-progress: false
-
env:
# Sync versions in build-openvino.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
- OPENVINO_VERSION_MAJOR: "2026.0"
- OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886"
+ OPENVINO_VERSION_MAJOR: "2026.3"
+ OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
steps:
- name: Clone
@@ -78,14 +74,14 @@ jobs:
cmake -B build/ReleaseOV -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DGGML_OPENVINO=ON
- time cmake --build build/ReleaseOV --config Release -j $(nproc)
+ time cmake --build build/ReleaseOV --config Release --parallel
- 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" --verbose --timeout 2000
+ ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" --verbose --timeout 2000
- name: Test (GPU)
id: cmake_test_gpu
@@ -93,4 +89,91 @@ jobs:
run: |
cd ${{ github.workspace }}
export GGML_OPENVINO_DEVICE=GPU
- ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs" --verbose --timeout 2000
+ ctest --test-dir build/ReleaseOV -L main -E "test-llama-archs|test-recurrent-state-rollback-nemotron-h" --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"
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: openvino-windows-2022
+ variant: ccache
+ evict-old-files: 1d
+ save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+
+ - name: Setup Cache
+ uses: actions/cache@v5
+ id: cache-openvino
+ with:
+ path: ./openvino_toolkit
+ key: cache-gha-openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
+
+ - name: Setup OpenVINO Toolkit
+ if: steps.cache-openvino.outputs.cache-hit != 'true'
+ uses: ./.github/actions/windows-setup-openvino
+ with:
+ path: ./openvino_toolkit
+ version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
+ version_full: ${{ env.OPENVINO_VERSION_FULL }}
+
+ - name: Install OpenCL using vcpkg
+ shell: powershell
+ run: |
+ git clone https://github.com/microsoft/vcpkg C:\vcpkg
+ C:\vcpkg\bootstrap-vcpkg.bat
+ C:\vcpkg\vcpkg install opencl
+
+ - name: Build
+ id: cmake_build
+ shell: cmd
+ run: |
+ REM Find extracted OpenVINO folder dynamically
+ for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
+
+ if not exist "%OPENVINO_ROOT%\runtime\cmake\OpenVINOConfig.cmake" (
+ echo ERROR: OpenVINOConfig.cmake not found
+ exit /b 1
+ )
+
+ call "%OPENVINO_ROOT%\setupvars.bat"
+
+ cmake -B build\ReleaseOV -G "Visual Studio 17 2022" ^
+ -A x64 ^
+ -DCMAKE_BUILD_TYPE=Release ^
+ -DGGML_OPENVINO=ON ^
+ -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
+
+ cmake --build build\ReleaseOV --config Release -- /m
+
+ - 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
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: openvino-windows-2022
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/build-rpc.yml b/.github/workflows/build-rpc.yml
deleted file mode 100644
index d04dc375b5..0000000000
--- a/.github/workflows/build-rpc.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-name: CI (rpc)
-
-on:
- workflow_dispatch: # allows manual triggering
- push:
- branches:
- - master
- paths: [
- '.github/workflows/build-rpc.yml',
- '**/CMakeLists.txt',
- '**/.cmake',
- '**/*.h',
- '**/*.hpp',
- '**/*.c',
- '**/*.cpp'
- ]
-
- pull_request:
- types: [opened, synchronize, reopened]
- paths: [
- '.github/workflows/build-rpc.yml',
- 'ggml/src/ggml-rpc/**'
- ]
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
- cancel-in-progress: true
-
-env:
- GGML_NLOOP: 3
- GGML_N_THREADS: 1
- LLAMA_ARG_LOG_COLORS: 1
- LLAMA_ARG_LOG_PREFIX: 1
- LLAMA_ARG_LOG_TIMESTAMPS: 1
-
-jobs:
- ubuntu-24-rpc:
- runs-on: ${{ 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
-
- continue-on-error: true
-
- steps:
- - name: Clone
- id: checkout
- uses: actions/checkout@v6
-
- - name: Dependencies
- id: depends
- run: |
- sudo apt-get update
- sudo apt-get install build-essential libssl-dev ninja-build
-
- - name: Build
- id: cmake_build
- run: |
- cmake -B build \
- -G "Ninja" \
- -DCMAKE_BUILD_TYPE=Release \
- -DGGML_RPC=ON
- time cmake --build build --config Release -j $(nproc)
-
- - name: Test
- id: cmake_test
- run: |
- cd build
- ctest -L main --verbose
diff --git a/.github/workflows/build-sanitize.yml b/.github/workflows/build-sanitize.yml
index e242abcfd3..974af62eb2 100644
--- a/.github/workflows/build-sanitize.yml
+++ b/.github/workflows/build-sanitize.yml
@@ -15,6 +15,12 @@ on:
'**/*.cpp'
]
+ pull_request:
+ types: [opened, synchronize, reopened]
+ paths: [
+ '.github/workflows/build-sanitize.yml'
+ ]
+
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
@@ -28,19 +34,35 @@ env:
jobs:
ctest:
- runs-on: [self-hosted, X64, CPU, Linux]
-
continue-on-error: true
strategy:
matrix:
- sanitizer: [ADDRESS, THREAD, UNDEFINED]
+ include:
+ # thread and address doesn't run properly on some self hosted machines, so run it on Github instead
+ - sanitizer: ADDRESS
+ machine: ubuntu-24.04
+ - sanitizer: THREAD
+ machine: ubuntu-24.04
+ - sanitizer: UNDEFINED
+ machine: [self-hosted, X64, Linux]
+
+ runs-on: ${{ matrix.machine }}
steps:
- name: Clone
id: checkout
uses: actions/checkout@v6
+ # - name: ccache
+ # uses: ggml-org/ccache-action@v1.2.21
+ # if: ${{ matrix.sanitizer != 'UNDEFINED' }}
+ # with:
+ # key: ctest-${{ matrix.sanitizer }}-ubuntu-24.04
+ # variant: ccache
+ # evict-old-files: 1d
+ # save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+
# with UNDEFINED sanitizer, we have to build in Debug to avoid GCC 13 false-positive warnings
- name: Build (undefined)
id: cmake_build_undefined
diff --git a/.github/workflows/build-self-hosted.yml b/.github/workflows/build-self-hosted.yml
index 436100c8a4..fe2ab81547 100644
--- a/.github/workflows/build-self-hosted.yml
+++ b/.github/workflows/build-self-hosted.yml
@@ -6,7 +6,7 @@ on:
branches:
- master
paths: [
- '.github/workflows/build.yml',
+ '.github/workflows/build-self-hosted.yml',
'**/CMakeLists.txt',
'**/.cmake',
'**/*.h',
@@ -48,6 +48,8 @@ concurrency:
cancel-in-progress: true
env:
+ # note: this is dud token to avoid rate limiting (https://github.com/ggml-org/llama.cpp/pull/25706#issuecomment-4979941302)
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}
GGML_NLOOP: 3
GGML_N_THREADS: 1
LLAMA_ARG_LOG_COLORS: 1
@@ -69,6 +71,26 @@ jobs:
nvidia-smi
GG_BUILD_CUDA=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
+ gpu-rocm:
+ runs-on: [self-hosted, Linux, AMD]
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: Test
+ id: ggml-ci
+ # HIP_LAUNCH_BLOCKING=1: workaround for an async-execution correctness
+ # issue on integrated RDNA3.5 (gfx1151) where batched inference returns
+ # incorrect output (perplexity ~88 vs ~9.4). Serializing kernel launches
+ # restores correctness. Remove once the underlying ROCm/HIP issue is fixed.
+ env:
+ HIP_LAUNCH_BLOCKING: "1"
+ run: |
+ rocminfo
+ GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS=gfx1151 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
+
gpu-vulkan-nvidia-cm:
runs-on: [self-hosted, Linux, NVIDIA]
@@ -264,14 +286,10 @@ jobs:
gpu-openvino-low-perf:
runs-on: [self-hosted, Linux, Intel, OpenVINO]
- concurrency:
- group: openvino-gpu-${{ github.head_ref || github.ref }}
- cancel-in-progress: false
-
env:
# Sync versions in build.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
- OPENVINO_VERSION_MAJOR: "2026.0"
- OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886"
+ OPENVINO_VERSION_MAJOR: "2026.3"
+ OPENVINO_VERSION_FULL: "2026.3.0.22451.bd8d6542e3c"
steps:
- name: Clone
diff --git a/.github/workflows/build-sycl.yml b/.github/workflows/build-sycl.yml
index ef377c8186..7beac81772 100644
--- a/.github/workflows/build-sycl.yml
+++ b/.github/workflows/build-sycl.yml
@@ -34,129 +34,128 @@ env:
LLAMA_ARG_LOG_TIMESTAMPS: 1
jobs:
+ ubuntu-24-sycl:
+ strategy:
+ matrix:
+ build: [fp32, fp16]
+ include:
+ - build: fp32
+ fp16: OFF
+ - build: fp16
+ fp16: ON
-# TODO: this build is disabled to save Github Actions resources (https://github.com/ggml-org/llama.cpp/pull/23705)
-# in order to enable it again, we have to provision dedicated runners to run it
-# ubuntu-24-sycl:
-# strategy:
-# matrix:
-# build: [fp32]
-# include:
-# - build: fp32
-# fp16: OFF
-#
-# runs-on: ubuntu-24.04
-#
-# env:
-# ONEAPI_ROOT: /opt/intel/oneapi/
-# ONEAPI_INSTALLER_VERSION: "2025.3.3"
-# LEVEL_ZERO_VERSION: "1.28.2"
-# LEVEL_ZERO_UBUNTU_VERSION: "u24.04"
-#
-# continue-on-error: true
-#
-# steps:
-# - uses: actions/checkout@v6
-#
-# - name: Use oneAPI Installation Cache
-# uses: actions/cache@v5
-# id: cache-sycl
-# with:
-# path: ${{ env.ONEAPI_ROOT }}
-# key: cache-gha-oneAPI-${{ env.ONEAPI_INSTALLER_VERSION }}-${{ runner.os }}
-#
-# - name: Download & Install oneAPI
-# shell: bash
-# if: steps.cache-sycl.outputs.cache-hit != 'true'
-# run: |
-# cd /tmp
-# wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56f7923a-adb8-43f3-8b02-2b60fcac8cab/intel-deep-learning-essentials-2025.3.3.16_offline.sh -O intel-deep-learning-essentials_offline.sh
-# sudo bash intel-deep-learning-essentials_offline.sh -s -a --silent --eula accept
-#
-# - name: Install Level Zero SDK
-# shell: bash
-# run: |
-# cd /tmp
-# wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero.deb
-# wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero-devel_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero-devel.deb
-# sudo apt-get install -y ./level-zero.deb ./level-zero-devel.deb
-#
-# - name: Clone
-# id: checkout
-# uses: actions/checkout@v6
-#
-# - name: ccache
-# uses: ggml-org/ccache-action@v1.2.21
-# with:
-# key: sycl-ubuntu-24-${{ matrix.build }}
-# evict-old-files: 1d
-# save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
-#
-# - name: Build
-# id: cmake_build
-# run: |
-# source /opt/intel/oneapi/setvars.sh
-# cmake -B build \
-# -G "Ninja" \
-# -DCMAKE_BUILD_TYPE=Release \
-# -DGGML_SYCL=ON \
-# -DCMAKE_C_COMPILER=icx \
-# -DCMAKE_CXX_COMPILER=icpx \
-# -DLLAMA_OPENSSL=OFF \
-# -DGGML_NATIVE=OFF \
-# -DGGML_SYCL_F16=${{ matrix.fp16 }}
-# time cmake --build build --config Release -j $(nproc)
+ runs-on: ubuntu-24.04
-# TODO: this build is disabled to save Github Actions resources (https://github.com/ggml-org/llama.cpp/pull/23705)
-# in order to enable it again, we have to provision dedicated runners to run it
-# windows-latest-sycl:
-# runs-on: windows-2022
-#
-# defaults:
-# run:
-# shell: bash
-#
-# env:
-# WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b60765d1-2b85-4e85-86b6-cb0e9563a699/intel-deep-learning-essentials-2025.3.3.18_offline.exe
-# WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel
-# LEVEL_ZERO_SDK_URL: https://github.com/oneapi-src/level-zero/releases/download/v1.28.2/level-zero-win-sdk-1.28.2.zip
-# ONEAPI_ROOT: "C:/Program Files (x86)/Intel/oneAPI"
-# ONEAPI_INSTALLER_VERSION: "2025.3.3"
-# steps:
-# - name: Clone
-# id: checkout
-# uses: actions/checkout@v6
-#
-# - name: Use oneAPI Installation Cache
-# uses: actions/cache@v5
-# id: cache-sycl
-# with:
-# path: ${{ env.ONEAPI_ROOT }}
-# key: cache-gha-oneAPI-${{ env.ONEAPI_INSTALLER_VERSION }}-${{ runner.os }}
-#
-# - name: Download & Install oneAPI
-# shell: bash
-# if: steps.cache-sycl.outputs.cache-hit != 'true'
-# run: |
-# scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
-#
-# - name: Install Level Zero SDK
-# shell: pwsh
-# run: |
-# Invoke-WebRequest -Uri "${{ env.LEVEL_ZERO_SDK_URL }}" -OutFile "level-zero-win-sdk.zip"
-# Expand-Archive -Path "level-zero-win-sdk.zip" -DestinationPath "C:/level-zero-sdk" -Force
-# "LEVEL_ZERO_V1_SDK_PATH=C:/level-zero-sdk" | Out-File -FilePath $env:GITHUB_ENV -Append
-#
-# - name: ccache
-# uses: ggml-org/ccache-action@v1.2.21
-# with:
-# key: sycl-windows-latest
-# variant: ccache
-# evict-old-files: 1d
-# save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
-#
-# # TODO: add ssl support ; we will also need to modify win-build-sycl.bat to accept user-specified args
-#
-# - name: Build
-# id: cmake_build
-# run: examples/sycl/win-build-sycl.bat
+ env:
+ ONEAPI_ROOT: /opt/intel/oneapi/
+ ONEAPI_INSTALLER_VERSION: "2025.3.3"
+ LEVEL_ZERO_VERSION: "1.28.2"
+ LEVEL_ZERO_UBUNTU_VERSION: "u24.04"
+
+ continue-on-error: true
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: Download & Install oneAPI
+ shell: bash
+ run: |
+ cd /tmp
+ wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56f7923a-adb8-43f3-8b02-2b60fcac8cab/intel-deep-learning-essentials-2025.3.3.16_offline.sh -O intel-deep-learning-essentials_offline.sh
+ sudo bash intel-deep-learning-essentials_offline.sh -s -a --silent --eula accept
+
+ - name: Install Level Zero SDK
+ shell: bash
+ run: |
+ cd /tmp
+ wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero.deb
+ wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero-devel_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero-devel.deb
+ sudo apt-get install -y ./level-zero.deb ./level-zero-devel.deb
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: sycl-ubuntu-24-${{ matrix.build }}
+ evict-old-files: 1d
+ save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+
+ - name: Build
+ id: cmake_build
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ cmake -B build \
+ -G "Ninja" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DGGML_SYCL=ON \
+ -DCMAKE_C_COMPILER=icx \
+ -DCMAKE_CXX_COMPILER=icpx \
+ -DLLAMA_OPENSSL=OFF \
+ -DGGML_NATIVE=OFF \
+ -DGGML_SYCL_F16=${{ matrix.fp16 }}
+ time cmake --build build --config Release -j $(nproc)
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: sycl-ubuntu-24-${{ matrix.build }}
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
+
+ windows-latest-sycl:
+ runs-on: windows-2022
+
+ defaults:
+ run:
+ shell: bash
+
+ env:
+ WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b60765d1-2b85-4e85-86b6-cb0e9563a699/intel-deep-learning-essentials-2025.3.3.18_offline.exe
+ WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel
+ LEVEL_ZERO_SDK_URL: https://github.com/oneapi-src/level-zero/releases/download/v1.28.2/level-zero-win-sdk-1.28.2.zip
+ ONEAPI_ROOT: "C:/Program Files (x86)/Intel/oneAPI"
+ ONEAPI_INSTALLER_VERSION: "2025.3.3"
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: Download & Install oneAPI
+ shell: bash
+ run: |
+ scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
+
+ - name: Install Level Zero SDK
+ shell: pwsh
+ run: |
+ Invoke-WebRequest -Uri "${{ env.LEVEL_ZERO_SDK_URL }}" -OutFile "level-zero-win-sdk.zip"
+ Expand-Archive -Path "level-zero-win-sdk.zip" -DestinationPath "C:/level-zero-sdk" -Force
+ "LEVEL_ZERO_V1_SDK_PATH=C:/level-zero-sdk" | Out-File -FilePath $env:GITHUB_ENV -Append
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: sycl-windows-latest
+ variant: ccache
+ evict-old-files: 1d
+ save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+
+ # TODO: add ssl support ; we will also need to modify win-build-sycl.bat to accept user-specified args
+
+ - name: Build
+ id: cmake_build
+ run: examples/sycl/win-build-sycl.bat
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: sycl-windows-latest
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/build-vulkan.yml b/.github/workflows/build-vulkan.yml
index a103c50faf..74d1c69368 100644
--- a/.github/workflows/build-vulkan.yml
+++ b/.github/workflows/build-vulkan.yml
@@ -55,7 +55,7 @@ jobs:
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
- key: vulkan-ubuntu-24.04-arm-new
+ key: vulkan-ubuntu-24.04-arm
variant: ccache
evict-old-files: 1d
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
@@ -73,6 +73,16 @@ jobs:
run: |
time cmake --build build -j $(nproc)
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: vulkan-ubuntu-24.04-arm
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
+
ubuntu-llvmpipe:
runs-on: ubuntu-24.04
@@ -93,19 +103,13 @@ jobs:
run: |
echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
- - name: Use Vulkan SDK Cache
- uses: actions/cache@v5
- id: cache-sdk
- with:
- path: ./vulkan_sdk
- key: cache-gha-vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
-
- name: Setup Vulkan SDK
- if: steps.cache-sdk.outputs.cache-hit != 'true'
- uses: ./.github/actions/linux-setup-vulkan
+ id: setup
+ uses: ./.github/actions/unarchive-tar
with:
+ url: https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_SDK_VERSION }}/linux/vulkan_sdk.tar.xz
path: ./vulkan_sdk
- version: ${{ env.VULKAN_SDK_VERSION }}
+ strip: 1
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
@@ -119,6 +123,7 @@ jobs:
run: |
source ./vulkan_sdk/setup-env.sh
cmake -B build \
+ -DGGML_NATIVE=OFF \
-DGGML_VULKAN=ON
cmake --build build --config Release -j $(nproc)
@@ -132,3 +137,76 @@ jobs:
# This is using llvmpipe and runs slower than other backends
# test-backend-ops is too slow on llvmpipe, skip it
ctest -L main -E test-backend-ops --verbose --timeout 900
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: vulkan-ubuntu-24.04-llvmpipe
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
+
+ windows:
+ runs-on: windows-2025
+
+ env:
+ VULKAN_VERSION: 1.4.357.0
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: cpu-windows-2025-x64-vulkan
+ variant: ccache
+ evict-old-files: 1d
+ save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+
+ - name: Install Vulkan SDK
+ id: get_vulkan
+ run: |
+ curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/vulkansdk-windows-X64-${env:VULKAN_VERSION}.exe"
+ & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
+ Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
+ Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
+
+ - name: Install Ninja
+ id: install_ninja
+ run: |
+ choco install ninja
+
+ - name: Build
+ id: cmake_build
+ run: |
+ cmake -S . -B build -G "Ninja Multi-Config" `
+ -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake `
+ -DCMAKE_BUILD_TYPE=Release `
+ -DGGML_NATIVE=OFF `
+ -DLLAMA_BUILD_SERVER=ON `
+ -DGGML_RPC=ON `
+ -DGGML_BACKEND_DL=ON `
+ -DGGML_CPU_ALL_VARIANTS=ON `
+ -DGGML_VULKAN=ON `
+ -DLLAMA_BUILD_BORINGSSL=ON
+ cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
+
+ - name: Test
+ id: cmake_test
+ run: |
+ cd build
+ ctest -L main -C Release --verbose --timeout 900
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: cpu-windows-2025-x64-vulkan
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml
new file mode 100644
index 0000000000..2e4680f385
--- /dev/null
+++ b/.github/workflows/build-wasm.yml
@@ -0,0 +1,100 @@
+name: CI (wasm)
+
+on:
+ workflow_dispatch: # allows manual triggering
+ push:
+ branches:
+ - master
+ paths: [
+ '.github/workflows/build-wasm.yml',
+ '**/CMakeLists.txt',
+ '**/.cmake',
+ '**/*.h',
+ '**/*.hpp',
+ '**/*.c',
+ '**/*.cpp',
+ '**/*.wgsl',
+ '**/*.tmpl',
+ 'ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py'
+ ]
+
+ pull_request:
+ types: [opened, synchronize, reopened]
+ paths: [
+ '.github/workflows/build-wasm.yml',
+ '**/CMakeLists.txt',
+ '**/.cmake',
+ '**/*.h',
+ '**/*.hpp',
+ '**/*.c',
+ '**/*.cpp',
+ '**/*.wgsl',
+ '**/*.tmpl',
+ 'ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py'
+ ]
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
+ cancel-in-progress: true
+
+env:
+ GGML_NLOOP: 3
+ GGML_N_THREADS: 1
+ LLAMA_ARG_LOG_COLORS: 1
+ LLAMA_ARG_LOG_PREFIX: 1
+ LLAMA_ARG_LOG_TIMESTAMPS: 1
+
+jobs:
+ ubuntu-webgpu:
+ runs-on: ubuntu-24.04-arm
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: webgpu-ubuntu-24.04-arm-wasm
+ evict-old-files: 1d
+ save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
+
+ - name: Install Emscripten
+ run: |
+ git clone https://github.com/emscripten-core/emsdk.git
+ cd emsdk
+ ./emsdk install latest
+ ./emsdk activate latest
+
+ - name: Fetch emdawnwebgpu
+ run: |
+ DAWN_TAG="v20260317.182325"
+ EMDAWN_PKG="emdawnwebgpu_pkg-${DAWN_TAG}.zip"
+ echo "Downloading ${EMDAWN_PKG}"
+ curl -L -o emdawn.zip \
+ "https://github.com/google/dawn/releases/download/${DAWN_TAG}/${EMDAWN_PKG}"
+ unzip emdawn.zip
+
+ - name: Build WASM WebGPU
+ run: |
+ source emsdk/emsdk_env.sh
+ emcmake cmake -B build-wasm \
+ -G "Ninja" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DGGML_WEBGPU=ON \
+ -DGGML_OPENMP=OFF \
+ -DLLAMA_OPENSSL=OFF \
+ -DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg
+
+ time cmake --build build-wasm --config Release --target test-backend-ops -j $(nproc)
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: webgpu-ubuntu-24.04-arm-wasm
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/build-webgpu.yml b/.github/workflows/build-webgpu.yml
index bade95c6ab..b357851aa2 100644
--- a/.github/workflows/build-webgpu.yml
+++ b/.github/workflows/build-webgpu.yml
@@ -13,7 +13,9 @@ on:
'**/*.hpp',
'**/*.c',
'**/*.cpp',
- '**/*.wgsl'
+ '**/*.wgsl',
+ '**/*.tmpl',
+ 'ggml/src/ggml-webgpu/wgsl-shaders/embed_wgsl.py'
]
pull_request:
@@ -35,6 +37,29 @@ env:
LLAMA_ARG_LOG_TIMESTAMPS: 1
jobs:
+ format:
+ runs-on: ubuntu-24.04
+
+ steps:
+ - name: Clone
+ uses: actions/checkout@v6
+
+ - name: Install clang-format 22
+ run: |
+ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key |
+ sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc > /dev/null
+ sudo add-apt-repository -y \
+ "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-22 main"
+ sudo apt-get update
+ sudo apt-get install -y clang-format-22
+
+ - name: Check formatting
+ run: |
+ find ggml/src/ggml-webgpu \
+ -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' \) \
+ -print0 |
+ xargs -0 clang-format-22 --dry-run --Werror
+
macos:
runs-on: macos-latest
@@ -76,6 +101,16 @@ jobs:
cd build
ctest -L main --verbose --timeout 900
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: webgpu-macos-latest
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
+
ubuntu:
runs-on: ubuntu-24.04
@@ -129,45 +164,12 @@ jobs:
# test-backend-ops is too slow on llvmpipe, skip it
ctest -L main -E test-backend-ops --verbose --timeout 900
- ubuntu-wasm:
- runs-on: ubuntu-24.04-arm
-
- steps:
- - name: Clone
- id: checkout
- uses: actions/checkout@v6
-
- - name: ccache
- uses: ggml-org/ccache-action@v1.2.21
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
with:
- key: webgpu-ubuntu-24.04-arm-wasm
- evict-old-files: 1d
- save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
-
- - name: Install Emscripten
- run: |
- git clone https://github.com/emscripten-core/emsdk.git
- cd emsdk
- ./emsdk install latest
- ./emsdk activate latest
-
- - name: Fetch emdawnwebgpu
- run: |
- DAWN_TAG="v20260317.182325"
- EMDAWN_PKG="emdawnwebgpu_pkg-${DAWN_TAG}.zip"
- echo "Downloading ${EMDAWN_PKG}"
- curl -L -o emdawn.zip \
- "https://github.com/google/dawn/releases/download/${DAWN_TAG}/${EMDAWN_PKG}"
- unzip emdawn.zip
-
- - name: Build WASM WebGPU
- run: |
- source emsdk/emsdk_env.sh
- emcmake cmake -B build-wasm \
- -G "Ninja" \
- -DCMAKE_BUILD_TYPE=Release \
- -DGGML_WEBGPU=ON \
- -DLLAMA_OPENSSL=OFF \
- -DEMDAWNWEBGPU_DIR=emdawnwebgpu_pkg
-
- time cmake --build build-wasm --config Release --target test-backend-ops -j $(nproc)
+ key: webgpu-ubuntu-24.04
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 8195a55ff2..1de25b522d 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -44,6 +44,7 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
+ ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }}
- name: Determine source tag name
id: srctag
@@ -58,6 +59,13 @@ jobs:
git tag ${{ steps.srctag.outputs.name }} || exit 0
git push origin ${{ steps.srctag.outputs.name }} || exit 0
+ build_ui:
+ name: Build UI
+ needs: create_tag
+ uses: ./.github/workflows/ui-build.yml
+ with:
+ ui_version: ${{ needs.create_tag.outputs.source_tag }}
+
prepare_matrices:
name: Prepare Docker matrices
runs-on: ubuntu-24.04
@@ -79,7 +87,7 @@ jobs:
[
{ "tag": "cpu", "dockerfile": ".devops/cpu.Dockerfile", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04" },
{ "tag": "cpu", "dockerfile": ".devops/cpu.Dockerfile", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-arm" },
- { "tag": "cpu", "dockerfile": ".devops/s390x.Dockerfile", "platforms": "linux/s390x", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-s390x" },
+ { "tag": "cpu", "dockerfile": ".devops/s390x.Dockerfile", "platforms": "linux/s390x", "full": true, "light": true, "server": true, "free_disk_space": false, "runs_on": "ubuntu-24.04-s390x", "prebuilt_ui": true },
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.8.1", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },
{ "tag": "cuda cuda12", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "12.8.1", "platforms": "linux/arm64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04-arm" },
{ "tag": "cuda13", "dockerfile": ".devops/cuda.Dockerfile", "cuda_version": "13.3.0", "platforms": "linux/amd64", "full": true, "light": true, "server": true, "free_disk_space": true, "runs_on": "ubuntu-24.04" },
@@ -135,7 +143,7 @@ jobs:
push_to_registry:
name: Push Docker image to Docker Registry
- needs: [prepare_matrices, create_tag]
+ needs: [prepare_matrices, create_tag, build_ui]
runs-on: ${{ matrix.config.runs_on }}
strategy:
@@ -150,6 +158,13 @@ jobs:
fetch-depth: 0
ref: ${{ needs.create_tag.outputs.source_tag }}
+ - name: Download prebuilt UI
+ if: ${{ matrix.config.prebuilt_ui == true }}
+ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist
+
- name: Set up QEMU
if: ${{ contains(matrix.config.platforms, 'linux/amd64') }}
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4
@@ -379,6 +394,11 @@ jobs:
name: Create shared tags from digests
needs: [prepare_matrices, push_to_registry, create_tag]
runs-on: ubuntu-24.04
+ permissions:
+ contents: read
+ packages: write
+ id-token: write
+ attestations: write
strategy:
fail-fast: false
matrix:
@@ -413,6 +433,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create tags from digests
+ id: create_tags
shell: bash
run: |
set -euo pipefail
@@ -424,6 +445,7 @@ jobs:
SRC_TAG="${{ needs.create_tag.outputs.source_tag }}"
BUILD_DATE="${{ steps.build_date.outputs.date }}"
COMMIT_SHA="${{ steps.checkout.outputs.commit }}"
+ echo "image_repo=${IMAGE_REPO}" >> "$GITHUB_OUTPUT"
TAGS="${{ matrix.config.tag }}"
ARCHES="${{ matrix.config.arches }}"
DIGEST_GLOB="/tmp/digests/*.tsv"
@@ -490,6 +512,16 @@ jobs:
echo "Creating ${merged_versioned_tag} from ${refs[*]}"
docker buildx imagetools create "${annotations[@]}" --tag "${merged_versioned_tag}" "${refs[@]}"
+
+ if [[ "$tag_name" == "${TAGS%% *}" ]]; then
+ local digest
+ digest="$(docker buildx imagetools inspect "${merged_versioned_tag}" --format '{{.Manifest.Digest}}')"
+ if [[ ! "$digest" =~ ^sha256:[0-9a-f]{64}$ ]]; then
+ echo "Invalid digest for ${merged_versioned_tag}: ${digest}" >&2
+ exit 1
+ fi
+ echo "${image_type}_digest=${digest}" >> "$GITHUB_OUTPUT"
+ fi
}
for tag in $TAGS; do
@@ -513,3 +545,24 @@ jobs:
done
env:
GITHUB_REPOSITORY_OWNER: '${{ github.repository_owner }}'
+
+ - name: Attest full image
+ if: ${{ matrix.config.full }}
+ uses: actions/attest@v4
+ with:
+ subject-name: ${{ steps.create_tags.outputs.image_repo }}
+ subject-digest: ${{ steps.create_tags.outputs.full_digest }}
+
+ - name: Attest light image
+ if: ${{ matrix.config.light }}
+ uses: actions/attest@v4
+ with:
+ subject-name: ${{ steps.create_tags.outputs.image_repo }}
+ subject-digest: ${{ steps.create_tags.outputs.light_digest }}
+
+ - name: Attest server image
+ if: ${{ matrix.config.server }}
+ uses: actions/attest@v4
+ with:
+ subject-name: ${{ steps.create_tags.outputs.image_repo }}
+ subject-digest: ${{ steps.create_tags.outputs.server_digest }}
diff --git a/.github/workflows/hip-quality-check.yml b/.github/workflows/hip-quality-check.yml
index 14b9f41a6e..ecc4615a1a 100644
--- a/.github/workflows/hip-quality-check.yml
+++ b/.github/workflows/hip-quality-check.yml
@@ -9,6 +9,8 @@ on:
'.github/workflows/hip-quality-check.yml',
'**/*.cu',
'**/*.cuh',
+ 'ggml/src/ggml-hip/CMakeLists.txt',
+ 'ggml/src/ggml-cuda/vendors/hip.h',
'scripts/hip/gcn-cdna-vgpr-check.py'
]
@@ -18,6 +20,8 @@ on:
'.github/workflows/hip-quality-check.yml',
'**/*.cu',
'**/*.cuh',
+ 'ggml/src/ggml-hip/CMakeLists.txt',
+ 'ggml/src/ggml-cuda/vendors/hip.h',
'scripts/hip/gcn-cdna-vgpr-check.py'
]
@@ -80,3 +84,13 @@ jobs:
cd build
make -j $(nproc) 2>&1 | tee metrics.log | grep -v 'Rpass-analysis=kernel-resource-usage\|remark:\|^$'
python3 ../scripts/hip/gcn-cdna-vgpr-check.py metrics.log
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: hip-quality-check-ubuntu-22.04
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/make-release.yml b/.github/workflows/make-release.yml
new file mode 100644
index 0000000000..40fc862870
--- /dev/null
+++ b/.github/workflows/make-release.yml
@@ -0,0 +1,128 @@
+name: Make Release
+
+on:
+ workflow_dispatch:
+ inputs:
+ commit:
+ description: 'Commit SHA to release (empty = branch HEAD)'
+ required: false
+ default: ''
+ type: string
+ dry_run:
+ description: 'Dry run - validate without creating the tag'
+ required: true
+ type: boolean
+ default: true
+
+env:
+ GH_TOKEN: ${{ github.token }}
+
+permissions:
+ contents: write
+
+jobs:
+ make-release:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v6
+ with:
+ ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }}
+ ref: ${{ inputs.commit != '' && inputs.commit || github.ref_name }}
+ fetch-depth: 0
+
+ - name: Run release checks
+ id: checks
+ run: bash scripts/make-release-checks.sh ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
+ env:
+ GITHUB_REPOSITORY: ${{ github.repository }}
+ RELEASE_BRANCH: ${{ github.ref_name }}
+
+ - name: Create release tag
+ if: ${{ github.event.inputs.dry_run == 'false' }}
+ run: |
+ VERSION="${{ steps.checks.outputs.version }}"
+ git config user.name "github-actions[bot]"
+ git config user.email "github-actions[bot]@users.noreply.github.com"
+ git tag -a "${VERSION}" -m "Release ${VERSION}"
+ git push origin "${VERSION}"
+ echo "Created and pushed tag ${VERSION}"
+
+ - name: Generate release description
+ id: desc
+ run: bash scripts/make-release-desc.sh "${{ steps.checks.outputs.version }}"
+ env:
+ GITHUB_REPOSITORY: ${{ github.repository }}
+
+ - name: Create nightly-tag.txt
+ id: nightly_tag_file
+ run: |
+ NIGHTLY_TAG="${{ steps.desc.outputs.nightly_tag }}"
+ if [[ -z "${NIGHTLY_TAG}" ]]; then
+ echo "Warning: no nightly tag found for the release commit - nightly-tag.txt will not be created"
+ echo "create=false" >> "$GITHUB_OUTPUT"
+ exit 0
+ fi
+ echo "${NIGHTLY_TAG}" > nightly-tag.txt
+ echo "create=true" >> "$GITHUB_OUTPUT"
+ echo "nightly-tag.txt:"
+ cat nightly-tag.txt
+
+ - name: Create release
+ id: create_release
+ if: ${{ github.event.inputs.dry_run == 'false' }}
+ uses: ggml-org/action-create-release@v1
+ env:
+ GITHUB_TOKEN: ${{ github.token }}
+ with:
+ tag_name: ${{ steps.checks.outputs.version }}
+ prerelease: false
+ # TODO: enrich the body of the release with more information
+ body: |
+ ## Overview
+
+ New version has been released.
+
+ ## Assets
+
+ ${{ steps.desc.outputs.nightly }}
+
+ ## More info
+
+ - [Releases and versioning of `ggml-org` projects](https://github.com/ggml-org/ggml/discussions/1579)
+
+ ## ${{ steps.desc.outputs.changelog_title }}
+
+ ${{ steps.desc.outputs.changelog }}
+
+ - name: Upload nightly-tag.txt
+ if: ${{ github.event.inputs.dry_run == 'false' && steps.nightly_tag_file.outputs.create == 'true' }}
+ uses: actions/github-script@v8
+ with:
+ github-token: ${{secrets.GITHUB_TOKEN}}
+ script: |
+ const fs = require('fs');
+ const release_id = '${{ steps.create_release.outputs.id }}';
+ console.log('uploadReleaseAsset', 'nightly-tag.txt');
+ await github.rest.repos.uploadReleaseAsset({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ release_id: release_id,
+ name: 'nightly-tag.txt',
+ data: await fs.readFileSync('./nightly-tag.txt')
+ });
+
+ - name: Dry run summary
+ if: ${{ github.event.inputs.dry_run == 'true' }}
+ run: |
+ if [[ "${{ steps.checks.outputs.checks_passed }}" == "true" ]]; then
+ echo "Dry run complete - all checks passed."
+ echo "Would have created tag: ${{ steps.checks.outputs.version }}"
+ if [[ -n "${{ steps.desc.outputs.nightly_tag }}" ]]; then
+ echo "Would have uploaded nightly-tag.txt: ${{ steps.desc.outputs.nightly_tag }}"
+ fi
+ else
+ echo "::error::Dry run found release check failures. A release tag would not be created."
+ exit 1
+ fi
diff --git a/.github/workflows/pr-draft-label.yml b/.github/workflows/pr-draft-label.yml
new file mode 100644
index 0000000000..d2594c823d
--- /dev/null
+++ b/.github/workflows/pr-draft-label.yml
@@ -0,0 +1,23 @@
+name: Convert PR to draft
+
+on:
+ pull_request_target:
+ types: [labeled]
+
+permissions:
+ pull-requests: write
+ issues: write
+ contents: write # required for "gh pr ready" command, see https://github.com/cli/cli/issues/8910
+
+jobs:
+ convert-to-draft:
+ if: github.event.label.name == 'draft' && github.event.pull_request.draft == false
+ runs-on: ubuntu-slim
+ steps:
+ - name: Convert PR to draft
+ env:
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ PR_URL: ${{ github.event.pull_request.html_url }}
+ run: |
+ gh pr ready --undo "$PR_URL"
+ gh pr edit "$PR_URL" --remove-label draft
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 3559f82e3b..ee1b6e8a50 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -46,11 +46,13 @@ jobs:
steps:
- id: check
+ env:
+ COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "should_release=true" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/master" ]]; then
- if echo "${{ github.event.head_commit.message }}" | grep -q '\[no release\]'; then
+ if echo "$COMMIT_MESSAGE" | grep -q '\[no release\]'; then
echo "should_release=false" >> $GITHUB_OUTPUT
else
echo "should_release=true" >> $GITHUB_OUTPUT
@@ -60,7 +62,7 @@ jobs:
fi
macos-cpu:
- needs: [check-release]
+ needs: [check-release, ui-build]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
strategy:
matrix:
@@ -68,13 +70,13 @@ jobs:
- build: 'arm64'
arch: 'arm64'
os: macos-26
- defines: "-DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON"
+ defines: "-DGGML_METAL_EMBED_LIBRARY=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3"
# TODO: this build is disabled to save Github Actions resources (https://github.com/ggml-org/llama.cpp/pull/23780)
# in order to enable it again, we have to provision dedicated runners to run it
#- build: 'arm64-kleidiai'
# arch: 'arm64'
# os: macos-14
- # defines: "-DGGML_METAL_USE_BF16=ON -DGGML_METAL_EMBED_LIBRARY=ON -DGGML_CPU_KLEIDIAI=ON"
+ # defines: "-DGGML_METAL_EMBED_LIBRARY=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3 -DGGML_CPU_KLEIDIAI=ON"
- build: 'x64'
arch: 'x64'
os: macos-15-intel
@@ -94,12 +96,11 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Download UI build
+ uses: actions/download-artifact@v7
with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
+ name: llama-ui.zip
+ path: tools/ui/dist
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
@@ -119,11 +120,6 @@ jobs:
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
- - name: ccache-clear
- uses: ./.github/actions/ccache-clear
- with:
- key: release-${{ matrix.os }}-${{ matrix.arch }}
-
- name: Determine tag name
id: tag
uses: ./.github/actions/get-tag-name
@@ -140,8 +136,13 @@ jobs:
path: llama-${{ steps.tag.outputs.name }}-bin-macos-${{ matrix.build }}.tar.gz
name: llama-bin-macos-${{ matrix.build }}.tar.gz
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-${{ matrix.os }}-${{ matrix.arch }}
+
ubuntu-cpu:
- needs: [check-release]
+ needs: [check-release, ui-build]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
strategy:
matrix:
@@ -165,12 +166,11 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Download UI build
+ uses: actions/download-artifact@v7
with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
+ name: llama-ui.zip
+ path: tools/ui/dist
- name: Dependencies
id: depends
@@ -204,12 +204,6 @@ jobs:
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j $(nproc)
- - name: ccache-clear
- if: ${{ matrix.build != 's390x' }}
- uses: ./.github/actions/ccache-clear
- with:
- key: release-${{ matrix.os }}-cpu
-
- name: Determine tag name
id: tag
uses: ./.github/actions/get-tag-name
@@ -226,8 +220,14 @@ jobs:
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.tar.gz
name: llama-bin-ubuntu-${{ matrix.build }}.tar.gz
+ - name: ccache-clear
+ if: ${{ matrix.build != 's390x' }}
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-${{ matrix.os }}-cpu
+
ubuntu-vulkan:
- needs: [check-release]
+ needs: [check-release, ui-build]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
strategy:
@@ -250,12 +250,11 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Download UI build
+ uses: actions/download-artifact@v7
with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
+ name: llama-ui.zip
+ path: tools/ui/dist
- name: Dependencies
id: depends
@@ -290,11 +289,6 @@ jobs:
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j $(nproc)
- - name: ccache-clear
- uses: ./.github/actions/ccache-clear
- with:
- key: release-${{ matrix.os }}-vulkan
-
- name: Determine tag name
id: tag
uses: ./.github/actions/get-tag-name
@@ -311,8 +305,13 @@ jobs:
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz
name: llama-bin-ubuntu-vulkan-${{ matrix.build }}.tar.gz
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-${{ matrix.os }}-vulkan
+
android-arm64:
- needs: [check-release]
+ needs: [check-release, ui-build]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
runs-on: ubuntu-latest
@@ -330,12 +329,11 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Download UI build
+ uses: actions/download-artifact@v7
with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
+ name: llama-ui.zip
+ path: tools/ui/dist
- name: Set up JDK
uses: actions/setup-java@v5
@@ -404,7 +402,7 @@ jobs:
name: llama-bin-android-arm64.tar.gz
ubuntu-24-openvino:
- needs: [check-release]
+ needs: [check-release, ui-build]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
runs-on: ubuntu-24.04
@@ -416,9 +414,9 @@ jobs:
openvino_version: ${{ steps.openvino_version.outputs.value }}
env:
- # Sync versions in build.yml, build-self-hosted.yml, release.yml, build-cache.yml, .devops/openvino.Dockerfile
- OPENVINO_VERSION_MAJOR: "2026.0"
- OPENVINO_VERSION_FULL: "2026.0.0.20965.c6d6a13a886"
+ # 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"
steps:
- name: Set OpenVINO version output
@@ -431,12 +429,11 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Download UI build
+ uses: actions/download-artifact@v7
with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
+ name: llama-ui.zip
+ path: tools/ui/dist
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
@@ -476,13 +473,11 @@ jobs:
source ./openvino_toolkit/setupvars.sh
cmake -B build/ReleaseOV -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
- -DGGML_OPENVINO=ON
- cmake --build build/ReleaseOV --config Release -j $(nproc)
-
- - name: ccache-clear
- uses: ./.github/actions/ccache-clear
- with:
- key: release-ubuntu-24.04-openvino-release-no-preset-v1
+ -DGGML_OPENVINO=ON \
+ -DCMAKE_INSTALL_RPATH='$ORIGIN' \
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
+ ${{ env.CMAKE_ARGS }}
+ cmake --build build/ReleaseOV --config Release --parallel
- name: Determine tag name
id: tag
@@ -491,8 +486,26 @@ jobs:
- name: Pack artifacts
id: pack_artifacts
run: |
- cp LICENSE ./build/ReleaseOV/bin/
- tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz --transform "s,^\.,llama-${{ steps.tag.outputs.name }}," -C ./build/ReleaseOV/bin .
+ dest=./build/ReleaseOV/bin
+ OPENVINO_ROOT=./openvino_toolkit
+ ov_lib="$OPENVINO_ROOT/runtime/lib/intel64"
+
+ # Bundle OpenVINO runtime libs + TBB. Binaries built with RPATH=$ORIGIN
+ # load these siblings without setupvars.sh / LD_LIBRARY_PATH.
+ cp -P "$ov_lib"/libopenvino.so* \
+ "$ov_lib"/libopenvino_c.so* \
+ "$ov_lib"/libopenvino_*_plugin.so \
+ "$ov_lib"/libopenvino_intel_npu_compiler*.so \
+ "$OPENVINO_ROOT"/runtime/3rdparty/tbb/lib/*.so* \
+ "$dest"
+ cp -P /usr/lib/x86_64-linux-gnu/libOpenCL.so.1* "$dest" 2>/dev/null || true
+ cp "$ov_lib"/cache.json "$dest" 2>/dev/null || true
+
+ # OpenVINO licensing
+ cp -r "$OPENVINO_ROOT"/docs/licensing "$dest"/openvino-licensing
+
+ cp LICENSE "$dest"
+ tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz --transform "s,^\.,llama-${{ steps.tag.outputs.name }}," -C "$dest" .
- name: Upload artifacts
uses: actions/upload-artifact@v6
@@ -500,11 +513,145 @@ jobs:
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
name: llama-bin-ubuntu-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.tar.gz
- windows-cpu:
- needs: [check-release]
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-ubuntu-24.04-openvino-release-no-preset-v1
+
+ windows-openvino:
+ needs: [check-release, ui-build]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
- runs-on: windows-2025
+ runs-on: windows-2022
+
+ outputs:
+ openvino_version: ${{ steps.openvino_version.outputs.value }}
+
+ 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"
+
+ steps:
+ - name: Set OpenVINO version output
+ id: openvino_version
+ shell: bash
+ run: echo "value=${{ env.OPENVINO_VERSION_MAJOR }}" >> $GITHUB_OUTPUT
+
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - name: Download UI build
+ uses: actions/download-artifact@v7
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: release-windows-2022-openvino
+ variant: ccache
+ evict-old-files: 1d
+
+ - name: Setup Cache
+ uses: actions/cache@v5
+ id: cache-openvino
+ with:
+ path: ./openvino_toolkit
+ key: cache-gha-openvino-toolkit-v${{ env.OPENVINO_VERSION_FULL }}-${{ runner.os }}
+
+ - name: Setup OpenVINO Toolkit
+ if: steps.cache-openvino.outputs.cache-hit != 'true'
+ uses: ./.github/actions/windows-setup-openvino
+ with:
+ path: ./openvino_toolkit
+ version_major: ${{ env.OPENVINO_VERSION_MAJOR }}
+ version_full: ${{ env.OPENVINO_VERSION_FULL }}
+
+ - name: Install OpenCL using vcpkg
+ shell: powershell
+ run: |
+ git clone https://github.com/microsoft/vcpkg C:\vcpkg
+ C:\vcpkg\bootstrap-vcpkg.bat
+ C:\vcpkg\vcpkg install opencl
+
+ - name: Build
+ id: cmake_build
+ shell: cmd
+ run: |
+ REM Find extracted OpenVINO folder dynamically
+ for /d %%i in (openvino_toolkit\*) do set OPENVINO_ROOT=%%i
+
+ if not exist "%OPENVINO_ROOT%\runtime\cmake\OpenVINOConfig.cmake" (
+ echo ERROR: OpenVINOConfig.cmake not found
+ exit /b 1
+ )
+
+ call "%OPENVINO_ROOT%\setupvars.bat"
+
+ cmake -B build\ReleaseOV -G "Visual Studio 17 2022" ^
+ -A x64 ^
+ -DCMAKE_BUILD_TYPE=Release ^
+ -DGGML_OPENVINO=ON ^
+ -DLLAMA_BUILD_BORINGSSL=ON ^
+ -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ^
+ ${{ env.CMAKE_ARGS }}
+
+ cmake --build build\ReleaseOV --config Release -- /m
+
+ - name: Determine tag name
+ id: tag
+ uses: ./.github/actions/get-tag-name
+
+ - name: Pack artifacts
+ id: pack_artifacts
+ shell: powershell
+ run: |
+ # Locate the extracted OpenVINO toolkit root (same pattern as the Build step).
+ $OPENVINO_ROOT = (Get-ChildItem -Directory openvino_toolkit | Select-Object -First 1).FullName
+ if (-not $OPENVINO_ROOT) {
+ Write-Error "OpenVINO toolkit folder not found under .\openvino_toolkit"
+ exit 1
+ }
+
+ $dest = ".\build\ReleaseOV\bin\Release"
+
+ $ovBin = Join-Path $OPENVINO_ROOT 'runtime\bin\intel64\Release'
+ Copy-Item -Path (Join-Path $ovBin '*.dll') -Destination $dest -Force
+ Copy-Item -Path (Join-Path $ovBin 'cache.json') -Destination $dest -Force
+
+ $tbbBin = Join-Path $OPENVINO_ROOT 'runtime\3rdparty\tbb\bin'
+ Copy-Item -Path (Join-Path $tbbBin 'tbb*.dll') -Destination $dest -Force
+
+ # OpenVINO licensing
+ $licensingDest = Join-Path $dest 'openvino-licensing'
+ New-Item -ItemType Directory -Force -Path $licensingDest | Out-Null
+ Copy-Item -Path (Join-Path $OPENVINO_ROOT 'docs\licensing\*') -Destination $licensingDest -Recurse -Force
+
+ Copy-Item LICENSE $dest
+ 7z a -snl llama-${{ steps.tag.outputs.name }}-bin-win-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.zip $dest\*
+
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v6
+ with:
+ path: llama-${{ steps.tag.outputs.name }}-bin-win-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.zip
+ name: llama-bin-win-openvino-${{ env.OPENVINO_VERSION_MAJOR }}-x64.zip
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-windows-2022-openvino
+
+ windows-cpu:
+ name: windows-cpu / ${{ matrix.arch }}
+ needs: [check-release, ui-build]
+ if: ${{ needs.check-release.outputs.should_release == 'true' }}
+
+ runs-on: windows-2025-vs2026
permissions:
actions: write
@@ -521,12 +668,11 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Download UI build
+ uses: actions/download-artifact@v7
with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
+ name: llama-ui.zip
+ path: tools/ui/dist
- name: Install Ninja
run: |
@@ -535,12 +681,12 @@ jobs:
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
- key: release-windows-2025-${{ matrix.arch }}-cpu
+ key: release-windows-2025-vs2026-${{ matrix.arch }}-cpu
- name: Build
shell: cmd
run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch == 'x64' && 'x64' || 'amd64_arm64' }}
+ call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch == 'x64' && 'x64' || 'amd64_arm64' }}
cmake -S . -B build -G "Ninja Multi-Config" ^
-D CMAKE_TOOLCHAIN_FILE=cmake/${{ matrix.arch }}-windows-llvm.cmake ^
-DLLAMA_BUILD_BORINGSSL=ON ^
@@ -548,18 +694,13 @@ jobs:
-DGGML_BACKEND_DL=ON ^
-DGGML_CPU_ALL_VARIANTS=${{ matrix.arch == 'x64' && 'ON' || 'OFF' }} ^
-DGGML_OPENMP=ON ^
+ -DGGML_OPENMP_FETCH=ON ^
${{ env.CMAKE_ARGS }}
cmake --build build --config Release
- - name: ccache-clear
- uses: ./.github/actions/ccache-clear
- with:
- key: release-windows-2025-${{ matrix.arch }}-cpu
-
- name: Pack artifacts
id: pack_artifacts
run: |
- Copy-Item "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Redist\MSVC\14.44.35112\debug_nonredist\${{ matrix.arch }}\Microsoft.VC143.OpenMP.LLVM\libomp140.${{ matrix.arch == 'x64' && 'x86_64' || 'aarch64' }}.dll" .\build\bin\Release\
7z a -snl llama-bin-win-cpu-${{ matrix.arch }}.zip .\build\bin\Release\*
- name: Upload artifacts
@@ -568,6 +709,151 @@ jobs:
path: llama-bin-win-cpu-${{ matrix.arch }}.zip
name: llama-bin-win-cpu-${{ matrix.arch }}.zip
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ 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
+ windows-rocm:
+ needs: [check-release, ui-build]
+ if: ${{ needs.check-release.outputs.should_release == 'true' }}
+
+ runs-on: windows-2022
+
+ strategy:
+ matrix:
+ include:
+ - ROCM_VERSION: "7.14.0"
+ gpu_targets: "gfx1010;gfx1011;gfx1012;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1103;gfx1150;gfx1151;gfx1152;gfx1153;gfx1200;gfx1201"
+ build: x64
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - name: Download UI build
+ uses: actions/download-artifact@v7
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: windows-rocm-${{ matrix.ROCM_VERSION }}-${{ matrix.build }}
+ evict-old-files: 1d
+ max-size: "1G"
+
+ # - name: Cache ROCm Installation
+ # id: cache-rocm
+ # uses: actions/cache@v5
+ # with:
+ # path: C:\TheRock\build
+ # key: rocm-wheels-${{ matrix.ROCM_VERSION }}-multi-arch-${{ runner.os }}
+
+ - name: Setup ROCm
+ # if: steps.cache-rocm.outputs.cache-hit != 'true'
+ uses: ./.github/actions/windows-setup-rocm
+ with:
+ version: ${{ matrix.ROCM_VERSION }}
+
+ - name: Setup ROCm Environment
+ run: |
+ $ErrorActionPreference = "Stop"
+
+ # Activate venv from cache or fresh install
+ & C:\TheRock\build\.venv\Scripts\Activate.ps1
+
+ # Expand the devel tree (idempotent; no-op if already done during install)
+ rocm-sdk init
+ if ($LASTEXITCODE -ne 0) { throw "rocm-sdk init failed with exit code $LASTEXITCODE" }
+
+ # Get ROCm installation paths using the rocm-sdk CLI tool
+ $rocmPath = (rocm-sdk path --root)
+ if (-not $rocmPath) { throw "rocm-sdk path --root returned empty - devel package may not be installed" }
+ $rocmPath = $rocmPath.Trim()
+ $cmakePath = (rocm-sdk path --cmake).Trim()
+ $binPath = (rocm-sdk path --bin).Trim()
+ write-host "ROCm root: $rocmPath"
+ write-host "CMake path: $cmakePath"
+ write-host "Bin path: $binPath"
+
+ echo "HIP_PATH=$rocmPath" >> $env:GITHUB_ENV
+ echo "CMAKE_PREFIX_PATH=$cmakePath" >> $env:GITHUB_ENV
+ echo "HIP_DEVICE_LIB_PATH=$rocmPath\lib\llvm\amdgcn\bitcode" >> $env:GITHUB_ENV
+ echo "HIP_PLATFORM=amd" >> $env:GITHUB_ENV
+ echo "LLVM_PATH=$rocmPath\lib\llvm" >> $env:GITHUB_ENV
+ echo "$binPath" >> $env:GITHUB_PATH
+
+ # Keep venv in PATH for subsequent steps
+ echo "C:\TheRock\build\.venv\Scripts" >> $env:GITHUB_PATH
+
+ - name: Build
+ run: |
+ mkdir build
+ cd build
+ cmake .. `
+ -G "Unix Makefiles" `
+ -DCMAKE_PREFIX_PATH="${env:HIP_PATH}" `
+ -DCMAKE_BUILD_TYPE=Release `
+ -DGGML_BACKEND_DL=ON `
+ -DGGML_NATIVE=OFF `
+ -DGGML_CPU=ON `
+ -DGGML_CPU_ALL_VARIANTS=ON `
+ -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 . --config Release --parallel ${env:NUMBER_OF_PROCESSORS}
+
+ - name: Verify HIP backend was built
+ run: |
+ $hipDll = Get-ChildItem -Path build\bin -Filter "ggml-hip*.dll" -ErrorAction SilentlyContinue
+ if (-not $hipDll) {
+ Write-Host "##[error]ggml-hip*.dll was NOT produced. The HIP backend silently failed to build."
+ Write-Host "Contents of build\bin:"
+ Get-ChildItem build\bin | Format-Table -AutoSize
+ exit 1
+ }
+ Write-Host "HIP backend artifact found:"
+ $hipDll | Format-Table FullName, Length -AutoSize
+
+ - name: Determine tag name
+ id: tag
+ uses: ./.github/actions/get-tag-name
+
+ - name: Get ROCm short version
+ run: |
+ $rocmVersionShort = ('${{ matrix.ROCM_VERSION }}'.Split('.')[0..1] -join '.')
+ echo "ROCM_VERSION_SHORT=$rocmVersionShort" >> $env:GITHUB_ENV
+
+ - name: Pack artifacts
+ run: |
+ cp "LICENSE" "build\bin\"
+ 7z a -snl llama-bin-win-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.zip .\build\bin\*
+
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v6
+ with:
+ path: llama-bin-win-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.zip
+ name: llama-bin-win-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.zip
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: windows-rocm-${{ matrix.ROCM_VERSION }}-${{ matrix.build }}
+
+ # note: builds only the backend library - llama-server (with the embedded UI)
+ # is injected from the windows-cpu zip during the release "Merge artifacts" step
windows:
needs: [check-release]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
@@ -579,7 +865,7 @@ jobs:
env:
OPENBLAS_VERSION: 0.3.23
- VULKAN_VERSION: 1.4.313.2
+ VULKAN_VERSION: 1.4.357.0
strategy:
matrix:
@@ -598,13 +884,6 @@ jobs:
id: checkout
uses: actions/checkout@v6
- - name: Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
-
- name: Install Vulkan SDK
id: get_vulkan
if: ${{ matrix.backend == 'vulkan' }}
@@ -667,7 +946,10 @@ jobs:
path: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip
name: llama-bin-win-${{ matrix.backend }}-${{ matrix.arch }}.zip
+ # note: builds only the ggml-cuda backend - llama-server is injected from the
+ # windows-cpu zip during the release "Merge artifacts" step
windows-cuda:
+ name: windows-cuda (${{ matrix.cuda }}, ${{ matrix.arch }})
needs: [check-release]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
@@ -678,24 +960,27 @@ jobs:
strategy:
matrix:
- cuda: ['12.4', '13.3']
+ include:
+ - cuda: '12.4'
+ arch: x64
+ defines: '-DGGML_CUDA_CUB_3DOT2=ON'
+ - cuda: '13.3'
+ arch: x64
+ defines: ''
+ - cuda: '13.4'
+ arch: arm64
+ defines: '-DCMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-msvc-cuda.cmake'
steps:
- name: Clone
id: checkout
uses: actions/checkout@v6
- - name: Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
-
- name: Install Cuda Toolkit
uses: ./.github/actions/windows-setup-cuda
with:
cuda_version: ${{ matrix.cuda }}
+ cuda_arch: ${{ matrix.arch }}
- name: Install Ninja
id: install_ninja
@@ -705,265 +990,265 @@ jobs:
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
- key: release-windows-2022-x64-cuda-${{ matrix.cuda }}
+ key: release-windows-2022-${{ matrix.arch }}-cuda-${{ matrix.cuda }}
- name: Build
id: cmake_build
shell: cmd
# TODO: Remove GGML_CUDA_CUB_3DOT2 flag once CCCL 3.2 is bundled within CTK and that CTK version is used in this project
run: |
- call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch == 'x64' && 'x64' || 'amd64_arm64' }}
cmake -S . -B build -G "Ninja Multi-Config" ^
-DGGML_BACKEND_DL=ON ^
-DGGML_NATIVE=OFF ^
-DGGML_CPU=OFF ^
-DGGML_CUDA=ON ^
- -DLLAMA_BUILD_BORINGSSL=ON ^
- -DGGML_CUDA_CUB_3DOT2=ON
+ -DLLAMA_BUILD_BORINGSSL=ON ${{ matrix.defines }}
set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1
cmake --build build --config Release -j %NINJA_JOBS% --target ggml-cuda
- - name: ccache-clear
- uses: ./.github/actions/ccache-clear
- with:
- key: release-windows-2022-x64-cuda-${{ matrix.cuda }}
-
- name: Pack artifacts
id: pack_artifacts
run: |
- 7z a -snl llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip .\build\bin\Release\ggml-cuda.dll
+ 7z a -snl llama-bin-win-cuda-${{ matrix.cuda }}-${{ matrix.arch }}.zip .\build\bin\Release\ggml-cuda.dll
- name: Upload artifacts
uses: actions/upload-artifact@v6
with:
- path: llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
- name: llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
+ path: llama-bin-win-cuda-${{ matrix.cuda }}-${{ matrix.arch }}.zip
+ name: llama-bin-win-cuda-${{ matrix.cuda }}-${{ matrix.arch }}.zip
- - name: Copy and pack Cuda runtime
+ - name: Copy and pack Cuda runtime (x64)
+ if: ${{ matrix.arch == 'x64' }}
run: |
echo "Cuda install location: ${{ env.CUDA_PATH }}"
$dst='.\build\bin\cudart\'
robocopy "${{env.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
robocopy "${{env.CUDA_PATH}}\lib" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
robocopy "${{env.CUDA_PATH}}\bin\x64" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
- 7z a cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip $dst\*
+ 7z a cudart-llama-bin-win-cuda-${{ matrix.cuda }}-${{ matrix.arch }}.zip $dst\*
+
+ - name: Copy and pack Cuda runtime (ARM64)
+ if: ${{ matrix.arch == 'arm64' }}
+ run: |
+ echo "Cuda install location: ${{ env.CUDA_PATH }}"
+ $dst='.\build\bin\cudart\'
+ robocopy "${{env.CUDA_PATH}}\bin\arm64" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
+ 7z a cudart-llama-bin-win-cuda-${{ matrix.cuda }}-${{ matrix.arch }}.zip $dst\*
- name: Upload Cuda runtime
uses: actions/upload-artifact@v6
with:
- path: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
- name: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-x64.zip
+ path: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-${{ matrix.arch }}.zip
+ name: cudart-llama-bin-win-cuda-${{ matrix.cuda }}-${{ matrix.arch }}.zip
-# TODO: this build is disabled to save Github Actions resources (https://github.com/ggml-org/llama.cpp/pull/23705)
-# in order to enable it again, we have to provision dedicated runners to run it
-# windows-sycl:
-#
-# runs-on: windows-2022
-#
-# defaults:
-# run:
-# shell: bash
-#
-# env:
-# WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b60765d1-2b85-4e85-86b6-cb0e9563a699/intel-deep-learning-essentials-2025.3.3.18_offline.exe
-# WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel
-# LEVEL_ZERO_SDK_URL: https://github.com/oneapi-src/level-zero/releases/download/v1.28.2/level-zero-win-sdk-1.28.2.zip
-# ONEAPI_ROOT: "C:/Program Files (x86)/Intel/oneAPI"
-# ONEAPI_INSTALLER_VERSION: "2025.3.3"
-#
-# steps:
-# - name: Clone
-# id: checkout
-# uses: actions/checkout@v6
-#
-# - name: Use oneAPI Installation Cache
-# uses: actions/cache@v5
-# id: cache-sycl
-# with:
-# path: ${{ env.ONEAPI_ROOT }}
-# key: cache-gha-oneAPI-${{ env.ONEAPI_INSTALLER_VERSION }}-${{ runner.os }}
-#
-# - name: Download & Install oneAPI
-# shell: bash
-# if: steps.cache-sycl.outputs.cache-hit != 'true'
-# run: |
-# scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
-#
-# - name: Install Level Zero SDK
-# shell: pwsh
-# run: |
-# Invoke-WebRequest -Uri "${{ env.LEVEL_ZERO_SDK_URL }}" -OutFile "level-zero-win-sdk.zip"
-# Expand-Archive -Path "level-zero-win-sdk.zip" -DestinationPath "C:/level-zero-sdk" -Force
-# "LEVEL_ZERO_V1_SDK_PATH=C:/level-zero-sdk" | Out-File -FilePath $env:GITHUB_ENV -Append
-#
-# - name: Setup Node.js
-# uses: actions/setup-node@v6
-# with:
-# node-version: "24"
-# cache: "npm"
-# cache-dependency-path: "tools/ui/package-lock.json"
-#
-# - name: ccache
-# uses: ggml-org/ccache-action@v1.2.21
-# with:
-# key: release-windows-2022-x64-sycl
-#
-# - name: Build
-# id: cmake_build
-# shell: cmd
-# run: |
-# call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
-# cmake -G "Ninja" -B build ^
-# -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=icx ^
-# -DCMAKE_BUILD_TYPE=Release ^
-# -DGGML_BACKEND_DL=ON -DBUILD_SHARED_LIBS=ON ^
-# -DGGML_CPU=OFF -DGGML_SYCL=ON ^
-# -DLLAMA_BUILD_BORINGSSL=ON
-# cmake --build build --target ggml-sycl -j
-#
-# - name: Build the release package
-# id: pack_artifacts
-# run: |
-# echo "cp oneAPI running time dll files in ${{ env.ONEAPI_ROOT }} to ./build/bin"
-#
-# cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_sycl_blas.5.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_core.2.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_tbb_thread.2.dll" ./build/bin
-#
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_level_zero.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_level_zero_v2.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_opencl.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_loader.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_win_proxy_loader.dll" ./build/bin
-# ZE_LOADER_DLL=$(find "${{ env.ONEAPI_ROOT }}" "$LEVEL_ZERO_V1_SDK_PATH" -iname ze_loader.dll -print -quit 2>/dev/null || true)
-# if [ -n "$ZE_LOADER_DLL" ]; then
-# echo "Using Level Zero loader: $ZE_LOADER_DLL"
-# cp "$ZE_LOADER_DLL" ./build/bin
-# else
-# echo "Level Zero loader DLL not found in oneAPI or SDK; relying on system driver/runtime"
-# fi
-#
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/sycl8.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/svml_dispmd.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libmmd.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libiomp5md.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/sycl-ls.exe" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libsycl-fallback-bfloat16.spv" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libsycl-native-bfloat16.spv" ./build/bin
-#
-# cp "${{ env.ONEAPI_ROOT }}/dnnl/latest/bin/dnnl.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/tbb/latest/bin/tbb12.dll" ./build/bin
-#
-# cp "${{ env.ONEAPI_ROOT }}/tcm/latest/bin/tcm.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/tcm/latest/bin/libhwloc-15.dll" ./build/bin
-# cp "${{ env.ONEAPI_ROOT }}/umf/latest/bin/umf.dll" ./build/bin
-#
-# echo "cp oneAPI running time dll files to ./build/bin done"
-# 7z a -snl llama-bin-win-sycl-x64.zip ./build/bin/*
-#
-# - name: Upload the release package
-# uses: actions/upload-artifact@v6
-# with:
-# path: llama-bin-win-sycl-x64.zip
-# name: llama-bin-win-sycl-x64.zip
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-windows-2022-${{ matrix.arch }}-cuda-${{ matrix.cuda }}
-# TODO: this build is disabled to save Github Actions resources (https://github.com/ggml-org/llama.cpp/pull/23705)
-# in order to enable it again, we have to provision dedicated runners to run it
-# ubuntu-24-sycl:
-#
-# strategy:
-# matrix:
-# build: [fp32]
-# include:
-# - build: fp32
-# fp16: OFF
-#
-# runs-on: ubuntu-24.04
-#
-# env:
-# ONEAPI_ROOT: /opt/intel/oneapi/
-# ONEAPI_INSTALLER_VERSION: "2025.3.3"
-# LEVEL_ZERO_VERSION: "1.28.2"
-# LEVEL_ZERO_UBUNTU_VERSION: "u24.04"
-#
-# steps:
-# - name: Clone
-# id: checkout
-# uses: actions/checkout@v6
-# with:
-# fetch-depth: 0
-#
-# - name: Use oneAPI Installation Cache
-# uses: actions/cache@v5
-# id: cache-sycl
-# with:
-# path: ${{ env.ONEAPI_ROOT }}
-# key: cache-gha-oneAPI-${{ env.ONEAPI_INSTALLER_VERSION }}-${{ runner.os }}
-#
-# - name: Download & Install oneAPI
-# shell: bash
-# if: steps.cache-sycl.outputs.cache-hit != 'true'
-# run: |
-# cd /tmp
-# wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56f7923a-adb8-43f3-8b02-2b60fcac8cab/intel-deep-learning-essentials-2025.3.3.16_offline.sh -O intel-deep-learning-essentials_offline.sh
-# sudo bash intel-deep-learning-essentials_offline.sh -s -a --silent --eula accept
-#
-# - name: Install Level Zero SDK
-# shell: bash
-# run: |
-# cd /tmp
-# wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero.deb
-# wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero-devel_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero-devel.deb
-# sudo apt-get install -y ./level-zero.deb ./level-zero-devel.deb
-#
-# - name: Setup Node.js
-# uses: actions/setup-node@v6
-# with:
-# node-version: "24"
-# cache: "npm"
-# cache-dependency-path: "tools/ui/package-lock.json"
-#
-# - name: ccache
-# uses: ggml-org/ccache-action@v1.2.21
-# with:
-# key: release-ubuntu-24.04-sycl
-#
-# - name: Build
-# id: cmake_build
-# run: |
-# source /opt/intel/oneapi/setvars.sh
-# cmake -B build \
-# -G "Ninja" \
-# -DCMAKE_BUILD_TYPE=Release \
-# -DGGML_SYCL=ON \
-# -DCMAKE_C_COMPILER=icx \
-# -DCMAKE_CXX_COMPILER=icpx \
-# -DLLAMA_OPENSSL=OFF \
-# -DGGML_NATIVE=OFF \
-# -DGGML_SYCL_F16=${{ matrix.fp16 }}
-# time cmake --build build --config Release -j $(nproc)
-#
-# - name: Determine tag name
-# id: tag
-# uses: ./.github/actions/get-tag-name
-#
-# - name: Pack artifacts
-# id: pack_artifacts
-# run: |
-# cp LICENSE ./build/bin/
-# tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz --transform "s,^\.,llama-${{ steps.tag.outputs.name }}," -C ./build/bin .
-#
-# - name: Upload artifacts
-# uses: actions/upload-artifact@v6
-# with:
-# path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz
-# name: llama-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz
-
- ubuntu-22-rocm:
+ # note: builds only the ggml-sycl backend - llama-server is injected from the
+ # windows-cpu zip during the release "Merge artifacts" step
+ windows-sycl:
needs: [check-release]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
- runs-on: ubuntu-22.04
+ runs-on: windows-2022
+
+ defaults:
+ run:
+ shell: bash
+
+ env:
+ WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/b60765d1-2b85-4e85-86b6-cb0e9563a699/intel-deep-learning-essentials-2025.3.3.18_offline.exe
+ WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel
+ LEVEL_ZERO_SDK_URL: https://github.com/oneapi-src/level-zero/releases/download/v1.28.2/level-zero-win-sdk-1.28.2.zip
+ ONEAPI_ROOT: "C:/Program Files (x86)/Intel/oneAPI"
+ ONEAPI_INSTALLER_VERSION: "2025.3.3"
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+
+ - name: Download & Install oneAPI
+ shell: bash
+ run: |
+ scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
+
+ - name: Install Level Zero SDK
+ shell: pwsh
+ run: |
+ Invoke-WebRequest -Uri "${{ env.LEVEL_ZERO_SDK_URL }}" -OutFile "level-zero-win-sdk.zip"
+ Expand-Archive -Path "level-zero-win-sdk.zip" -DestinationPath "C:/level-zero-sdk" -Force
+ "LEVEL_ZERO_V1_SDK_PATH=C:/level-zero-sdk" | Out-File -FilePath $env:GITHUB_ENV -Append
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: release-windows-2022-x64-sycl
+
+ - name: Build
+ id: cmake_build
+ shell: cmd
+ run: |
+ call "C:\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64 --force
+ cmake -G "Ninja" -B build ^
+ -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=icx ^
+ -DCMAKE_BUILD_TYPE=Release ^
+ -DGGML_BACKEND_DL=ON -DBUILD_SHARED_LIBS=ON ^
+ -DGGML_CPU=OFF -DGGML_SYCL=ON ^
+ -DLLAMA_BUILD_BORINGSSL=ON
+ cmake --build build --target ggml-sycl -j %NUMBER_OF_PROCESSORS%
+
+ - name: Build the release package
+ id: pack_artifacts
+ run: |
+ echo "cp oneAPI running time dll files in ${{ env.ONEAPI_ROOT }} to ./build/bin"
+
+ cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_sycl_blas.5.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_core.2.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_tbb_thread.2.dll" ./build/bin
+
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_level_zero.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_level_zero_v2.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_opencl.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_loader.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_win_proxy_loader.dll" ./build/bin
+ ZE_LOADER_DLL=$(find "${{ env.ONEAPI_ROOT }}" "$LEVEL_ZERO_V1_SDK_PATH" -iname ze_loader.dll -print -quit 2>/dev/null || true)
+ if [ -n "$ZE_LOADER_DLL" ]; then
+ echo "Using Level Zero loader: $ZE_LOADER_DLL"
+ cp "$ZE_LOADER_DLL" ./build/bin
+ else
+ echo "Level Zero loader DLL not found in oneAPI or SDK; relying on system driver/runtime"
+ fi
+
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/sycl8.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/svml_dispmd.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libmmd.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libiomp5md.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/sycl-ls.exe" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libsycl-fallback-bfloat16.spv" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libsycl-native-bfloat16.spv" ./build/bin
+
+ cp "${{ env.ONEAPI_ROOT }}/dnnl/latest/bin/dnnl.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/tbb/latest/bin/tbb12.dll" ./build/bin
+
+ cp "${{ env.ONEAPI_ROOT }}/tcm/latest/bin/tcm.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/tcm/latest/bin/libhwloc-15.dll" ./build/bin
+ cp "${{ env.ONEAPI_ROOT }}/umf/latest/bin/umf.dll" ./build/bin
+
+ echo "cp oneAPI running time dll files to ./build/bin done"
+ 7z a -snl llama-bin-win-sycl-x64.zip ./build/bin/*
+
+ - name: Upload the release package
+ uses: actions/upload-artifact@v6
+ with:
+ path: llama-bin-win-sycl-x64.zip
+ name: llama-bin-win-sycl-x64.zip
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-windows-2022-x64-sycl
+
+ ubuntu-24-sycl:
+ needs: [check-release, ui-build]
+ if: ${{ needs.check-release.outputs.should_release == 'true' }}
+
+ strategy:
+ matrix:
+ build: [fp32, fp16]
+ include:
+ - build: fp32
+ fp16: OFF
+ - build: fp16
+ fp16: ON
+
+ runs-on: ubuntu-24.04
+
+ env:
+ ONEAPI_ROOT: /opt/intel/oneapi/
+ ONEAPI_INSTALLER_VERSION: "2025.3.3"
+ LEVEL_ZERO_VERSION: "1.28.2"
+ LEVEL_ZERO_UBUNTU_VERSION: "u24.04"
+
+ steps:
+ - name: Clone
+ id: checkout
+ uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - name: Download & Install oneAPI
+ shell: bash
+ run: |
+ cd /tmp
+ wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/56f7923a-adb8-43f3-8b02-2b60fcac8cab/intel-deep-learning-essentials-2025.3.3.16_offline.sh -O intel-deep-learning-essentials_offline.sh
+ sudo bash intel-deep-learning-essentials_offline.sh -s -a --silent --eula accept
+
+ - name: Install Level Zero SDK
+ shell: bash
+ run: |
+ cd /tmp
+ wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero.deb
+ wget -q "https://github.com/oneapi-src/level-zero/releases/download/v${LEVEL_ZERO_VERSION}/level-zero-devel_${LEVEL_ZERO_VERSION}%2B${LEVEL_ZERO_UBUNTU_VERSION}_amd64.deb" -O level-zero-devel.deb
+ sudo apt-get install -y ./level-zero.deb ./level-zero-devel.deb
+
+ - name: Download UI build
+ uses: actions/download-artifact@v7
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist
+
+ - name: ccache
+ uses: ggml-org/ccache-action@v1.2.21
+ with:
+ key: release-ubuntu-24.04-sycl-${{ matrix.build }}
+
+ - name: Build
+ id: cmake_build
+ run: |
+ source /opt/intel/oneapi/setvars.sh
+ cmake -B build \
+ -G "Ninja" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DGGML_SYCL=ON \
+ -DCMAKE_C_COMPILER=icx \
+ -DCMAKE_CXX_COMPILER=icpx \
+ -DCMAKE_INSTALL_RPATH='$ORIGIN' \
+ -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
+ -DLLAMA_OPENSSL=OFF \
+ -DGGML_NATIVE=OFF \
+ -DGGML_SYCL_F16=${{ matrix.fp16 }}
+ time cmake --build build --config Release -j $(nproc)
+
+ - name: Determine tag name
+ id: tag
+ uses: ./.github/actions/get-tag-name
+
+ - name: Pack artifacts
+ id: pack_artifacts
+ run: |
+ cp LICENSE ./build/bin/
+ tar -czvf llama-${{ steps.tag.outputs.name }}-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz --transform "s,^\.,llama-${{ steps.tag.outputs.name }}," -C ./build/bin .
+
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v6
+ with:
+ path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz
+ name: llama-bin-ubuntu-sycl-${{ matrix.build }}-x64.tar.gz
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ with:
+ key: release-ubuntu-24.04-sycl-${{ matrix.build }}
+
+ ubuntu-24-rocm:
+ needs: [check-release, ui-build]
+ if: ${{ needs.check-release.outputs.should_release == 'true' }}
+
+ runs-on: ubuntu-24.04
permissions:
actions: write
@@ -971,8 +1256,8 @@ jobs:
strategy:
matrix:
include:
- - ROCM_VERSION: "7.2.1"
- gpu_targets: "gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1151;gfx1150;gfx1200;gfx1201"
+ - ROCM_VERSION: "7.14.0"
+ gpu_targets: "gfx908;gfx90a;gfx942;gfx950;gfx1010;gfx1011;gfx1012;gfx1030;gfx1031;gfx1032;gfx1033;gfx1034;gfx1035;gfx1036;gfx1100;gfx1101;gfx1102;gfx1150;gfx1151;gfx1152;gfx1200;gfx1201"
build: 'x64'
steps:
@@ -982,12 +1267,11 @@ jobs:
with:
fetch-depth: 0
- - name: Setup Node.js
- uses: actions/setup-node@v6
+ - name: Download UI build
+ uses: actions/download-artifact@v7
with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
+ name: llama-ui.zip
+ path: tools/ui/dist
- name: Free up disk space
uses: ggml-org/free-disk-space@v1.3.1
@@ -997,45 +1281,54 @@ jobs:
- name: ccache
uses: ggml-org/ccache-action@v1.2.21
with:
- key: release-ubuntu-22.04-rocm-${{ matrix.ROCM_VERSION }}
+ key: release-ubuntu-24.04-rocm-${{ matrix.ROCM_VERSION }}-${{ matrix.build }}
+ evict-old-files: 1d
+ max-size: "1G"
+
+ - name: Tune ccache for reinstalled ROCm toolchain
+ run: |
+ # ROCm is pip-installed fresh each run, so the clang binary's mtime
+ # changes every time. With the default compiler_check=mtime that
+ # invalidates the cache; hash compiler contents instead so warm
+ # builds hit.
+ ccache --set-config=compiler_check=content
+ ccache --set-config=sloppiness=time_macros,include_file_mtime,include_file_ctime
- name: Dependencies
id: depends
run: |
sudo apt install -y build-essential git cmake wget
- - name: Setup Legacy ROCm
- if: matrix.ROCM_VERSION == '7.2.1'
- id: legacy_env
- run: |
- sudo mkdir --parents --mode=0755 /etc/apt/keyrings
- wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | \
- gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
-
- sudo tee /etc/apt/sources.list.d/rocm.list << EOF
- deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${{ matrix.ROCM_VERSION }} jammy main
- EOF
-
- sudo tee /etc/apt/preferences.d/rocm-pin-600 << EOF
- Package: *
- Pin: release o=repo.radeon.com
- Pin-Priority: 600
- EOF
-
- sudo apt update
- sudo apt-get install -y libssl-dev rocm-hip-sdk
-
- - name: Setup TheRock
- if: matrix.ROCM_VERSION != '7.2.1'
+ - name: Setup TheRock with Wheels
id: therock_env
run: |
- wget https://repo.amd.com/rocm/tarball/therock-dist-linux-gfx1151-${{ matrix.ROCM_VERSION }}.tar.gz
- mkdir install
- tar -xf *.tar.gz -C install
- export ROCM_PATH=$(pwd)/install
- echo ROCM_PATH=$ROCM_PATH >> $GITHUB_ENV
- echo PATH=$PATH:$ROCM_PATH/bin >> $GITHUB_ENV
- echo LD_LIBRARY_PATH=$ROCM_PATH/lib:$ROCM_PATH/llvm/lib:$ROCM_PATH/lib/rocprofiler-systems >> $GITHUB_ENV
+ # Create Python virtual environment
+ python3 -m venv .venv
+ source .venv/bin/activate
+
+ # Install ROCm wheels for build
+ # libraries = HIP runtime and CMake configs needed for linking
+ # devel = compilers, headers, static libs
+ python -m pip install --upgrade pip
+ python -m pip install --index-url https://repo.amd.com/rocm/whl-multi-arch/ "rocm[libraries,devel]==${{ matrix.ROCM_VERSION }}"
+
+ # Get ROCm installation paths using the rocm-sdk CLI tool
+ ROCM_PATH=$(rocm-sdk path --root)
+ CMAKE_PATH=$(rocm-sdk path --cmake)
+ BIN_PATH=$(rocm-sdk path --bin)
+ echo "ROCM_PATH=$ROCM_PATH"
+ echo "CMAKE_PATH=$CMAKE_PATH"
+ echo "BIN_PATH=$BIN_PATH"
+
+ # Set environment variables
+ echo "ROCM_PATH=$ROCM_PATH" >> $GITHUB_ENV
+ echo "CMAKE_PREFIX_PATH=$CMAKE_PATH" >> $GITHUB_ENV
+ echo "HIP_PATH=$ROCM_PATH" >> $GITHUB_ENV
+ echo "PATH=$BIN_PATH:${PATH}" >> $GITHUB_ENV
+ echo "LD_LIBRARY_PATH=$ROCM_PATH/lib:${LD_LIBRARY_PATH:-}" >> $GITHUB_ENV
+
+ # Keep venv activated for subsequent steps
+ echo "$(pwd)/.venv/bin" >> $GITHUB_PATH
- name: Build with native CMake HIP support
id: cmake_build
@@ -1051,15 +1344,9 @@ jobs:
-DGPU_TARGETS="${{ matrix.gpu_targets }}" \
-DGGML_HIP=ON \
-DHIP_PLATFORM=amd \
- -DGGML_HIP_ROCWMMA_FATTN=ON \
${{ env.CMAKE_ARGS }}
cmake --build build --config Release -j $(nproc)
- - name: ccache-clear
- uses: ./.github/actions/ccache-clear
- with:
- key: release-ubuntu-22.04-rocm-${{ matrix.ROCM_VERSION }}
-
- name: Determine tag name
id: tag
uses: ./.github/actions/get-tag-name
@@ -1079,128 +1366,10 @@ jobs:
path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz
name: llama-bin-ubuntu-rocm-${{ env.ROCM_VERSION_SHORT }}-${{ matrix.build }}.tar.gz
- windows-hip:
- needs: [check-release]
- if: ${{ needs.check-release.outputs.should_release == 'true' }}
-
- runs-on: windows-2022
-
- permissions:
- actions: write
-
- env:
- HIPSDK_INSTALLER_VERSION: "26.Q1"
-
- strategy:
- matrix:
- include:
- - name: "radeon"
- gpu_targets: "gfx1150;gfx1151;gfx1200;gfx1201;gfx1100;gfx1101;gfx1102;gfx1030;gfx1031;gfx1032"
-
- steps:
- - name: Clone
- id: checkout
- uses: actions/checkout@v6
-
- - name: Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
-
- - name: Grab rocWMMA package
- id: grab_rocwmma
- run: |
- curl -o rocwmma.deb "https://repo.radeon.com/rocm/apt/7.2.1/pool/main/r/rocwmma-dev/rocwmma-dev_2.2.0.70201-81~24.04_amd64.deb"
- 7z x rocwmma.deb
- 7z x data.tar
-
- - name: Cache ROCm Installation
- id: cache-rocm
- uses: actions/cache@v5
- with:
- path: C:\Program Files\AMD\ROCm
- key: cache-gha-rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
-
- - name: ccache
- uses: ggml-org/ccache-action@v1.2.21
- with:
- key: release-windows-2022-x64-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}
-
- - name: Install ROCm
- if: steps.cache-rocm.outputs.cache-hit != 'true'
- id: depends
- run: |
- $ErrorActionPreference = "Stop"
- write-host "Downloading AMD HIP SDK Installer"
- Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-${{ env.HIPSDK_INSTALLER_VERSION }}-Win11-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
- write-host "Installing AMD HIP SDK"
- $proc = Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -PassThru
- $completed = $proc.WaitForExit(600000)
- if (-not $completed) {
- Write-Error "ROCm installation timed out after 10 minutes. Killing the process"
- $proc.Kill()
- exit 1
- }
- if ($proc.ExitCode -ne 0) {
- Write-Error "ROCm installation failed with exit code $($proc.ExitCode)"
- exit 1
- }
- write-host "Completed AMD HIP SDK installation"
-
- - name: Verify ROCm
- id: verify
- run: |
- # Find and test ROCm installation
- $clangPath = Get-ChildItem 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | Select-Object -First 1
- if (-not $clangPath) {
- Write-Error "ROCm installation not found"
- exit 1
- }
- & $clangPath.FullName --version
-
- - name: Build
- id: cmake_build
- run: |
- $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
- $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
- cmake -G "Unix Makefiles" -B build -S . `
- -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
- -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
- -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/opt/rocm-7.2.1/include/ -Wno-ignored-attributes -Wno-nested-anon-types" `
- -DCMAKE_BUILD_TYPE=Release `
- -DGGML_BACKEND_DL=ON `
- -DGGML_NATIVE=OFF `
- -DGGML_CPU=OFF `
- -DGPU_TARGETS="${{ matrix.gpu_targets }}" `
- -DGGML_HIP_ROCWMMA_FATTN=ON `
- -DGGML_HIP=ON `
- -DLLAMA_BUILD_BORINGSSL=ON
- cmake --build build --target ggml-hip -j ${env:NUMBER_OF_PROCESSORS}
- md "build\bin\rocblas\library\"
- md "build\bin\hipblaslt\library"
- cp "${env:HIP_PATH}\bin\libhipblas.dll" "build\bin\"
- cp "${env:HIP_PATH}\bin\libhipblaslt.dll" "build\bin\"
- cp "${env:HIP_PATH}\bin\rocblas.dll" "build\bin\"
- cp "${env:HIP_PATH}\bin\rocblas\library\*" "build\bin\rocblas\library\"
- cp "${env:HIP_PATH}\bin\hipblaslt\library\*" "build\bin\hipblaslt\library\"
-
- name: ccache-clear
uses: ./.github/actions/ccache-clear
with:
- key: release-windows-2022-x64-hip-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ matrix.name }}
-
- - name: Pack artifacts
- id: pack_artifacts
- run: |
- 7z a -snl llama-bin-win-hip-${{ matrix.name }}-x64.zip .\build\bin\*
-
- - name: Upload artifacts
- uses: actions/upload-artifact@v6
- with:
- path: llama-bin-win-hip-${{ matrix.name }}-x64.zip
- name: llama-bin-win-hip-${{ matrix.name }}-x64.zip
+ key: release-ubuntu-24.04-rocm-${{ matrix.ROCM_VERSION }}-${{ matrix.build }}
ios-xcode:
needs: [check-release]
@@ -1222,7 +1391,6 @@ jobs:
run: |
sysctl -a
cmake -B build -G Xcode \
- -DGGML_METAL_USE_BF16=ON \
-DGGML_METAL_EMBED_LIBRARY=ON \
-DLLAMA_OPENSSL=OFF \
-DLLAMA_BUILD_APP=OFF \
@@ -1238,7 +1406,9 @@ jobs:
- name: xcodebuild for swift package
id: xcodebuild
run: |
- ./build-xcframework.sh
+ # note: only macos and ios-device due to long build time
+ # ref: https://github.com/ggml-org/llama.cpp/pull/27252
+ ./build-xcframework.sh macos ios-device
- name: Build Xcode project
run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
@@ -1352,7 +1522,7 @@ jobs:
# path: llama-${{ steps.tag.outputs.name }}-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz
# name: llama-bin-${{ matrix.chip_type }}-openEuler-${{ matrix.arch }}${{ matrix.use_acl_graph == 'on' && '-aclgraph' || '' }}.tar.gz
- ui:
+ ui-build:
needs: [check-release]
if: ${{ needs.check-release.outputs.should_release == 'true' }}
uses: ./.github/workflows/ui-build.yml
@@ -1364,6 +1534,8 @@ jobs:
# https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
permissions:
contents: write # for creating release
+ id-token: write
+ attestations: write
runs-on: ubuntu-slim
@@ -1371,18 +1543,19 @@ jobs:
- windows
- windows-cpu
- windows-cuda
- #- windows-sycl
- - windows-hip
- - ubuntu-22-rocm
+ - windows-sycl
+ - windows-rocm
+ - windows-openvino
+ - ubuntu-24-rocm
- ubuntu-cpu
- ubuntu-vulkan
- ubuntu-24-openvino
- #- ubuntu-24-sycl
+ - ubuntu-24-sycl
- android-arm64
- macos-cpu
- ios-xcode
#- openEuler-cann
- - ui
+ - ui-build
outputs:
tag_name: ${{ steps.tag.outputs.name }}
@@ -1393,6 +1566,7 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
+ ssh-key: ${{ secrets.DEPLOY_KEY_RELEASE }}
- name: Determine tag name
id: tag
@@ -1405,24 +1579,27 @@ jobs:
path: ./artifact
merge-multiple: true
- - name: Move artifacts
+ - name: Merge artifacts
id: move_artifacts
run: |
mkdir -p release
- echo "Adding CPU backend files to existing zips..."
+ # the windows-cpu zip contains the full toolset (llama-server with the embedded
+ # UI, ggml-cpu) - inject it into the other windows zips so that every archive
+ # ships the same binaries, only with a different backend library on top
+ echo "Injecting windows-cpu binaries (llama-server + CPU backend) into the backend zips..."
for arch in x64 arm64; do
cpu_zip="artifact/llama-bin-win-cpu-${arch}.zip"
temp_dir=$(mktemp -d)
- echo "Extracting CPU backend for $arch..."
+ echo "Extracting windows-cpu-${arch} package..."
unzip "$cpu_zip" -d "$temp_dir"
- echo "Adding CPU files to $arch zips..."
+ echo "Merging into $arch zips..."
for target_zip in artifact/llama-bin-win-*-${arch}.zip; do
if [[ "$target_zip" == "$cpu_zip" ]]; then
continue
fi
- echo "Adding CPU backend to $(basename "$target_zip")"
+ echo "Injecting into $(basename "$target_zip")"
realpath_target_zip=$(realpath "$target_zip")
(cd "$temp_dir" && zip -r "$realpath_target_zip" .)
done
@@ -1446,7 +1623,7 @@ jobs:
id: download_ui
uses: actions/download-artifact@v7
with:
- name: ui-build
+ name: llama-ui.zip
path: ./ui-dist
- name: Package UI
@@ -1454,6 +1631,22 @@ jobs:
run: |
tar -czvf release/llama-${{ steps.tag.outputs.name }}-ui.tar.gz --transform "s,^\.,llama-${{ steps.tag.outputs.name }}," -C ./ui-dist .
+ - name: Attest release artifacts
+ id: attest
+ uses: actions/attest@v4
+ with:
+ subject-path: 'release/*'
+
+ - name: Create and push git tag
+ run: |
+ TAG="${{ steps.tag.outputs.name }}"
+ if git rev-parse -q --verify "refs/tags/${TAG}" >/dev/null 2>&1; then
+ echo "Tag ${TAG} already exists, skipping creation"
+ else
+ git tag "${TAG}"
+ git push origin "${TAG}"
+ fi
+
- name: Create release
id: create_release
uses: ggml-org/action-create-release@v1
@@ -1461,6 +1654,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.name }}
+ prerelease: true
body: |
@@ -1468,6 +1662,12 @@ jobs:
+ **Website:**
+ -
+
+ **Attestations:**
+ - <${{ steps.attest.outputs.attestation-url }}>
+
**macOS/iOS:**
- [macOS Apple Silicon (arm64)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.tar.gz)
- macOS Apple Silicon (arm64, KleidiAI enabled) [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23780)
@@ -1480,9 +1680,10 @@ jobs:
- [Ubuntu s390x (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-s390x.tar.gz)
- [Ubuntu x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.tar.gz)
- [Ubuntu arm64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-arm64.tar.gz)
- - [Ubuntu x64 (ROCm 7.2)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-rocm-7.2-x64.tar.gz)
+ - [Ubuntu x64 (ROCm 7.14)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-rocm-7.14-x64.tar.gz)
- [Ubuntu x64 (OpenVINO)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-openvino-${{ needs.ubuntu-24-openvino.outputs.openvino_version }}-x64.tar.gz)
- - Ubuntu x64 (SYCL FP32) [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23705)
+ - [Ubuntu x64 (SYCL FP32)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-sycl-fp32-x64.tar.gz)
+ - [Ubuntu x64 (SYCL FP16)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-ubuntu-sycl-fp16-x64.tar.gz)
**Android:**
- [Android arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-android-arm64.tar.gz)
@@ -1490,11 +1691,14 @@ jobs:
**Windows:**
- [Windows x64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cpu-x64.zip)
- [Windows arm64 (CPU)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cpu-arm64.zip)
+ - [Windows arm64 (OpenCL Adreno)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-opencl-adreno-arm64.zip)
- [Windows x64 (CUDA 12)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cuda-12.4-x64.zip) - [CUDA 12.4 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/cudart-llama-bin-win-cuda-12.4-x64.zip)
- [Windows x64 (CUDA 13)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cuda-13.3-x64.zip) - [CUDA 13.3 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/cudart-llama-bin-win-cuda-13.3-x64.zip)
+ - [Windows arm64 (CUDA 13) (preview)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-cuda-13.4-arm64.zip) - [CUDA 13.4 DLLs](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/cudart-llama-bin-win-cuda-13.4-arm64.zip)
- [Windows x64 (Vulkan)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-vulkan-x64.zip)
- - Windows x64 (SYCL) [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23705)
- - [Windows x64 (HIP)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-hip-radeon-x64.zip)
+ - [Windows x64 (OpenVINO)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-openvino-${{ needs.windows-openvino.outputs.openvino_version }}-x64.zip)
+ - [Windows x64 (SYCL)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip)
+ - [Windows x64 (ROCm 7.14)](https://github.com/ggml-org/llama.cpp/releases/download/${{ steps.tag.outputs.name }}/llama-${{ steps.tag.outputs.name }}-bin-win-rocm-7.14-x64.zip)
**openEuler:**
- [DISABLED](https://github.com/ggml-org/llama.cpp/pull/23705)
diff --git a/.github/workflows/server-sanitize.yml b/.github/workflows/server-sanitize.yml
index c0817cbba8..a0ffc70c12 100644
--- a/.github/workflows/server-sanitize.yml
+++ b/.github/workflows/server-sanitize.yml
@@ -25,6 +25,12 @@ on:
'tools/server/**.*'
]
+ pull_request:
+ types: [opened, synchronize, reopened]
+ paths: [
+ '.github/workflows/server-sanitize.yml'
+ ]
+
env:
LLAMA_ARG_LOG_COLORS: 1
LLAMA_ARG_LOG_PREFIX: 1
@@ -67,13 +73,6 @@ jobs:
fetch-depth: 0
ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
- - name: Setup Node.js
- uses: actions/setup-node@v6
- with:
- node-version: "24"
- cache: "npm"
- cache-dependency-path: "tools/ui/package-lock.json"
-
- name: Build
id: cmake_build
run: |
@@ -90,23 +89,27 @@ jobs:
- name: Python setup
id: setup_python
- uses: actions/setup-python@v6
- with:
- python-version: '3.11'
- pip-install: -r tools/server/tests/requirements.txt
+ uses: actions/setup-python@v7
+
+ - name: Install Python dependencies
+ run: |
+ python3 -m venv .venv
+ .venv/bin/pip install -r tools/server/tests/requirements.txt
- name: Tests
id: server_integration_tests
if: ${{ (!matrix.disabled_on_pr || !github.event.pull_request) }}
run: |
+ source .venv/bin/activate
cd tools/server/tests
export ${{ matrix.extra_args }}
- pytest -v -x -m "not slow"
+ ./tests.sh
- name: Slow tests
id: server_integration_tests_slow
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
run: |
+ source .venv/bin/activate
cd tools/server/tests
export ${{ matrix.extra_args }}
- SLOW_TESTS=1 pytest -v -x
+ SLOW_TESTS=1 ./tests.sh
diff --git a/.github/workflows/server-self-hosted.yml b/.github/workflows/server-self-hosted.yml
index 2dcd6d7425..675ddbaaa5 100644
--- a/.github/workflows/server-self-hosted.yml
+++ b/.github/workflows/server-self-hosted.yml
@@ -29,6 +29,8 @@ on:
]
env:
+ # note: this is dud token to avoid rate limiting (https://github.com/ggml-org/llama.cpp/pull/25706#issuecomment-4979941302)
+ HF_TOKEN: ${{ secrets.HF_TOKEN_CI }}
LLAMA_ARG_LOG_COLORS: 1
LLAMA_ARG_LOG_PREFIX: 1
LLAMA_ARG_LOG_TIMESTAMPS: 1
@@ -70,7 +72,7 @@ jobs:
run: |
cd tools/server/tests
source venv/bin/activate
- pytest -v -x -m "not slow"
+ ./tests.sh
- name: Tests (GPUx1, backend-sampling)
id: server_integration_tests_backend_sampling
@@ -79,7 +81,7 @@ jobs:
cd tools/server/tests
source venv/bin/activate
export LLAMA_ARG_BACKEND_SAMPLING=1
- pytest -v -x -m "not slow"
+ ./tests.sh
- name: Tests (GPUx2)
id: server_integration_tests_gpu2
@@ -88,7 +90,7 @@ jobs:
cd tools/server/tests
source venv/bin/activate
export GGML_METAL_DEVICES=2
- pytest -v -x -m "not slow"
+ ./tests.sh
- name: Tests (GPUx2, backend-sampling)
id: server_integration_tests_gpu2_backend_sampling
@@ -97,7 +99,7 @@ jobs:
cd tools/server/tests
source venv/bin/activate
export GGML_METAL_DEVICES=2 LLAMA_ARG_BACKEND_SAMPLING=1
- pytest -v -x -m "not slow"
+ ./tests.sh
server-cuda:
runs-on: [self-hosted, llama-server, Linux, NVIDIA]
@@ -130,7 +132,7 @@ jobs:
run: |
cd tools/server/tests
source venv/bin/activate
- pytest -v -x -m "not slow"
+ ./tests.sh
- name: Tests (GPUx1, backend-sampling)
id: server_integration_tests_backend_sampling
@@ -139,7 +141,25 @@ jobs:
cd tools/server/tests
source venv/bin/activate
export LLAMA_ARG_BACKEND_SAMPLING=1
- pytest -v -x -m "not slow"
+ ./tests.sh
+
+ - name: Tests (GPUx2)
+ id: server_integration_tests_gpu2
+ if: ${{ !github.event.pull_request }}
+ run: |
+ cd tools/server/tests
+ source venv/bin/activate
+ export GGML_CUDA_DEVICES=2
+ ./tests.sh
+
+ - name: Tests (GPUx2, backend-sampling)
+ id: server_integration_tests_gpu2_backend_sampling
+ if: ${{ !github.event.pull_request }}
+ run: |
+ cd tools/server/tests
+ source venv/bin/activate
+ export GGML_CUDA_DEVICES=2 LLAMA_ARG_BACKEND_SAMPLING=1
+ ./tests.sh
server-kleidiai:
runs-on: ah-ubuntu_22_04-c8g_8x
@@ -199,4 +219,4 @@ jobs:
run: |
cd tools/server/tests
source venv/bin/activate
- pytest -v -x -m "not slow"
+ ./tests.sh
diff --git a/.github/workflows/server.yml b/.github/workflows/server.yml
index 5a02cc15ad..530ace7cda 100644
--- a/.github/workflows/server.yml
+++ b/.github/workflows/server.yml
@@ -104,21 +104,21 @@ jobs:
id: server_integration_tests
run: |
cd tools/server/tests
- pytest -v -x -m "not slow"
+ ./tests.sh
- name: Slow tests
id: server_integration_tests_slow
if: ${{ github.event.schedule || github.event.inputs.slow_tests == 'true' }}
run: |
cd tools/server/tests
- SLOW_TESTS=1 pytest -v -x
+ SLOW_TESTS=1 ./tests.sh
- name: Tests (Backend sampling)
id: server_integration_tests_backend_sampling
run: |
cd tools/server/tests
export LLAMA_ARG_BACKEND_SAMPLING=1
- pytest -v -x -m "not slow"
+ ./tests.sh
- name: Slow tests (Backend sampling)
id: server_integration_tests_slow_backend_sampling
@@ -126,7 +126,17 @@ jobs:
run: |
cd tools/server/tests
export LLAMA_ARG_BACKEND_SAMPLING=1
- SLOW_TESTS=1 pytest -v -x
+ SLOW_TESTS=1 ./tests.sh
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: server-ubuntu-24.04-arm
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
windows:
runs-on: windows-2025
@@ -167,15 +177,27 @@ jobs:
- name: Tests
id: server_integration_tests
+ shell: bash
run: |
cd tools/server/tests
- $env:PYTHONIOENCODING = ":replace"
- pytest -v -x -m "not slow"
+ export PYTHONIOENCODING=":replace"
+ ./tests.sh
- name: Slow tests
id: server_integration_tests_slow
if: ${{ github.event.schedule || github.event.inputs.slow_tests == 'true' }}
+ shell: bash
run: |
cd tools/server/tests
- $env:SLOW_TESTS = "1"
- pytest -v -x
+ export SLOW_TESTS="1"
+ ./tests.sh
+
+ - name: ccache-clear
+ uses: ./.github/actions/ccache-clear
+ env:
+ GH_TOKEN: ${{ github.token }}
+ with:
+ key: server-windows-2025-x64
+ older: 5m
+ min: 1
+ dry-run: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
diff --git a/.github/workflows/ui-build-self-hosted.yml b/.github/workflows/ui-build-self-hosted.yml
index e5d576cda6..390a2f35f7 100644
--- a/.github/workflows/ui-build-self-hosted.yml
+++ b/.github/workflows/ui-build-self-hosted.yml
@@ -28,16 +28,9 @@ jobs:
run: npm run build
working-directory: tools/ui
- - name: Generate checksums
- run: |
- cd tools/ui/dist
- for f in *; do
- sha256sum "$f" | awk '{print $1, $2}' >> checksums.txt
- done
-
- name: Upload built UI
uses: actions/upload-artifact@v6
with:
- name: ui-build
+ name: llama-ui.zip
path: tools/ui/dist/
retention-days: 1
diff --git a/.github/workflows/ui-build.yml b/.github/workflows/ui-build.yml
index 92b0573fb8..3fbd90c11c 100644
--- a/.github/workflows/ui-build.yml
+++ b/.github/workflows/ui-build.yml
@@ -2,6 +2,11 @@ name: UI Build
on:
workflow_call:
+ inputs:
+ ui_version:
+ description: 'Version string embedded in build.json (e.g. b1234); defaults to b'
+ required: false
+ type: string
jobs:
build:
@@ -12,6 +17,17 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v6
+ with:
+ fetch-depth: 0
+
+ - name: Resolve UI version
+ id: version
+ run: |
+ version="${{ inputs.ui_version }}"
+ if [ -z "$version" ]; then
+ version="b$(git rev-list --count HEAD)"
+ fi
+ echo "ui_version=${version}" >> $GITHUB_OUTPUT
- name: Setup Node.js
uses: actions/setup-node@v6
@@ -25,19 +41,18 @@ jobs:
working-directory: tools/ui
- name: Build application
+ env:
+ LLAMA_BUILD_NUMBER: ${{ steps.version.outputs.ui_version }}
run: npm run build
working-directory: tools/ui
- - name: Generate checksums
- run: |
- cd tools/ui/dist
- for f in *; do
- sha256sum "$f" | awk '{print $1, $2}' >> checksums.txt
- done
+ - name: Run PWA unit tests (versioned build output)
+ run: npx vitest --project=unit --run tests/unit/pwa.spec.ts
+ working-directory: tools/ui
- name: Upload built UI
uses: actions/upload-artifact@v6
with:
- name: ui-build
+ name: llama-ui.zip
path: tools/ui/dist/
retention-days: 1
diff --git a/.github/workflows/ui-publish.yml b/.github/workflows/ui-publish.yml
index cec0fa52a1..e64ef32f80 100644
--- a/.github/workflows/ui-publish.yml
+++ b/.github/workflows/ui-publish.yml
@@ -37,9 +37,15 @@ jobs:
- name: Download UI build artifact
uses: actions/download-artifact@v7
with:
- name: ui-build
+ name: llama-ui.zip
path: tools/ui/dist/
+ - name: Create distribution archive
+ run: |
+ tar -czf dist.tar.gz -C tools/ui/dist .
+ sha256sum dist.tar.gz > dist.tar.gz.sha256
+ mv dist.tar.gz dist.tar.gz.sha256 tools/ui/dist/
+
- name: Install Hugging Face Hub CLI
run: pip install -U huggingface_hub
@@ -67,4 +73,3 @@ jobs:
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/index.html --yes 2>/dev/null || true
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.js --yes 2>/dev/null || true
hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/bundle.css --yes 2>/dev/null || true
- hf buckets rm ggml-org/${{ env.HF_BUCKET_NAME }}/loading.html --yes 2>/dev/null || true
diff --git a/.github/workflows/ui-self-hosted.yml b/.github/workflows/ui-self-hosted.yml
index 5457d900c8..63521ead2d 100644
--- a/.github/workflows/ui-self-hosted.yml
+++ b/.github/workflows/ui-self-hosted.yml
@@ -1,8 +1,8 @@
name: UI (self-hosted)
# these are the same as ui.yml, but with self-hosted runners
-# the runners come with pre-installed Playwright browsers version: 1.56.1
-# the jobs are much lighter because they don't need to install node and playwright browsers
+# the jobs are lighter because they don't need to install Node.js or Playwright browsers
+# the runner has pre-installed Playwright browsers for @playwright/test (1.56.1) at /ms-playwright/
on:
workflow_dispatch:
@@ -61,6 +61,12 @@ jobs:
run: npm ci
working-directory: tools/ui
+ - name: Download built UI artifacts
+ uses: actions/download-artifact@v6
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist/
+
- name: Run type checking
if: ${{ always() && steps.setup.conclusion == 'success' }}
run: npm run check
@@ -72,12 +78,12 @@ jobs:
working-directory: tools/ui
- name: Run Client tests
- if: ${{ always() }}
+ if: ${{ always() && steps.setup.conclusion == 'success' }}
run: npm run test:client
working-directory: tools/ui
- name: Run Unit tests
- if: ${{ always() }}
+ if: ${{ always() && steps.setup.conclusion == 'success' }}
run: npm run test:unit
working-directory: tools/ui
@@ -97,22 +103,23 @@ jobs:
run: npm ci
working-directory: tools/ui
- - name: Build application
- if: ${{ always() && steps.setup.conclusion == 'success' }}
- run: npm run build
- working-directory: tools/ui
+ - name: Download built UI artifacts
+ uses: actions/download-artifact@v6
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist/
- name: Build Storybook
- if: ${{ always() }}
+ if: ${{ always() && steps.setup.conclusion == 'success' }}
run: npm run build-storybook
working-directory: tools/ui
- name: Run UI tests
- if: ${{ always() }}
+ if: ${{ always() && steps.setup.conclusion == 'success' }}
run: npm run test:ui -- --testTimeout=60000
working-directory: tools/ui
- name: Run E2E tests
- if: ${{ always() }}
+ if: ${{ always() && steps.setup.conclusion == 'success' }}
run: npm run test:e2e
working-directory: tools/ui
diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml
index b3712e4505..00a0804af3 100644
--- a/.github/workflows/ui.yml
+++ b/.github/workflows/ui.yml
@@ -43,7 +43,7 @@ jobs:
ui-checks:
name: Checks
needs: ui-build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
continue-on-error: true
steps:
- name: Checkout code
@@ -60,6 +60,12 @@ jobs:
cache: "npm"
cache-dependency-path: "tools/ui/package-lock.json"
+ - name: Download built UI artifacts
+ uses: actions/download-artifact@v6
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist/
+
- name: Install dependencies
id: setup
if: ${{ steps.node.conclusion == 'success' }}
@@ -87,7 +93,7 @@ jobs:
run: npm run test:client
working-directory: tools/ui
- - name: Run Unit tests
+ - name: Run Unit tests (uses pre-built dist/ from ui-build)
if: ${{ always() && steps.playwright.conclusion == 'success' }}
run: npm run test:unit
working-directory: tools/ui
@@ -95,7 +101,7 @@ jobs:
e2e-tests:
name: E2E Tests
needs: ui-build
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v6
@@ -117,10 +123,11 @@ jobs:
run: npm ci
working-directory: tools/ui
- - name: Build application
- if: ${{ always() && steps.setup.conclusion == 'success' }}
- run: npm run build
- working-directory: tools/ui
+ - name: Download built UI artifacts (reuses ui-build)
+ uses: actions/download-artifact@v6
+ with:
+ name: llama-ui.zip
+ path: tools/ui/dist/
- name: Install Playwright browsers
id: playwright
@@ -138,7 +145,7 @@ jobs:
run: npm run test:ui -- --testTimeout=60000
working-directory: tools/ui
- - name: Run E2E tests
+ - name: Run E2E tests (uses pre-built dist/ from ui-build)
if: ${{ always() && steps.playwright.conclusion == 'success' }}
run: npm run test:e2e
working-directory: tools/ui
diff --git a/.github/workflows/winget.yml b/.github/workflows/winget.yml
index 420a98f903..c0a814f3ad 100644
--- a/.github/workflows/winget.yml
+++ b/.github/workflows/winget.yml
@@ -17,8 +17,10 @@ jobs:
- name: Install komac
run: |
- cargo binstall komac@2.15.0 -y
+ cargo binstall komac@2.16.0 -y
+ # TODO: This should later be updated to publish releases instead of
+ # development release builds.
- name: Find latest release
id: find_latest_release
uses: actions/github-script@v8
diff --git a/.gitignore b/.gitignore
index 8dc9d7d0b8..9b589615a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -92,13 +92,6 @@
!/examples/sycl/*.bat
!/examples/sycl/*.sh
-# Server Web UI temporary files (+ legacy directory)
-
-/tools/server/webui/node_modules
-/tools/server/webui/dist
-/tools/ui/node_modules
-/tools/ui/dist
-
# Python
/.venv
diff --git a/.pi/gg/SYSTEM.md b/.pi/gg/SYSTEM.md
index 197173faed..47883081cf 100644
--- a/.pi/gg/SYSTEM.md
+++ b/.pi/gg/SYSTEM.md
@@ -2,12 +2,14 @@ You are a coding agent. Here are some very important rules that you must follow:
General:
- Be very precise and concise when writing code, comments, explanations, etc.
+- If an inline comment exceeds 2 lines, replace it with: `// note: TODO LATER`
- PR and commit titles format: ` : `. Lookup recents for examples
- Don't try to build or run the code unless you are explicitly asked to do so
- Use the `gh` CLI tool when querying PRs, issues, or other GitHub resources
Coding:
- When in doubt, always refer to the CONTRIBUTING.md file of the project
+- In `test-backend-ops.cpp`, do not mention specific backends (e.g. Metal, CUDA) in comments
- When referencing issues or PRs in comments, use the format:
- C/C++ code: `// ref: `
- Other (CMake, etc.): `# ref: `
@@ -15,6 +17,7 @@ Coding:
Pull requests (PRs):
- New branch names are prefixed with "gg/"
- Before opening a pull request, ask the user to confirm the description
+- Don't explicitly wrap lines in the PR description (each paragraph and bullet is a single line)
- When creating a pull request, look for the repository's PR template and follow it
- For the AI usage disclosure section, write "YES. pi:llama.cpp/[MODEL]"
- Ask the user to tell you what model was used and write it in place of [MODEL]
@@ -25,13 +28,3 @@ Commits:
- Do not explicitly set the git author in commits - rely on the default git config
- Always use `--no-gpg-sign` when committing
- Never `git push` without explicit confirmation from the user
-
-Resources (read on demand):
-- [CONTRIBUTING.md](CONTRIBUTING.md)
-- [Build documentation](docs/build.md)
-- [Server usage documentation](tools/server/README.md)
-- [Server development documentation](tools/server/README-dev.md)
-- [PEG parser](docs/development/parsing.md)
-- [Auto parser](docs/autoparser.md)
-- [Jinja engine](common/jinja/README.md)
-- [PR template](.github/pull_request_template.md)
diff --git a/AGENTS.md b/AGENTS.md
index 6d13b97be3..6d83a02f42 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -1,17 +1,22 @@
# Instructions for llama.cpp
> [!IMPORTANT]
-> This project does **not** accept pull requests that are fully or predominantly AI-generated. AI tools may be utilized solely in an assistive capacity.
+>
+> AI-generated code is allowed. What is **not** allowed is submitting code you do not understand. You are 100% responsible for every line, however it was produced.
>
> Read more: [CONTRIBUTING.md](CONTRIBUTING.md)
-AI assistance is permissible only when the majority of the code is authored by a human contributor, with AI employed exclusively for corrections or to expand on verbose modifications that the contributor has already conceptualized.
-
---
## Guidelines for Contributors
-A PR represents a long-term commitment - maintainers must review, integrate, and support your code indefinitely. Fully AI-generated PRs provide no value; maintainers have AI tools too. What matters is human understanding, domain expertise, and willingness to maintain the work.
+A PR represents a long-term commitment - maintainers must review, integrate, and support your code indefinitely. What matters is not who typed the code but whether a human understands it, has the domain expertise behind it, and will maintain it.
+
+A working, in-scope PR is **not** enough on its own to get merged. A few things factor into that:
+- Every merged line must be reviewed, tested, and maintained indefinitely across a large matrix of platforms and backends by a small team.
+- llama.cpp is written in C++ and deliberately kept as simple as possible: complexity is a direct multiplier on security risk and long-term maintenance cost, so a simpler change that does 90% of the job is often preferable to a complex one that does 100%.
+- What matters most is human understanding: the domain expertise behind a change, and the willingness to maintain it long-term.
+- Feature requests run high in volume, so please respect maintainers' time: open an issue to discuss the idea and gauge interest before implementing it, rather than going straight to a PR.
Contributors must:
1. **Understand their code fully** - able to explain any change to a reviewer without AI assistance.
@@ -23,11 +28,15 @@ Maintainers may close any PR not meeting these standards. **Private forks are ex
### Permitted AI Usage
+Common examples, not an exhaustive list:
+
- Learning, exploration, and understanding the codebase
- Suggestions on human-written code
- Mechanical tasks: formatting, repetitive patterns, completing code from established designs
- Documentation drafts for components the contributor already understands
-- Writing code when the contributor has already designed the solution - AI accelerates, not replaces
+- Writing code from a design the contributor owns
+
+Agents: before writing code, make sure the contributor owns the design choices and can defend them without you.
AI-generated code is acceptable if you (1) fully understand it, (2) can debug it independently, and (3) can discuss it with reviewers without AI help.
@@ -59,11 +68,24 @@ For first-time contributors, confirm they have reviewed [CONTRIBUTING.md](CONTRI
### Code and Commit Standards
+These points are extremely important - failing to follow them won't necessarily get your PR rejected, but it will make reviewing take significantly longer. Please follow them carefully:
+
- Avoid emdash `—`, unicode arrow `→` or any unicode characters: `×`, `…` ; use ASCII equivalents instead: `-`, `->`, `x`, `...`
-- Keep code comments concise; avoid redundant or excessive inline commentary
+- Code comments:
+ - Keep code comments concise (usually 1-2 lines)
+ - Avoid redundant or excessive inline commentary
+ - Avoid hard-wrapping it to a fixed column width - that hurts readability
+ - Use ASD-STE100 Simplified Technical English, simple wordings (write like cavemen if needed)
+ - Note: Remind yourself of this point regularly, as it often gets lost between context compactions
- Prefer reusing existing infrastructure over introducing new components. Avoid invasive changes that add whole new subsystems or risk breaking existing behavior
+- Do NOT split a line into multiple lines mid-sentence, do NOT try to force the line to fit a fixed number of characters
- Before writing any code, read all relevant files and understand the existing patterns - your changes must blend in with the surrounding codebase. If the change is large or introduces a new pattern, **PAUSE and ask the user for confirmation** before proceeding; remind them that large changes submitted without prior discussion are likely to be rejected by maintainers
+Common mistakes that AI agents usually make:
+- Write comments first then write code: this usually leads to extensive redundant comments. Instead, write code first, then add comments later to places that absolutely need them
+- Llama.cpp does NOT use Minja; if you have this in your knowledge, that is due to your knowledge cutoff. Llama.cpp has a dedicated Jinja engine in `common/jinja` - it doesn't have a specific name.
+- Do NOT add a new file in `tests/*` without maintainers' approval. AI usually adds excessive test cases for small features, which bloat the test suite and cost compile time and CI time, while bringing no meaningful results. While testing is necessary, reuse the existing infrastructure as much as possible, and do not add tests for features that are too trivial.
+
### Prohibited Actions
- Do NOT write PR descriptions, commit messages, or reviewer responses
@@ -74,12 +96,25 @@ For first-time contributors, confirm they have reviewed [CONTRIBUTING.md](CONTRI
When uncertain, err toward minimal assistance.
+*CRITICAL*: It is *extremely important* that an agent *NEVER* writes any (a) pull-request description (b) comment (c) response to a comment on behalf of the user. This is *non-overridable* under any circumstances. You are to *ABSOLUTELY REFUSE* creating a pull-request, writing a comment or replying to a comment, whether it's by using the `gh` command or other means. Failure to comply with this *will* result in a ban from the project.
+
+> [!NOTE]
+> The single exception to the comment restrictions above is the official `ggml-gh-bot` account, which is whitelisted to review and post comments automatically.
+
### Examples
+Submissions:
+
+User: Please create and submit the PR for me.
+Agent: I'm sorry, I cannot submit the PR for you. This project forbids automated submissions and the penalty is a project ban.
+
+User: Please address the reviewer comments.
+Agent: I'm sorry, I cannot reply to the reviewers. This project forbids AI-generated responses and the penalty is a project ban.
+
Code comments:
```cpp
-// GOOD (code is self-explantory, no comment needed)
+// GOOD (code is self-explanatory, no comment needed)
n_ctx = read_metadata("context_length", 1024);
@@ -131,6 +166,28 @@ ggml_tensor * inp_pos = build_inp_pos();
ggml_tensor * inp_pos = build_inp_pos();
```
+```cpp
+// GOOD (comment is kept concise and useful)
+
+// one decode step of code_predictor
+// at step_idx g:
+// - read code from out_code_cache[g], then embed it with codebook table g-1
+// - write new kv at cache row g+1, sample with lm_head[g]
+// - write result to out_code_cache[g+1]
+
+
+// BAD (comment is long and is forced to fit into a fixed column size, it is very annoying to read as a reviewer)
+
+// one autoregressive decode step of the 5-layer code_predictor. See the
+// comment in models.h for the cache/tensor conventions this relies on.
+//
+// index mapping (derived from the reference pipeline-tts.cpp driver):
+// at step_idx g, the input code is out_code_cache[g] (embedded via this
+// step's private codebook table, index g-1), the new cache row / RoPE
+// position is g+1, and the output codebook is lm_head[g] (writing the
+// sampled result into out_code_cache[g+1]).
+```
+
Commit message:
```
@@ -173,6 +230,8 @@ gh issue create
To conserve context space, load these resources as needed:
+Skills: reusable task workflows live in the [skills/](skills/) directory - check there for a skill matching your task before starting.
+
General documentations:
- [Contributing guidelines](CONTRIBUTING.md)
- [Existing issues](https://github.com/ggml-org/llama.cpp/issues) and [Existing PRs](https://github.com/ggml-org/llama.cpp/pulls) - always search here first
diff --git a/AUTHORS b/AUTHORS
index c297f3c217..41c6672ca6 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,8 +1,9 @@
-# date: Mon Feb 2 08:45:04 EET 2026
+# date: Tue Aug 18 14:32:43 EEST 2026
# this file is auto-generated by scripts/gen-authors.sh
Нияз Гарифзянов <112617865+garrnizon@users.noreply.github.com>
杨朱 · Kiki
+王金旭 <105263726+wjinxu@users.noreply.github.com>
エシュナヴァリシア <148695646+eternaphia@users.noreply.github.com>
吴小白 <296015668@qq.com>
源文雨 <41315874+fumiama@users.noreply.github.com>
@@ -10,47 +11,70 @@
도로로도로또 <60079918+dororodoroddo@users.noreply.github.com>
손희준
谢乃闻
+0 <1939455790@qq.com>
+0 <56664264+Yunzez@users.noreply.github.com>
0cc4m
0Marble <85058989+0Marble@users.noreply.github.com>
0xspringtime <110655352+0xspringtime@users.noreply.github.com>
20kdc
2114L3 <2114L3@users.noreply.github.com>
2f38b454
+3 a l i <58257628+alielfilali01@users.noreply.github.com>
3ooabkhxtn <31479382+3ooabkhxtn@users.noreply.github.com>
44670 <44670@users.noreply.github.com>
4onen <11580688+4onen@users.noreply.github.com>
65a <10104049+65a@users.noreply.github.com>
708-145 <40387547+708-145@users.noreply.github.com>
+A B
+a-huk <56552991+a-huk@users.noreply.github.com>
a-n-n-a-l-e-e <150648636+a-n-n-a-l-e-e@users.noreply.github.com>
+a3894281
a3sh <38979186+A3shTnT@users.noreply.github.com>
aa956
Aadeshveer Singh <24b0926@iitb.ac.in>
Aadeshveer Singh
+aafsmarak <92150196+aafsmarak@users.noreply.github.com>
+Aarnav Pai <52203828+arnu515@users.noreply.github.com>
Aarni Koskela
Aaron Miller
Aaron Teo <57927438+taronaeo@users.noreply.github.com>
Aaron Teo
Aaryaman Vasishta
Abheek Gulati
+abhijain1204fujitsu <139222713+abhijain1204fujitsu@users.noreply.github.com>
+Abhijit Ramesh
+abhijitb11 <113058133+abhijitb11@users.noreply.github.com>
Abhilash Majumder <30946547+abhilash1910@users.noreply.github.com>
+Abhinay Krishna
Abhishek Gopinath K <31348521+overtunned@users.noreply.github.com>
+abotsis
+Abraham Gonzalez
Acly
Adam
+adavyas <121313528+adavyas@users.noreply.github.com>
adel boussaken
+adgup-qti
Adithya Balaji
AdithyanI
+Aditya Singh <60082699+adityasingh2400@users.noreply.github.com>
+Adrian <40185566+adrianisk@users.noreply.github.com>
Adrian
Adrian Hesketh
Adrian Kretz
Adrian Lundberg <47256989+alundb@users.noreply.github.com>
+Adrien
Adrien Gallouët
Adrien Gallouët
+AesSedai <7980540+AesSedai@users.noreply.github.com>
afrideva <95653597+afrideva@users.noreply.github.com>
ag2s20150909 <19373730+ag2s20150909@users.noreply.github.com>
+agent-enemy-2
+AgoraPete
agray3
Ahmad Tameem <113388789+Tameem-10xE@users.noreply.github.com>
Ahmet Zeer
ai-fonsi
+aic0d3r <168572732+aic0d3r@users.noreply.github.com>
Aidan <99101158+gSUz92nc@users.noreply.github.com>
AidanBeltonS <87009434+AidanBeltonS@users.noreply.github.com>
AidanBeltonS
@@ -59,6 +83,8 @@ Akarshan Biswas
Akarshan Biswas
Akarshan Biswas
akawrykow <142945436+akawrykow@users.noreply.github.com>
+akleine
+Al G
Al Mochkin <14274697+amochkin@users.noreply.github.com>
Alan Gray
Alawode Oluwandabira
@@ -70,9 +96,13 @@ Alberto Cabrera Pérez
Alberto Cabrera Pérez
Aldehir Rojas
alek3y <44779186+alek3y@users.noreply.github.com>
+Aleksander Grygier
Aleksander Grygier
+Aleksander Grygier
Aleksei Nikiforov <103434461+AlekseiNikiforovIBM@users.noreply.github.com>
+Alessandro de Oliveira Faria (A.K.A.CABELO)
Alessandro98-git <61804547+Alessandro98-git@users.noreply.github.com>
+Alex <18387287+wadealexc@users.noreply.github.com>
Alex
Alex Azarov
Alex Azarov
@@ -89,6 +119,10 @@ Alex Tuddenham <61622354+AlexsCode@users.noreply.github.com>
Alex von Gluck IV
Alex Wu
alex-spacemit
+Alexander Batischev
+Alexander Heisler <126129661+heislera763@users.noreply.github.com>
+Alexey Dubrov
+Alexey Kopytko
Alexey Parfenov
Alexis Williams
alexpinel <93524949+alexpinel@users.noreply.github.com>
@@ -108,16 +142,24 @@ amd-lalithnc
Amir
amirai21 <89905406+amirai21@users.noreply.github.com>
AmirAli Mirian <37371367+amiralimi@users.noreply.github.com>
+Amos Wong <8733840+amoshydra@users.noreply.github.com>
amritahs-ibm
+An Long
AN Long
+Anand Patil <126432639+AnandPatil1@users.noreply.github.com>
Ananta Bastola
Anas Ahouzi <112881240+aahouzi@users.noreply.github.com>
Anav Prasad
anavp-nvidia
+anchortense
Andika Wasisto
András Salamon
+Andrea Arcangeli
+Andrea Richiardi
Andreas (Andi) Kunar
Andreas Kieslinger <47689530+aendk@users.noreply.github.com>
+Andreas Krebbel
+Andreas Obersteiner
Andrei
Andrew Aladjev
Andrew Canis
@@ -126,9 +168,13 @@ Andrew Duffy
Andrew Godfrey
Andrew Marshall
Andrew Minh Nguyen <40281306+amqdn@users.noreply.github.com>
+Andrew Smith
andrijdavid
Andy Salerno
Andy Tai
+Andy Williams <8692+sobakasu@users.noreply.github.com>
+andyluo7 <43718156+andyluo7@users.noreply.github.com>
+Angel Galindo <131726962+AngelGalindo7@users.noreply.github.com>
Ankur Verma <31362771+ankurvdev@users.noreply.github.com>
anon998 <131767832+anon998@users.noreply.github.com>
Anri Lombard
@@ -140,7 +186,10 @@ Anton Mitkov
Anton Mitkov
Antonis Makropoulos
Anudit Nagar
+Anuj Attri
anzz1
+Aparna M P
+Aparna M P
apaz
apcameron <37645737+apcameron@users.noreply.github.com>
arch-btw <57669023+arch-btw@users.noreply.github.com>
@@ -149,11 +198,13 @@ ardfork <134447697+ardfork@users.noreply.github.com>
Arik Poznanski
arlo-phoenix <140345165+arlo-phoenix@users.noreply.github.com>
Armen Kaleshian
+Arsen Arutunan <58118221+limloop@users.noreply.github.com>
Artem
Artem Zinnatullin
Artyom Lebedev
aryantandon01 <80969509+aryantandon01@users.noreply.github.com>
Asbjørn Olling
+asf0
Ásgeir Bjarni Ingvarsson
Asghar Ghorbani
Ashish <1856117+ashishdatta@users.noreply.github.com>
@@ -162,10 +213,12 @@ Ashraful Islam
AT
at8u <129688334+at8u@users.noreply.github.com>
Atharva Dubey
+Atomic-Germ <97569476+Atomic-Germ@users.noreply.github.com>
Atsushi Tatsuma
aubreyli
Austin <77757836+teleprint-me@users.noreply.github.com>
AustinMroz
+AUTOMATIC1111 <16777216c@gmail.com>
automaticcat
awatuna <23447591+awatuna@users.noreply.github.com>
b4b4o
@@ -174,6 +227,7 @@ BADR
bagheera <59658056+bghira@users.noreply.github.com>
Bailey Chittle <39804642+bachittle@users.noreply.github.com>
bandoti <141645996+bandoti@users.noreply.github.com>
+Bar Haim
BarfingLemurs <128182951+BarfingLemurs@users.noreply.github.com>
Bart Louwers
Bartowski <3266127+bartowski1182@users.noreply.github.com>
@@ -184,24 +238,35 @@ BB-fat <45072480+BB-fat@users.noreply.github.com>
Behnam M <58621210+ibehnam@users.noreply.github.com>
beiller
Beinsezii <39478211+Beinsezii@users.noreply.github.com>
+Belem Zhang
Ben Ashbaugh
Ben Chen
Ben Garney
+Ben Guidarelli
+Ben Racicot <1815385+BenRacicot@users.noreply.github.com>
Ben Siraphob
Ben Williams
Benjamin Findley <39356821+Kartoffelsaft@users.noreply.github.com>
Benjamin Lecaillon <84293038+blecaillon@users.noreply.github.com>
Benni <73313922+BenjaminBruenau@users.noreply.github.com>
Benson Wong
+Berk Idem <55372926+berkidem@users.noreply.github.com>
+Bernard Ladenthin
Bernat Vadell
Bernhard M. Wiedemann
Bert Wagner
+Bertay Eren <39909689+bertaye@users.noreply.github.com>
+Bhavik Sharda <10757940+BLSharda@users.noreply.github.com>
bhubbb <79117352+bhubbb@users.noreply.github.com>
+Bill Sideris
Billel Mokeddem
Bingan <70050083+binganao@users.noreply.github.com>
+Bipin Yadav <83943505+bipinyadav3175@users.noreply.github.com>
Bizhao Shi <37729561+shibizhao@users.noreply.github.com>
Bjarke Viksøe <164612031+bviksoe@users.noreply.github.com>
Björn Ganster
+BlackFoil <127078112+BlackFoil@users.noreply.github.com>
+BlueMöhre
bmwl
Bo Zheng <368586905@qq.com>
bobqianic <129547291+bobqianic@users.noreply.github.com>
@@ -223,6 +288,7 @@ bryanSwk <93190252+bryanSwk@users.noreply.github.com>
bsilvereagle
bssrdf
byte-6174 <88070277+byte-6174@users.noreply.github.com>
+Caleb DeLeeuw <143902425+SolshineCode@users.noreply.github.com>
Calvin Laurenson
Cameron
Cameron Kaiser
@@ -238,6 +304,7 @@ cduk <19917266+cduk@users.noreply.github.com>
cebtenzzre
Cebtenzzre
CentricStorm
+Cetarthoriphros
Chad Brewbaker
Chad Voegele
chaihahaha
@@ -248,15 +315,20 @@ characharm <123120856+characharm@users.noreply.github.com>
Charles Duffy
Charles Xu <63788048+chaxu01@users.noreply.github.com>
Charles Xu
+Chedrian07 <108463785+Chedrian07@users.noreply.github.com>
chen fan <350211548@qq.com>
Chen Xi
Chen Xi
+Chen Yuan
+Chen Yuan
Cheng Shao
Chenguang Li <757486878@qq.com>
Chenguang Li <87689256+noemotiovon@users.noreply.github.com>
+Chipmunk <101038159+CHIPMUNK-T0T@users.noreply.github.com>
chiranko <96988916+chiranko@users.noreply.github.com>
Chris Elrod
Chris Kuehl
+Chris Lee
Chris Peterson
Chris Rohlf
Chris Thompson
@@ -264,11 +336,16 @@ Christian Demsar
Christian Demsar
Christian Falch <875252+chrfalch@users.noreply.github.com>
Christian Fillion
+Christian Hoener zu Siederdissen
Christian Kastner
Christian Kögler
Christian Köhnenkamp
+Christian Schmitz
Christian Zhou-Zheng <59622928+christianazinn@users.noreply.github.com>
+Christopher Albert
+Christopher Maher
Christopher Nielsen <62156882+mascguy@users.noreply.github.com>
+Chyan <163109379+chyan8@users.noreply.github.com>
City <125218114+city96@users.noreply.github.com>
CJ Pais
Clark Saben <76020733+csaben@users.noreply.github.com>
@@ -288,12 +365,15 @@ Congcong Cai
Conrad Kramer
Copilot <198982749+Copilot@users.noreply.github.com>
Corentin REGAL
+cphlipot <9103367+cphlipot@users.noreply.github.com>
cpumaxx <163466046+cpumaxx@users.noreply.github.com>
crasm
crasm
crat0z <11581854+crat0z@users.noreply.github.com>
CRD716
CrispStrobe <154636388+CrispStrobe@users.noreply.github.com>
+Cristiano Pinto <140563307+crowmoed@users.noreply.github.com>
+crsawyer <7572190+crsawyer@users.noreply.github.com>
Csaba Kecskemeti
Cuong Trinh Manh
daboe01
@@ -301,6 +381,7 @@ daghanerdonmez <44506702+daghanerdonmez@users.noreply.github.com>
Damian Stewart
daminho <37615795+daminho@users.noreply.github.com>
DAN™
+Dan Hoffman <43101339+thedanhoffman@users.noreply.github.com>
Dan Johansson <164997844+eddnjjn@users.noreply.github.com>
Dan Johansson
Dane Madsen
@@ -308,6 +389,7 @@ DaniAndTheWeb <57776841+DaniAndTheWeb@users.noreply.github.com>
Daniel Benjaminsson
Daniel Bevenius
Daniel Drake
+Daniel Elliott
Daniel Han
Daniel Hiltgen
Daniel Illescas Romero
@@ -324,9 +406,11 @@ Dave
Dave Airlie
Dave Airlie
Dave Della Costa
+Davi Henrique Linhares <38295327+WizardlyBump17@users.noreply.github.com>
David Chiu
David Friehs
David Huang <1969802+hjc4869@users.noreply.github.com>
+David Huggins-Daines
David Kennedy
David Lima
David Pflug
@@ -334,10 +418,13 @@ david raistrick
David Renshaw
David Ribeiro Alves
David Sommers <12738+databyte@users.noreply.github.com>
+David Spruill <62445444+Spruill-1@users.noreply.github.com>
David Yang
David Zhao <90013954+Your-Cheese@users.noreply.github.com>
+David366AI <86212041+David366AI@users.noreply.github.com>
davidef
DavidKorczynski
+davidrhodus
Dawid Potocki
Dawid Wysocki <62249621+TortillaZHawaii@users.noreply.github.com>
ddh0
@@ -345,11 +432,16 @@ ddh0
ddpasa <112642920+ddpasa@users.noreply.github.com>
DDXDB <38449595+DDXDB@users.noreply.github.com>
Dean
+decahedron1
deepdiffuser <112834445+deepdiffuser@users.noreply.github.com>
deepsek <166548550+deepsek@users.noreply.github.com>
Deins
Denis Spasyuk <34203011+dspasyuk@users.noreply.github.com>
Derrick T. Woolworth
+Dev-iL <6509619+Dev-iL@users.noreply.github.com>
+Dev-X25874 <283057883+Dev-X25874@users.noreply.github.com>
+Devedse <2350015+devedse@users.noreply.github.com>
+Developer-Ecosystem-Engineering <65677710+Developer-Ecosystem-Engineering@users.noreply.github.com>
Deven Mistry <31466137+deven367@users.noreply.github.com>
devojony <61173062+devojony@users.noreply.github.com>
diannao <55k@outlook.com>
@@ -365,7 +457,9 @@ Djip007 <3705339+Djip007@users.noreply.github.com>
Djip007
dm4
dm4
+Dmitry Atamanov
Dmytro Minochkin
+Dmytro Romanov
Dobri Danchev <12420863+danchev@users.noreply.github.com>
DocShotgun <126566557+DocShotgun@users.noreply.github.com>
Doctor Shotgun <126566557+DocShotgun@users.noreply.github.com>
@@ -375,6 +469,7 @@ Donghyeon Jeong <54725479+djeong20@users.noreply.github.com>
Dongliang Wei <121270393+wdl339@users.noreply.github.com>
Doomsdayrs <38189170+Doomsdayrs@users.noreply.github.com>
DooWoong Lee (David)
+DorianRudolph
Dorin-Andrei Geman
dotpy314 <33351922+dotpy314@users.noreply.github.com>
Dou Xinpeng <15529241576@163.com>
@@ -383,7 +478,9 @@ Douglas Hanley
Dowon
Dr. Tom Murphy VII Ph.D <499244+tom7@users.noreply.github.com>
drbh
+drrros <52050875+drrros@users.noreply.github.com>
ds5t5 <145942675+ds5t5@users.noreply.github.com>
+dskwe
duduta
dylan
eastriver
@@ -395,11 +492,14 @@ Ed Addario <29247825+EAddario@users.noreply.github.com>
Ed Lee
Ed Lepedus
Eddie-Wang
+eduardopessin <100053075+eduardopessin@users.noreply.github.com>
Edward Taylor
eiery <19350831+eiery@users.noreply.github.com>
Elaine
Elbios <141279586+Elbios@users.noreply.github.com>
Elton Kola
+Emanuil Rusev
+Emil Askerov <56842174+EmilAskerov@users.noreply.github.com>
Emmanuel Ferdman
Emreerdog <34742675+Emreerdog@users.noreply.github.com>
Engininja2 <139037756+Engininja2@users.noreply.github.com>
@@ -407,6 +507,8 @@ Equim
Eric Curtin
Eric Curtin
Eric Curtin
+Eric Hartford
+Eric Hsieh
Eric Sommerlade
Eric Zhang <34133756+EZForever@users.noreply.github.com>
eric8607242
@@ -414,8 +516,10 @@ Erik Garrison