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

thanhpham1
/
Finetuned-all-mpnet-base-v2-with-technical-docs

Sentence Similarity
sentence-transformers
Safetensors
English
mpnet
feature-extraction
Generated from Trainer
dataset_size:5146
loss:MatryoshkaLoss
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Model card Files Files and versions
xet
Community

Instructions to use thanhpham1/Finetuned-all-mpnet-base-v2-with-technical-docs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use thanhpham1/Finetuned-all-mpnet-base-v2-with-technical-docs with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("thanhpham1/Finetuned-all-mpnet-base-v2-with-technical-docs")
    
    sentences = [
        "import subprocess\nzen_of_python = subprocess.check_output([\"python\", \"-c\", \"import this\"])\ncorpus = zen_of_python.split()\n\nnum_partitions = 3\nchunk = len(corpus) // num_partitions\npartitions = [\ncorpus[i * chunk: (i + 1) * chunk] for i in range(num_partitions)\n]\n\nMapping Data#\nTo determine the map phase, we require a map function to use on each document.\nThe output is the pair (word, 1) for every word found in a document.\nFor basic text documents we load as Python strings, the process is as follows:\n\ndef map_function(document):\nfor word in document.lower().split():\nyield word, 1\n\nWe use the apply_map function on a large collection of documents by marking it as a task in Ray using the @ray.remote decorator.\nWhen we call apply_map, we apply it to three sets of document data (num_partitions=3).\nThe apply_map function returns three lists, one for each partition so that Ray can rearrange the results of the map phase and distribute them to the appropriate nodes.\n\nimport ray",
        "What does the map_function yield for each word in a document?",
        "What does PBT do differently from traditional hyperparameter tuning methods?",
        "What is returned by task_with_static_multiple_returns_good in the Actor class?"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
Finetuned-all-mpnet-base-v2-with-technical-docs
439 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
thanhpham1's picture
thanhpham1
Add new SentenceTransformer model
47f2116 verified about 1 year ago
  • 1_Pooling
    Add new SentenceTransformer model about 1 year ago
  • .gitattributes
    1.52 kB
    initial commit about 1 year ago
  • README.md
    38.3 kB
    Add new SentenceTransformer model about 1 year ago
  • config.json
    551 Bytes
    Add new SentenceTransformer model about 1 year ago
  • config_sentence_transformers.json
    205 Bytes
    Add new SentenceTransformer model about 1 year ago
  • model.safetensors
    438 MB
    xet
    Add new SentenceTransformer model about 1 year ago
  • modules.json
    349 Bytes
    Add new SentenceTransformer model about 1 year ago
  • sentence_bert_config.json
    53 Bytes
    Add new SentenceTransformer model about 1 year ago
  • special_tokens_map.json
    964 Bytes
    Add new SentenceTransformer model about 1 year ago
  • tokenizer.json
    711 kB
    Add new SentenceTransformer model about 1 year ago
  • tokenizer_config.json
    1.62 kB
    Add new SentenceTransformer model about 1 year ago
  • vocab.txt
    232 kB
    Add new SentenceTransformer model about 1 year ago