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

cross-encoder
/
monoelectra-large

Text Ranking
sentence-transformers
ONNX
Safetensors
OpenVINO
Transformers
English
electra
text-classification
custom_code
Model card Files Files and versions
xet
Community

Instructions to use cross-encoder/monoelectra-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use cross-encoder/monoelectra-large with sentence-transformers:

    from sentence_transformers import CrossEncoder
    
    model = CrossEncoder("cross-encoder/monoelectra-large", 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)
  • Transformers

    How to use cross-encoder/monoelectra-large with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModelForSequenceClassification
    
    tokenizer = AutoTokenizer.from_pretrained("cross-encoder/monoelectra-large", trust_remote_code=True)
    model = AutoModelForSequenceClassification.from_pretrained("cross-encoder/monoelectra-large", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
monoelectra-large
Ctrl+K
Ctrl+K
  • 5 contributors
History: 8 commits
Tom Aarsen
Integrate with (Sentence) Transformers
faf7512 over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • README.md
    2.54 kB
    Integrate with (Sentence) Transformers over 1 year ago
  • config.json
    1.18 kB
    Integrate with (Sentence) Transformers over 1 year ago
  • model.safetensors
    1.34 GB
    xet
    Integrate with (Sentence) Transformers over 1 year ago
  • modeling.py
    3.96 kB
    Integrate with (Sentence) Transformers over 1 year ago
  • special_tokens_map.json
    695 Bytes
    upload model about 2 years ago
  • tokenizer.json
    711 kB
    upload model about 2 years ago
  • tokenizer_config.json
    1.24 kB
    upload model about 2 years ago
  • vocab.txt
    232 kB
    upload model about 2 years ago