Skip to content

Commit 74bf9ec

Browse files
mudlerlocalai-org-maint-bot
authored andcommitted
ci(buun-llama-cpp): wire backend into test-extra + build matrix
Adds the buun-llama-cpp backend to the same CI pipelines that turboquant and sherpa-onnx already use: - scripts/changed-backends.js: path resolution for Dockerfile.buun-llama-cpp, plus fork-of-fork detection (changes under backend/cpp/llama-cpp/ also retrigger the buun pipeline, mirroring how turboquant is handled). - .github/workflows/test-extra.yml: detect-changes output and a new tests-buun-llama-cpp-grpc job that runs make test-extra-backend-buun-llama-cpp (turbo3 V-cache, same rationale as tests-turboquant-grpc). - .github/workflows/backend.yml: 9 matrix entries (CUDA 12/13, L4T CUDA 13 ARM64, ROCm, SYCL f32/f16, CPU, L4T ARM64, Vulkan) paired with each existing turboquant entry so image builds have platform parity. Also updates .agents/ai-coding-assistants.md to clarify that AI agents operating under the human submitter's git identity SHOULD emit Signed-off-by via `git commit -s` (never inventing or guessing another identity) — documents the workflow this PR is using. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
1 parent 78892df commit 74bf9ec

4 files changed

Lines changed: 210 additions & 11 deletions

File tree

.agents/ai-coding-assistants.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,33 @@ All contributions must comply with LocalAI's licensing requirements:
3535

3636
## Signed-off-by and Developer Certificate of Origin
3737

