Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert commit af9bd3b: Edge case for trt llm out-of-vocabulary #50

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions nemo_skills/inference/server/serve_trt.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ def get_output_single(output_ids, input_length, max_output_len, tokenizer, eos_t
if len(eos_ids) > 0:
outputs = outputs[: eos_ids[0]]
outputs = outputs.tolist()
# somehow sometimes it produces tokens out of range..
outputs = [elem if elem < tokenizer.vocab_size else tokenizer.vocab_size - 1 for elem in outputs]
outputs = [elem if 0 <= elem else 0 for elem in outputs]
return tokenizer.decode(outputs)


Expand Down
Loading