Skip to content

Commit e4861df

Browse files
committed
Bump version to 0.3.27
1 parent 1f8341e commit e4861df

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.27]
11+
12+
- feat: add `PaddleOCR-VL-1.5` multimodal chat handler `PaddleOCRChatHandler`
13+
14+
- fix: resolve VRAM leak in multimodal models by explicitly closing mtmd context
15+
- Remove the `ExitStack` closure in `Llava15ChatHandler` to break circular references preventing garbage collection of the vision context.
16+
- Implement explicit `close()` and `__del__()` methods in the chat handler to safely free `mtmd_ctx`.
17+
- Integrate `chat_handler.close()` into the main `Llama.close()` lifecycle and nullify related attributes for immediate memory reclamation.
18+
19+
- fix: resolve reload memory leaks by breaking circular references in cleanup
20+
- Remove closure-based `ExitStack` callbacks in `LlamaModel`, `LlamaContext`, and `LlamaBatch` to eliminate circular references.
21+
- Move explicit C-level memory freeing (`llama_*_free`) directly into `close()` methods.
22+
- Nullify additional attributes (`tokenizer_`, `model_params`, etc.) in `Llama.close()` to guarantee immediate garbage collection during unload.
23+
- Add todo comment to LoRA process logic, the current LoRa loading logic is outdated and needs to be refactored.
24+
25+
- feat: add memory breakdown and sampler performance timings APIs
26+
27+
- feat: Search system paths for shared libraries(`by @benniekiss`)
28+
29+
- Optimize `longest_token_prefix` to use zero-copy NumPy arrays and drop .tolist() overhead
30+
31+
- Free _candidates and large numpy arrays during explicit close()
32+
33+
- fix: resolve memory leaks in sampling context lifecycle
34+
- Safely close temporary `LlamaSamplingContext` in `sample()` using a try-finally block.
35+
- Explicitly release the previous `_sampling_ctx` in `generate()` before re-assignment to prevent orphaned pointers.
36+
- Ensure `_sampling_ctx` is properly freed in `Llama.close()`.
37+
38+
- Fix custom sampler memory cleanup and improve lifecycle management
39+
- Add explicit `close()` and `__del__()` to CustomSampler to safely free C resources and break Python reference cycles
40+
- Ensure custom samplers are properly detached and freed in `LlamaSampler.close()`
41+
- Add minor documentation comments for clarity
42+
43+
- feat: Update llama.cpp to [ggml-org/llama.cpp/commit/cacc371f99fb3b5b431d3fa89ac0c752bbd62a3b](https://github.com/ggml-org/llama.cpp/commit/cacc371f99fb3b5b431d3fa89ac0c752bbd62a3b)
44+
45+
- feat: Sync llama.cpp llama/mtmd API Binding 20260223
46+
47+
More information see: https://github.com/JamePeng/llama-cpp-python/compare/3d0fd1b75ee564361a4babf21f88855225ba1fe0...1f8341ee74a2fea15a1008487cbecaccf918c755
48+
1049
## [0.3.26]
1150
- perf(llama-cpp): optimize LlamaTokenDataArray memory operations
1251
- Cache NumPy field views for 'id', 'logit', and 'p' to bypass expensive property lookups.

llama_cpp/__init__.py

Lines 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.3.26"
4+
__version__ = "0.3.27"

0 commit comments

Comments
 (0)