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

[ModelRunner] Fix stop & bad word list pointer offset. #1486

Closed
wants to merge 1 commit into from

Conversation

fjosw
Copy link
Contributor

@fjosw fjosw commented Apr 22, 2024

In regression tests of the ModelRunnerCpp vs ModelRunner we noticed that the stop_words_list feature does not work properly for the ModelRunner and batch_size > 1. Depending on the input we get incorrect results or Cuda Runtime Errors (misaligned address). Looking at the relevant code, it seems that the pointer offsets for stop_words_list_ptrs (and also bad_words_list_ptrs) don't take into account the size of the tensor entries. This PR fixes this issue by multiplying the offset by the element size.

@MartinMarciniszyn MartinMarciniszyn self-assigned this May 22, 2024
Copy link
Collaborator

@MartinMarciniszyn MartinMarciniszyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll move these changes into NVIDIA's internal repository.

@MartinMarciniszyn
Copy link
Collaborator

This has already been picked up by @syuoni and will be released to Github next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants