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

  • Log In
  • Sign Up

Devy1
/
MiniLM-cosqa-32

Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
dense
Generated from Trainer
dataset_size:9020
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Model card Files Files and versions
xet
Community

Instructions to use Devy1/MiniLM-cosqa-32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use Devy1/MiniLM-cosqa-32 with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("Devy1/MiniLM-cosqa-32")
    
    sentences = [
        "python multiprocessing show cpu count",
        "def unique(seq):\n    \"\"\"Return the unique elements of a collection even if those elements are\n       unhashable and unsortable, like dicts and sets\"\"\"\n    cleaned = []\n    for each in seq:\n        if each not in cleaned:\n            cleaned.append(each)\n    return cleaned",
        "def is_in(self, point_x, point_y):\n        \"\"\" Test if a point is within this polygonal region \"\"\"\n\n        point_array = array(((point_x, point_y),))\n        vertices = array(self.points)\n        winding = self.inside_rule == \"winding\"\n        result = points_in_polygon(point_array, vertices, winding)\n        return result[0]",
        "def machine_info():\n    \"\"\"Retrieve core and memory information for the current machine.\n    \"\"\"\n    import psutil\n    BYTES_IN_GIG = 1073741824.0\n    free_bytes = psutil.virtual_memory().total\n    return [{\"memory\": float(\"%.1f\" % (free_bytes / BYTES_IN_GIG)), \"cores\": multiprocessing.cpu_count(),\n             \"name\": socket.gethostname()}]"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
MiniLM-cosqa-32
91.9 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
Devy1's picture
Devy1
Add new SentenceTransformer model
38d8dec verified 7 months ago
  • 1_Pooling
    Add new SentenceTransformer model 7 months ago
  • .gitattributes
    1.52 kB
    initial commit 7 months ago
  • README.md
    47.2 kB
    Add new SentenceTransformer model 7 months ago
  • config.json
    611 Bytes
    Add new SentenceTransformer model 7 months ago
  • config_sentence_transformers.json
    283 Bytes
    Add new SentenceTransformer model 7 months ago
  • model.safetensors
    90.9 MB
    xet
    Add new SentenceTransformer model 7 months ago
  • modules.json
    349 Bytes
    Add new SentenceTransformer model 7 months ago
  • sentence_bert_config.json
    57 Bytes
    Add new SentenceTransformer model 7 months ago
  • special_tokens_map.json
    695 Bytes
    Add new SentenceTransformer model 7 months ago
  • tokenizer.json
    712 kB
    Add new SentenceTransformer model 7 months ago
  • tokenizer_config.json
    1.46 kB
    Add new SentenceTransformer model 7 months ago
  • vocab.txt
    232 kB
    Add new SentenceTransformer model 7 months ago