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

Returns translated sentences immediately in beam search #858

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

rhenry-nv
Copy link
Contributor

@rhenry-nv rhenry-nv commented Apr 20, 2021

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:

  • Adds call back mechanism to beam search
  • Adds new ModelTask for Async return
  • Updates the Triton backend to leverage the async return feature

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

  • I have tested the code manually
  • I have run regression tests
  • I have read and followed CONTRIBUTING.md
  • I have updated CHANGELOG.md

delli and others added 27 commits January 20, 2021 12:53
…ton backend is not tested/compiled as of this commit.
…k and userdata directly to beam search invocation
@emjotde emjotde self-assigned this May 25, 2021
@emjotde emjotde self-requested a review May 25, 2021 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants