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
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

efederici
/
sentence-bert-base

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

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

  • Libraries
  • sentence-transformers

    How to use efederici/sentence-bert-base with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("efederici/sentence-bert-base")
    
    sentences = [
        "Questa è una persona felice",
        "Questo è un cane felice",
        "Questa è una persona molto felice",
        "Oggi è una giornata di sole"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Transformers

    How to use efederici/sentence-bert-base with Transformers:

    # Load model directly
    from transformers import AutoTokenizer, AutoModel
    
    tokenizer = AutoTokenizer.from_pretrained("efederici/sentence-bert-base")
    model = AutoModel.from_pretrained("efederici/sentence-bert-base")
  • Notebooks
  • Google Colab
  • Kaggle
sentence-bert-base
441 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 12 commits
efederici's picture
efederici
Update README.md
d34e611 almost 3 years ago
  • 1_Pooling
    Added new model about 4 years ago
  • .gitattributes
    1.18 kB
    initial commit about 4 years ago
  • README.md
    3.43 kB
    Update README.md almost 3 years ago
  • config.json
    635 Bytes
    Added new model about 4 years ago
  • config_sentence_transformers.json
    124 Bytes
    Added new model about 4 years ago
  • modules.json
    229 Bytes
    Added new model about 4 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

    • "torch.LongStorage",
    • "torch.FloatStorage",
    • "collections.OrderedDict",
    • "torch._utils._rebuild_tensor_v2"

    What is a pickle import?

    440 MB
    xet
    Added new model about 4 years ago
  • sentence_bert_config.json
    53 Bytes
    Added new model about 4 years ago
  • special_tokens_map.json
    112 Bytes
    Added new model about 4 years ago
  • tokenizer.json
    725 kB
    Added new model about 4 years ago
  • tokenizer_config.json
    373 Bytes
    Added new model about 4 years ago
  • vocab.txt
    235 kB
    Added new model about 4 years ago