Returns translated sentences immediately in beam search#858
Open
rhenry-nv wants to merge 27 commits into
Open
Conversation
… sentences during translation
stubs. EOD. Will complete tomorrow.
…ton backend is not tested/compiled as of this commit.
…k and userdata directly to beam search invocation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a callback mechanism to the Marian beam search to allow sentences to be consumed as soon as they are translated. This PR also updates the triton backend in the Marian contrib folder to leverage this feature.
When running with Triton on batch 64, I observed 1.8X reduction in median latencies and 1.6X reduction in 99.9 percentile latencies for a proxy model. This proxy model is not the same model referred to in prior PRs.
List of changes:
Added dependencies: none
How to test
Build a backend by running the build.sh script in contrib/triton-aml. Copy the libtriton_marian.so as described in the README in the contrib/triton-aml folder.
The regression tests should not be affected by this change. I have not checked this, but I have manually checked for correctness both through Triton and without Triton using some sample inputs and outputs.
Describe how you have tested your code, including OS and the cmake command.
cmake .. -DCOMPILE_CPU=on -DCOMPILE_CUDA=on -DUSE_SENTENCEPIECE=on -DUSE_STATIC_LIBS=off -DCOMPILE_SERVER=off -DUSE_FBGEMM=on -DCOMPILE_CUDA_SM35=off -DCOMPILE_CUDA_SM50=off -DCOMPILE_CUDA_SM60=off -DCOMPILE_CUDA_SM70=on -DCOMPILE_CUDA_SM75=off -DCOMPILE_TESTS=on
Ubuntu - 18.04.3 LTS
nvcc - 11.1.105
gcc - 7.5.0
Checklist