fix dim issue of next_token_logits in sample, or else logits_processo… #301
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…r has issue if repetition_penalty is used
Fixes # (issue)
it will core dump if set following in text generation example
generation_config.do_sample=True
generation_config.repetition_penalty=0.75
coredump trace like
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/work/chatbot/inference/generate.py", line 529, in generate_output
return model.generate(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/work/optimum-habana/optimum/habana/transformers/generation/utils.py", line 627, in generate
return self.sample(
File "/work/optimum-habana/optimum/habana/transformers/generation/utils.py", line 1531, in sample
streamer.put(next_tokens.cpu())
RuntimeError: [Rank:0] FATAL ERROR :: MODULE:PT_BRIDGE syn compile encountered : Graph compile failed. 26 compile time 55892013 ns