Skip to content

fix: resolve out-of-bounds error on long text inference - #23

Open
mayuriphad wants to merge 1 commit into
programmer290399:mainfrom
mayuriphad:fix-long-texts
Open

mayuriphad wants to merge 1 commit into
programmer290399:mainfrom
mayuriphad:fix-long-texts

Conversation

@mayuriphad

Copy link
Copy Markdown

Fixes #16. The \RuntimeError: The size of tensor a must match the size of tensor b\ occurs because the tokenizer generates inputs larger than the model's max sequence length for long texts. Adding \ runcation=True\ to \encode_plus\ safely truncates context that exceeds max length, preventing the crash.

Copilot AI lite review requested due to automatic review settings September 15, 2026 04:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

models: rc: transformer models: Unable to process long texts

2 participants