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

  • Log In
  • Sign Up

kamp0010
/
all-minilm-l6-v2-code

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

Instructions to use kamp0010/all-minilm-l6-v2-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use kamp0010/all-minilm-l6-v2-code with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("kamp0010/all-minilm-l6-v2-code")
    
    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
  • Local Apps
  • Unsloth Studio new

    How to use kamp0010/all-minilm-l6-v2-code with Unsloth Studio:

    Install Unsloth Studio (macOS, Linux, WSL)
    curl -fsSL https://unsloth.ai/install.sh | sh
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for kamp0010/all-minilm-l6-v2-code to start chatting
    Install Unsloth Studio (Windows)
    irm https://unsloth.ai/install.ps1 | iex
    # Run unsloth studio
    unsloth studio -H 0.0.0.0 -p 8888
    # Then open http://localhost:8888 in your browser
    # Search for kamp0010/all-minilm-l6-v2-code to start chatting
    Using HuggingFace Spaces for Unsloth
    # No setup required
    # Open https://huggingface.co/spaces/unsloth/studio in your browser
    # Search for kamp0010/all-minilm-l6-v2-code to start chatting
    Load model with FastModel
    pip install unsloth
    from unsloth import FastModel
    model, tokenizer = FastModel.from_pretrained(
        model_name="kamp0010/all-minilm-l6-v2-code",
        max_seq_length=2048,
    )
all-minilm-l6-v2-code
57.2 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 5 commits
Think
Upload config.json
1c25b8b verified 3 months ago
  • 1_Pooling
    Upload config.json 3 months ago
  • .gitattributes
    1.52 kB
    initial commit 3 months ago
  • README.md
    29.1 kB
    Upload 12 files 3 months ago
  • adapter_config.json
    1.01 kB
    Upload 12 files 3 months ago
  • adapter_model.safetensors
    10.8 MB
    xet
    Upload 12 files 3 months ago
  • config.json
    611 Bytes
    Upload 12 files 3 months ago
  • config_sentence_transformers.json
    284 Bytes
    Upload 12 files 3 months ago
  • model.safetensors
    45.4 MB
    xet
    Upload 12 files 3 months ago
  • modules.json
    349 Bytes
    Upload 12 files 3 months ago
  • sentence_bert_config.json
    57 Bytes
    Upload 12 files 3 months ago
  • special_tokens_map.json
    695 Bytes
    Upload 12 files 3 months ago
  • tokenizer.json
    712 kB
    Upload 12 files 3 months ago
  • tokenizer_config.json
    1.46 kB
    Upload 12 files 3 months ago
  • vocab.txt
    232 kB
    Upload 12 files 3 months ago