Skip to content

can't load reranker-v2-minicpm-layerwise model #721

@AlexYoung757

Description

@AlexYoung757

when uses code like this:

from FlagEmbedding import LayerWiseFlagLLMReranker

reranker = LayerWiseFlagLLMReranker('/path/bge-reranker-v2-minicpm-layerwise', use_fp16=True) 

score = reranker.compute_score(['query', 'passage'], cutoff_layers=[28]) # Adjusting 'cutoff_layers' to pick which layers are used for computing the score.
print(score)

environment

transformer==4.38.2
FlagEmbedding==1.2.9
sentence-transformers==2.6.1

so, the error as follow:
Could not locate the configuration_minicpm_reranker.py inside BAAI/bge-reranker-v2-minicpm-layerwise.

OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like BAAI/bge-reranker-v2-minicpm-layerwise is not the path to a directory containing a file named configuration_minicpm_reranker.py.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

But i have download the minicpm-layerwise model, and set the path. anyone have same question?

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