Skip to content

Commit 624207e

Browse files
taronaeoAlekseiNikiforovIBMCISC
authored
devops: add s390x & ppc64le CI (#15925)
* devops: move s390x and ppc64le ci build we have access to ubuntu-24.04-s390x and ppc64le images now Signed-off-by: Aaron Teo <[email protected]> * devops: disable ppc64le for now since they have compiler errors Signed-off-by: Aaron Teo <[email protected]> * devops: stop warnings as errors Signed-off-by: Aaron Teo <[email protected]> * devops: switch to non-macro flag Signed-off-by: Aaron Teo <[email protected]> * devops: going the llama macro route Signed-off-by: Aaron Teo <[email protected]> * devops: add big-endian gguf test models Signed-off-by: Aaron Teo <[email protected]> * devops: disable ppc64le to test s390x, check test build Signed-off-by: Aaron Teo <[email protected]> * devops: dup .gguf.inp files for big-endian tests Signed-off-by: Aaron Teo <[email protected]> * devops: dup .gguf.out files for big-endian too Signed-off-by: Aaron Teo <[email protected]> * devops: add python setup and endian byteswap Signed-off-by: Aaron Teo <[email protected]> * devops: pooring thing does not have s390x python3 Signed-off-by: Aaron Teo <[email protected]> * devops: add missing rust compiler for s390x Signed-off-by: Aaron Teo <[email protected]> * devops: try rust actions runner Signed-off-by: Aaron Teo <[email protected]> * Revert "devops: try rust actions runner" This reverts commit 3f8db04. Signed-off-by: Aaron Teo <[email protected]> * devops: try a different path for rust Signed-off-by: Aaron Teo <[email protected]> * devops: dump home directory and user info Signed-off-by: Aaron Teo <[email protected]> * devops: install gguf-py only Signed-off-by: Aaron Teo <[email protected]> * devops: missed relative path Signed-off-by: Aaron Teo <[email protected]> * devops: remove big-endian files since local swapping is working Signed-off-by: Aaron Teo <[email protected]> * devops: revert test-tokenizer-0 cmakelists Signed-off-by: Aaron Teo <[email protected]> * Fix unicode flags conversion from and to uint16_t Bitfields are allocated in different order on s390x Signed-off-by: Aaron Teo <[email protected]> * Simplify byteswap command Signed-off-by: Aaron Teo <[email protected]> * Add byteswapping and git-lfs for test-tokenizers-ggml-vocabs Signed-off-by: Aaron Teo <[email protected]> * Fix endianness detection in vocab loader Signed-off-by: Aaron Teo <[email protected]> * Disable test-thread-safety on s390x In this test a model is downloaded, then immediately loaded to check if more downloads are needed, and then used for test. There is no clean way to separate all those steps to add byteswapping between them, so just skip this test. Signed-off-by: Aaron Teo <[email protected]> * Fix q8_0 test in test-quantize-fns vec_signed uses unexpected rounding mode. Explicitly use different rounding function. Signed-off-by: Aaron Teo <[email protected]> * devops: add big-endian stories260K Signed-off-by: Aaron Teo <[email protected]> * devops: add s390x test-eval-callback Signed-off-by: Aaron Teo <[email protected]> * devops: fix test does not exist Signed-off-by: Aaron Teo <[email protected]> * devops: fix model not found llama-eval-callback Signed-off-by: Aaron Teo <[email protected]> * Fix q3_K dot product error in test-quantize-fns on s390x Array q8bytes had only 4 elements allocated, but 8 elements accessed. This lead to write out of bounds and later read of overwritten values out of bounds and incorrect result. Signed-off-by: Aaron Teo <[email protected]> * devops: re-enable ppc64le for testing Signed-off-by: Aaron Teo <[email protected]> * devops: activate test-thread-safety for s390x Signed-off-by: Aaron Teo <[email protected]> * devops: disable ppc64le tests for some reason it keeps failing test-thread-safety tests and I do not have a machine that is able to replicate the tests. Signed-off-by: Aaron Teo <[email protected]> * devops: LLAMA_FATAL_WARNINGS=ON Signed-off-by: Aaron Teo <[email protected]> * Correct repository URL for s390x for test-thread-safety model Signed-off-by: Aaron Teo <[email protected]> * Fix fs_get_cache_directory Ensure it works even if both XDG_CACHE_HOME and HOME are unset. This might happen in containers. Signed-off-by: Aaron Teo <[email protected]> * Re-enable CI for ppc64le Signed-off-by: Aaron Teo <[email protected]> * Fortify ggml_rope_impl Only memcpy data from sections argument if it's non-NULL. Signed-off-by: Aaron Teo <[email protected]> * Add TODO in struct unicode_cpt_flags to reimplement it in endian-independent way * Update URL for big-endian model * Update .github/workflows/build.yml Co-authored-by: Sigbjørn Skjæret <[email protected]> * Update remaining mentions of BE models to ggml-org/models repo --------- Signed-off-by: Aaron Teo <[email protected]> Co-authored-by: Aleksei Nikiforov <[email protected]> Co-authored-by: Aleksei Nikiforov <[email protected]> Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent 807e8c6 commit 624207e

File tree

10 files changed

+121
-103
lines changed

10 files changed

+121
-103
lines changed

.github/workflows/build-linux-cross.yml

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -141,97 +141,6 @@ jobs:
141141

142142
# cmake --build build --config Release -j $(nproc)
143143

144-
ubuntu-24-ppc64el-cpu-cross:
145-
runs-on: ubuntu-24.04
146-
147-
steps:
148-
- uses: actions/checkout@v4
149-
- name: Setup PowerPC64le
150-
run: |
151-
sudo dpkg --add-architecture ppc64el
152-
153-
# Add arch-specific repositories for non-amd64 architectures
154-
cat << EOF | sudo tee /etc/apt/sources.list.d/ppc64el-ports.list
155-
deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble main universe
156-
deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble-updates main universe
157-
deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble-security main universe
158-
deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble-backports main universe
159-
EOF
160-
161-
sudo apt-get update || true ;# Prevent failure due to missing URLs.
162-
163-
sudo apt-get install -y --no-install-recommends \
164-
build-essential \
165-
gcc-14-powerpc64le-linux-gnu \
166-
g++-14-powerpc64le-linux-gnu
167-
168-
- name: Build
169-
run: |
170-
cmake -B build -DLLAMA_CURL=OFF \
171-
-DCMAKE_BUILD_TYPE=Release \
172-
-DGGML_OPENMP=OFF \
173-
-DLLAMA_BUILD_EXAMPLES=ON \
174-
-DLLAMA_BUILD_TOOLS=ON \
175-
-DLLAMA_BUILD_TESTS=OFF \
176-
-DCMAKE_SYSTEM_NAME=Linux \
177-
-DCMAKE_SYSTEM_PROCESSOR=ppc64 \
178-
-DCMAKE_C_COMPILER=powerpc64le-linux-gnu-gcc-14 \
179-
-DCMAKE_CXX_COMPILER=powerpc64le-linux-gnu-g++-14 \
180-
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
181-
-DCMAKE_FIND_ROOT_PATH=/usr/lib/powerpc64le-linux-gnu \
182-
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
183-
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
184-
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH
185-
186-
cmake --build build --config Release -j $(nproc)
187-
188-
# ubuntu-24-ppc64el-vulkan-cross:
189-
# runs-on: ubuntu-24.04
190-
191-
# steps:
192-
# - uses: actions/checkout@v4
193-
# - name: Setup PowerPC64le
194-
# run: |
195-
# sudo dpkg --add-architecture ppc64el
196-
197-
# # Add arch-specific repositories for non-amd64 architectures
198-
# cat << EOF | sudo tee /etc/apt/sources.list.d/ppc64el-ports.list
199-
# deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble main universe
200-
# deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble-updates main universe
201-
# deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble-security main universe
202-
# deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports/ noble-backports main universe
203-
# EOF
204-
205-
# sudo apt-get update || true ;# Prevent failure due to missing URLs.
206-
207-
# sudo apt-get install -y --no-install-recommends \
208-
# build-essential \
209-
# glslc \
210-
# gcc-14-powerpc64le-linux-gnu \
211-
# g++-14-powerpc64le-linux-gnu \
212-
# libvulkan-dev:ppc64el
213-
214-
# - name: Build
215-
# run: |
216-
# cmake -B build -DLLAMA_CURL=OFF \
217-
# -DCMAKE_BUILD_TYPE=Release \
218-
# -DGGML_VULKAN=ON \
219-
# -DGGML_OPENMP=OFF \
220-
# -DLLAMA_BUILD_EXAMPLES=ON \
221-
# -DLLAMA_BUILD_TOOLS=ON \
222-
# -DLLAMA_BUILD_TESTS=OFF \
223-
# -DCMAKE_SYSTEM_NAME=Linux \
224-
# -DCMAKE_SYSTEM_PROCESSOR=ppc64 \
225-
# -DCMAKE_C_COMPILER=powerpc64le-linux-gnu-gcc-14 \
226-
# -DCMAKE_CXX_COMPILER=powerpc64le-linux-gnu-g++-14 \
227-
# -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
228-
# -DCMAKE_FIND_ROOT_PATH=/usr/lib/powerpc64le-linux-gnu \
229-
# -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
230-
# -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
231-
# -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=BOTH
232-
233-
# cmake --build build --config Release -j $(nproc)
234-
235144
debian-13-loongarch64-cpu-cross:
236145
runs-on: ubuntu-24.04
237146
container: debian@sha256:653dfb9f86c3782e8369d5f7d29bb8faba1f4bff9025db46e807fa4c22903671

.github/workflows/build.yml

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ jobs:
192192
os: ubuntu-22.04
193193
- build: 'arm64'
194194
os: ubuntu-22.04-arm
195+
- build: 's390x'
196+
os: ubuntu-24.04-s390x
197+
- build: 'ppc64le'
198+
os: ubuntu-24.04-ppc64le
195199

196200
runs-on: ${{ matrix.os }}
197201

@@ -206,11 +210,28 @@ jobs:
206210
key: ubuntu-cpu-cmake
207211
evict-old-files: 1d
208212

209-
- name: Dependencies
210-
id: depends
213+
- name: Build Dependencies
214+
id: build_depends
211215
run: |
212216
sudo apt-get update
213-
sudo apt-get install build-essential libcurl4-openssl-dev
217+
sudo apt-get install -y --no-install-recommends \
218+
python3 python3-pip python3-dev \
219+
libjpeg-dev build-essential libcurl4-openssl-dev \
220+
git-lfs
221+
222+
- name: Python Dependencies
223+
id: python_depends
224+
run: |
225+
python3 -m pip install --upgrade pip
226+
pip3 install ./gguf-py
227+
228+
- name: Swap Endianness
229+
id: endianness
230+
if: ${{ matrix.build == 's390x' }}
231+
run: |
232+
for f in models/*.gguf; do
233+
echo YES | python3 gguf-py/gguf/scripts/gguf_convert_endian.py $f big
234+
done
214235
215236
- name: Build
216237
id: cmake_build
@@ -228,6 +249,7 @@ jobs:
228249
229250
- name: Test llama2c conversion
230251
id: llama2c_test
252+
if: ${{ matrix.build != 's390x' }}
231253
run: |
232254
cd build
233255
echo "Fetch tokenizer"
@@ -237,6 +259,15 @@ jobs:
237259
./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
238260
./bin/llama-cli -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
239261
262+
- name: Test llama2c (s390x)
263+
id: llama2c_test_s390x
264+
if: ${{ matrix.build == 's390x' }}
265+
run: |
266+
cd build
267+
echo "Fetch llama2c big-endian model"
268+
wget https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K-be.gguf
269+
./bin/llama-cli -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
270+
240271
ubuntu-latest-cmake-sanitizer:
241272
runs-on: ubuntu-latest
242273

common/common.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@
5151
#include <unistd.h>
5252
#endif
5353

54+
#if defined(__linux__)
55+
#include <sys/types.h>
56+
#include <pwd.h>
57+
#endif
58+
5459
#if defined(_MSC_VER)
5560
#pragma warning(disable: 4244 4267) // possible loss of data
5661
#endif
@@ -865,8 +870,20 @@ std::string fs_get_cache_directory() {
865870
#if defined(__linux__) || defined(__FreeBSD__) || defined(_AIX) || defined(__OpenBSD__)
866871
if (std::getenv("XDG_CACHE_HOME")) {
867872
cache_directory = std::getenv("XDG_CACHE_HOME");
868-
} else {
873+
} else if (std::getenv("HOME")) {
869874
cache_directory = std::getenv("HOME") + std::string("/.cache/");
875+
} else {
876+
#if defined(__linux__)
877+
/* no $HOME is defined, fallback to getpwuid */
878+
struct passwd *pw = getpwuid(getuid());
879+
if ((!pw) || (!pw->pw_dir)) {
880+
throw std::runtime_error("Failed to find $HOME directory");
881+
}
882+
883+
cache_directory = std::string(pw->pw_dir) + std::string("/.cache/");
884+
#else /* defined(__linux__) */
885+
throw std::runtime_error("Failed to find $HOME directory");
886+
#endif /* defined(__linux__) */
870887
}
871888
#elif defined(__APPLE__)
872889
cache_directory = std::getenv("HOME") + std::string("/Library/Caches/");

