Skip to content

Commit 40f4787

Browse files
committed
Merge branch 'master' of github.com:ggerganov/llama.cpp into mfalcon_mamba_cuda
2 parents b423a6d + a77feb5 commit 40f4787

11 files changed

+6058
-6422
lines changed

.devops/llama-server-cuda.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ ENV CUDA_DOCKER_ARCH=${CUDA_DOCKER_ARCH}
2424
ENV GGML_CUDA=1
2525
# Enable cURL
2626
ENV LLAMA_CURL=1
27+
# Must be set to 0.0.0.0 so it can listen to requests from host machine
28+
ENV LLAMA_ARG_HOST=0.0.0.0
2729

2830
RUN make -j$(nproc) llama-server
2931

.devops/llama-server-intel.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ RUN apt-get update && \
2626
COPY --from=build /app/build/bin/llama-server /llama-server
2727

2828
ENV LC_ALL=C.utf8
29+
# Must be set to 0.0.0.0 so it can listen to requests from host machine
30+
ENV LLAMA_ARG_HOST=0.0.0.0
2931

3032
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
3133

.devops/llama-server-rocm.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ ENV GPU_TARGETS=${ROCM_DOCKER_ARCH}
3939
ENV GGML_HIPBLAS=1
4040
ENV CC=/opt/rocm/llvm/bin/clang
4141
ENV CXX=/opt/rocm/llvm/bin/clang++
42+
# Must be set to 0.0.0.0 so it can listen to requests from host machine
43+
ENV LLAMA_ARG_HOST=0.0.0.0
4244

4345
# Enable cURL
4446
ENV LLAMA_CURL=1

.devops/llama-server-vulkan.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ RUN cp /app/build/bin/llama-server /llama-server && \
2323
rm -rf /app
2424

2525
ENV LC_ALL=C.utf8
26+
# Must be set to 0.0.0.0 so it can listen to requests from host machine
27+
ENV LLAMA_ARG_HOST=0.0.0.0
2628

2729
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
2830

.devops/llama-server.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ RUN apt-get update && \
2121
COPY --from=build /app/llama-server /llama-server
2222

2323
ENV LC_ALL=C.utf8
24+
# Must be set to 0.0.0.0 so it can listen to requests from host machine
25+
ENV LLAMA_ARG_HOST=0.0.0.0
2426

2527
HEALTHCHECK CMD [ "curl", "-f", "http://localhost:8080/health" ]
2628

.ecrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Exclude": ["^\\.gitmodules$"],
2+
"Exclude": ["^\\.gitmodules$", "stb_image\\.h"],
33
"Disable": {
44
"IndentSize": true
55
}

common/common.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ bool gpt_params_parse_ex(int argc, char ** argv, gpt_params & params) {
327327
void gpt_params_parse_from_env(gpt_params & params) {
328328
// we only care about server-related params for now
329329
get_env("LLAMA_ARG_MODEL", params.model);
330+
get_env("LLAMA_ARG_MODEL_URL", params.model_url);
331+
get_env("LLAMA_ARG_MODEL_ALIAS", params.model_alias);
332+
get_env("LLAMA_ARG_HF_REPO", params.hf_repo);
333+
get_env("LLAMA_ARG_HF_FILE", params.hf_file);
330334
get_env("LLAMA_ARG_THREADS", params.n_threads);
331335
get_env("LLAMA_ARG_CTX_SIZE", params.n_ctx);
332336
get_env("LLAMA_ARG_N_PARALLEL", params.n_parallel);
@@ -341,6 +345,9 @@ void gpt_params_parse_from_env(gpt_params & params) {
341345
get_env("LLAMA_ARG_EMBEDDINGS", params.embedding);
342346
get_env("LLAMA_ARG_FLASH_ATTN", params.flash_attn);
343347
get_env("LLAMA_ARG_DEFRAG_THOLD", params.defrag_thold);
348+
get_env("LLAMA_ARG_CONT_BATCHING", params.cont_batching);
349+
get_env("LLAMA_ARG_HOST", params.hostname);
350+
get_env("LLAMA_ARG_PORT", params.port);
344351
}
345352

346353
bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {

0 commit comments

Comments
 (0)