OpenNMT / OpenNMT/CTranslate2

`translate_iterable` is not properly handling `max_input_length`

Open
#1,646 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
4.7k
Forks
536
Avg merge
12h 12m
Merged PRs (30d)
4

Description

Even after setting max_input_length = 0, I get the following warning when exceeding 1024.

RuntimeError: No position encodings are defined for positions >= 1024, but got position 1116

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue through translate_iterable with max_input_length set to 0 and an input exceeding 1024 positions. Trace how that option is handled when position 1116 is reached, then verify the corrected behavior with an input of the same length.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.