You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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
- Cache NumPy field views for 'id', 'logit', and 'p' to bypass expensive property lookups.
52
+
- Refactor copy_logits to use pre-generated ID sequences and cached views.
53
+
- Ensure logical consistency by resetting token IDs every sampling step to counter C++ reordering.
54
+
- Minimize redundant memory allocations during the inference loop.
55
+
56
+
- feat: Add explicit memory cleanup for sampling contexts
57
+
- Implements `close()` and `__del__` for LlamaTokenDataArray and expands LlamaSamplingContext cleanup.
58
+
- Ensures NumPy views and internal C-references are properly released to allow Python GC to reclaim memory.
59
+
60
+
- optimize(memory): reduce scores buffer size and optimize state saving
61
+
- Update save_state and load_state API use.
62
+
- Refactored self.scores to allocate only a single row (1, n_vocab) when logits_all=False, significantly reducing memory usage for large vocabulary models.
63
+
- Optimized save_state to eliminate redundant memory allocations and copies by using ctypes.string_at.
64
+
- Updated load_state, eval, and sampler adapters to correctly handle the dynamic shape of self.scores.
65
+
66
+
- Fix CMake install layout to avoid top-level bin directory in site-packages
67
+
68
+
- ggml: Load ggml library from candidate path list
69
+
- Auto-select lib/ or bin/ directories
70
+
- Add backend loading functions
71
+
72
+
- feat(loader): extend default library search paths on Linux and macOS
73
+
-`load_shared_library` to include a path list feature (allowing you to add custom paths in addition to the default ones). You can later add your own paths to the `libggml_base_paths` candidate list in `_ggml.py`, such as those not commonly used Python paths.
74
+
- fix: Enhance the handling logic for non-existent file paths.
75
+
- Improves reliability of shared library discovery for system-wide installations.
76
+
77
+
- feat: Update llama.cpp to [ggml-org/llama.cpp/commit/abb9f3c42b5e6acee9e8e37836ef691d1a41bdb8](https://github.com/ggml-org/llama.cpp/commit/abb9f3c42b5e6acee9e8e37836ef691d1a41bdb8)
78
+
79
+
- feat: Sync llama.cpp llama/mtmd API Binding 20260219
80
+
81
+
More information see: https://github.com/JamePeng/llama-cpp-python/compare/b03224b2dde3c8cbdd8bf529794e3a41ac7f5751...6b38182a17effd0cedbf8736bee2464dd6c7b4da
82
+
10
83
## [0.3.25]
11
84
- feat: [Refactor Llama class to use new LlamaSampler chain API from _internals](https://github.com/JamePeng/llama-cpp-python/commit/1e6094a327f0fb9dc35d52f84d8ebabc1faa1e95)
12
85
This commit refactors the high-level Llama class to fully utilize the new C++ `llama_sampler` chain architecture via `LlamaSamplingContext`.
0 commit comments