File tree Expand file tree Collapse file tree 8 files changed +24
-12
lines changed Expand file tree Collapse file tree 8 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ 0.2.85]
11
+
12
+ - feat: Update llama.cpp to ggerganov/llama.cpp@398ede5efeb07b9adf9fbda7ea63f630d476a792
13
+ - fix: Missing LoRA adapter after API change by @shamitv in #1630
14
+ - fix(docker): Update Dockerfile BLAS options by @olivierdebauche in #1632
15
+ - fix(docker): Fix GGML_CUDA param by @olivierdebauche in #1633
16
+ - fix(docker): Update Dockerfile build options from ` LLAMA_ ` to ` GGML_ ` by @olivierdebauche in #1634
17
+ - feat: FreeBSD compatibility by @yurivict in #1635
18
+
10
19
## [ 0.2.84]
11
20
12
21
- feat: Update llama.cpp to ggerganov/llama.cpp@4730faca618ff9cee0780580145e3cbe86f24876
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ COPY . .
15
15
16
16
# setting build related env vars
17
17
ENV CUDA_DOCKER_ARCH=all
18
- ENV LLAMA_CUBLAS =1
18
+ ENV GGML_CUDA =1
19
19
20
20
# Install depencencies
21
21
RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette pydantic-settings starlette-context
22
22
23
23
# Install llama-cpp-python (build with cuda)
24
- RUN CMAKE_ARGS="-DLLAMA_CUBLAS =on" pip install llama-cpp-python
24
+ RUN CMAKE_ARGS="-DGGML_CUDA =on" pip install llama-cpp-python
25
25
26
26
# Run the server
27
27
CMD python3 -m llama_cpp.server
Original file line number Diff line number Diff line change @@ -20,13 +20,13 @@ RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fa
20
20
21
21
# Perform the conditional installations based on the image
22
22
RUN echo "Image: ${IMAGE}" && \
23
- if [ "${IMAGE}" = "python:3-slim-bullseye " ] ; then \
23
+ if [ "${IMAGE}" = "python:3-slim-bookworm " ] ; then \
24
24
echo "OpenBLAS install:" && \
25
25
apt-get install -y --no-install-recommends libopenblas-dev && \
26
- LLAMA_OPENBLAS=1 pip install llama-cpp-python --verbose; \
26
+ CMAKE_ARGS= "-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS" pip install llama-cpp-python --verbose; \
27
27
else \
28
28
echo "CuBLAS install:" && \
29
- LLAMA_CUBLAS=1 pip install llama-cpp-python --verbose; \
29
+ CMAKE_ARGS= "-DGGML_CUDA=on" pip install llama-cpp-python --verbose; \
30
30
fi
31
31
32
32
# Clean up apt cache
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN apt update && apt install -y libopenblas-dev ninja-build build-essential pkg
12
12
13
13
RUN python -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette pydantic-settings starlette-context
14
14
15
- RUN CMAKE_ARGS="-DLLAMA_BLAS =ON -DLLAMA_BLAS_VENDOR =OpenBLAS" pip install llama_cpp_python --verbose
15
+ RUN CMAKE_ARGS="-DGGML_BLAS =ON -DGGML_BLAS_VENDOR =OpenBLAS" pip install llama_cpp_python --verbose
16
16
17
17
# Run the server
18
18
CMD python3 -m llama_cpp.server
Original file line number Diff line number Diff line change 1
1
from .llama_cpp import *
2
2
from .llama import *
3
3
4
- __version__ = "0.2.84 "
4
+ __version__ = "0.2.85 "
Original file line number Diff line number Diff line change @@ -2083,11 +2083,14 @@ def pooling_type(self) -> str:
2083
2083
2084
2084
def close (self ) -> None :
2085
2085
"""Explicitly free the model from memory."""
2086
- self ._stack .close ()
2086
+ if hasattr (self ,'_stack' ):
2087
+ if self ._stack is not None :
2088
+ self ._stack .close ()
2087
2089
2088
2090
def __del__ (self ) -> None :
2089
- if self ._lora_adapter is not None :
2090
- llama_cpp .llama_lora_adapter_free (self ._lora_adapter )
2091
+ if hasattr (self ,'_lora_adapter' ):
2092
+ if self ._lora_adapter is not None :
2093
+ llama_cpp .llama_lora_adapter_free (self ._lora_adapter )
2091
2094
self .close ()
2092
2095
2093
2096
@staticmethod
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ def _load_shared_library(lib_base_name: str):
28
28
# for llamacpp) and "llama" (default name for this repo)
29
29
_lib_paths : List [pathlib .Path ] = []
30
30
# Determine the file extension based on the platform
31
- if sys .platform .startswith ("linux" ):
31
+ if sys .platform .startswith ("linux" ) or sys . platform . startswith ( "freebsd" ) :
32
32
_lib_paths += [
33
33
_base_path / f"lib{ lib_base_name } .so" ,
34
34
]
You can’t perform that action at this time.
0 commit comments