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

Modified factor decoding for automatic dubbing #1082

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Proyag
Copy link

@Proyag Proyag commented Feb 4, 2023

The main addition in this PR is modified decoding with specific kinds of target factors. This is designed for automatic dubbing models (https://iwslt.org/2023/dubbing), where we are dealing with numeric factors which are calculated on the basis of other numeric target factors. There are 4 kinds of factors that have been implemented:

  • Frames (for phoneme durations)
  • Total frames remaining - This is decremented by the number of frames at each time step.
  • Segment frames remaining - Frames remaining till a [pause] token is generated. Segment durations are provided via a target_segment_durations field in JSON inputs.
  • Pauses remaining - Number of [pause] tokens remaining.
    These are specified with sockeye-translate --force-factors-stepwise, e.g. --force-factors-stepwise none frames total_remaining none none will mean that the second and third target factors will be calculated according to the rules corresponding to frames and total frames remaining, while the rest of the target factors are unaffected.

I've also added an option to use sinusoidal embeddings instead of randomly initialized embeddings for numeric target factors.

These features also require use of specially created vocabs, for which I've added sockeye_contrib/create_seq_vocab.py and help messages.

Changes should be fully backwards-compatible -- all tests pass.

Pending internal discussion; cc: @thompsonb

Pull Request Checklist

  • Changes are complete (if posting work-in-progress code, prefix your pull request title with '[WIP]'
    until you can check this box.
  • Unit tests pass (pytest)
  • Were system tests modified? [No] If so did you run these at least 5 times to account for the variation across runs?
  • System tests pass (pytest test/system)
  • Passed code style checking (./style-check.sh)
  • You have considered writing a test
  • Updated major/minor version in sockeye/__init__.py. Major version bump if this is a backwards incompatible change.
  • Updated CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

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

1 participant