Sentence Similarity
sentence-transformers
Safetensors
modernbert
dataset_size:901028
loss:CosineSimilarityLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use Shuu12121/CodeCloneDetection-ModernBERT-Owl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Shuu12121/CodeCloneDetection-ModernBERT-Owl with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Shuu12121/CodeCloneDetection-ModernBERT-Owl") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -127,6 +127,8 @@ else:
|
|
| 127 |
print("🔴 These code snippets are NOT considered clones.")
|
| 128 |
```
|
| 129 |
## 🧪 How to Test
|
|
|
|
|
|
|
| 130 |
!pip install -U sentence-transformers datasets
|
| 131 |
|
| 132 |
from sentence_transformers import SentenceTransformer
|
|
|
|
| 127 |
print("🔴 These code snippets are NOT considered clones.")
|
| 128 |
```
|
| 129 |
## 🧪 How to Test
|
| 130 |
+
|
| 131 |
+
```python
|
| 132 |
!pip install -U sentence-transformers datasets
|
| 133 |
|
| 134 |
from sentence_transformers import SentenceTransformer
|