Skip to content

Commit

Permalink
Add LLM.set_tokenizer (vllm-project#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRC1995 authored Jun 28, 2023
1 parent 1c238e1 commit 33834ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vllm/entrypoints/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def get_tokenizer(
) -> Union[PreTrainedTokenizer, PreTrainedTokenizerFast]:
return self.llm_engine.tokenizer

def set_tokenizer(
self,
tokenizer: Union[PreTrainedTokenizer, PreTrainedTokenizerFast],
) -> None:
self.llm_engine.tokenizer = tokenizer

def generate(
self,
prompts: Optional[Union[str, List[str]]] = None,
Expand Down

0 comments on commit 33834ff

Please sign in to comment.