Skip to content

Commit 56267b6

Browse files
authored
Merge branch 'ggml-org:master' into mradermacher
2 parents 98f54e8 + 72b24d9 commit 56267b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3679
-1569
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

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,6 @@ poetry.toml
149149
/run-chat.sh
150150
.ccache/
151151

152-
# Code Workspace
152+
# IDE
153153
*.code-workspace
154-
154+
.windsurf/

.windsurf/rules/css-architecture.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.windsurf/rules/sveltekit-architecture.md

Lines changed: 0 additions & 48 deletions
This file was deleted.

.windsurf/rules/tests.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.windsurf/rules/typescript-architecture.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
/ggml/src/ggml-metal/ @ggerganov
6262
/ggml/src/ggml-opt.cpp @JohannesGaessler
6363
/ggml/src/ggml-quants.* @ggerganov
64+
/ggml/src/ggml-rpc/ @rgerganov
6465
/ggml/src/ggml-threading.* @ggerganov @slaren
6566
/ggml/src/ggml-vulkan/ @0cc4m
6667
/ggml/src/ggml-zdnn/ @taronaeo @Andreas-Krebbel @AlekseiNikiforovIBM
@@ -89,6 +90,7 @@
8990
/tools/mtmd/ @ngxson
9091
/tools/perplexity/ @ggerganov
9192
/tools/quantize/ @ggerganov
93+
/tools/rpc/ @rgerganov
9294
/tools/run/ @ericcurtin
9395
/tools/server/* @ngxson @ggerganov @ericcurtin # no subdir
9496
/tools/server/webui/ @allozaur

common/CMakeLists.txt

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,39 @@ if (LLAMA_CURL)
8787
target_compile_definitions(${TARGET} PUBLIC LLAMA_USE_CURL)
8888
include_directories(${CURL_INCLUDE_DIRS})
8989
set(LLAMA_COMMON_EXTRA_LIBS ${LLAMA_COMMON_EXTRA_LIBS} ${CURL_LIBRARIES})
90-
endif ()
90+
else()
91+
find_package(OpenSSL)
92+
if (OpenSSL_FOUND)
93+
include(CheckCSourceCompiles)
94+
set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
95+
check_c_source_compiles("
96+
#include <openssl/opensslv.h>
97+
#if defined(OPENSSL_IS_BORINGSSL) || defined(LIBRESSL_VERSION_NUMBER)
98+
# if OPENSSL_VERSION_NUMBER < 0x1010107f
99+
# error bad version
100+
# endif
101+
#else
102+
# if OPENSSL_VERSION_NUMBER < 0x30000000L
103+
# error bad version
104+
# endif
105+
#endif
106+
int main() { return 0; }
107+
" OPENSSL_VERSION_SUPPORTED)
108+
if (OPENSSL_VERSION_SUPPORTED)
109+
message(STATUS "OpenSSL found: ${OPENSSL_VERSION}")
110+
target_compile_definitions(${TARGET} PUBLIC CPPHTTPLIB_OPENSSL_SUPPORT)
111+
target_link_libraries(${TARGET} PUBLIC OpenSSL::SSL OpenSSL::Crypto)
112+
if (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
113+
target_compile_definitions(${TARGET} PUBLIC CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN)
114+
find_library(CORE_FOUNDATION_FRAMEWORK CoreFoundation REQUIRED)
115+
find_library(SECURITY_FRAMEWORK Security REQUIRED)
116+
target_link_libraries(${TARGET} PUBLIC ${CORE_FOUNDATION_FRAMEWORK} ${SECURITY_FRAMEWORK})
117+
endif()
118+
endif()
119+
else()
120+
message(STATUS "OpenSSL not found, SSL support disabled")
121+
endif()
122+
endif()
91123

92124
if (LLAMA_LLGUIDANCE)
93125
include(ExternalProject)

0 commit comments

Comments
 (0)