Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

BAAI
/
bge-reranker-base

Text Classification
sentence-transformers
PyTorch
ONNX
Safetensors
English
Chinese
xlm-roberta
mteb
text-embeddings-inference
Eval Results (legacy)
Model card Files Files and versions
xet
Community
27

Instructions to use BAAI/bge-reranker-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use BAAI/bge-reranker-base with sentence-transformers:

    from sentence_transformers import CrossEncoder
    
    model = CrossEncoder("BAAI/bge-reranker-base")
    
    query = "Which planet is known as the Red Planet?"
    passages = [
    	"Venus is often called Earth's twin because of its similar size and proximity.",
    	"Mars, known for its reddish appearance, is often referred to as the Red Planet.",
    	"Jupiter, the largest planet in our solar system, has a prominent red spot.",
    	"Saturn, famous for its rings, is sometimes mistaken for the Red Planet."
    ]
    
    scores = model.predict([(query, passage) for passage in passages])
    print(scores)
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
bge-reranker-base
2.23 GB
Ctrl+K
Ctrl+K
  • 5 contributors
History: 6 commits
SFconvertbot's picture
SFconvertbot
Adding `safetensors` variant of this model
76eb976 about 3 years ago
  • .gitattributes
    1.52 kB
    initial commit about 3 years ago
  • README.md
    25.5 kB
    update about 3 years ago
  • config.json
    799 Bytes
    upload about 3 years ago
  • model.safetensors
    1.11 GB
    xet
    Adding `safetensors` variant of this model about 3 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

    • "torch.FloatStorage",
    • "collections.OrderedDict",
    • "torch._utils._rebuild_tensor_v2",
    • "torch.LongStorage"

    What is a pickle import?

    1.11 GB
    xet
    upload about 3 years ago
  • sentencepiece.bpe.model
    5.07 MB
    xet
    upload about 3 years ago
  • special_tokens_map.json
    279 Bytes
    upload about 3 years ago
  • tokenizer_config.json
    443 Bytes
    upload about 3 years ago