From 4cb61da835c4ba587304a14e7f3fcc771fb757ba Mon Sep 17 00:00:00 2001 From: rohithkrn Date: Tue, 8 Aug 2023 08:51:46 -0700 Subject: [PATCH] fix batch offset computation (#999) --- engines/python/setup/djl_python/fastertransformer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/python/setup/djl_python/fastertransformer.py b/engines/python/setup/djl_python/fastertransformer.py index 874bf5188aa..9ebbdeb7d2e 100644 --- a/engines/python/setup/djl_python/fastertransformer.py +++ b/engines/python/setup/djl_python/fastertransformer.py @@ -189,6 +189,7 @@ def inference(self, inputs: Input): "generated_text": s } for s in result[offset:offset + input_size[i]]] outputs.add(generated_text, key=inputs.get_content().key_at(i)) + offset = offset + input_size[i] return outputs