Update Submodule vendor/llama.cpp fb27a52..b49650a #1139
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| pull_request: | |
| branches: ["main"] | |
| push: | |
| branches: ["main"] | |
| # Auto-cancel stale runs on the same PR/branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| TRANSFORMER_REVISION: 9217f5db79a29953eb74d5343926648285ec7e67 | |
| HYBRID_REVISION: b0f773d6323ab08f262f88f53f73a8d869b59635 | |
| jobs: | |
| prepare-models: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Cache test models | |
| id: models | |
| uses: actions/cache@v5 | |
| with: | |
| path: test-models | |
| key: test-models-q8proj-v1-${{ env.TRANSFORMER_REVISION }}-${{ env.HYBRID_REVISION }} | |
| - name: Install download dependency | |
| if: steps.models.outputs.cache-hit != 'true' | |
| run: python -m pip install huggingface-hub | |
| - name: Download pinned models once | |
| if: steps.models.outputs.cache-hit != 'true' | |
| shell: python | |
| run: | | |
| import os | |
| from huggingface_hub import hf_hub_download | |
| models = [ | |
| ("Qwen/Qwen2.5-0.5B-Instruct-GGUF", | |
| "qwen2.5-0.5b-instruct-q4_k_m.gguf", os.environ["TRANSFORMER_REVISION"]), | |
| ("JamePeng2023/Qwen3.5-0.8B-GGUF", | |
| "Qwen3.5-0.8B-Q4_K_M.gguf", os.environ["HYBRID_REVISION"]), | |
| ("JamePeng2023/Qwen3.5-0.8B-GGUF", | |
| "mmproj-Qwen3.5-0.8b-Q8_0.gguf", os.environ["HYBRID_REVISION"]), | |
| ] | |
| for repo, filename, revision in models: | |
| hf_hub_download(repo, filename, revision=revision, local_dir="test-models") | |
| - name: Share models with all test environments | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-models | |
| path: test-models/*.gguf | |
| if-no-files-found: error | |
| compression-level: 0 | |
| retention-days: 3 | |
| # Combined job for Linux, Windows, and Apple Silicon macOS | |
| build-and-test: | |
| needs: prepare-models | |
| env: | |
| LLAMA_TEST_TRANSFORMER_MODEL: ${{ github.workspace }}/test-models/qwen2.5-0.5b-instruct-q4_k_m.gguf | |
| LLAMA_TEST_HYBRID_MODEL: ${{ github.workspace }}/test-models/Qwen3.5-0.8B-Q4_K_M.gguf | |
| LLAMA_TEST_MMPROJ: ${{ github.workspace }}/test-models/mmproj-Qwen3.5-0.8b-Q8_0.gguf | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Don't cancel other jobs in the matrix if one fails | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-2022] | |
| python-version: ["3.9", "3.14"] | |
| include: | |
| # Apple Silicon macOS with Metal | |
| - os: macos-26 | |
| python-version: "3.9" | |
| cmake_args: "-DGGML_METAL_EMBED_LIBRARY=off -DGGML_RPC=on" | |
| metal_status: "(Metal)" | |
| - os: macos-26 | |
| python-version: "3.14" | |
| cmake_args: "-DGGML_METAL_EMBED_LIBRARY=off -DGGML_RPC=on" | |
| metal_status: "(Metal)" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| submodules: "recursive" | |
| - name: Install the latest version of uv and set the python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Download prepared test models | |
| uses: actions/download-artifact@v5 | |
| with: | |
| name: test-models | |
| path: test-models | |
| - name: Install dependencies and Build | |
| env: | |
| CMAKE_ARGS: ${{ matrix.cmake_args }} | |
| run: | | |
| echo "Building with CMAKE_ARGS: $CMAKE_ARGS" | |
| uv pip install --system -e .[all] --verbose | |
| shell: bash | |
| - name: System Info and llama-cpp-python version | |
| run: | | |
| python -c "import platform; print('Machine:', platform.machine(), 'Arch:', platform.architecture())" | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| sysctl -n machdep.cpu.brand_string | |
| fi | |
| python -c "import llama_cpp; print('llama_cpp_python:', llama_cpp.__version__)" | |
| shell: bash | |
| - name: Test with pytest by python ${{ matrix.python-version }} | |
| run: python -m pytest | |
| shell: bash |