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 9
Browse files
eval/Information-Retrieval_evaluation_eval_results.csv
CHANGED
|
@@ -7,3 +7,4 @@ epoch,steps,cosine-Accuracy@1,cosine-Accuracy@3,cosine-Accuracy@5,cosine-Accurac
|
|
| 7 |
6.0,120,0.5421360973411447,0.8526363226678684,0.9269941415051826,0.9725101397025687,0.5421360973411447,0.5421360973411447,0.2842121075559561,0.8526363226678684,0.1853988283010365,0.9269941415051826,0.09725101397025686,0.9725101397025687,0.7058309548845811,0.7719743126795603,0.7074011190893008
|
| 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
|
|
|
|
|
|
| 7 |
6.0,120,0.5421360973411447,0.8526363226678684,0.9269941415051826,0.9725101397025687,0.5421360973411447,0.5421360973411447,0.2842121075559561,0.8526363226678684,0.1853988283010365,0.9269941415051826,0.09725101397025686,0.9725101397025687,0.7058309548845811,0.7719743126795603,0.7074011190893008
|
| 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
|
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:4b943636f7772e88a7e186086e58b135fa7c48d1e7782f967cdff7380128ca56
|
| 3 |
size 596070136
|