Merge cluster to master #3
|
@ -28,7 +28,6 @@ def tokenize(prompt: str, backend_url: str) -> int:
|
||||||
return j['length']
|
return j['length']
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f'Failed to tokenize using VLLM -', f'{e.__class__.__name__}: {e}')
|
print(f'Failed to tokenize using VLLM -', f'{e.__class__.__name__}: {e}')
|
||||||
raise Exception
|
|
||||||
return len(tokenizer.encode(chunk)) + 10
|
return len(tokenizer.encode(chunk)) + 10
|
||||||
|
|
||||||
# Use a ThreadPoolExecutor to send all chunks to the server at once
|
# Use a ThreadPoolExecutor to send all chunks to the server at once
|
||||||
|
|
Reference in New Issue