Sentence Similarity
sentence-transformers
Safetensors
modernbert
feature-extraction
Generated from Trainer
dataset_size:3999600
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use Shuu12121/CodeSearch-ModernBERT-Owl-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Shuu12121/CodeSearch-ModernBERT-Owl-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Shuu12121/CodeSearch-ModernBERT-Owl-v1") sentences = [ "The list of databases\n\nGenerated from protobuf field <code>repeated .google.cloud.alloydb.v1.Database databases = 1;</code>\n@param array<\\Google\\Cloud\\AlloyDb\\V1\\Database>|\\Google\\Protobuf\\Internal\\RepeatedField $var\n@return $this", "public function setDatabases($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\AlloyDb\\V1\\Database::class);\n $this->databases = $arr;\n\n return $this;\n }", "public function toApiArray($row, $role = 'guest', $deep = true)\n {\n return $row;\n }", "def adapter( type = :file, *args, &block )\n adapters.add(type, *args, &block)\n end" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download tokenizer.json from Shuu12121/CodeSearch-ModernBERT-Owl-v1: direct link, hf CLI and curl.
- Browser
- Download file 3.61 MB
-
https://huggingface.co/Shuu12121/CodeSearch-ModernBERT-Owl-v1/resolve/main/tokenizer.json
- Command line
-
hf download hf://Shuu12121/CodeSearch-ModernBERT-Owl-v1/tokenizer.json
-
curl -L -o tokenizer.json https://huggingface.co/Shuu12121/CodeSearch-ModernBERT-Owl-v1/resolve/main/tokenizer.json
3.61 MB
File too large to display, you can check the raw version instead.