char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
be2c6d7d1
char/aliceai-t5-moe
1name : CI (ibm) 2 3on : 4workflow_dispatch : # allows manual triggering 5push : 6branches : 7- master 8paths : [ 9'.github/workflows/build-ibm.yml' , 10'**/CMakeLists.txt' , 11'**/.cmake' , 12'**/*.h' , 13'**/*.hpp' , 14'**/*.c' , 15'**/*.cpp' 16] 17 18pull_request : 19types : [ opened , synchronize , reopened ] 20paths : [ 21'.github/workflows/build-ibm.yml' , 22'ggml/src/ggml-cpu/**' 23] 24 25concurrency : 26group : ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }} 27cancel-in-progress : true 28 29env : 30GGML_NLOOP : 3 31GGML_N_THREADS : 1 32LLAMA_ARG_LOG_COLORS : 1 33LLAMA_ARG_LOG_PREFIX : 1 34LLAMA_ARG_LOG_TIMESTAMPS : 1 35 36jobs : 37ubuntu-24-s390x : 38name : ubuntu-24-s390x (VXE ${{ matrix.vxe }}) 39runs-on : ubuntu-24.04-s390x 40 41strategy : 42fail-fast : false 43matrix : 44vxe : [ "ON" , "OFF" ] # `-DGGML_VXE=ON/OFF` 45 46steps : 47- name : Clone 48id : checkout 49uses : actions/checkout@v6 50 51- name : Build Dependencies 52id : build_depends 53run : | 54sudo apt-get update 55sudo apt-get install -y --no-install-recommends \ 56python3 python3-pip python3-dev python3-wheel \ 57libjpeg-dev build-essential libssl-dev \ 58git-lfs 59 60- name : Toolchain workaround (GCC 14) 61run : | 62sudo apt-get install -y gcc-14 g++-14 63echo "CC=gcc-14" >> "$GITHUB_ENV" 64echo "CXX=g++-14" >> "$GITHUB_ENV" 65 66- name : Python Dependencies 67id : python_depends 68run : | 69export PIP_BREAK_SYSTEM_PACKAGES="1" 70python3 -m pip install --upgrade pip setuptools 71pip3 install ./gguf-py 72 73- name : Swap Endianness 74id : endianness 75run : | 76for f in models/*.gguf; do 77echo YES | python3 gguf-py/gguf/scripts/gguf_convert_endian.py $f big 78done 79 80- name : Build 81id : cmake_build 82run : | 83cmake -B build \ 84-DLLAMA_FATAL_WARNINGS=ON \ 85-DGGML_RPC=ON \ 86-DGGML_VXE=${{ matrix.vxe }} 87time cmake --build build --config Release -j $(nproc) 88 89- name : Test 90id : cmake_test 91run : | 92cd build 93ctest -L main --verbose --timeout 900 94 95- name : Test llama2c (s390x) 96id : llama2c_test_s390x 97run : | 98cd build 99echo "Fetch llama2c big-endian model" 100wget https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K-be.gguf 101./bin/llama-completion -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256 102 103ubuntu-24-ppc64le : 104runs-on : ubuntu-24.04-ppc64le 105 106steps : 107- name : Clone 108id : checkout 109uses : actions/checkout@v6 110 111- name : Build Dependencies 112id : build_depends 113run : | 114sudo apt-get update 115sudo apt-get install -y --no-install-recommends \ 116python3 python3-pip python3-dev python3-wheel \ 117libjpeg-dev build-essential libssl-dev \ 118git-lfs 119 120- name : Toolchain workaround (GCC 14) 121run : | 122sudo apt-get install -y gcc-14 g++-14 123echo "CC=gcc-14" >> "$GITHUB_ENV" 124echo "CXX=g++-14" >> "$GITHUB_ENV" 125 126- name : Python Dependencies 127id : python_depends 128run : | 129export PIP_BREAK_SYSTEM_PACKAGES="1" 130python3 -m pip install --upgrade pip setuptools 131pip3 install ./gguf-py 132 133- name : Build 134id : cmake_build 135run : | 136cmake -B build \ 137-DLLAMA_FATAL_WARNINGS=ON \ 138-DGGML_RPC=ON 139time cmake --build build --config Release -j $(nproc) 140 141- name : Test 142id : cmake_test 143run : | 144cd build 145ctest -L main --verbose --timeout 900 146 147- name : Test llama2c conversion 148id : llama2c_test 149run : | 150 cd build 151 echo "Fetch tokenizer" 152 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/tok512.bin 153 echo "Fetch llama2c model" 154 wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin 155 ./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf 156 ./bin/llama-completion -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256