Skip to content

Commit 8c5f1d8

Browse files
JulesGMrlouf
authored andcommitted
Fixed __call__ as well
1 parent 0383ce1 commit 8c5f1d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

outlines/generate/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ def __call__(
231231

232232
# We reshape the output to (batch_size, sample_size)
233233
output: List[List[FormattedOutput]] = list()
234-
for i in range(batch_size):
235-
output.append(formatted[i : i + num_samples])
234+
for i in range(0, batch_size * num_samples, num_samples):
235+
output.append(formatted[i : i + num_samples]
236236

237237
# We remove leading dimensions for the output
238238
if batch_size == 1 and num_samples == 1:

0 commit comments

Comments
 (0)