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

  • Log In
  • Sign Up

NbAiLab
/
nb-sbert-base

Sentence Similarity
sentence-transformers
PyTorch
Safetensors
Transformers
Norwegian
bert
feature-extraction
text-embeddings-inference
Model card Files Files and versions
xet
Community
6

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

  • Libraries
  • sentence-transformers

    How to use NbAiLab/nb-sbert-base with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("NbAiLab/nb-sbert-base")
    
    sentences = [
        "This is a Norwegian boy",
        "Dette er en norsk gutt",
        "This is an English boy",
        "This is a dog"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Transformers

    How to use NbAiLab/nb-sbert-base with Transformers:

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

Two questions: is max_seq_length = 75 ? If so, why 75?

2
#5 opened almost 2 years ago by
hfsamhenry

The model card seems to lack licensing info

#3 opened almost 2 years ago by
perisolb-chronos
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs