Skip to content

Commit

Permalink
Update nemo_utils.py
Browse files Browse the repository at this point in the history
Signed-off-by: JimmyZhang12 <67203904+JimmyZhang12@users.noreply.github.com>
  • Loading branch information
JimmyZhang12 authored Apr 16, 2024
1 parent 78ac1ba commit ec29505
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nemo/export/trt_llm/nemo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ def to_word_list_format(

flat_ids = []
offsets = []
# We use a similar trick as in NeMo to deal with the fact that the encoding of a single word
# can't always be trusted. See
# The encoding of a single word can't always be trusted. See
# https://github.com/NVIDIA/NeMo/blob/bb575b72fd0be51ae10cc77d9f89ddb9e9d3b96d/nemo/collections/nlp/modules/common/text_generation_strategy.py#L229
ids_ref = tokenizer.encode(ref_str)
for word_dict_item in word_dict:
Expand Down

0 comments on commit ec29505

Please sign in to comment.