examples/eval-callback/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT})
55
target_compile_features(${TARGET} PRIVATE cxx_std_17)
66

77
set(TEST_TARGET test-eval-callback)
8-
add_test(NAME ${TEST_TARGET}
9-
COMMAND llama-eval-callback --hf-repo ggml-org/models --hf-file tinyllamas/stories260K.gguf --model stories260K.gguf --prompt hello --seed 42 -ngl 0)
8+
if(NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "s390x")
9+
add_test(NAME ${TEST_TARGET}
10+
COMMAND llama-eval-callback --hf-repo ggml-org/models --hf-file tinyllamas/stories260K.gguf --model stories260K.gguf --prompt hello --seed 42 -ngl 0)
11+
else()
12+
add_test(NAME ${TEST_TARGET}
13+
COMMAND llama-eval-callback --hf-repo ggml-org/models --hf-file tinyllamas/stories260K-be.gguf --model stories260K-be.gguf --prompt hello --seed 42 -ngl 0)
14+
endif()
1015
set_property(TEST ${TEST_TARGET} PROPERTY LABELS eval-callback curl)

ggml/src/ggml-cpu/arch/s390/quants.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ void quantize_row_q8_0(const float * GGML_RESTRICT x, void * GGML_RESTRICT vy, i
7575

7676
for (int j = 0; j < 8; j++) {
7777
const float32x4_t v = vec_mul(srcv[j], vec_splats(id));
78-
const int32x4_t vi = vec_signed(v);
78+
/* Uses non-default rounding for vec_signed or vec_round */
79+
const int32x4_t vi = vec_signed(__builtin_s390_vfisb(v, 4, 1));
7980

8081
y[i].qs[4*j + 0] = vec_extract(vi, 0);
8182
y[i].qs[4*j + 1] = vec_extract(vi, 1);
@@ -122,7 +123,8 @@ void quantize_row_q8_1(const float * GGML_RESTRICT x, void * GGML_RESTRICT vy, i
122123

123124
for (int j = 0; j < 8; j++) {
124125
const float32x4_t v = vec_mul(srcv[j], vec_splats(id));
125-
const int32x4_t vi = vec_signed(v);
126+
/* Uses non-default rounding for vec_signed or vec_round */
127+
const int32x4_t vi = vec_signed(__builtin_s390_vfisb(v, 4, 1));
126128

127129
y[i].qs[4*j + 0] = vec_extract(vi, 0);
128130
y[i].qs[4*j + 1] = vec_extract(vi, 1);
@@ -731,7 +733,7 @@ void ggml_vec_dot_q3_K_q8_K(int n, float * GGML_RESTRICT s, size_t bs, const voi
731733
uint8x16_t q3h[4];
732734
uint8x16_t q3b[2];
733735
int8x16_t q3bytes[4];
734-
int8x16_t q8bytes[4];
736+
int8x16_t q8bytes[8];
735737
uint8x16_t qhbits[2];
736738

737739
float sum = 0;

ggml/src/ggml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3927,7 +3927,7 @@ static struct ggml_tensor * ggml_rope_impl(
39273927
memcpy(params + 8, &attn_factor, sizeof(float));
39283928
memcpy(params + 9, &beta_fast, sizeof(float));
39293929
memcpy(params + 10, &beta_slow, sizeof(float));
3930-
if (mrope_used) {
3930+
if (mrope_used && sections) {
39313931
memcpy(params + 11, sections, sizeof(int32_t) * GGML_MROPE_SECTIONS);
39323932
} else {
39333933
memset(params + 11, 0, sizeof(int32_t) * GGML_MROPE_SECTIONS);

src/llama-vocab.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,7 @@ void llama_vocab::impl::load(llama_model_loader & ml, const LLM_KV & kv) {
17721772
const size_t n_precompiled_charsmap = gguf_get_arr_n(ctx, precompiled_charsmap_keyidx);
17731773
const char * pc = (const char *) gguf_get_arr_data(ctx, precompiled_charsmap_keyidx);
17741774
precompiled_charsmap.assign(pc, pc + n_precompiled_charsmap);
1775-
#ifdef IS_BIG_ENDIAN
1775+
#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
17761776
// correct endiannes of data in precompiled_charsmap binary blob
17771777
uint32_t * xcda_blob_size = (uint32_t *) &precompiled_charsmap[0];
17781778
*xcda_blob_size = __builtin_bswap32(*xcda_blob_size);

src/unicode.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <string>
55
#include <vector>
66

7+
// TODO: reimplement this structure in endian-independent way
78
struct unicode_cpt_flags {
89
enum {
910
UNDEFINED = 0x0001,
@@ -15,6 +16,10 @@ struct unicode_cpt_flags {
1516
SYMBOL = 0x0040, // regex: \p{S}
1617
CONTROL = 0x0080, // regex: \p{C}
1718
MASK_CATEGORIES = 0x00FF,
19+
WHITESPACE = 0x0100,
20+
LOWERCASE = 0x0200,
21+
UPPERCASE = 0x0400,
22+
NFD = 0x0800,
1823
};
1924

2025
// codepoint type
@@ -34,11 +39,49 @@ struct unicode_cpt_flags {
3439

3540
// decode from uint16
3641
inline unicode_cpt_flags(const uint16_t flags = 0) {
42+
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
3743
*reinterpret_cast<uint16_t*>(this) = flags;
44+
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
45+
is_undefined = (flags & UNDEFINED) ? 1 : 0;
46+
is_number = (flags & NUMBER) ? 1 : 0;
47+
is_letter = (flags & LETTER) ? 1 : 0;
48+
is_separator = (flags & SEPARATOR) ? 1 : 0;
49+
is_accent_mark = (flags & ACCENT_MARK) ? 1 : 0;
50+
is_punctuation = (flags & PUNCTUATION) ? 1 : 0;
51+
is_symbol = (flags & SYMBOL) ? 1 : 0;
52+
is_control = (flags & CONTROL) ? 1 : 0;
53+
is_whitespace = (flags & WHITESPACE) ? 1 : 0;
54+
is_lowercase = (flags & LOWERCASE) ? 1 : 0;
55+
is_uppercase = (flags & UPPERCASE) ? 1 : 0;
56+
is_nfd = (flags & NFD) ? 1 : 0;
57+
#else
58+
#error Unexpected or undefined __BYTE_ORDER__
59+
#endif
3860
}
3961

4062
inline uint16_t as_uint() const {
63+
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
4164
return *reinterpret_cast<const uint16_t*>(this);
65+
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
66+
uint16_t result =
67+
is_undefined * UNDEFINED
68+
+ is_number * NUMBER
69+
+ is_letter * LETTER
70+
+ is_separator * SEPARATOR
71+
+ is_accent_mark * ACCENT_MARK
72+
+ is_punctuation * PUNCTUATION
73+
+ is_symbol * SYMBOL
74+
+ is_control * CONTROL
75+
+ is_whitespace * WHITESPACE
76+
+ is_lowercase * LOWERCASE
77+
+ is_uppercase * UPPERCASE
78+
+ is_nfd * NFD
79+
;
80+
81+
return result;
82+
#else
83+
#error Unexpected or undefined __BYTE_ORDER__
84+
#endif
4285
}
4386

4487
inline uint16_t category_flag() const {

tests/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,11 @@ llama_build_and_test(test-json-partial.cpp)
185185
llama_build_and_test(test-log.cpp)
186186
llama_build_and_test(test-regex-partial.cpp)
187187

188-
llama_build_and_test(test-thread-safety.cpp ARGS -hf ggml-org/models -hff tinyllamas/stories15M-q4_0.gguf -ngl 99 -p "The meaning of life is" -n 128 -c 256 -ub 32 -np 4 -t 2)
188+
if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "s390x")
189+
llama_build_and_test(test-thread-safety.cpp ARGS -hf ggml-org/models -hff tinyllamas/stories15M-q4_0.gguf -ngl 99 -p "The meaning of life is" -n 128 -c 256 -ub 32 -np 4 -t 2)
190+
else()
191+
llama_build_and_test(test-thread-safety.cpp ARGS -hf ggml-org/models -hff tinyllamas/stories15M-be.Q4_0.gguf -ngl 99 -p "The meaning of life is" -n 128 -c 256 -ub 32 -np 4 -t 2)
192+
endif()
189193

190194
# this fails on windows (github hosted runner) due to curl DLL not found (exit code 0xc0000135)
191195
if (NOT WIN32)

tests/test-tokenizers-repo.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ if [ -d $folder ] && [ -d $folder/.git ]; then
2323
(cd $folder; git pull)
2424
else
2525
git clone $repo $folder
26+
27+
# byteswap models if on big endian
28+
if [ "$(uname -m)" = s390x ]; then
29+
for f in $folder/*/*.gguf; do
30+
echo YES | python3 "$(dirname $0)/../gguf-py/gguf/scripts/gguf_convert_endian.py" $f big
31+
done
32+
fi
2633
fi
2734

2835
shopt -s globstar

0 commit comments

Comments
 (0)