The GitHub Actions job "Java CI" on opennlp.git/feat/GH-1391-embed-batch-cap has succeeded. Run started by GitHub user krickert (triggered by krickert).
Head commit for run: 210d1601ddb0af21fe9bf82bde92dbfb8166d9d3 / Kristian Rickert <[email protected]> GH-1391: Cap the token positions of one SentenceVectorsDL.embedAll inference TextEmbedder.embedAll and the manual say the implementation forms its own batches, so a caller may pass a list of any size. SentenceVectorsDL grouped the texts by tokenized length and ran each group as one inference, however many texts it had. Each group is now split so that no inference takes more than 16384 token positions (rows times row length), 32 rows at the BERT length of 512. An input longer than that runs in a batch of its own. Groups run in the order their length first appears in the call. Vectors do not change: batches are not padded, so every row is computed from the same tensors as its single-input call. The grouping moved into a package-private batches method so tests can check the inference plan. SentenceVectorsDLBatchLimitTest covers row count boundaries (exact fit, one over, one under, lengths that do and do not divide the cap), a length at and over the cap, an empty call, a mix where only one group splits, input order with alternating lengths, CLS and mean pooling, the pooled-output model and unit length scaling through a split group. The GPU parity test also runs a split group, and the tiny model texts and expected vectors are shared in TinyVectorModels. Fixes #1391 Signed-off-by: Kristian Rickert <[email protected]> Co-authored-by: Claude Code 2.1.296 (Opus 5.5) <[email protected]> Report URL: https://github.com/apache/opennlp/actions/runs/39129245603 With regards, GitHub Actions via GitBox
