Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9fb809f

Browse filesBrowse files
authored
Merge branch 'main' into patch-1
2 parents 81cf909 + f7b9e6d commit 9fb809f
Copy full SHA for 9fb809f

File tree

Expand file treeCollapse file tree

8 files changed

+24
-12
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+24
-12
lines changed

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

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+
1019
## [0.2.84]
1120

1221
- feat: Update llama.cpp to ggerganov/llama.cpp@4730faca618ff9cee0780580145e3cbe86f24876

‎docker/cuda_simple/Dockerfile

Copy file name to clipboardExpand all lines: docker/cuda_simple/Dockerfile
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ COPY . .
1515

1616
# setting build related env vars
1717
ENV CUDA_DOCKER_ARCH=all
18-
ENV LLAMA_CUBLAS=1
18+
ENV GGML_CUDA=1
1919

2020
# Install depencencies
2121
RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette pydantic-settings starlette-context
2222

2323
# 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
2525

2626
# Run the server
2727
CMD python3 -m llama_cpp.server

‎docker/open_llama/Dockerfile

Copy file name to clipboardExpand all lines: docker/open_llama/Dockerfile
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fa
2020

2121
# Perform the conditional installations based on the image
2222
RUN echo "Image: ${IMAGE}" && \
23-
if [ "${IMAGE}" = "python:3-slim-bullseye" ] ; then \
23+
if [ "${IMAGE}" = "python:3-slim-bookworm" ] ; then \
2424
echo "OpenBLAS install:" && \
2525
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; \
2727
else \
2828
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; \
3030
fi
3131

3232
# Clean up apt cache

‎docker/openblas_simple/Dockerfile

Copy file name to clipboardExpand all lines: docker/openblas_simple/Dockerfile
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt update && apt install -y libopenblas-dev ninja-build build-essential pkg
1212

1313
RUN python -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette pydantic-settings starlette-context
1414

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
1616

1717
# Run the server
1818
CMD python3 -m llama_cpp.server

‎llama_cpp/__init__.py

Copy file name to clipboard
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .llama_cpp import *
22
from .llama import *
33

4-
__version__ = "0.2.84"
4+
__version__ = "0.2.85"

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,11 +2083,14 @@ def pooling_type(self) -> str:
20832083

20842084
def close(self) -> None:
20852085
"""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()
20872089

20882090
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)
20912094
self.close()
20922095

20932096
@staticmethod

‎llama_cpp/llama_cpp.py

Copy file name to clipboardExpand all lines: llama_cpp/llama_cpp.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def _load_shared_library(lib_base_name: str):
2828
# for llamacpp) and "llama" (default name for this repo)
2929
_lib_paths: List[pathlib.Path] = []
3030
# 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"):
3232
_lib_paths += [
3333
_base_path / f"lib{lib_base_name}.so",
3434
]

‎vendor/llama.cpp

Copy file name to clipboard

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.