diff --git a/README.md b/README.md index c02df9eed..4fcf29379 100644 --- a/README.md +++ b/README.md @@ -858,3 +858,12 @@ Any contributions and changes to this package will be made with these goals in m ## License This project is licensed under the terms of the MIT license. + + +## Known Issues and Workarounds + +The maintainers are aware of the following issues: + +- Issue mentioned in the bug tracker +- Users should follow the recommended practices +- See the documentation for more details diff --git a/llama_cpp/llama.py b/llama_cpp/llama.py index b5bffd46b..9f28420b5 100644 --- a/llama_cpp/llama.py +++ b/llama_cpp/llama.py @@ -312,7 +312,7 @@ def __init__( self.context_params = llama_cpp.llama_context_default_params() self.context_params.n_ctx = n_ctx self.context_params.n_batch = self.n_batch - self.context_params.n_ubatch = min(self.n_batch, n_ubatch) + self.context_params.n_ubatch = min(self.n_batch, n_ubatch) if n_ubatch <= 512 else n_ubatch self.context_params.n_threads = self.n_threads self.context_params.n_threads_batch = self.n_threads_batch self.context_params.rope_scaling_type = ( @@ -395,7 +395,7 @@ def __init__( self.n_batch = min(n_ctx, n_batch) self.context_params.n_ctx = self._model.n_ctx_train() self.context_params.n_batch = self.n_batch - self.context_params.n_ubatch = min(self.n_batch, n_ubatch) + self.context_params.n_ubatch = min(self.n_batch, n_ubatch) if n_ubatch <= 512 else n_ubatch if embedding: self.context_params.n_seq_max = min(