Skip to content

Commit

Permalink
[V1] Fix detokenizer ports (vllm-project#10224)
Browse files Browse the repository at this point in the history
Signed-off-by: Woosuk Kwon <[email protected]>
Signed-off-by: OmerD <[email protected]>
  • Loading branch information
WoosukKwon authored and omer-dayan committed Nov 14, 2024
1 parent 7b70a2f commit 34e1ae3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vllm/v1/tokenizer/detokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ def __init__(self, tokenizer_name: str, tokenizer_mode: str,
# For example, it does not terminate properly. We need to improve this.
self.push_port = get_open_port()
self.pull_port = get_open_port()
# NOTE: The push port of the engine process should be the same as the
# pull port of the detokenizer process. Vice versa.
self.detokenizer = DetokenizerProc(tokenizer_name=tokenizer_name,
tokenizer_mode=tokenizer_mode,
trust_remote_code=trust_remote_code,
push_port=self.push_port,
pull_port=self.pull_port)
push_port=self.pull_port,
pull_port=self.push_port)
self.detokenizer.start()

self.zmq_context = zmq.Context()
Expand Down Expand Up @@ -95,8 +97,8 @@ def __init__(
self.tokenizer_name = tokenizer_name
self.tokenizer_mode = tokenizer_mode
self.trust_remote_code = trust_remote_code
# NOTE: The pull_port of the detokenizer should be the same as the
# push_port of the engine. Vice versa.
# NOTE: The pull_port of the detokenizer process should be the same as
# the push_port of the engine process. Vice versa.
self.pull_port = pull_port
self.push_port = push_port

Expand Down

0 comments on commit 34e1ae3

Please sign in to comment.