Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

openbmb
/
MiniCPM-Reranker-Light

Text Ranking
Transformers
Safetensors
sentence-transformers
Chinese
English
minicpm
text-classification
custom_code
Model card Files Files and versions
xet
Community
1

Instructions to use openbmb/MiniCPM-Reranker-Light with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use openbmb/MiniCPM-Reranker-Light with Transformers:

    # Load model directly
    from transformers import AutoModelForSequenceClassification
    model = AutoModelForSequenceClassification.from_pretrained("openbmb/MiniCPM-Reranker-Light", trust_remote_code=True, dtype="auto")
  • sentence-transformers

    How to use openbmb/MiniCPM-Reranker-Light with sentence-transformers:

    from sentence_transformers import CrossEncoder
    
    model = CrossEncoder("openbmb/MiniCPM-Reranker-Light", trust_remote_code=True)
    
    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)
  • Notebooks
  • Google Colab
  • Kaggle
MiniCPM-Reranker-Light
2.73 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 13 commits
Kaguya-19's picture
Kaguya-19
tomaarsen's picture
tomaarsen HF Staff
Update model metadata to set pipeline tag to the new `text-ranking` (#1)
bd1c130 verified 11 months ago
  • scripts
    Update scripts/transformers_demo.py over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    10.7 kB
    Update model metadata to set pipeline tag to the new `text-ranking` (#1) 11 months ago
  • config.json
    2.94 kB
    Update config.json over 1 year ago
  • configuration_minicpm.py
    9.83 kB
    init over 1 year ago
  • model.safetensors
    2.72 GB
    xet
    init over 1 year ago
  • modeling_minicpm.py
    74.8 kB
    init over 1 year ago
  • special_tokens_map.json
    552 Bytes
    init over 1 year ago
  • tokenizer.json
    3.68 MB
    init over 1 year ago
  • tokenizer.model
    1.18 MB
    xet
    init over 1 year ago
  • tokenizer_config.json
    1.18 kB
    init over 1 year ago