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(server): close tokenizer config files after reading by @cloudgpuapp in #2422
- fix(cache): preserve disk cache entries on lookup and evict least-recently-used states by @remote-controlled-man in #2423
- fix: size Python buffers to the actual context by @remote-controlled-man in #2436
- feat: update llama.cpp to ggml-org/llama.cpp@afe77e18f
Expand Down
4 changes: 3 additions & 1 deletion llama_cpp/server/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,10 @@ def load_llama_from_model_settings(settings: ModelSettings) -> llama_cpp.Llama:
assert settings.hf_tokenizer_config_path is not None, (
"hf_tokenizer_config_path must be set for hf-tokenizer-config"
)
with open(settings.hf_tokenizer_config_path, "r") as config_file:
tokenizer_config = json.load(config_file)
chat_handler = llama_cpp.llama_chat_format.hf_tokenizer_config_to_chat_completion_handler(
json.load(open(settings.hf_tokenizer_config_path))
tokenizer_config
)

tokenizer: Optional[llama_cpp.BaseLlamaTokenizer] = None
Expand Down
Loading