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

agentlans
/
e5-small-v2-nli

Text Classification
sentence-transformers
Safetensors
Transformers
English
bert
natural-language-inference
nlp
model-card
text-embeddings-inference
Model card Files Files and versions
xet
Community

Instructions to use agentlans/e5-small-v2-nli with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use agentlans/e5-small-v2-nli with sentence-transformers:

    from sentence_transformers import CrossEncoder
    
    model = CrossEncoder("agentlans/e5-small-v2-nli")
    
    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 agentlans/e5-small-v2-nli with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("text-classification", model="agentlans/e5-small-v2-nli")
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoTokenizer, AutoModelForSequenceClassification
    
    tokenizer = AutoTokenizer.from_pretrained("agentlans/e5-small-v2-nli")
    model = AutoModelForSequenceClassification.from_pretrained("agentlans/e5-small-v2-nli", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
e5-small-v2-nli
134 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 4 commits
agentlans's picture
agentlans
Update README.md
6da84ba verified almost 2 years ago
  • .gitattributes
    1.52 kB
    initial commit almost 2 years ago
  • README.md
    4.04 kB
    Update README.md almost 2 years ago
  • config.json
    849 Bytes
    Upload 7 files almost 2 years ago
  • model.safetensors
    133 MB
    xet
    Upload 7 files almost 2 years ago
  • special_tokens_map.json
    695 Bytes
    Upload 7 files almost 2 years ago
  • tokenizer.json
    711 kB
    Upload 7 files almost 2 years ago
  • tokenizer_config.json
    1.19 kB
    Upload 7 files almost 2 years ago
  • training_args.bin
    5.24 kB
    xet
    Upload 7 files almost 2 years ago
  • vocab.txt
    232 kB
    Upload 7 files almost 2 years ago