Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and terrykong committed Sep 18, 2024
1 parent ae981a7 commit 1946e78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nemo_aligner/utils/trt_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def __init__(

# Some tokenizers like meta-llama/Meta-Llama-3-70B do not have a pad_id
if tokenizer.pad_id is None:
assert tokenizer.eos_id != -1, f"If tokenizer.pad_id=None, we require the eos_id != pad_id and eos_id != -1 since we assume pad_id = -1 when not defined"
assert (
tokenizer.eos_id != -1
), f"If tokenizer.pad_id=None, we require the eos_id != pad_id and eos_id != -1 since we assume pad_id = -1 when not defined"
logging.warning(f"{tokenizer=} does not contain a pad_id. TRT-LLM will use -1 for the pad_id")
self.pad_id = -1
else:
Expand Down

0 comments on commit 1946e78

Please sign in to comment.