Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • 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

Shuu12121
/
CodeSearch-ModernBERT-Owl-4.1-Plus

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

Instructions to use Shuu12121/CodeSearch-ModernBERT-Owl-4.1-Plus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • sentence-transformers

    How to use Shuu12121/CodeSearch-ModernBERT-Owl-4.1-Plus with sentence-transformers:

    from sentence_transformers import SentenceTransformer
    
    model = SentenceTransformer("Shuu12121/CodeSearch-ModernBERT-Owl-4.1-Plus")
    
    sentences = [
        "Create a function to call with simple and hard types This is done so simple types don't need to check for hard types",
        "function copyHead(headHtml, doc) {\n        var head = doc.getElementsByTagName('head')[0];\n\n        if (head.innerHTML == headHtml) {\n            // the content is already correct\n            return;\n        }\n\n        jQuery.init(head).empty();\n\n        appendHTML(headHtml, head);\n    }",
        "func compress(value float64) int16 {\n\ti := int16(precision*math.Log(1.0+math.Abs(value)) + 0.5)\n\tif value < 0 {\n\t\treturn -1 * i\n\t}\n\treturn i\n}",
        "function (types, hard) {\n            for (var t in types) {\n                if (types.hasOwnProperty(t)) {\n                    (function (prop) {\n                        Object.defineProperty(props, prop, {\n                            get: function () {\n                                for (var i = 0; i < inputs.length; ++i) {\n                                    if (!checkType(prop, inputs[i], hard)) {\n                                        return false;\n                                    }\n                                }\n                                return true;\n                            }\n                        });\n                    }(t));\n                }\n            }\n        }"
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [4, 4]
  • Notebooks
  • Google Colab
  • Kaggle
CodeSearch-ModernBERT-Owl-4.1-Plus
612 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
Shuu12121's picture
Shuu12121
Upload ModernBERT model
dcdc104 verified over 1 year ago
  • 1_Pooling
    Upload ModernBERT model over 1 year ago
  • .gitattributes
    1.52 kB
    initial commit over 1 year ago
  • README.md
    31 kB
    Upload ModernBERT model over 1 year ago
  • added_tokens.json
    36 Bytes
    Upload ModernBERT model over 1 year ago
  • config.json
    1.3 kB
    Upload ModernBERT model over 1 year ago
  • config_sentence_transformers.json
    205 Bytes
    Upload ModernBERT model over 1 year ago
  • merges.txt
    481 kB
    Upload ModernBERT model over 1 year ago
  • model.safetensors
    607 MB
    xet
    Upload ModernBERT model over 1 year ago
  • modules.json
    229 Bytes
    Upload ModernBERT model over 1 year ago
  • sentence_bert_config.json
    54 Bytes
    Upload ModernBERT model over 1 year ago
  • special_tokens_map.json
    961 Bytes
    Upload ModernBERT model over 1 year ago
  • tokenizer.json
    3.6 MB
    Upload ModernBERT model over 1 year ago
  • tokenizer_config.json
    1.72 kB
    Upload ModernBERT model over 1 year ago
  • vocab.json
    821 kB
    Upload ModernBERT model over 1 year ago