Sentence Similarity
sentence-transformers
Safetensors
modernbert
feature-extraction
dense
Generated from Trainer
dataset_size:193623
loss:CachedMultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use benjamintli/modernbert-code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use benjamintli/modernbert-code with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("benjamintli/modernbert-code") sentences = [ "@Override\n public void encode(final OtpOutputStream buf) {\n final int arity = elems.length;\n\n buf.write_tuple_head(arity);\n\n for (int i = 0; i < arity; i++) {\n buf.write_any(elems[i]);\n }\n }", "fetch function with the same interface than in cozy-client-js", "Convert this tuple to the equivalent Erlang external representation.\n\n@param buf\nan output stream to which the encoded tuple should be written.", "Delete a customer by it's id.\n\n@param int $id The id\n\n@return bool\n@throws \\Throwable in case something went wrong when deleting." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
- Xet hash:
- 21d1eecd13d6b57d3d315b310c94ca4c81c6444b52d641790b283a789f96678d
- Size of remote file:
- 5.59 kB
- SHA256:
- 2ff63002b0696e0bca298d7362e777fb1495a075596d5a061a731da2a4ff77be
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.