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 e966f3b

Browse filesBrowse files
xu-songabetlen
andauthored
feat: Add more detailed log for prefix-match (abetlen#1659)
Co-authored-by: Andrei <abetlen@gmail.com>
1 parent 8432116 commit e966f3b
Copy full SHA for e966f3b

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed

‎llama_cpp/llama.py

Copy file name to clipboardExpand all lines: llama_cpp/llama.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,11 +777,12 @@ def generate(
777777
else:
778778
break
779779
if longest_prefix > 0:
780-
if self.verbose:
781-
print("Llama.generate: prefix-match hit", file=sys.stderr)
782780
reset = False
783781
tokens = tokens[longest_prefix:]
784782
self.n_tokens = longest_prefix
783+
if self.verbose:
784+
print(f"Llama.generate: {longest_prefix} prefix-match hit, "
785+
f"remaining {len(tokens)} prompt tokens to eval", file=sys.stderr)
785786

786787
# Reset the model state
787788
if reset:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.