Sentence Similarity
sentence-transformers
Safetensors
gemma3_text
feature-extraction
dense
Generated from Trainer
dataset_size:2609
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use TextModel/Embedding-crime-indo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use TextModel/Embedding-crime-indo with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("TextModel/Embedding-crime-indo") sentences = [ "query: Kalau si koruptor ternyata udah nggak punya harta lagi buat bayar uang pengganti, apa konsekuensinya?", "passage: Hukumnya adalah tindak pidana yang diancam dengan pidana penjara paling lama 4 tahun atau pidana denda paling banyak kategori IV karena menggunakan ancaman kekerasan. (Pasal 302 KUHP)", "passage: Kalau harta bendanya tidak mencukupi, terpidana bisa dipidana penjara yang lamanya tidak melebihi ancaman maksimum pidana pokoknya dan sudah ditentukan langsung di dalam putusan pengadilan.", "passage: Penyitaan dan pelelangan harta bila uang pengganti tidak dibayar." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Add new SentenceTransformer model
Browse files- 2_Dense/model.safetensors +1 -1
- 3_Dense/model.safetensors +1 -1
- README.md +12 -12
- model.safetensors +1 -1
2_Dense/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9437272
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd47a06904e2227963bc08edd2ac82e2d54130b6676ef5efddbaa44aa9e84fc8
|
| 3 |
size 9437272
|
3_Dense/model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 9437272
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f84cfba6a5e5a50f210d275d559f6fbb58766490c4beb9407419a5cd7e0ad0d3
|
| 3 |
size 9437272
|
README.md
CHANGED
|
@@ -104,7 +104,7 @@ model-index:
|
|
| 104 |
type: val
|
| 105 |
metrics:
|
| 106 |
- type: cosine_accuracy
|
| 107 |
-
value: 0.
|
| 108 |
name: Cosine Accuracy
|
| 109 |
- task:
|
| 110 |
type: triplet
|
|
@@ -114,7 +114,7 @@ model-index:
|
|
| 114 |
type: test
|
| 115 |
metrics:
|
| 116 |
- type: cosine_accuracy
|
| 117 |
-
value: 0.
|
| 118 |
name: Cosine Accuracy
|
| 119 |
---
|
| 120 |
|
|
@@ -185,7 +185,7 @@ print(query_embeddings.shape, document_embeddings.shape)
|
|
| 185 |
# Get the similarity scores for the embeddings
|
| 186 |
similarities = model.similarity(query_embeddings, document_embeddings)
|
| 187 |
print(similarities)
|
| 188 |
-
# tensor([[0.
|
| 189 |
```
|
| 190 |
|
| 191 |
<!--
|
|
@@ -223,7 +223,7 @@ You can finetune this model on your own dataset.
|
|
| 223 |
|
| 224 |
| Metric | val | test |
|
| 225 |
|:--------------------|:-----------|:-----------|
|
| 226 |
-
| **cosine_accuracy** | **0.
|
| 227 |
|
| 228 |
<!--
|
| 229 |
## Bias, Risks and Limitations
|
|
@@ -413,14 +413,14 @@ You can finetune this model on your own dataset.
|
|
| 413 |
</details>
|
| 414 |
|
| 415 |
### Training Logs
|
| 416 |
-
| Epoch | Step
|
| 417 |
-
|:-------:|:------:|:-------------:|:---------------:|:-------------------:|:--------------------:|
|
| 418 |
-
| -1 | -1
|
| 419 |
-
|
|
| 420 |
-
| 2.0
|
| 421 |
-
| 3.0 | 246
|
| 422 |
-
| 4.0 | 328
|
| 423 |
-
| -1 | -1
|
| 424 |
|
| 425 |
* The bold row denotes the saved checkpoint.
|
| 426 |
|
|
|
|
| 104 |
type: val
|
| 105 |
metrics:
|
| 106 |
- type: cosine_accuracy
|
| 107 |
+
value: 0.9465753436088562
|
| 108 |
name: Cosine Accuracy
|
| 109 |
- task:
|
| 110 |
type: triplet
|
|
|
|
| 114 |
type: test
|
| 115 |
metrics:
|
| 116 |
- type: cosine_accuracy
|
| 117 |
+
value: 0.9357045292854309
|
| 118 |
name: Cosine Accuracy
|
| 119 |
---
|
| 120 |
|
|
|
|
| 185 |
# Get the similarity scores for the embeddings
|
| 186 |
similarities = model.similarity(query_embeddings, document_embeddings)
|
| 187 |
print(similarities)
|
| 188 |
+
# tensor([[0.7065, 0.5494, 0.1299]])
|
| 189 |
```
|
| 190 |
|
| 191 |
<!--
|
|
|
|
| 223 |
|
| 224 |
| Metric | val | test |
|
| 225 |
|:--------------------|:-----------|:-----------|
|
| 226 |
+
| **cosine_accuracy** | **0.9466** | **0.9357** |
|
| 227 |
|
| 228 |
<!--
|
| 229 |
## Bias, Risks and Limitations
|
|
|
|
| 413 |
</details>
|
| 414 |
|
| 415 |
### Training Logs
|
| 416 |
+
| Epoch | Step | Training Loss | Validation Loss | val_cosine_accuracy | test_cosine_accuracy |
|
| 417 |
+
|:-------:|:-------:|:-------------:|:---------------:|:-------------------:|:--------------------:|
|
| 418 |
+
| -1 | -1 | - | - | 0.9192 | 0.9097 |
|
| 419 |
+
| 1.0 | 82 | 0.2979 | 0.2212 | 0.9438 | - |
|
| 420 |
+
| **2.0** | **164** | **0.1132** | **0.2597** | **0.9466** | **-** |
|
| 421 |
+
| 3.0 | 246 | 0.0371 | 0.2365 | 0.9411 | - |
|
| 422 |
+
| 4.0 | 328 | 0.0233 | 0.2106 | 0.9411 | - |
|
| 423 |
+
| -1 | -1 | - | - | 0.9466 | 0.9357 |
|
| 424 |
|
| 425 |
* The bold row denotes the saved checkpoint.
|
| 426 |
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1211486072
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b06c1283581cb3ba0c854f909f1470fdfbbea8f0eb9c7ee34d460fc307e1ecd2
|
| 3 |
size 1211486072
|