Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03k
1name: CI (cpu)2 3on:4 workflow_dispatch: # allows manual triggering5 push:6 branches:7 - master8 paths: [9 '.github/workflows/build-cpu.yml',10 '.github/workflows/build-cmake-pkg.yml',11 '**/CMakeLists.txt',12 '**/.cmake',13 '**/*.h',14 '**/*.hpp',15 '**/*.c',16 '**/*.cpp',17 ]18 19 pull_request:20 types: [opened, synchronize, reopened]21 paths: [22 '.github/workflows/build-cpu.yml',23 '.github/workflows/build-cmake-pkg.yml',24 '**/CMakeLists.txt',25 '**/.cmake',26 '**/*.h',27 '**/*.hpp',28 '**/*.c',29 '**/*.cpp'30 ]31 32concurrency:33 group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}34 cancel-in-progress: true35 36env:37 GGML_NLOOP: 338 GGML_N_THREADS: 139 LLAMA_ARG_LOG_COLORS: 140 LLAMA_ARG_LOG_PREFIX: 141 LLAMA_ARG_LOG_TIMESTAMPS: 142 43jobs:44 build-cmake-pkg:45 uses: ./.github/workflows/build-cmake-pkg.yml46 47 ubuntu:48 strategy:49 matrix:50 include:51 - build: 'x64'52 os: ubuntu-22.0453 - build: 'arm64'54 os: ubuntu-24.04-arm55 56 runs-on: ${{ matrix.os }}57 58 steps:59 - name: Clone60 id: checkout61 uses: actions/checkout@v662 63 - name: ccache64 uses: ggml-org/ccache-action@v1.2.2165 with:66 key: cpu-${{ matrix.os }}67 evict-old-files: 1d68 save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}69 70 - name: Build Dependencies71 id: build_depends72 run: |73 sudo apt-get update74 sudo apt-get install -y --no-install-recommends \75 python3 python3-pip python3-dev python3-wheel \76 libjpeg-dev build-essential libssl-dev \77 git-lfs78 79 - name: Toolchain workaround (GCC 14)80 if: ${{ contains(matrix.os, 'ubuntu-24.04') }}81 run: |82 sudo apt-get install -y gcc-14 g++-1483 echo "CC=gcc-14" >> "$GITHUB_ENV"84 echo "CXX=g++-14" >> "$GITHUB_ENV"85 86 - name: Python Dependencies87 id: python_depends88 run: |89 export PIP_BREAK_SYSTEM_PACKAGES="1"90 python3 -m pip install --upgrade pip setuptools91 pip3 install ./gguf-py92 93 - name: Build94 id: cmake_build95 run: |96 cmake -B build \97 -DLLAMA_FATAL_WARNINGS=ON \98 -DGGML_RPC=ON99 time cmake --build build --config Release -j $(nproc)100 101 - name: Test102 id: cmake_test103 run: |104 cd build105 ctest -L main --verbose --timeout 900106 107 - name: Test llama2c conversion108 id: llama2c_test109 run: |110 cd build111 echo "Fetch tokenizer"112 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/tok512.bin113 echo "Fetch llama2c model"114 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin115 ./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf116 ./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256117 118 windows:119 runs-on: windows-2025120 121 env:122 OPENBLAS_VERSION: 0.3.23123 SDE_VERSION: 9.33.0-2024-01-07124 VULKAN_VERSION: 1.4.357.0125 126 strategy:127 matrix:128 include:129 - build: 'x64-cpu-static'130 arch: 'x64'131 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'132 - build: 'x64-openblas'133 arch: 'x64'134 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"'135 - build: 'x64-vulkan'136 arch: 'x64'137 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'138 - build: 'arm64'139 arch: 'arm64'140 defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'141 142 steps:143 - name: Clone144 id: checkout145 uses: actions/checkout@v6146 147 - name: ccache148 uses: ggml-org/ccache-action@v1.2.21149 with:150 key: cpu-windows-2025-${{ matrix.build }}151 variant: ccache152 evict-old-files: 1d153 save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}154 155 - name: Download OpenBLAS156 id: get_openblas157 if: ${{ matrix.build == 'x64-openblas' }}158 run: |159 curl.exe -o $env:RUNNER_TEMP/openblas.zip -L "https://github.com/xianyi/OpenBLAS/releases/download/v${env:OPENBLAS_VERSION}/OpenBLAS-${env:OPENBLAS_VERSION}-x64.zip"160 curl.exe -o $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt -L "https://github.com/xianyi/OpenBLAS/raw/v${env:OPENBLAS_VERSION}/LICENSE"161 mkdir $env:RUNNER_TEMP/openblas162 tar.exe -xvf $env:RUNNER_TEMP/openblas.zip -C $env:RUNNER_TEMP/openblas163 $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)164 $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim()))165 $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe')166 & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll167 168 - name: Install Vulkan SDK169 id: get_vulkan170 if: ${{ matrix.build == 'x64-vulkan' }}171 run: |172 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"173 & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install174 Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"175 Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"176 177 - name: Install Ninja178 id: install_ninja179 run: |180 choco install ninja181 182 - name: Build183 id: cmake_build184 run: |185 cmake -S . -B build ${{ matrix.defines }} `186 -DLLAMA_BUILD_BORINGSSL=ON187 cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}188 189 - name: Add libopenblas.dll190 id: add_libopenblas_dll191 if: ${{ matrix.build == 'x64-openblas' }}192 run: |193 cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll194 cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt195 196 - name: Test197 id: cmake_test198 if: ${{ matrix.arch == 'x64' }}199 run: |200 cd build201 ctest -L main -C Release --verbose --timeout 900202 203 # TODO: disabled for now, consider adding tests for all CPU variants instead204 # - name: Test (Intel SDE)205 # id: cmake_test_sde206 # if: ${{ matrix.build == 'avx512-x64' && env.HAS_AVX512F == '0' }} # use Intel SDE for AVX-512 emulation207 # run: |208 # curl.exe -o $env:RUNNER_TEMP/sde.tar.xz -L "https://downloadmirror.intel.com/813591/sde-external-${env:SDE_VERSION}-win.tar.xz"209 # # for some weird reason windows tar doesn't like sde tar.xz210 # 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar.xz211 # 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar212 # $sde = $(join-path $env:RUNNER_TEMP sde-external-${env:SDE_VERSION}-win/sde.exe)213 # cd build214 # $env:LLAMA_SKIP_TESTS_SLOW_ON_EMULATOR = 1215 # & $sde -future -- ctest -L main -C Release --verbose --timeout 900216 