Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- fix: avoid cleanup errors for partially initialized `LlamaModel` objects by @usernames122 in #2173
- fix: suppress stdout and stderr in Jupyter notebooks by @Anai-Guo in #2181
- feat: enable arm64 musl builds by @acon96 in #2221
- feat: Update llama.cpp to ggml-org/llama.cpp@d749821db
Expand Down
4 changes: 3 additions & 1 deletion llama_cpp/_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def __init__(
self.params = params
self.verbose = verbose
self._exit_stack = ExitStack()
# LlamaModel does not use samplers, but close() can run after partial init.
self.sampler = None
self.custom_samplers = []

model = None

Expand All @@ -65,7 +68,6 @@ def __init__(

self.model = model
self.vocab = vocab
self.sampler = None # LlamaModel doesn't use samplers, but some cleanup code expects this attribute

def free_model():
if self.model is None:
Expand Down
Loading