-
Notifications
You must be signed in to change notification settings - Fork 401
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
truncation cause error while using bert_score
#2673
Comments
Hi! thanks for your contribution!, great first issue! |
bert_score
that is a good question @stancld?
|
Sure, my pleasure! I'll get down to it as soon as possible! |
@zhoubay how is it going here? |
While using
bert_score
, I'm trying to use a model that restricted to 512 tokens, i.e.BiomedNLP-PubMedBERT-base-uncased-abstract-fulltext
. But there's an error implying I'm trying to use larger tensor than 512 tokens, even though I set themax_length
as something lower than512
, that is500
.The snippets here:
After detailed checking codes, the culprit is the following line, which setting
truncation
asFalse
.torchmetrics/src/torchmetrics/text/bert.py
Line 213 in 6a2fc72
May I ask why using this? Or could there be a flag that control whether truncate or not?
The text was updated successfully, but these errors were encountered: