Skip to content

Commit

Permalink
solving errors from format script
Browse files Browse the repository at this point in the history
  • Loading branch information
fialhocoelho committed Jun 4, 2024
1 parent 040a69a commit 570f7aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ einops # required for MPT
httpx
peft
requests
ray
#ray
sentence-transformers # required for embedding

# Benchmarking
Expand Down
6 changes: 3 additions & 3 deletions vllm/entrypoints/grpc/grpc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ async def Tokenize(
"""
# Log the incoming tokenization request for metrics
service_metrics.observe_tokenization_request(request)

# Initialize an empty list to store individual tokenization responses
responses: List[TokenizeResponse] = []

Expand All @@ -598,7 +598,7 @@ async def Tokenize(
if 1 <= request.truncate_input_tokens < token_count:
token_count = request.truncate_input_tokens

# Initialize Tokens fron ids
# Initialize Tokens from ids
tokens = self.tokenizer.convert_ids_to_tokens(token_ids)
offsets = None # Initialize offsets to None

Expand All @@ -609,7 +609,7 @@ async def Tokenize(
for start, end in batch_encoding.offset_mapping
if start is not None and end is not None
]
# Truncate offset list if request.truncate_input_tokens
# Truncate offset list if request.truncate_input_tokens
offsets=offsets[-token_count:]

# Return a token list (Truncated if request.truncate_input_tokens)
Expand Down

0 comments on commit 570f7aa

Please sign in to comment.