Skip to content

Commit

Permalink
Build with RHEL 8 / c8s ABI
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Heimes <[email protected]>
  • Loading branch information
tiran committed May 15, 2024
1 parent f24f85e commit 8ed18f8
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 21 deletions.
60 changes: 40 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,33 @@ jobs:
run: make quantize

- name: file info
run: file build/quantize*
run: file build/quantize-arm64-darwin

- name: test quantize
run: |
build/quantize-arm64-darwin \
llama.cpp/models/ggml-vocab-llama.gguf \
/tmp/ggml-vocab-Q4_K_M.gguf \
Q4_K_M
- uses: actions/upload-artifact@v4
with:
name: "quantize-macos-arm64"
path: build/quantize*
name: "quantize-arm64-darwin"
path: build/quantize-arm64-darwin

linux-build:
name: "Build quantize on Linux for ${{ matrix.arch }}"
runs-on: "ubuntu-latest"
strategy:
fail-fast: true
matrix:
arch:
- "amd64"
- "arm64"
# - "ppc64le"
# - "s390x"
image:
- registry.access.redhat.com/ubi9/python-312
include:
- arch: "amd64"
suffix: "x86_64-linux"
image: quay.io/sclorg/python-312-c8s:c8s
- arch: "arm64"
suffix: "aarch64-linux"
image: quay.io/sclorg/python-312-c8s:c8s
steps:
- uses: "actions/checkout@v4"
with:
Expand All @@ -70,21 +77,34 @@ jobs:
- name: make build/quantize from llama.cpp sources
run: |
set -e
docker run --platform linux/${{ matrix.arch }} ${{ matrix.image }} uname -a
docker run --platform linux/${{ matrix.arch }} \
-v .:/opt/app-root/src \
-e CMAKE_ARGS="-DLLAMA_FATAL_WARNINGS=ON" \
${{ matrix.image }} \
make quantize
set -e
docker run --platform linux/${{ matrix.arch }} ${{ matrix.image }} uname -a
docker run --platform linux/${{ matrix.arch }} \
-v .:/opt/app-root/src \
-e CMAKE_ARGS="-DLLAMA_FATAL_WARNINGS=ON" \
${{ matrix.image }} \
make quantize
- name: file info
run: file build/quantize*
run: file build/quantize-${{ matrix.suffix }}

- name: file symbols
run: nm -a build/quantize-${{ matrix.suffix }} | grep -o "GLIBC.*" | sort -u

- name: test quantize
run: |
docker run --platform linux/${{ matrix.arch }} \
-v .:/opt/app-root/src \
${{ matrix.image }} \
build/quantize-${{ matrix.suffix }} \
llama.cpp/models/ggml-vocab-llama.gguf \
/tmp/ggml-vocab-Q4_K_M.gguf \
Q4_K_M
- uses: actions/upload-artifact@v4
with:
name: "quantize-linux-${{ matrix.arch }}"
path: build/quantize*
name: "quantize-${{ matrix.suffix }}"
path: build/quantize-${{ matrix.suffix }}

merge-artifacts:
name: Merge artifacts
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# instructlab-quantize

llama.cpp's [`quantize`](https://github.com/ggerganov/llama.cpp/blob/master/examples/quantize/quantize.cpp)
binary for [InstructLab](https://github.com/instructlab/instructlab) on macOS ARM64.
binary for [InstructLab](https://github.com/instructlab/instructlab).

- macOS ARM64
- Linux x86_64 glibc with RHEL 8 ABI (`GLIBCXX_3.4.22`, `GLIBC_2.27`)
- Linux aarch64 glibc with RHEL 8 ABI (`GLIBCXX_3.4.22`, `GLIBC_2.27`)


`quantize` program was written by 'the ggml authors' for `llama.cpp`. License:

Expand Down
Binary file modified src/instructlab_quantize/quantize-aarch64-linux
Binary file not shown.
Binary file modified src/instructlab_quantize/quantize-x86_64-linux
Binary file not shown.

0 comments on commit 8ed18f8

Please sign in to comment.