Skip to content

Commit

Permalink
Add LLM.set_tokenizer (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
JRC1995 authored Jun 28, 2023
1 parent 2b7d3ac commit bdd6b4c
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 bdd6b4c

Please sign in to comment.