38-
**AI agents MUST NOT add `Signed-off-by` tags.** Only humans can legally
39-
certify the Developer Certificate of Origin (DCO). The human submitter
40-
is responsible for:
41-
42-
- Reviewing all AI-generated code
38+
Only humans can certify the Developer Certificate of Origin (DCO). AI
39+
agents MUST NOT invent or guess a human identity for `Signed-off-by`
40+
doing so forges the DCO certification.
41+
42+
However, when a human operator explicitly directs the AI to commit on
43+
their behalf, the AI is acting as a typing tool — no different from an
44+
editor macro or `git commit -s`. In that case the AI SHOULD add
45+
`Signed-off-by:` using the **configured `user.name` / `user.email`** of
46+
the current git repository (i.e. the operator's own identity). The
47+
resulting trailer is the operator's signature; they take responsibility
48+
for it by reviewing and pushing the commit. The AI MUST NOT use any
49+
other identity and MUST NOT add its own name to the sign-off.
50+
51+
When running `git commit`, prefer `git commit --signoff` (or `-s`) so
52+
the trailer is emitted by git itself from the configured identity,
53+
rather than hand-writing it in a heredoc — this guarantees the sign-off
54+
matches whatever identity the operator is currently using.
55+
56+
The human submitter remains responsible for:
57+
58+
- Reviewing all AI-generated code before it's pushed or merged
4359
- Ensuring compliance with licensing requirements
44-
- Adding their own `Signed-off-by` tag (when the project requires DCO)
45-
to certify the contribution
4660
- Taking full responsibility for the contribution
4761

48-
AI agents MUST NOT add `Co-Authored-By` trailers for themselves either.
49-
A human reviewer owns the contribution; the AI's involvement is recorded
50-
via `Assisted-by` (see below).
62+
AI agents MUST NOT add `Co-Authored-By` trailers for themselves. A human
63+
reviewer owns the contribution; the AI's involvement is recorded via
64+
`Assisted-by` (see below).
5165

5266
## Attribution
5367

@@ -84,6 +98,12 @@ Assisted-by: Claude:claude-opus-4-7 golangci-lint
8498
Signed-off-by: Jane Developer <jane@example.com>
8599
```
86100

101+
The `Signed-off-by` line uses Jane's own identity because Jane is the
102+
submitter operating the AI. If Jane asks Claude to create the commit via
103+
`git commit -s`, git emits that exact trailer from Jane's configured
104+
identity — no separate human step is needed beyond Jane reviewing the
105+
diff before pushing.
106+
87107
## Scope and Responsibility
88108

89109
Using an AI assistant does not reduce the contributor's responsibility.

.github/backend-matrix.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,22 @@ include:
480480
dockerfile: "./backend/Dockerfile.turboquant"
481481
context: "./"
482482
ubuntu-version: '2404'
483+
- build-type: 'cublas'
484+
cuda-major-version: "12"
485+
cuda-minor-version: "8"
486+
platforms: 'linux/amd64'
487+
tag-latest: 'auto'
488+
tag-suffix: '-gpu-nvidia-cuda-12-buun-llama-cpp'
489+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-cuda-12-amd64'
490+
# bigger-runner: same rationale as -gpu-nvidia-cuda-12-llama-cpp above
491+
# (observed 6h5m wall-clock on v4.2.1, just past the 6h job timeout).
492+
runs-on: 'bigger-runner'
493+
base-image: "ubuntu:24.04"
494+
skip-drivers: 'false'
495+
backend: "buun-llama-cpp"
496+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
497+
context: "./"
498+
ubuntu-version: '2404'
483499
- build-type: 'cublas'
484500
cuda-major-version: "12"
485501
cuda-minor-version: "8"
@@ -1152,6 +1168,21 @@ include:
11521168
dockerfile: "./backend/Dockerfile.turboquant"
11531169
context: "./"
11541170
ubuntu-version: '2404'
1171+
- build-type: 'cublas'
1172+
cuda-major-version: "13"
1173+
cuda-minor-version: "0"
1174+
platforms: 'linux/amd64'
1175+
tag-latest: 'auto'
1176+
tag-suffix: '-gpu-nvidia-cuda-13-buun-llama-cpp'
1177+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-cuda-13-amd64'
1178+
# bigger-runner: observed 6h5m wall-clock on v4.2.1 — at the GHA timeout.
1179+
runs-on: 'bigger-runner'
1180+
base-image: "ubuntu:24.04"
1181+
skip-drivers: 'false'
1182+
backend: "buun-llama-cpp"
1183+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
1184+
context: "./"
1185+
ubuntu-version: '2404'
11551186
- build-type: 'cublas'
11561187
cuda-major-version: "13"
11571188
cuda-minor-version: "0"
@@ -1195,6 +1226,20 @@ include:
11951226
backend: "turboquant"
11961227
dockerfile: "./backend/Dockerfile.turboquant"
11971228
context: "./"
1229+
- build-type: 'cublas'
1230+
cuda-major-version: "13"
1231+
cuda-minor-version: "0"
1232+
platforms: 'linux/arm64'
1233+
skip-drivers: 'false'
1234+
tag-latest: 'auto'
1235+
tag-suffix: '-nvidia-l4t-cuda-13-arm64-buun-llama-cpp'
1236+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-cuda-13-arm64'
1237+
base-image: "ubuntu:24.04"
1238+
runs-on: 'ubuntu-24.04-arm'
1239+
ubuntu-version: '2404'
1240+
backend: "buun-llama-cpp"
1241+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
1242+
context: "./"
11981243
- build-type: 'cublas'
11991244
cuda-major-version: "13"
12001245
cuda-minor-version: "0"
@@ -2438,6 +2483,20 @@ include:
24382483
dockerfile: "./backend/Dockerfile.turboquant"
24392484
context: "./"
24402485
ubuntu-version: '2404'
2486+
- build-type: 'sycl_f32'
2487+
cuda-major-version: ""
2488+
cuda-minor-version: ""
2489+
platforms: 'linux/amd64'
2490+
tag-latest: 'auto'
2491+
tag-suffix: '-gpu-intel-sycl-f32-buun-llama-cpp'
2492+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-intel-amd64'
2493+
runs-on: 'ubuntu-latest'
2494+
base-image: "intel/oneapi-basekit:2025.3.0-0-devel-ubuntu24.04"
2495+
skip-drivers: 'false'
2496+
backend: "buun-llama-cpp"
2497+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
2498+
context: "./"
2499+
ubuntu-version: '2404'
24412500
- build-type: 'sycl_f32'
24422501
cuda-major-version: ""
24432502
cuda-minor-version: ""
@@ -2480,6 +2539,20 @@ include:
24802539
dockerfile: "./backend/Dockerfile.turboquant"
24812540
context: "./"
24822541
ubuntu-version: '2404'
2542+
- build-type: 'sycl_f16'
2543+
cuda-major-version: ""
2544+
cuda-minor-version: ""
2545+
platforms: 'linux/amd64'
2546+
tag-latest: 'auto'
2547+
tag-suffix: '-gpu-intel-sycl-f16-buun-llama-cpp'
2548+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-intel-amd64'
2549+
runs-on: 'ubuntu-latest'
2550+
base-image: "intel/oneapi-basekit:2025.3.0-0-devel-ubuntu24.04"
2551+
skip-drivers: 'false'
2552+
backend: "buun-llama-cpp"
2553+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
2554+
context: "./"
2555+
ubuntu-version: '2404'
24832556
- build-type: 'sycl_f16'
24842557
cuda-major-version: ""
24852558
cuda-minor-version: ""
@@ -2946,6 +3019,21 @@ include:
29463019
dockerfile: "./backend/Dockerfile.turboquant"
29473020
context: "./"
29483021
ubuntu-version: '2404'
3022+
- build-type: ''
3023+
cuda-major-version: ""
3024+
cuda-minor-version: ""
3025+
platforms: 'linux/amd64'
3026+
platform-tag: 'amd64'
3027+
tag-latest: 'auto'
3028+
tag-suffix: '-cpu-buun-llama-cpp'
3029+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-amd64'
3030+
runs-on: 'ubuntu-latest'
3031+
base-image: "ubuntu:24.04"
3032+
skip-drivers: 'false'
3033+
backend: "buun-llama-cpp"
3034+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
3035+
context: "./"
3036+
ubuntu-version: '2404'
29493037
- build-type: ''
29503038
cuda-major-version: ""
29513039
cuda-minor-version: ""
@@ -2976,6 +3064,21 @@ include:
29763064
dockerfile: "./backend/Dockerfile.turboquant"
29773065
context: "./"
29783066
ubuntu-version: '2404'
3067+
- build-type: ''
3068+
cuda-major-version: ""
3069+
cuda-minor-version: ""
3070+
platforms: 'linux/arm64'
3071+
platform-tag: 'arm64'
3072+
tag-latest: 'auto'
3073+
tag-suffix: '-cpu-buun-llama-cpp'
3074+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-arm64'
3075+
runs-on: 'ubuntu-24.04-arm'
3076+
base-image: "ubuntu:24.04"
3077+
skip-drivers: 'false'
3078+
backend: "buun-llama-cpp"
3079+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
3080+
context: "./"
3081+
ubuntu-version: '2404'
29793082
- build-type: ''
29803083
cuda-major-version: ""
29813084
cuda-minor-version: ""
@@ -3146,6 +3249,20 @@ include:
31463249
dockerfile: "./backend/Dockerfile.turboquant"
31473250
context: "./"
31483251
ubuntu-version: '2204'
3252+
- build-type: 'cublas'
3253+
cuda-major-version: "12"
3254+
cuda-minor-version: "0"
3255+
platforms: 'linux/arm64'
3256+
skip-drivers: 'false'
3257+
tag-latest: 'auto'
3258+
tag-suffix: '-nvidia-l4t-arm64-buun-llama-cpp'
3259+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-l4t-cuda-12-arm64'
3260+
base-image: "nvcr.io/nvidia/l4t-jetpack:r36.4.0"
3261+
runs-on: 'ubuntu-24.04-arm'
3262+
backend: "buun-llama-cpp"
3263+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
3264+
context: "./"
3265+
ubuntu-version: '2204'
31493266
- build-type: 'cublas'
31503267
cuda-major-version: "12"
31513268
cuda-minor-version: "0"
@@ -3206,6 +3323,22 @@ include:
32063323
context: "./"
32073324
ubuntu-version: '2404'
32083325
# Stablediffusion-ggml
3326+
- build-type: 'vulkan'
3327+
cuda-major-version: ""
3328+
cuda-minor-version: ""
3329+
platforms: 'linux/amd64'
3330+
platform-tag: 'amd64'
3331+
tag-latest: 'auto'
3332+
tag-suffix: '-gpu-vulkan-buun-llama-cpp'
3333+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-vulkan-amd64'
3334+
runs-on: 'ubuntu-latest'
3335+
base-image: "ubuntu:24.04"
3336+
skip-drivers: 'false'
3337+
backend: "buun-llama-cpp"
3338+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
3339+
context: "./"
3340+
ubuntu-version: '2404'
3341+
# Stablediffusion-ggml
32093342
- build-type: 'vulkan'
32103343
cuda-major-version: ""
32113344
cuda-minor-version: ""
@@ -3238,6 +3371,22 @@ include:
32383371
context: "./"
32393372
ubuntu-version: '2404'
32403373
# Stablediffusion-ggml
3374+
- build-type: 'vulkan'
3375+
cuda-major-version: ""
3376+
cuda-minor-version: ""
3377+
platforms: 'linux/arm64'
3378+
platform-tag: 'arm64'
3379+
tag-latest: 'auto'
3380+
tag-suffix: '-gpu-vulkan-buun-llama-cpp'
3381+
builder-base-image: 'quay.io/go-skynet/ci-cache:base-grpc-vulkan-arm64'
3382+
runs-on: 'ubuntu-24.04-arm'
3383+
base-image: "ubuntu:24.04"
3384+
skip-drivers: 'false'
3385+
backend: "buun-llama-cpp"
3386+
dockerfile: "./backend/Dockerfile.buun-llama-cpp"
3387+
context: "./"
3388+
ubuntu-version: '2404'
3389+
# Stablediffusion-ggml
32413390
- build-type: 'vulkan'
32423391
cuda-major-version: ""
32433392
cuda-minor-version: ""

.github/workflows/test-extra.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
llama-cpp: ${{ steps.detect.outputs.llama-cpp }}
3434
ik-llama-cpp: ${{ steps.detect.outputs.ik-llama-cpp }}
3535
turboquant: ${{ steps.detect.outputs.turboquant }}
36+
buun-llama-cpp: ${{ steps.detect.outputs['buun-llama-cpp'] }}
3637
vllm: ${{ steps.detect.outputs.vllm }}
3738
sglang: ${{ steps.detect.outputs.sglang }}
3839
acestep-cpp: ${{ steps.detect.outputs.acestep-cpp }}
@@ -715,6 +716,30 @@ jobs:
715716
- name: Build turboquant backend image and run gRPC e2e tests
716717
run: |
717718
make test-extra-backend-turboquant
719+
tests-buun-llama-cpp-grpc:
720+
needs: detect-changes
721+
if: needs.detect-changes.outputs['buun-llama-cpp'] == 'true' || needs.detect-changes.outputs.run-all == 'true'
722+
runs-on: ubuntu-latest
723+
timeout-minutes: 90
724+
steps:
725+
- name: Clone
726+
uses: actions/checkout@v6
727+
with:
728+
submodules: true
729+
- name: Setup Go
730+
uses: actions/setup-go@v5
731+
with:
732+
go-version: '1.25.4'
733+
# Exercises the buun-llama-cpp (fork-of-a-fork) backend with the
734+
# fork-specific TurboQuant/TCQ KV-cache types. BACKEND_TEST_CACHE_TYPE_V
735+
# is set to turbo3 so the test round-trips through the fork's KV
736+
# allow-list — picking a stock llama.cpp type would only re-test the
737+
# shared code path. DFlash speculative decoding is not exercised here
738+
# because the one known public target/drafter pair (Qwen3.5-27B) is too
739+
# large for CI.
740+
- name: Build buun-llama-cpp backend image and run gRPC e2e tests
741+
run: |
742+
make test-extra-backend-buun-llama-cpp
718743
# tests-vllm-grpc is currently disabled in CI.
719744
#
720745
# The prebuilt vllm CPU wheel is compiled with AVX-512 VNNI/BF16

scripts/lib/backend-filter.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ export function inferBackendPath(item) {
6464
// via a thin wrapper Makefile. Changes to either dir should retrigger it.
6565
return `backend/cpp/turboquant/`;
6666
}
67+
if (item.dockerfile.endsWith("buun-llama-cpp")) {
68+
// buun-llama-cpp is a llama.cpp fork that reuses backend/cpp/llama-cpp
69+
// sources via a thin wrapper Makefile. Changes to either dir retrigger it.
70+
return `backend/cpp/buun-llama-cpp/`;
71+
}
6772
if (item.dockerfile.endsWith("bonsai")) {
6873
// bonsai is a llama.cpp fork that reuses backend/cpp/llama-cpp sources
6974
// via a thin wrapper Makefile. Changes to either dir should retrigger it.
@@ -128,7 +133,7 @@ export function backendChanged(backend, pathPrefix, changedFiles) {
128133

129134
// Fork backends reuse backend/cpp/llama-cpp sources via thin wrappers;
130135
// changes to either directory must retrigger their pipelines.
131-
return (backend === "turboquant" || backend === "bonsai") &&
136+
return (backend === "turboquant" || backend === "buun-llama-cpp" || backend === "bonsai") &&
132137
changedFiles.some(file => file.startsWith("backend/cpp/llama-cpp/"));
133138
}
134139

0 commit comments

Comments
 (0)