File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -213,14 +213,17 @@ def run_hf(
213
213
max_prompt_len = 0
214
214
max_output_len = 0
215
215
for i in range (len (requests )):
216
- prompt , prompt_len , output_len = requests [i ]
216
+ prompt = requests [i ].prompt
217
+ prompt_len = requests [i ].prompt_len
218
+ output_len = requests [i ].expected_output_len
217
219
# Add the prompt to the batch.
218
220
batch .append (prompt )
219
221
max_prompt_len = max (max_prompt_len , prompt_len )
220
222
max_output_len = max (max_output_len , output_len )
221
223
if len (batch ) < max_batch_size and i != len (requests ) - 1 :
222
224
# Check if we can add more requests to the batch.
223
- _ , next_prompt_len , next_output_len = requests [i + 1 ]
225
+ next_prompt_len = requests [i + 1 ].prompt_len
226
+ next_output_len = requests [i + 1 ].expected_output_len
224
227
if (max (max_prompt_len , next_prompt_len ) +
225
228
max (max_output_len , next_output_len )) <= 2048 :
226
229
# We can add more requests to the batch.
You can’t perform that action at this time.
0 commit comments