File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
src/vllm_tgis_adapter/grpc Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -886,18 +886,17 @@ async def Tokenize(
886
886
887
887
if request .return_offsets :
888
888
if is_mistral_tokenizer :
889
- logger . warning (
889
+ raise ValueError (
890
890
"Mistral tokenizer doesn't support "
891
891
"return_offsets at the moment. "
892
892
)
893
- else :
894
- offsets = [
895
- {"start" : start , "end" : end }
896
- for start , end in batch_encoding .offset_mapping
897
- if start is not None and end is not None
898
- ]
899
- # Truncate offset list if request.truncate_input_tokens
900
- offsets = offsets [- token_count :]
893
+ offsets = [
894
+ {"start" : start , "end" : end }
895
+ for start , end in batch_encoding .offset_mapping
896
+ if start is not None and end is not None
897
+ ]
898
+ # Truncate offset list if request.truncate_input_tokens
899
+ offsets = offsets [- token_count :]
901
900
902
901
tokens = tokens [- token_count :] if request .return_tokens else None
903
902
You can’t perform that action at this time.
0 commit comments