Skip to content

ERROR: padding_idx must be within num_embeddings #200

@Jacoblincc

Description

@Jacoblincc

this is my code:

bert_model_path = "/data01/preModels/roberta-large"
P, R, F1 = bert_score(
[generated_answer],
[expected_answer],
model_type=bert_model_path,
num_layers=24,
# verbose=True
)

the generated_answer and expected_answer is a string.
I can use this code in a new .py file, but when i put it in my project(ft llm), it occur this error.[ERROR: padding_idx must be within num_embeddings]
my transformer version is 4.49.0 and bert-score version is 0.3.13

how can i solve it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions