Sentence Similarity
sentence-transformers
Safetensors
English
modernbert
feature-extraction
dense
Generated from Trainer
dataset_size:19963
loss:CachedMultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use benjamintli/modernbert-cosqa-hard-negatives with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use benjamintli/modernbert-cosqa-hard-negatives with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("benjamintli/modernbert-cosqa-hard-negatives") sentences = [ "python string to microseconds", "def seconds_to_hms(seconds):\n \"\"\"\n Converts seconds float to 'hh:mm:ss.ssssss' format.\n \"\"\"\n hours = int(seconds / 3600.0)\n minutes = int((seconds / 60.0) % 60.0)\n secs = float(seconds % 60.0)\n return \"{0:02d}:{1:02d}:{2:02.6f}\".format(hours, minutes, secs)", "def align_file_position(f, size):\n \"\"\" Align the position in the file to the next block of specified size \"\"\"\n align = (size - 1) - (f.tell() % size)\n f.seek(align, 1)", "def timestamp_to_microseconds(timestamp):\n \"\"\"Convert a timestamp string into a microseconds value\n :param timestamp\n :return time in microseconds\n \"\"\"\n timestamp_str = datetime.datetime.strptime(timestamp, ISO_DATETIME_REGEX)\n epoch_time_secs = calendar.timegm(timestamp_str.timetuple())\n epoch_time_mus = epoch_time_secs * 1e6 + timestamp_str.microsecond\n return epoch_time_mus" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Training in progress, epoch 10
Browse files
eval/Information-Retrieval_evaluation_eval_results.csv
CHANGED
|
@@ -8,3 +8,4 @@ epoch,steps,cosine-Accuracy@1,cosine-Accuracy@3,cosine-Accuracy@5,cosine-Accurac
|
|
| 8 |
7.0,140,0.5466426318161334,0.8580441640378549,0.9269941415051826,0.9734114465975665,0.5466426318161334,0.5466426318161334,0.28601472134595163,0.8580441640378549,0.1853988283010365,0.9269941415051826,0.09734114465975663,0.9734114465975665,0.7100227472692533,0.7753865487291295,0.7115503830684274
|
| 9 |
8.0,160,0.5497972059486255,0.857593510590356,0.9283461018476792,0.975214060387562,0.5497972059486255,0.5497972059486255,0.28586450353011866,0.857593510590356,0.18566922036953581,0.9283461018476792,0.09752140603875618,0.975214060387562,0.7116477821412461,0.7770233022002305,0.7130355574887935
|
| 10 |
9.0,180,0.5511491662911221,0.8602974312753493,0.9301487156376747,0.9761153672825598,0.5511491662911221,0.5511491662911221,0.2867658104251164,0.8602974312753493,0.1860297431275349,0.9301487156376747,0.09761153672825595,0.9761153672825598,0.7133788636379876,0.7785594935139568,0.7147004534084033
|
|
|
|
|
|
| 8 |
7.0,140,0.5466426318161334,0.8580441640378549,0.9269941415051826,0.9734114465975665,0.5466426318161334,0.5466426318161334,0.28601472134595163,0.8580441640378549,0.1853988283010365,0.9269941415051826,0.09734114465975663,0.9734114465975665,0.7100227472692533,0.7753865487291295,0.7115503830684274
|
| 9 |
8.0,160,0.5497972059486255,0.857593510590356,0.9283461018476792,0.975214060387562,0.5497972059486255,0.5497972059486255,0.28586450353011866,0.857593510590356,0.18566922036953581,0.9283461018476792,0.09752140603875618,0.975214060387562,0.7116477821412461,0.7770233022002305,0.7130355574887935
|
| 10 |
9.0,180,0.5511491662911221,0.8602974312753493,0.9301487156376747,0.9761153672825598,0.5511491662911221,0.5511491662911221,0.2867658104251164,0.8602974312753493,0.1860297431275349,0.9301487156376747,0.09761153672825595,0.9761153672825598,0.7133788636379876,0.7785594935139568,0.7147004534084033
|
| 11 |
+
10.0,200,0.5520504731861199,0.8598467778278504,0.9310500225326723,0.975214060387562,0.5520504731861199,0.5520504731861199,0.2866155926092835,0.8598467778278504,0.18621000450653444,0.9310500225326723,0.09752140603875618,0.975214060387562,0.7140104937874189,0.778855811581032,0.7154223269913967
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 596070136
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c8e243ad7f7ee06b604932edbe090b469708dc5471859862a92169e9793be94
|
| 3 |
size 596070136
|