Skip to content

Commit

Permalink
Update llmfoundry/models/inference_api_wrapper/openai_causal_lm.py
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel King <[email protected]>
  • Loading branch information
bmosaicml and dakinggg authored Sep 15, 2023
1 parent 1a9a77e commit 2bd933a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def retokenize(self, tokens: List[int], cont_idxs: List[int]): # noqa: D403
self.tokenizer.decode(tokens[cont_idxs[0]:cont_idxs[-1] +
1]).strip())['input_ids']

# replace the origina continuation with the retokenized continuation + padding
# replace the original continuation with the retokenized continuation + padding
tokens = tokens[:cont_idxs[0]] + retokenized_continuation + [
tokens[-1]
] * (len(tokens) -
Expand Down

0 comments on commit 2bd933a

Please sign in to comment.