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

  • Log In
  • Sign Up

hkunlp
/
instructor-base

Sentence Similarity
sentence-transformers
PyTorch
Transformers
English
t5
text-embedding
embeddings
information-retrieval
beir
text-classification
language-model
text-clustering
text-semantic-similarity
text-evaluation
prompt-retrieval
text-reranking
feature-extraction
English
Sentence Similarity
natural_questions
ms_marco
fever
hotpot_qa
mteb
Eval Results (legacy)
Model card Files Files and versions
xet
Community
11

Instructions to use hkunlp/instructor-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use hkunlp/instructor-base with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("hkunlp/instructor-base")
    
    sentences = [
        "That is a happy person",
        "That is a happy dog",
        "That is a very happy person",
        "Today is a sunny day"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Transformers

    How to use hkunlp/instructor-base with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("hkunlp/instructor-base")
    model = AutoModel.from_pretrained("hkunlp/instructor-base")
  • Notebooks
  • Google Colab
  • Kaggle
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

Adding `safetensors` variant of this model

#11 opened over 1 year ago by
SFconvertbot

Instruct Embedding error

1
#10 opened almost 2 years ago by
ASH3002

Training the model from scratch

1
#9 opened over 2 years ago by
Mohammadreza

Update 1_Pooling/config.json

#8 opened almost 3 years ago by
usoni1

Multi Modal Capabilities?

1
#7 opened over 3 years ago by
Vvkishere

Issues when using in Colab & Sentence Transformers

14
#6 opened over 3 years ago by
Vvkishere

Fine-tuning and multilingual capability

1
#5 opened over 3 years ago by
adrien-alloreview

display benchmark metrics for base sized model

👍 1
4
#3 opened over 3 years ago by
MoritzLaurer
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs