8000 Bugfix: n_batch should always be <= n_ctx · lapnd/llama-cpp-python@5075c16 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5075c16

Browse files
committed
Bugfix: n_batch should always be <= n_ctx
1 parent 248b056 commit 5075c16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama_cpp/llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(
6868
maxlen=self.last_n_tokens_size,
6969
)
7070
self.tokens_consumed = 0
71-
self.n_batch = n_batch
71+
self.n_batch = min(n_ctx, n_batch)
7272

7373
self.n_threads = n_threads or multiprocessing.cpu_count()
7474

0 commit comments

Comments
 (0)
0