Commit 6b01a4767 for llama.cpp

commit 6b01a4767f8d3d0c416c410a49861333965c0982
Author: Ruixiang Wang <wangruixiang07@outlook.com>
Date:   Mon Nov 16 11:14:07 2026 +0100

    CI: trigger spec dec testing for relevant PRs (#32281)

    * ci: trigger spec dec testing after refactoring

    * add options to run spec dec ci nightly manually

diff --git a/.github/workflows/server-speculative.yml b/.github/workflows/server-speculative.yml
index de247afb6..e90eb21c4 100644
--- a/.github/workflows/server-speculative.yml
+++ b/.github/workflows/server-speculative.yml
@@ -7,6 +7,40 @@ on:
         description: 'Commit SHA1 to build'
         required: false
         type: string
+      spec_methods:
+        description: 'Speculative methods to test'
+        required: true
+        default: 'compact'
+        type: choice
+        options:
+          - compact
+          - nightly
+          - all
+  push:
+    branches:
+      - master
+    paths: [
+      '.github/workflows/server-speculative.yml',
+      'common/speculative.*',
+      'src/models/dflash*.cpp',
+      'src/models/dspark.cpp',
+      'src/models/eagle3.cpp',
+      'src/models/lilicorr.cpp',
+      'src/models/qwen35.cpp',
+      'tools/server/tests/unit/test_spec_methods.py'
+    ]
+  pull_request:
+    types: [opened, synchronize, reopened]
+    paths: [
+      '.github/workflows/server-speculative.yml',
+      'common/speculative.*',
+      'src/models/dflash*.cpp',
+      'src/models/dspark.cpp',
+      'src/models/eagle3.cpp',
+      'src/models/lilicorr.cpp',
+      'src/models/qwen35.cpp',
+      'tools/server/tests/unit/test_spec_methods.py'
+    ]

 cache-mode: none
 permissions:
@@ -56,8 +90,9 @@ jobs:

       - name: Test speculative decoding
         env:
-          SPEC_METHODS: compact
-          SPEC_MODEL_DIR: ${{ vars.SPEC_METHOD_MODEL_DIR || format('{0}/spec-models', runner.temp) }}
+          SPEC_METHODS: ${{ github.event.inputs.spec_methods || 'compact' }}
+          # pull requests from forks do not get repository variables
+          SPEC_MODEL_DIR: ${{ vars.SPEC_METHOD_MODEL_DIR || '/mnt/cache/spec-models' }}
           N_GPU_LAYERS: 99
         run: |
           cd tools/server/tests
diff --git a/tools/server/tests/README.md b/tools/server/tests/README.md
index d0f8b7938..4c47466ce 100644
--- a/tools/server/tests/README.md
+++ b/tools/server/tests/README.md
@@ -62,10 +62,11 @@ Use `SPEC_METHODS=nightly` for DFlash2 and LiLiCorr, or a comma-separated subset
 verified compact DFlash2 GGUF or compact LiLiCorr checkpoint is available. `SPEC_METHODS=all` runs both
 tiers and downloads about 47.693 GiB.

-The `Server (speculative decoding)` workflow runs only by explicit manual dispatch on the dedicated
-DGX Spark runner. It does not use the GitHub Actions cache. Set the `SPEC_METHOD_MODEL_DIR` repository
-variable to the runner's persistent model directory when its mount path is confirmed. Heavyweight
-DFlash2 and LiLiCorr measurements belong in the internal nightly performance/quality runs.
+The `Server (speculative decoding)` workflow runs the compact suite on the dedicated DGX Spark runner for pull requests and pushes to master that change the speculative decoding code, the model files of the speculative methods, the test or the workflow.
+A manual dispatch runs the suite selected by its `spec_methods` input: `compact` (default), `nightly` or `all`.
+It does not use the GitHub Actions cache: the models are kept in the directory of the `SPEC_METHOD_MODEL_DIR` repository variable.
+Pull requests from forks do not get repository variables, so their runs use `/mnt/cache/spec-models`, the persistent model directory of the runner.
+Heavyweight DFlash2 and LiLiCorr measurements belong in the internal nightly performance/quality runs.

 The acceptance floors use one-sided regression checks: improvements do not fail. Three identical
 runs on the GB10 runner against the PR merged with current master produced MTP `0.6640 / 2.9766`,
diff --git a/tools/server/tests/unit/test_spec_methods.py b/tools/server/tests/unit/test_spec_methods.py
index eb8e879b7..ef6407115 100644
--- a/tools/server/tests/unit/test_spec_methods.py
+++ b/tools/server/tests/unit/test_spec_methods.py
@@ -7,7 +7,6 @@ from utils import ServerProcess, download_file

 # Runs each speculative method greedily and checks that it still drafts and accepts as expected.
 # accept rate = accepted / drafted, accept len = 1 + accepted / verification steps (from /metrics).
-# DFlash2 and LiLiCorr use --spec-type draft-dflash; the draft GGUF metadata selects the variant.
 # Needs real models and a GPU. Use SPEC_METHODS=compact, nightly, all, or a comma-separated method list.

 HF = "https://huggingface.co"
@@ -69,7 +68,7 @@ CASES = [
     # Nightly floors retain the earlier three-point rate and 0.2 length margins.
     SpecCase(
         name="dflash2",
-        spec_type="draft-dflash",
+        spec_type="draft-dflash2",
         target="Qwen3.8-27B-Q4_K_M.gguf",
         draft="dflash2-Qwen3.8-27B-Q8_0.gguf",
         n_max=7,
@@ -78,7 +77,7 @@ CASES = [
     ),
     SpecCase(
         name="lilicorr",
-        spec_type="draft-dflash",
+        spec_type="draft-lilicorr",
         target="NVIDIA-Nemotron-3.5-Bolt-74B-A9B-24GB.gguf",
         draft="lilicorr-NVIDIA-Nemotron-3.5-Bolt-74B-A9B-24GB-NVFP4.gguf",
         n_max=7,