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
norm
vllm
Commits
bdd6b4c8
"benchmarks/vscode:/vscode.git/clone" did not exist on "39a12a8babe5d4c5d8959106044c6ebb8b830df7"
Unverified
Commit
bdd6b4c8
authored
Jun 28, 2023
by
Jishnu Ray Chowdhury
Committed by
GitHub
Jun 28, 2023
Browse files
Add LLM.set_tokenizer (#283)
parent
2b7d3aca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
vllm/entrypoints/llm.py
vllm/entrypoints/llm.py
+6
-0
No files found.
vllm/entrypoints/llm.py
View file @
bdd6b4c8
...
@@ -60,6 +60,12 @@ class LLM:
...
@@ -60,6 +60,12 @@ class LLM:
)
->
Union
[
PreTrainedTokenizer
,
PreTrainedTokenizerFast
]:
)
->
Union
[
PreTrainedTokenizer
,
PreTrainedTokenizerFast
]:
return
self
.
llm_engine
.
tokenizer
return
self
.
llm_engine
.
tokenizer
def
set_tokenizer
(
self
,
tokenizer
:
Union
[
PreTrainedTokenizer
,
PreTrainedTokenizerFast
],
)
->
None
:
self
.
llm_engine
.
tokenizer
=
tokenizer
def
generate
(
def
generate
(
self
,
self
,
prompts
:
Optional
[
Union
[
str
,
List
[
str
]]]
=
None
,
prompts
:
Optional
[
Union
[
str
,
List
[
str
]]]
=
None
,
...
...
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