You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Richard Zowalla (Jira)" <ji...@apache.org> on 2026/09/18 12:03:00 UTC
[jira] [Created] (OPENNLP-1978) SentenceVectorsDL does not truncate input to the model's maximum sequence length
Richard Zowalla created OPENNLP-1978:
----------------------------------------
Summary: SentenceVectorsDL does not truncate input to the model's maximum sequence length
Key: OPENNLP-1978
URL: https://issues.apache.org/jira/browse/OPENNLP-1978
Project: OpenNLP
Issue Type: Bug
Reporter: Richard Zowalla
Fix For: 3.0.0
{{SentenceVectorsDL}} encodes the whole text and runs it through the model without truncating to the model's maximum sequence length \(typically 512 positions for BERT\-style models\). A longer input fails inside ONNX Runtime and surfaces as a generic inference failure. With batched execution one over\-long input fails the whole batch.
Suggested fix: truncate to the maximum length by default \(keeping {{\[SEP\]}} at the end\), with an option to reject over\-long input with an {{IllegalArgumentException}} instead, and document the behavior.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)