Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ChatGLM3_fastllm
Commits
218223bf
Commit
218223bf
authored
Jan 10, 2024
by
zhouxiang
Browse files
晚上命令行demo
parent
ba9cb42a
Pipeline
#703
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
cli_demo.py
cli_demo.py
+4
-4
No files found.
cli_demo.py
View file @
218223bf
...
@@ -26,10 +26,10 @@ if __name__ == "__main__":
...
@@ -26,10 +26,10 @@ if __name__ == "__main__":
print
(
"AI:"
,
end
=
""
)
print
(
"AI:"
,
end
=
""
)
curResponse
=
""
curResponse
=
""
prompt
=
model
.
get_prompt
(
query
,
history
)
#
prompt = model.get_prompt(query, history)
tokens
=
model
.
tokenizer_encode_string
(
prompt
)
#
tokens = model.tokenizer_encode_string(prompt)
token_input_count
=
len
(
tokens
)
#
token_input_count = len(tokens)
print
(
"token_input_count"
,
token_input_count
)
#
print("token_input_count", token_input_count)
token_count
=
0
token_count
=
0
t0
=
time
.
time
()
t0
=
time
.
time
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment