Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
chore: upgrade and digest pin all action digests (#1002)
Richard Tweed3917d47399a1
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex b39c648a..a6953584 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -2,9 +2,9 @@ name: CIon:workflow_dispatch:push:- branches: [ master, main, fix ]+ branches: [master, main, fix]pull_request:- branches: [ master, main, fix ]+ branches: [master, main, fix]jobs:ubuntu-focal-make:@@ -14,7 +14,7 @@ jobs:steps:- name: Cloneid: checkout- uses: actions/checkout@v4+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0- name: Dependenciesid: depends@@ -28,7 +28,7 @@ jobs:- name: Cache cosmocc toolchainid: cache-cosmocc-toolchain- uses: actions/cache@v4+ uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5env:cache-name: cache-cosmocc-toolchainwith:diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex eebaf2e4..868cba30 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -4,18 +4,18 @@ on:push:branches: [main]paths:- - 'docs/**'- - 'scripts/publish_docs.py'- - 'scripts/validate_docs.py'- - '.gitbook.yaml'- - '.github/workflows/docs.yml'+ - "docs/**"+ - "scripts/publish_docs.py"+ - "scripts/validate_docs.py"+ - ".gitbook.yaml"+ - ".github/workflows/docs.yml"pull_request:paths:- - 'docs/**'- - 'scripts/publish_docs.py'- - 'scripts/validate_docs.py'- - '.gitbook.yaml'- - '.github/workflows/docs.yml'+ - "docs/**"+ - "scripts/publish_docs.py"+ - "scripts/validate_docs.py"+ - ".gitbook.yaml"+ - ".github/workflows/docs.yml"workflow_dispatch:jobs:@@ -25,7 +25,7 @@ jobs:runs-on: ubuntu-lateststeps:- name: Check out the repository- uses: actions/checkout@v4+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0with:fetch-depth: 0diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.ymlindex ae86e992..83f1d876 100644--- a/.github/workflows/editorconfig.yml+++ b/.github/workflows/editorconfig.yml@@ -4,7 +4,7 @@ on:workflow_dispatch: # allows manual triggeringinputs:create_release:- description: 'Create new release'+ description: "Create new release"required: truetype: booleanpush:@@ -22,6 +22,6 @@ jobs:editorconfig:runs-on: ubuntu-lateststeps:- - uses: actions/checkout@v4- - uses: editorconfig-checker/action-editorconfig-checker@main+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0+ - uses: editorconfig-checker/action-editorconfig-checker@840e866d93b8e032123c23bac69dece044d4d84c # v2.2.0- run: editorconfig-checkerdiff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.ymlindex 799e4d57..2b7ceb2b 100644--- a/.github/workflows/labeler.yml+++ b/.github/workflows/labeler.yml@@ -1,6 +1,6 @@name: "Pull Request Labeler"on:-- pull_request_target+ - pull_request_targetjobs:labeler:@@ -9,9 +9,9 @@ jobs:pull-requests: writeruns-on: ubuntu-lateststeps:- - uses: actions/checkout@v4- with:- repository: "Mozilla-Ocho/llamafile"- - uses: actions/labeler@v5- with:- configuration-path: '.github/labeler.yml'+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0+ with:+ repository: "Mozilla-Ocho/llamafile"+ - uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0+ with:+ configuration-path: ".github/labeler.yml"diff --git a/.github/workflows/pages-redirect.yml b/.github/workflows/pages-redirect.ymlindex 76831fa9..07b0047a 100644--- a/.github/workflows/pages-redirect.yml+++ b/.github/workflows/pages-redirect.yml@@ -4,20 +4,20 @@ on:push:branches: [main]paths:- - 'docs/**'- - 'scripts/publish_docs.py'- - 'scripts/validate_docs.py'- - 'scripts/generate_github_pages_redirects.py'- - 'tests/docs/**'- - '.github/workflows/pages-redirect.yml'+ - "docs/**"+ - "scripts/publish_docs.py"+ - "scripts/validate_docs.py"+ - "scripts/generate_github_pages_redirects.py"+ - "tests/docs/**"+ - ".github/workflows/pages-redirect.yml"pull_request:paths:- - 'docs/**'- - 'scripts/publish_docs.py'- - 'scripts/validate_docs.py'- - 'scripts/generate_github_pages_redirects.py'- - 'tests/docs/**'- - '.github/workflows/pages-redirect.yml'+ - "docs/**"+ - "scripts/publish_docs.py"+ - "scripts/validate_docs.py"+ - "scripts/generate_github_pages_redirects.py"+ - "tests/docs/**"+ - ".github/workflows/pages-redirect.yml"workflow_dispatch:jobs:@@ -27,14 +27,14 @@ jobs:runs-on: ubuntu-lateststeps:- name: Check out the repository- uses: actions/checkout@v4+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0with:fetch-depth: 0- name: Set up Python- uses: actions/setup-python@v5+ uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0with:- python-version: '3.11'+ python-version: "3.11"- name: Run redirect generator testsrun: python -m unittest discover -s tests/docs -p 'test_*.py'@@ -50,7 +50,7 @@ jobs:- name: Upload generated redirect site as PR artifactif: github.event_name == 'pull_request'- uses: actions/upload-artifact@v4+ uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1with:name: github-pages-redirect-previewpath: gh-pages-redirect/diff --git a/.github/workflows/update-llama-cpp.yml b/.github/workflows/update-llama-cpp.ymlindex 3d7ef2a3..78542085 100644--- a/.github/workflows/update-llama-cpp.yml+++ b/.github/workflows/update-llama-cpp.yml@@ -2,7 +2,7 @@ name: Update llama.cpp submoduleon:schedule:- - cron: '0 0 * * 1'+ - cron: "0 0 * * 1"workflow_dispatch:jobs:@@ -14,75 +14,75 @@ jobs:pull-requests: writesteps:- - uses: actions/checkout@v4- with:- submodules: recursive- fetch-depth: 0-- - name: Configure git- run: |- git config user.name "github-actions[bot]"- git config user.email "github-actions[bot]@users.noreply.github.com"-- - name: Check for submodule updates- id: check- run: |- cd llama.cpp-- CURRENT_COMMIT=$(git rev-parse HEAD)- echo "Current commit: $CURRENT_COMMIT"-- git fetch origin master-- LATEST_COMMIT=$(git rev-parse origin/master)- echo "Latest commit: $LATEST_COMMIT"-- if [ "$CURRENT_COMMIT" != "$LATEST_COMMIT" ]; then- echo "needs_update=true" >> "$GITHUB_OUTPUT"- echo "current_commit=$CURRENT_COMMIT" >> "$GITHUB_OUTPUT"- echo "latest_commit=$LATEST_COMMIT" >> "$GITHUB_OUTPUT"- echo "current_short=$(echo $CURRENT_COMMIT | cut -c1-7)" >> "$GITHUB_OUTPUT"- echo "latest_short=$(echo $LATEST_COMMIT | cut -c1-7)" >> "$GITHUB_OUTPUT"- else- echo "needs_update=false" >> "$GITHUB_OUTPUT"- echo "Submodule is up to date"- fi-- - name: Update submodule and create PR- if: steps.check.outputs.needs_update == 'true'- env:- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}- run: |- BRANCH_NAME="update-llama-cpp-${{ steps.check.outputs.latest_short }}"-- if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then- echo "Branch $BRANCH_NAME already exists, skipping"- exit 0- fi-- EXISTING_PR=$(gh pr list --search "Update llama.cpp submodule" --state open --json number --jq '.[0].number')- if [ -n "$EXISTING_PR" ]; then- echo "PR #$EXISTING_PR already exists for updating llama.cpp, skipping"- exit 0- fi-- git checkout -b "$BRANCH_NAME"-- cd llama.cpp- git checkout origin/master- cd ..-- git add llama.cpp- git commit -m "Update llama.cpp submodule to ${{ steps.check.outputs.latest_short }}"-- git push origin "$BRANCH_NAME"-- gh pr create \- --title "Update llama.cpp submodule to ${{ steps.check.outputs.latest_short }}" \- --body "This PR updates the llama.cpp submodule from \`${{ steps.check.outputs.current_short }}\` to \`${{ steps.check.outputs.latest_short }}\`.-- **Changes:** https://github.com/ggerganov/llama.cpp/compare/${{ steps.check.outputs.current_commit }}...${{ steps.check.outputs.latest_commit }}-- ---- *This PR was automatically created by the update-llama-cpp workflow.*" \- --head "$BRANCH_NAME"+ - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0+ with:+ submodules: recursive+ fetch-depth: 0++ - name: Configure git+ run: |+ git config user.name "github-actions[bot]"+ git config user.email "github-actions[bot]@users.noreply.github.com"++ - name: Check for submodule updates+ id: check+ run: |+ cd llama.cpp++ CURRENT_COMMIT=$(git rev-parse HEAD)+ echo "Current commit: $CURRENT_COMMIT"++ git fetch origin master++ LATEST_COMMIT=$(git rev-parse origin/master)+ echo "Latest commit: $LATEST_COMMIT"++ if [ "$CURRENT_COMMIT" != "$LATEST_COMMIT" ]; then+ echo "needs_update=true" >> "$GITHUB_OUTPUT"+ echo "current_commit=$CURRENT_COMMIT" >> "$GITHUB_OUTPUT"+ echo "latest_commit=$LATEST_COMMIT" >> "$GITHUB_OUTPUT"+ echo "current_short=$(echo $CURRENT_COMMIT | cut -c1-7)" >> "$GITHUB_OUTPUT"+ echo "latest_short=$(echo $LATEST_COMMIT | cut -c1-7)" >> "$GITHUB_OUTPUT"+ else+ echo "needs_update=false" >> "$GITHUB_OUTPUT"+ echo "Submodule is up to date"+ fi++ - name: Update submodule and create PR+ if: steps.check.outputs.needs_update == 'true'+ env:+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ run: |+ BRANCH_NAME="update-llama-cpp-${{ steps.check.outputs.latest_short }}"++ if git ls-remote --heads origin "$BRANCH_NAME" | grep -q "$BRANCH_NAME"; then+ echo "Branch $BRANCH_NAME already exists, skipping"+ exit 0+ fi++ EXISTING_PR=$(gh pr list --search "Update llama.cpp submodule" --state open --json number --jq '.[0].number')+ if [ -n "$EXISTING_PR" ]; then+ echo "PR #$EXISTING_PR already exists for updating llama.cpp, skipping"+ exit 0+ fi++ git checkout -b "$BRANCH_NAME"++ cd llama.cpp+ git checkout origin/master+ cd ..++ git add llama.cpp+ git commit -m "Update llama.cpp submodule to ${{ steps.check.outputs.latest_short }}"++ git push origin "$BRANCH_NAME"++ gh pr create \+ --title "Update llama.cpp submodule to ${{ steps.check.outputs.latest_short }}" \+ --body "This PR updates the llama.cpp submodule from \`${{ steps.check.outputs.current_short }}\` to \`${{ steps.check.outputs.latest_short }}\`.++ **Changes:** https://github.com/ggerganov/llama.cpp/compare/${{ steps.check.outputs.current_commit }}...${{ steps.check.outputs.latest_commit }}++ ---+ *This PR was automatically created by the update-llama-cpp workflow.*" \+ --head "$BRANCH_NAME"