Skip to content

Commit

Permalink
Fix "TypeError: Got unsupported ScalarType BFloat16" (#2472)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeitaroShinagawa authored Sep 18, 2024
1 parent dd49877 commit 4305ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lmdeploy/serve/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_ppl(self, input_ids: Union[List[int], List[List[int]]]):
steps=steps,
sequence_start=(i == 0),
sequence_end=(i == n_max_iter - 1))
_logits = _logits.cpu()
_logits = _logits.float().cpu()
padding_token_id = -100
target_ids = [(x + [padding_token_id])[1:] for x in _input_ids]
target_ids = [
Expand Down

0 comments on commit 4305ddf

Please sign in to comment.