Skip to content

Commit 678deeb

Browse files
Merge remote-tracking branch 'upstream/master'
2 parents e0ec788 + 510b5c2 commit 678deeb

97 files changed

Lines changed: 1572 additions & 1351 deletions

File tree

Some content is hidden

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

.devops/cann.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ RUN mkdir -p /app/lib && \
5858
RUN mkdir -p /app/full && \
5959
cp build/bin/* /app/full/ && \
6060
cp *.py /app/full/ && \
61+
cp -r conversion /app/full/ && \
6162
cp -r gguf-py /app/full/ && \
6263
cp -r requirements /app/full/ && \
6364
cp requirements.txt /app/full/

.devops/cpu.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN mkdir -p /app/lib && \
3030
RUN mkdir -p /app/full \
3131
&& cp build/bin/* /app/full \
3232
&& cp *.py /app/full \
33+
&& cp -r conversion /app/full \
3334
&& cp -r gguf-py /app/full \
3435
&& cp -r requirements /app/full \
3536
&& cp requirements.txt /app/full \

.devops/cuda.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ RUN mkdir -p /app/lib && \
3636
RUN mkdir -p /app/full \
3737
&& cp build/bin/* /app/full \
3838
&& cp *.py /app/full \
39+
&& cp -r conversion /app/full \
3940
&& cp -r gguf-py /app/full \
4041
&& cp -r requirements /app/full \
4142
&& cp requirements.txt /app/full \

.devops/intel.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ RUN mkdir -p /app/lib && \
3636
RUN mkdir -p /app/full \
3737
&& cp build/bin/* /app/full \
3838
&& cp *.py /app/full \
39+
&& cp -r conversion /app/full \
3940
&& cp -r gguf-py /app/full \
4041
&& cp -r requirements /app/full \
4142
&& cp requirements.txt /app/full \

.devops/musa.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ RUN mkdir -p /app/lib && \
4141
RUN mkdir -p /app/full \
4242
&& cp build/bin/* /app/full \
4343
&& cp *.py /app/full \
44+
&& cp -r conversion /app/full \
4445
&& cp -r gguf-py /app/full \
4546
&& cp -r requirements /app/full \
4647
&& cp requirements.txt /app/full \

.devops/openvino.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ RUN mkdir -p /app/lib && \
8181
RUN mkdir -p /app/full \
8282
&& cp build/ReleaseOV/bin/* /app/full/ \
8383
&& cp *.py /app/full \
84+
&& cp -r conversion /app/full \
8485
&& cp -r gguf-py /app/full \
8586
&& cp -r requirements /app/full \
8687
&& cp requirements.txt /app/full \

.devops/rocm.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ RUN mkdir -p /app/lib \
5353
RUN mkdir -p /app/full \
5454
&& cp build/bin/* /app/full \
5555
&& cp *.py /app/full \
56+
&& cp -r conversion /app/full \
5657
&& cp -r gguf-py /app/full \
5758
&& cp -r requirements /app/full \
5859
&& cp requirements.txt /app/full \

.devops/s390x.Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ RUN --mount=type=cache,target=/root/.ccache \
3737

3838
COPY *.py /opt/llama.cpp/bin
3939
COPY .devops/tools.sh /opt/llama.cpp/bin
40+
COPY conversion /opt/llama.cpp/conversion
4041

4142
COPY gguf-py /opt/llama.cpp/gguf-py
4243
COPY requirements.txt /opt/llama.cpp/gguf-py
@@ -47,9 +48,10 @@ COPY requirements /opt/llama.cpp/gguf-py/requirements
4748
FROM scratch AS collector
4849

4950
# Copy llama.cpp binaries and libraries
50-
COPY --from=build /opt/llama.cpp/bin /llama.cpp/bin
51-
COPY --from=build /opt/llama.cpp/lib /llama.cpp/lib
52-
COPY --from=build /opt/llama.cpp/gguf-py /llama.cpp/gguf-py
51+
COPY --from=build /opt/llama.cpp/bin /llama.cpp/bin
52+
COPY --from=build /opt/llama.cpp/lib /llama.cpp/lib
53+
COPY --from=build /opt/llama.cpp/gguf-py /llama.cpp/gguf-py
54+
COPY --from=build /opt/llama.cpp/conversion /llama.cpp/conversion
5355

5456

5557
### Base image
@@ -107,6 +109,7 @@ RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
107109

108110
COPY --from=collector /llama.cpp/bin /app
109111
COPY --from=collector /llama.cpp/gguf-py /app/gguf-py
112+
COPY --from=collector /llama.cpp/conversion /app/conversion
110113

111114
RUN pip install --no-cache-dir --break-system-packages \
112115
-r /app/gguf-py/requirements.txt

.devops/vulkan.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ RUN mkdir -p /app/lib && \
2626
RUN mkdir -p /app/full \
2727
&& cp build/bin/* /app/full \
2828
&& cp *.py /app/full \
29+
&& cp -r conversion /app/full \
2930
&& cp -r gguf-py /app/full \
3031
&& cp -r requirements /app/full \
3132
&& cp requirements.txt /app/full \

CMakeLists.txt

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ option(LLAMA_SANITIZE_UNDEFINED "llama: enable undefined sanitizer" OFF)
104104
option(LLAMA_BUILD_COMMON "llama: build common utils library" ${LLAMA_STANDALONE})
105105

106106
# extra artifacts
107-
option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE})
108-
option(LLAMA_BUILD_TOOLS "llama: build tools" ${LLAMA_STANDALONE})
109-
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
110-
option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
111-
option(LLAMA_BUILD_UI "llama: build the embedded Web UI for server" ON)
112-
option(LLAMA_USE_PREBUILT_UI "llama: use prebuilt UI from HF Bucket when available (requires LLAMA_BUILD_UI=ON)" ON)
107+
option(LLAMA_BUILD_TESTS "llama: build tests" ${LLAMA_STANDALONE})
108+
option(LLAMA_BUILD_TOOLS "llama: build tools" ${LLAMA_STANDALONE})
109+
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
110+
option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
111+
option(LLAMA_BUILD_APP "llama: build the unified binary" OFF)
112+
option(LLAMA_BUILD_UI "llama: build the embedded Web UI for server" ON)
113+
option(LLAMA_USE_PREBUILT_UI "llama: use prebuilt UI from HF Bucket when available (requires LLAMA_BUILD_UI=ON)" ON)
113114

114115
# Backward compat: when old var is set but new one isn't, forward the value
115116
if(DEFINED LLAMA_BUILD_WEBUI)
@@ -120,8 +121,9 @@ if(DEFINED LLAMA_USE_PREBUILT_WEBUI)
120121
set(LLAMA_USE_PREBUILT_UI ${LLAMA_USE_PREBUILT_WEBUI})
121122
message(DEPRECATION "LLAMA_USE_PREBUILT_WEBUI is deprecated, use LLAMA_USE_PREBUILT_UI instead")
122123
endif()
123-
option(LLAMA_TOOLS_INSTALL "llama: install tools" ${LLAMA_TOOLS_INSTALL_DEFAULT})
124-
option(LLAMA_TESTS_INSTALL "llama: install tests" ON)
124+
125+
option(LLAMA_TOOLS_INSTALL "llama: install tools" ${LLAMA_TOOLS_INSTALL_DEFAULT})
126+
option(LLAMA_TESTS_INSTALL "llama: install tests" ON)
125127

126128
# 3rd party libs
127129
option(LLAMA_OPENSSL "llama: use openssl to support HTTPS" ON)
@@ -226,6 +228,10 @@ if (LLAMA_BUILD_COMMON AND LLAMA_BUILD_TOOLS)
226228
add_subdirectory(tools)
227229
endif()
228230

231+
if (LLAMA_BUILD_APP)
232+
add_subdirectory(app)
233+
endif()
234+
229235
# Automatically add all files from the 'licenses' directory
230236
file(GLOB EXTRA_LICENSES "${CMAKE_SOURCE_DIR}/licenses/LICENSE-*")
231237

0 commit comments

Comments
 (0)