Skip to content

Commit

Permalink
set tokenizer version
Browse files Browse the repository at this point in the history
  • Loading branch information
mulin.lyh committed Jun 3, 2024
1 parent 96644f7 commit eceabd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 5 additions & 1 deletion vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ def __init__(
self.revision = revision
self.code_revision = code_revision
self.rope_scaling = rope_scaling
self.tokenizer_revision = tokenizer_revision
# The tokenizer version is usually consistent with the model version
if tokenizer_revision is None:
self.tokenizer_revision = revision
else:
self.tokenizer_revision = tokenizer_revision
self.quantization = quantization
self.quantization_param_path = quantization_param_path
self.enforce_eager = enforce_eager
Expand Down
4 changes: 1 addition & 3 deletions vllm/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,7 @@ def _init_tokenizer(self, **tokenizer_init_kwargs) -> BaseTokenizerGroup:
max_input_length=None,
tokenizer_mode=self.model_config.tokenizer_mode,
trust_remote_code=self.model_config.trust_remote_code,
revision=self.model_config.tokenizer_revision
if self.model_config.tokenizer_revision is not None else
self.model_config.revision)
revision=self.model_config.tokenizer_revision)
init_kwargs.update(tokenizer_init_kwargs)

return get_tokenizer_group(self.parallel_config.tokenizer_pool_config,
Expand Down

0 comments on commit eceabd4

Please sign in to comment.