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

  • Log In
  • Sign Up

kamp0010
/
test

Sentence Similarity
sentence-transformers
Safetensors
English
feature-extraction
dense
Generated from Trainer
dataset_size:1375067
loss:MultipleNegativesRankingLoss
Model card Files Files and versions
xet
Community

Instructions to use kamp0010/test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use kamp0010/test with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("kamp0010/test")
    
    sentences = [
        "Modify the inner parameters of the Kepler propagator in order to place\n        the spacecraft in the right Sphere of Influence",
        "func (c *Conn) SetDeadline(t time.Time) error {\n\treturn c.p.SetDeadline(t)\n}",
        "def _change_soi(self, body):\n        \n\n        if body == self.central:\n            self.bodies = [self.central]\n            self.step = self.central_step\n            self.active = self.central.name\n            self.frame = self.central.name\n        else:\n            soi = self.SOI[body.name]\n            self.bodies = [body]\n            self.step = self.alt_step\n            self.active = body.name\n            self.frame = soi.frame",
        "def main(args=None):\n    \"\"\"\"\"\"\n    parser = _parser()\n\n    # Python 2 will error 'too few arguments' if no subcommand is supplied.\n    # No such error occurs in Python 3, which makes it feasible to check\n    # whether a subcommand was provided (displaying a help message if not).\n    # argparse internals vary significantly over the major versions, so it's\n    # much easier to just override the args passed to it. In this case, print\n    # the usage message if there are no args.\n    if args is None and len(sys.argv) <= 1:\n        sys.argv.append('--help')\n\n    options = parser.parse_args(args)\n\n    # pass options to subcommand\n    options.func(options)\n\n    return 0"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
test
11.8 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
kamp0010's picture
kamp0010
Upload 11 files
d7d31ca verified 3 months ago
  • 1_Pooling
    Upload 11 files 3 months ago
  • .gitattributes
    1.52 kB
    initial commit 3 months ago
  • README.md
    28.8 kB
    Upload 11 files 3 months ago
  • adapter_config.json
    1.01 kB
    Upload 11 files 3 months ago
  • adapter_model.safetensors
    10.8 MB
    xet
    Upload 11 files 3 months ago
  • config_sentence_transformers.json
    284 Bytes
    Upload 11 files 3 months ago
  • modules.json
    349 Bytes
    Upload 11 files 3 months ago
  • sentence_bert_config.json
    57 Bytes
    Upload 11 files 3 months ago
  • special_tokens_map.json
    695 Bytes
    Upload 11 files 3 months ago
  • tokenizer.json
    712 kB
    Upload 11 files 3 months ago
  • tokenizer_config.json
    1.46 kB
    Upload 11 files 3 months ago
  • vocab.txt
    232 kB
    Upload 11 files 3 months ago