From 20047fa0e434fbea2db958dc8d2bdf04eefbfbf8 Mon Sep 17 00:00:00 2001 From: Cyberes Date: Mon, 16 Oct 2023 18:01:17 -0600 Subject: [PATCH] 2000 chunk size --- llm_server/llm/vllm/tokenize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llm_server/llm/vllm/tokenize.py b/llm_server/llm/vllm/tokenize.py index d32eb68..0a2f5c6 100644 --- a/llm_server/llm/vllm/tokenize.py +++ b/llm_server/llm/vllm/tokenize.py @@ -22,8 +22,8 @@ def tokenize(prompt: str, backend_url: str) -> int: tokenizer = tiktoken.get_encoding("cl100k_base") - # Split the prompt into 1000 character chunks - chunk_size = 1000 + # Split the prompt into 2000 character chunks + chunk_size = 2000 chunks = [prompt[i:i + chunk_size] for i in range(0, len(prompt), chunk_size)] # Define a function to send a chunk to the server