Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Function signature of two get_tokenizer used by benchmarks/benchmark_serving.py is not aligned #11977

Closed
1 task done
cblmemo opened this issue Jan 13, 2025 · 4 comments · Fixed by #11982
Closed
1 task done
Labels
bug Something isn't working

Comments

@cblmemo
Copy link

cblmemo commented Jan 13, 2025

Your current environment

(not related)

Model Input Dumps

No response

🐛 Describe the bug

Two functions imported by this conditional import has different signature:

try:
from vllm.transformers_utils.tokenizer import get_tokenizer
except ImportError:
from backend_request_func import get_tokenizer

def get_tokenizer(
tokenizer_name: Union[str, Path],
*args,
tokenizer_mode: str = "auto",
trust_remote_code: bool = False,
revision: Optional[str] = None,
download_dir: Optional[str] = None,
**kwargs,
) -> AnyTokenizer:

def get_tokenizer(
pretrained_model_name_or_path: str, trust_remote_code: bool
) -> Union[PreTrainedTokenizer, PreTrainedTokenizerFast]:

Which cause this error when using benchmark:

(task, pid=5102) Traceback (most recent call last):
(task, pid=5102)   File "/home/gcpuser/sky_workdir/vllm/benchmarks/benchmark_serving.py", line 1226, in <module>
(task, pid=5102)     main(args)
(task, pid=5102)   File "/home/gcpuser/sky_workdir/vllm/benchmarks/benchmark_serving.py", line 793, in main
(task, pid=5102)     tokenizer = get_tokenizer(tokenizer_id,
(task, pid=5102) TypeError: get_tokenizer() got an unexpected keyword argument 'tokenizer_mode'

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
@cblmemo cblmemo added the bug Something isn't working label Jan 13, 2025
@robertgshaw2-redhat
Copy link
Collaborator

Can you fix it?

@e1ijah1
Copy link
Contributor

e1ijah1 commented Jan 13, 2025

Can you fix it?

I've also noticed this bug. I'd be happy to help fix it if you'd like.

@robertgshaw2-redhat
Copy link
Collaborator

That would be great!

Can you fix it?

I've also noticed this bug. I'd be happy to help fix it if you'd like.

That would be great! Should be a quick fix

@e1ijah1
Copy link
Contributor

e1ijah1 commented Jan 13, 2025

That would be great!

Can you fix it?

I've also noticed this bug. I'd be happy to help fix it if you'd like.

That would be great! Should be a quick fix

I've submitted the fix. Please take a look 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants