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

ArnavKewalram
/
bge-small-code-v1

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

Instructions to use ArnavKewalram/bge-small-code-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use ArnavKewalram/bge-small-code-v1 with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("ArnavKewalram/bge-small-code-v1")
    
    sentences = [
        "Sets the global variables $rects and $origRectSpecs",
        "def modify_ranking(tournament):\n    database = TinyDB('db.json')\n    # recuperation de tous les joueurs du tournoi\n    players_table = database.table('players')\n    list_players = get_player_list(tournament)\n    # Modification du rang joueur par joueur\n    for player in list_players:\n        new_ranking = view.modify_ranking_view(player)\n        players_table.update({'Classement': new_ranking}, doc_ids=[player.doc_id])",
        "function setConstants() {\n        const wrapItems = \".image-analysis-wrapper .face-wrap, .image-analysis-wrapper .score-wrap, .image-analysis-wrapper .attribute-wrap, .image-analysis-wrapper .region-block, .image-analysis-wrapper .region-block .word-block .word-wrap\";\n\n        $rects = jQuery(\".image-analysis-wrapper .rectangle\");\n\n        // Iterate over each rectangle and save the width, height, top position,\n        // left position, closest stats block element, and position of the closest\n        // stats block element to an object.  Each object is then added to the \n        // $origRectSpecs array for global use.\n        $origRectSpecs = $rects.map(function () {\n            closestWrapItems = jQuery(this).siblings(wrapItems);\n\n            const stats = closestWrapItems.map(function () {\n                return {\n                    origStatTop: jQuery(this).position().top || parseInt(jQuery(this).css(\"top\")),\n                    origStatLeft: jQuery(this).position().left || parseInt(jQuery(this).css(\"left\"))\n                }\n            })\n\n            return {\n                origRectWidth: jQuery(this).width(),\n                origRectHeight: jQuery(this).height(),\n                origRectTop: jQuery(this).position().top || parseInt(jQuery(this).css(\"top\")), // if the rect is on a tab that is currently not displayed it has a position of 0, so this check gets the css instead so we don't lose the value\n                origRectLeft: jQuery(this).position().left || parseInt(jQuery(this).css(\"left\")),\n                statBlock: closestWrapItems[0],\n                statPosition: stats[0]\n            }\n        })\n    }",
        "reset() {\n\n        // Set the initial crop to match any given fixed aspect ratio (or\n        // default to a square crop 1:1).\n        let aspectRatio = this._initialAspectRatio\n\n        // Calculate the initial crop size such that it fits within the bounds\n        let width = getWidth(this.bounds)\n        let height = getWidth(this.bounds) / aspectRatio\n\n        if (aspectRatio < width / getHeight(this.bounds)) {\n            width = getHeight(this.bounds) * aspectRatio\n            height = getHeight(this.bounds)\n        }\n\n        // Calculate the initial crop position to be central to the bounds\n        const x = (getWidth(this.bounds) - width) / 2\n        const y = (getHeight(this.bounds) - height) / 2\n\n        // Set the region\n        this.region = [\n            [x, y],\n            [x + width, y + height]\n        ]\n    }"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
bge-small-code-v1
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
ArnavKewalram's picture
ArnavKewalram
Upload bge-small-code-v1 trained on CoRNStack
3c17337 verified 9 days ago
  • 1_Pooling
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • .gitattributes
    1.52 kB
    initial commit 9 days ago
  • README.md
    34.6 kB
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • config.json
    685 Bytes
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • config_sentence_transformers.json
    297 Bytes
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • model.safetensors
    133 MB
    xet
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • modules.json
    448 Bytes
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • sentence_bert_config.json
    250 Bytes
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • special_tokens_map.json
    732 Bytes
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • tokenizer.json
    712 kB
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • tokenizer_config.json
    1.33 kB
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago
  • vocab.txt
    232 kB
    Upload bge-small-code-v1 trained on CoRNStack 9 days ago