2.11
This commit is contained in:
parent
afed2c31d3
commit
2e25a8f839
@ -195,7 +195,7 @@ def multi_threading(queries, knowledge_name="", file_id="", llm_type=1, need_ext
|
|||||||
with concurrent.futures.ThreadPoolExecutor(max_workers=40) as executor:
|
with concurrent.futures.ThreadPoolExecutor(max_workers=40) as executor:
|
||||||
if llm_type == 4:
|
if llm_type == 4:
|
||||||
# 每组10个任务,组与组之间间隔5秒,提高缓存命中率
|
# 每组10个任务,组与组之间间隔5秒,提高缓存命中率
|
||||||
group_size = 5
|
group_size = 10
|
||||||
for i in range(0, len(queries), group_size):
|
for i in range(0, len(queries), group_size):
|
||||||
group = queries[i:i + group_size]
|
group = queries[i:i + group_size]
|
||||||
for idx, query in enumerate(group, start=i):
|
for idx, query in enumerate(group, start=i):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user