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
      • 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-v2-gemma

Text Classification
sentence-transformers
Safetensors
Transformers
multilingual
gemma
text-generation
Model card Files Files and versions
xet
Community
8

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

  • Libraries
  • sentence-transformers

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

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("BAAI/bge-reranker-v2-gemma")
    
    sentences = [
        "The weather is lovely today.",
        "It's so sunny outside!",
        "He drove to the stadium."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [3, 3]
  • Transformers

    How to use BAAI/bge-reranker-v2-gemma with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-classification", model="BAAI/bge-reranker-v2-gemma")
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForCausalLM
    
    tokenizer = AutoTokenizer.from_pretrained("BAAI/bge-reranker-v2-gemma")
    model = AutoModelForCausalLM.from_pretrained("BAAI/bge-reranker-v2-gemma")
  • Notebooks
  • Google Colab
  • Kaggle
bge-reranker-v2-gemma
10 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 15 commits
tomaarsen's picture
tomaarsen HF Staff
Update model metadata to set pipeline tag to the new `text-ranking` and library name to `sentence-transformers`
3117e4d verified about 1 year ago
  • assets
    Upload folder using huggingface_hub about 2 years ago
  • .gitattributes
    1.57 kB
    Upload tokenizer about 2 years ago
  • README.md
    17.2 kB
    Update model metadata to set pipeline tag to the new `text-ranking` and library name to `sentence-transformers` about 1 year ago
  • config.json
    659 Bytes
    Upload GemmaForCausalLM about 2 years ago
  • generation_config.json
    132 Bytes
    Upload GemmaForCausalLM about 2 years ago
  • model-00001-of-00003.safetensors
    4.91 GB
    xet
    Upload GemmaForCausalLM about 2 years ago
  • model-00002-of-00003.safetensors
    4.98 GB
    xet
    Upload GemmaForCausalLM about 2 years ago
  • model-00003-of-00003.safetensors
    134 MB
    xet
    Upload GemmaForCausalLM about 2 years ago
  • model.safetensors.index.json
    13.5 kB
    Upload GemmaForCausalLM about 2 years ago
  • special_tokens_map.json
    555 Bytes
    Upload tokenizer about 2 years ago
  • tokenizer.json
    17.5 MB
    xet
    Upload tokenizer about 2 years ago
  • tokenizer.model
    4.24 MB
    xet
    Upload tokenizer about 2 years ago
  • tokenizer_config.json
    1.11 kB
    Upload tokenizer about 2 years ago