Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • 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
3.36 GB
Ctrl+K
Ctrl+K
  • 5 contributors
History: 20 commits
Shitao's picture
Shitao
philschmid's picture
philschmid
Add TEI support tag (#19)
2cfc18c verified over 2 years ago
  • onnx
    add onnx files and readme for usage with onnx (#14) over 2 years ago
  • .gitattributes
    1.56 kB
    Add fast tokenizer (#5) almost 3 years ago
  • README.md
    34.1 kB
    Add TEI support tag (#19) over 2 years ago
  • config.json
    799 Bytes
    upload about 3 years ago
  • model.safetensors
    1.11 GB
    xet
    Adding `safetensors` variant of this model (#6) almost 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.json
    17.1 MB
    xet
    Add fast tokenizer (#5) almost 3 years ago
  • tokenizer_config.json
    443 Bytes
    upload about 3 years ago