Skip to content

question: calculate input_tokens about bge-reranker-v2-gemma #1559

@llyycchhee

Description

@llyycchhee

你好,我在使用FlagLLMReranker调用compute_score时,发现模型forward了两次。我是通过在forward时 对attention_mask.sum().item()进行累计来获取input_tokens的。想请问下这个现象正常吗?我想要获取input_tokens是否只需要计算一次就可。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions