code-embed-v2-zeroshot

A control model for code-embed-v2, not a release meant for use. It is code-embed-v2's recipe (UniXcoder-base, mean pooling, a 768-1536-1536 projection head, 1,024 tokens, SimCSE then MNRL then MNRL + Matryoshka, one epoch each) retrained on CoRNStack instead of CodeSearchNet, at v2's per-language row counts. Before training, every pair was checked against the corpora of all 18 evaluated MTEB tasks with exact and MinHash near-duplicate matching, and the 4,272 matches (0.23%) were removed, leaving 1,832,728 pairs.

It measures how much of code-embed-v2's gain over its base model depends on CodeSearchNet. Mean main score, same harness for all three (mteb 2.26.17, sentence-transformers 6.2.0, 1,024 tokens, batch 64, no prompts):

Mean over UniXcoder-base code-embed-v2 this model
MTEB(Code, v1), 12 tasks 0.3657 0.5475 0.4862
CoIR, 10 tasks 0.3356 0.5343 0.4480
CoREB(v1), 6 tasks 0.3531 0.4362 0.2899
3 CodeSearchNet-derived tasks 0.5683 0.7242 0.7182
Other 15 tasks 0.3202 0.4677 0.3613

Training code, the audit, per-task scores and raw MTEB result files are in github.com/divakantpandey/code-embed at v0.2.0. Trained once with seed 42.

The rest of this card is generated by Sentence Transformers.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Maximum Sequence Length: 1024 tokens
  • Output Dimensionality: 1536 dimensions
  • Similarity Function: Cosine Similarity
  • Supported Modality: Text

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'RobertaModel'})
  (1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': True})
  (2): Dense({'in_features': 768, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.GELU', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
  (3): Dense({'in_features': 1536, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
  (4): Normalize({'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("divakantpandey/code-embed-v2-zeroshot")
# Run inference
sentences = [
    'Get all records from table',
    'public function queryAll();',
    'public int getTenantId() { return tenantId; }',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1536]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.6936, 0.0677],
#         [0.6936, 1.0000, 0.0436],
#         [0.0677, 0.0436, 1.0000]])

Training Details

Training Dataset

Unnamed Dataset

  • Size: 1,832,728 training samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 100 samples:
    anchor positive
    type string string
    modality text text
    details
    • min: 6 tokens
    • mean: 16.5 tokens
    • max: 62 tokens
    • min: 13 tokens
    • mean: 159.75 tokens
    • max: 1024 tokens
  • Samples:
    anchor positive
    Works when x >= 0 Functional public static int recursivePowers(int x, int n) {
    // base case
    if (n == 0) {
    return 1;
    }

    // recursive case
    return x * recursivePowers(x, n-1);
    }
    Performs a random rotation of a Numpy image tensor. Arguments def random_rotation(x, rg, row_axis=0, col_axis=1, channel_axis=2,
    fill_mode='nearest', cval=0., interpolation_order=1):
    theta = np.random.uniform(-rg, rg)
    x = apply_affine_transform(x, theta=theta, channel_axis=channel_axis,
    fill_mode=fill_mode, cval=cval,
    order=interpolation_order)
    return x
    Put 0V on all scanners. def zero_scanners(self):
    self.logger.info('Zero all Scanners.')
    self.anc350_instrument.zero_scanners()
  • Loss: MatryoshkaLoss with these parameters:
    {
        "loss": "MultipleNegativesRankingLoss",
        "matryoshka_dims": [
            1536,
            768,
            384,
            256,
            128,
            64
        ],
        "matryoshka_weights": [
            0.25,
            0.25,
            0.15,
            0.15,
            0.1,
            0.1
        ],
        "n_dims_per_step": -1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 32
  • num_train_epochs: 1
  • learning_rate: 1e-05
  • lr_scheduler_type: cosine
  • warmup_steps: 0.1
  • weight_decay: 0.01
  • gradient_accumulation_steps: 4
  • bf16: True
  • tf32: True
  • dataloader_num_workers: 8

All Hyperparameters

Click to expand
  • per_device_train_batch_size: 32
  • num_train_epochs: 1
  • max_steps: -1
  • learning_rate: 1e-05
  • lr_scheduler_type: cosine
  • lr_scheduler_kwargs: None
  • warmup_steps: 0.1
  • optim: adamw_torch_fused
  • optim_args: None
  • weight_decay: 0.01
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 4
  • average_tokens_across_devices: True
  • max_grad_norm: 1.0
  • label_smoothing_factor: 0.0
  • bf16: True
  • fp16: False
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: True
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • project: huggingface
  • trackio_space_id: None
  • trackio_bucket_id: None
  • trackio_static_space_id: None
  • per_device_eval_batch_size: 8
  • prediction_loss_only: True
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: None
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: False
  • save_on_each_node: False
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: None
  • use_cpu: False
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • parallelism_config: None
  • dataloader_drop_last: False
  • dataloader_num_workers: 8
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • dataloader_multiprocessing_context: None
  • dataloader_in_order: True
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • ddp_static_graph: None
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: None
  • fsdp_config: None
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_predict: False
  • resume_from_checkpoint: None
  • local_rank: -1
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}
  • warmup_ratio: None

Training Logs

Click to expand
Epoch Step Training Loss
0.0017 25 1.7250
0.0035 50 1.5512
0.0052 75 1.3718
0.0070 100 1.2527
0.0087 125 1.1314
0.0105 150 1.0084
0.0122 175 0.9338
0.0140 200 0.9037
0.0157 225 0.8130
0.0175 250 0.7854
0.0192 275 0.7411
0.0210 300 0.7109
0.0227 325 0.6452
0.0244 350 0.6178
0.0262 375 0.6516
0.0279 400 0.5802
0.0297 425 0.5861
0.0314 450 0.4896
0.0332 475 0.4840
0.0349 500 0.5010
0.0367 525 0.4691
0.0384 550 0.4559
0.0402 575 0.4518
0.0419 600 0.4685
0.0437 625 0.4400
0.0454 650 0.4553
0.0471 675 0.4226
0.0489 700 0.4355
0.0506 725 0.4184
0.0524 750 0.3921
0.0541 775 0.3868
0.0559 800 0.4012
0.0576 825 0.4025
0.0594 850 0.3623
0.0611 875 0.4013
0.0629 900 0.3614
0.0646 925 0.3894
0.0663 950 0.3711
0.0681 975 0.3522
0.0698 1000 0.3425
0.0716 1025 0.3252
0.0733 1050 0.3421
0.0751 1075 0.3103
0.0768 1100 0.3396
0.0786 1125 0.3166
0.0803 1150 0.3147
0.0821 1175 0.3118
0.0838 1200 0.3344
0.0856 1225 0.3211
0.0873 1250 0.3190
0.0890 1275 0.2887
0.0908 1300 0.3127
0.0925 1325 0.3047
0.0943 1350 0.3004
0.0960 1375 0.3110
0.0978 1400 0.3071
0.0995 1425 0.3008
0.1013 1450 0.3195
0.1030 1475 0.3004
0.1048 1500 0.2828
0.1065 1525 0.2761
0.1083 1550 0.2593
0.1100 1575 0.2742
0.1117 1600 0.2854
0.1135 1625 0.2726
0.1152 1650 0.2643
0.1170 1675 0.2691
0.1187 1700 0.2576
0.1205 1725 0.2538
0.1222 1750 0.2660
0.1240 1775 0.2563
0.1257 1800 0.2529
0.1275 1825 0.2626
0.1292 1850 0.2512
0.1310 1875 0.2747
0.1327 1900 0.2601
0.1344 1925 0.2488
0.1362 1950 0.2495
0.1379 1975 0.2477
0.1397 2000 0.2488
0.1414 2025 0.2497
0.1432 2050 0.2508
0.1449 2075 0.2911
0.1467 2100 0.2207
0.1484 2125 0.2541
0.1502 2150 0.2489
0.1519 2175 0.2547
0.1537 2200 0.2453
0.1554 2225 0.2665
0.1571 2250 0.2569
0.1589 2275 0.2459
0.1606 2300 0.2493
0.1624 2325 0.2292
0.1641 2350 0.2244
0.1659 2375 0.2141
0.1676 2400 0.2117
0.1694 2425 0.2145
0.1711 2450 0.2091
0.1729 2475 0.2370
0.1746 2500 0.2034
0.1763 2525 0.2085
0.1781 2550 0.2170
0.1798 2575 0.2212
0.1816 2600 0.1960
0.1833 2625 0.2150
0.1851 2650 0.2244
0.1868 2675 0.1815
0.1886 2700 0.2037
0.1903 2725 0.1995
0.1921 2750 0.1962
0.1938 2775 0.1865
0.1956 2800 0.2094
0.1973 2825 0.1969
0.1990 2850 0.1606
0.2008 2875 0.1999
0.2025 2900 0.1853
0.2043 2925 0.2118
0.2060 2950 0.2287
0.2078 2975 0.1992
0.2095 3000 0.2000
0.2113 3025 0.1831
0.2130 3050 0.1944
0.2148 3075 0.1818
0.2165 3100 0.1611
0.2183 3125 0.1828
0.2200 3150 0.1705
0.2217 3175 0.1962
0.2235 3200 0.1659
0.2252 3225 0.1788
0.2270 3250 0.1727
0.2287 3275 0.1844
0.2305 3300 0.1720
0.2322 3325 0.1726
0.2340 3350 0.1840
0.2357 3375 0.1556
0.2375 3400 0.1536
0.2392 3425 0.1954
0.2410 3450 0.1767
0.2427 3475 0.1729
0.2444 3500 0.1503
0.2462 3525 0.1722
0.2479 3550 0.1675
0.2497 3575 0.1507
0.2514 3600 0.1521
0.2532 3625 0.1863
0.2549 3650 0.1672
0.2567 3675 0.1839
0.2584 3700 0.1684
0.2602 3725 0.1621
0.2619 3750 0.1634
0.2636 3775 0.1588
0.2654 3800 0.1698
0.2671 3825 0.1796
0.2689 3850 0.1697
0.2706 3875 0.1676
0.2724 3900 0.1493
0.2741 3925 0.1681
0.2759 3950 0.1402
0.2776 3975 0.1294
0.2794 4000 0.1605
0.2811 4025 0.1421
0.2829 4050 0.1482
0.2846 4075 0.1503
0.2863 4100 0.1642
0.2881 4125 0.1453
0.2898 4150 0.1426
0.2916 4175 0.1623
0.2933 4200 0.1503
0.2951 4225 0.1665
0.2968 4250 0.1490
0.2986 4275 0.1667
0.3003 4300 0.1499
0.3021 4325 0.1828
0.3038 4350 0.1641
0.3056 4375 0.1524
0.3073 4400 0.1559
0.3090 4425 0.1759
0.3108 4450 0.1504
0.3125 4475 0.1685
0.3143 4500 0.1556
0.3160 4525 0.1617
0.3178 4550 0.1581
0.3195 4575 0.1579
0.3213 4600 0.1488
0.3230 4625 0.1577
0.3248 4650 0.1615
0.3265 4675 0.1521
0.3283 4700 0.1344
0.3300 4725 0.1567
0.3317 4750 0.1645
0.3335 4775 0.1546
0.3352 4800 0.1721
0.3370 4825 0.1702
0.3387 4850 0.1555
0.3405 4875 0.1552
0.3422 4900 0.1648
0.3440 4925 0.1702
0.3457 4950 0.1597
0.3475 4975 0.1610
0.3492 5000 0.1613
0.3510 5025 0.1591
0.3527 5050 0.1521
0.3544 5075 0.1604
0.3562 5100 0.1258
0.3579 5125 0.1470
0.3597 5150 0.1578
0.3614 5175 0.1626
0.3632 5200 0.1421
0.3649 5225 0.1530
0.3667 5250 0.1284
0.3684 5275 0.1311
0.3702 5300 0.1496
0.3719 5325 0.1596
0.3736 5350 0.1424
0.3754 5375 0.1469
0.3771 5400 0.1525
0.3789 5425 0.1310
0.3806 5450 0.1596
0.3824 5475 0.1631
0.3841 5500 0.1318
0.3859 5525 0.1311
0.3876 5550 0.1449
0.3894 5575 0.1257
0.3911 5600 0.1296
0.3929 5625 0.1399
0.3946 5650 0.1443
0.3963 5675 0.1261
0.3981 5700 0.1406
0.3998 5725 0.1334
0.4016 5750 0.1409
0.4033 5775 0.1451
0.4051 5800 0.1426
0.4068 5825 0.1459
0.4086 5850 0.1378
0.4103 5875 0.1398
0.4121 5900 0.1349
0.4138 5925 0.1391
0.4156 5950 0.1295
0.4173 5975 0.1411
0.4190 6000 0.1395
0.4208 6025 0.1366
0.4225 6050 0.1458
0.4243 6075 0.1426
0.4260 6100 0.1281
0.4278 6125 0.1421
0.4295 6150 0.1520
0.4313 6175 0.1247
0.4330 6200 0.1331
0.4348 6225 0.1219
0.4365 6250 0.1510
0.4383 6275 0.1316
0.4400 6300 0.1354
0.4417 6325 0.1482
0.4435 6350 0.1491
0.4452 6375 0.1389
0.4470 6400 0.1257
0.4487 6425 0.1490
0.4505 6450 0.1524
0.4522 6475 0.1304
0.4540 6500 0.1260
0.4557 6525 0.1470
0.4575 6550 0.1334
0.4592 6575 0.1199
0.4610 6600 0.1087
0.4627 6625 0.1304
0.4644 6650 0.1427
0.4662 6675 0.1303
0.4679 6700 0.1348
0.4697 6725 0.1426
0.4714 6750 0.1265
0.4732 6775 0.1301
0.4749 6800 0.1319
0.4767 6825 0.1176
0.4784 6850 0.1431
0.4802 6875 0.1327
0.4819 6900 0.1485
0.4836 6925 0.1215
0.4854 6950 0.1368
0.4871 6975 0.1364
0.4889 7000 0.1630
0.4906 7025 0.1422
0.4924 7050 0.1415
0.4941 7075 0.1449
0.4959 7100 0.1395
0.4976 7125 0.1228
0.4994 7150 0.1301
0.5011 7175 0.1189
0.5029 7200 0.1329
0.5046 7225 0.1276
0.5063 7250 0.1252
0.5081 7275 0.1189
0.5098 7300 0.1313
0.5116 7325 0.1321
0.5133 7350 0.1376
0.5151 7375 0.1223
0.5168 7400 0.1361
0.5186 7425 0.1284
0.5203 7450 0.1209
0.5221 7475 0.1246
0.5238 7500 0.1342
0.5256 7525 0.1473
0.5273 7550 0.1235
0.5290 7575 0.1251
0.5308 7600 0.1366
0.5325 7625 0.1210
0.5343 7650 0.1260
0.5360 7675 0.1144
0.5378 7700 0.1402
0.5395 7725 0.1252
0.5413 7750 0.1329
0.5430 7775 0.1299
0.5448 7800 0.1182
0.5465 7825 0.1206
0.5483 7850 0.1219
0.5500 7875 0.1021
0.5517 7900 0.1187
0.5535 7925 0.1243
0.5552 7950 0.1180
0.5570 7975 0.1351
0.5587 8000 0.1296
0.5605 8025 0.1221
0.5622 8050 0.1291
0.5640 8075 0.1341
0.5657 8100 0.1088
0.5675 8125 0.1237
0.5692 8150 0.1347
0.5709 8175 0.1220
0.5727 8200 0.1274
0.5744 8225 0.1351
0.5762 8250 0.1175
0.5779 8275 0.1178
0.5797 8300 0.0961
0.5814 8325 0.1217
0.5832 8350 0.1148
0.5849 8375 0.1168
0.5867 8400 0.1213
0.5884 8425 0.1147
0.5902 8450 0.1232
0.5919 8475 0.1140
0.5936 8500 0.1116
0.5954 8525 0.1204
0.5971 8550 0.1401
0.5989 8575 0.1100
0.6006 8600 0.1062
0.6024 8625 0.1051
0.6041 8650 0.1173
0.6059 8675 0.1019
0.6076 8700 0.1325
0.6094 8725 0.1199
0.6111 8750 0.0958
0.6129 8775 0.1146
0.6146 8800 0.1129
0.6163 8825 0.1117
0.6181 8850 0.1048
0.6198 8875 0.1293
0.6216 8900 0.1296
0.6233 8925 0.1190
0.6251 8950 0.1025
0.6268 8975 0.1205
0.6286 9000 0.1234
0.6303 9025 0.1179
0.6321 9050 0.1278
0.6338 9075 0.1128
0.6356 9100 0.1006
0.6373 9125 0.1150
0.6390 9150 0.1118
0.6408 9175 0.1171
0.6425 9200 0.0992
0.6443 9225 0.0946
0.6460 9250 0.1023
0.6478 9275 0.1106
0.6495 9300 0.1147
0.6513 9325 0.1225
0.6530 9350 0.1108
0.6548 9375 0.1107
0.6565 9400 0.1055
0.6583 9425 0.1031
0.6600 9450 0.1211
0.6617 9475 0.1303
0.6635 9500 0.0944
0.6652 9525 0.1254
0.6670 9550 0.1182
0.6687 9575 0.1257
0.6705 9600 0.1042
0.6722 9625 0.1226
0.6740 9650 0.1001
0.6757 9675 0.1190
0.6775 9700 0.1172
0.6792 9725 0.0946
0.6809 9750 0.1228
0.6827 9775 0.1089
0.6844 9800 0.1046
0.6862 9825 0.1195
0.6879 9850 0.1171
0.6897 9875 0.1163
0.6914 9900 0.0931
0.6932 9925 0.1191
0.6949 9950 0.1061
0.6967 9975 0.1384
0.6984 10000 0.0982
0.7002 10025 0.1160
0.7019 10050 0.1162
0.7036 10075 0.1187
0.7054 10100 0.1062
0.7071 10125 0.1452
0.7089 10150 0.1181
0.7106 10175 0.1311
0.7124 10200 0.1020
0.7141 10225 0.1200
0.7159 10250 0.1162
0.7176 10275 0.1179
0.7194 10300 0.1170
0.7211 10325 0.1096
0.7229 10350 0.0949
0.7246 10375 0.0914
0.7263 10400 0.1095
0.7281 10425 0.1171
0.7298 10450 0.1165
0.7316 10475 0.1134
0.7333 10500 0.1062
0.7351 10525 0.1193
0.7368 10550 0.1074
0.7386 10575 0.1028
0.7403 10600 0.0957
0.7421 10625 0.1060
0.7438 10650 0.1026
0.7456 10675 0.0889
0.7473 10700 0.0867
0.7490 10725 0.1173
0.7508 10750 0.1045
0.7525 10775 0.1121
0.7543 10800 0.1080
0.7560 10825 0.0955
0.7578 10850 0.1063
0.7595 10875 0.1035
0.7613 10900 0.1150
0.7630 10925 0.1125
0.7648 10950 0.1338
0.7665 10975 0.0996
0.7683 11000 0.1203
0.7700 11025 0.1163
0.7717 11050 0.1082
0.7735 11075 0.1114
0.7752 11100 0.1083
0.7770 11125 0.1162
0.7787 11150 0.1143
0.7805 11175 0.0997
0.7822 11200 0.0937
0.7840 11225 0.1086
0.7857 11250 0.0869
0.7875 11275 0.1124
0.7892 11300 0.1043
0.7909 11325 0.0928
0.7927 11350 0.1196
0.7944 11375 0.1054
0.7962 11400 0.1120
0.7979 11425 0.1113
0.7997 11450 0.0997
0.8014 11475 0.1096
0.8032 11500 0.0924
0.8049 11525 0.0865
0.8067 11550 0.0861
0.8084 11575 0.1106
0.8102 11600 0.1123
0.8119 11625 0.0889
0.8136 11650 0.1067
0.8154 11675 0.1073
0.8171 11700 0.1064
0.8189 11725 0.1079
0.8206 11750 0.1038
0.8224 11775 0.1010
0.8241 11800 0.1071
0.8259 11825 0.0979
0.8276 11850 0.0871
0.8294 11875 0.1160
0.8311 11900 0.1043
0.8329 11925 0.0967
0.8346 11950 0.0883
0.8363 11975 0.1195
0.8381 12000 0.1149
0.8398 12025 0.1092
0.8416 12050 0.1031
0.8433 12075 0.1170
0.8451 12100 0.1110
0.8468 12125 0.0890
0.8486 12150 0.0961
0.8503 12175 0.1096
0.8521 12200 0.1071
0.8538 12225 0.1155
0.8556 12250 0.1103
0.8573 12275 0.1042
0.8590 12300 0.1093
0.8608 12325 0.0947
0.8625 12350 0.1039
0.8643 12375 0.0884
0.8660 12400 0.0946
0.8678 12425 0.1057
0.8695 12450 0.1054
0.8713 12475 0.1111
0.8730 12500 0.1103
0.8748 12525 0.0989
0.8765 12550 0.1126
0.8782 12575 0.1106
0.8800 12600 0.0922
0.8817 12625 0.1013
0.8835 12650 0.1095
0.8852 12675 0.1166
0.8870 12700 0.0965
0.8887 12725 0.1075
0.8905 12750 0.1061
0.8922 12775 0.0977
0.8940 12800 0.1315
0.8957 12825 0.1045
0.8975 12850 0.1126
0.8992 12875 0.1029
0.9009 12900 0.0944
0.9027 12925 0.1123
0.9044 12950 0.0978
0.9062 12975 0.0944
0.9079 13000 0.0917
0.9097 13025 0.0941
0.9114 13050 0.0971
0.9132 13075 0.0967
0.9149 13100 0.1099
0.9167 13125 0.1101
0.9184 13150 0.1065
0.9202 13175 0.0972
0.9219 13200 0.1090
0.9236 13225 0.1017
0.9254 13250 0.1073
0.9271 13275 0.1099
0.9289 13300 0.0972
0.9306 13325 0.0963
0.9324 13350 0.1031
0.9341 13375 0.1118
0.9359 13400 0.0897
0.9376 13425 0.0957
0.9394 13450 0.0985
0.9411 13475 0.1174
0.9429 13500 0.1079
0.9446 13525 0.1099
0.9463 13550 0.1073
0.9481 13575 0.1079
0.9498 13600 0.1000
0.9516 13625 0.1175
0.9533 13650 0.1021
0.9551 13675 0.1171
0.9568 13700 0.1065
0.9586 13725 0.0969
0.9603 13750 0.1048
0.9621 13775 0.1098
0.9638 13800 0.1058
0.9656 13825 0.0861
0.9673 13850 0.1053
0.9690 13875 0.0826
0.9708 13900 0.0971
0.9725 13925 0.1043
0.9743 13950 0.1070
0.9760 13975 0.0805
0.9778 14000 0.1076
0.9795 14025 0.1011
0.9813 14050 0.1128
0.9830 14075 0.1097
0.9848 14100 0.1025
0.9865 14125 0.1031
0.9882 14150 0.1025
0.9900 14175 0.0982
0.9917 14200 0.1079
0.9935 14225 0.0973
0.9952 14250 0.1158
0.9970 14275 0.1071
0.9987 14300 0.1041
0.0017 25 0.1342
0.0035 50 0.1385
0.0052 75 0.1325
0.0070 100 0.1530
0.0087 125 0.1369
0.0105 150 0.1340
0.0122 175 0.1439
0.0140 200 0.1222
0.0157 225 0.1279
0.0175 250 0.1362
0.0192 275 0.1358
0.0210 300 0.1387
0.0227 325 0.1371
0.0244 350 0.1191
0.0262 375 0.1479
0.0279 400 0.1273
0.0297 425 0.1225
0.0314 450 0.1102
0.0332 475 0.1095
0.0349 500 0.1316
0.0367 525 0.1343
0.0384 550 0.1122
0.0402 575 0.1247
0.0419 600 0.1392
0.0437 625 0.1252
0.0454 650 0.1179
0.0471 675 0.1197
0.0489 700 0.1414
0.0506 725 0.1138
0.0524 750 0.1219
0.0541 775 0.1167
0.0559 800 0.1256
0.0576 825 0.1105
0.0594 850 0.1102
0.0611 875 0.1239
0.0629 900 0.1184
0.0646 925 0.1195
0.0663 950 0.1036
0.0681 975 0.1073
0.0698 1000 0.1117
0.0716 1025 0.1067
0.0733 1050 0.0933
0.0751 1075 0.1036
0.0768 1100 0.1135
0.0786 1125 0.1095
0.0803 1150 0.0918
0.0821 1175 0.1037
0.0838 1200 0.1243
0.0856 1225 0.0959
0.0873 1250 0.1003
0.0890 1275 0.0947
0.0908 1300 0.1238
0.0925 1325 0.0974
0.0943 1350 0.1010
0.0960 1375 0.1142
0.0978 1400 0.1063
0.0995 1425 0.1094
0.1013 1450 0.1108
0.1030 1475 0.0990
0.1048 1500 0.0939
0.1065 1525 0.0937
0.1083 1550 0.0925
0.1100 1575 0.0952
0.1117 1600 0.0892
0.1135 1625 0.0973
0.1152 1650 0.0903
0.1170 1675 0.0892
0.1187 1700 0.0773
0.1205 1725 0.0700
0.1222 1750 0.0819
0.1240 1775 0.0829
0.1257 1800 0.0804
0.1275 1825 0.0803
0.1292 1850 0.0764
0.1310 1875 0.0935
0.1327 1900 0.0771
0.1344 1925 0.0735
0.1362 1950 0.0808
0.1379 1975 0.0750
0.1397 2000 0.0752
0.1414 2025 0.0701
0.1432 2050 0.0743
0.1449 2075 0.0899
0.1467 2100 0.0675
0.1484 2125 0.0765
0.1502 2150 0.0715
0.1519 2175 0.0800
0.1537 2200 0.0802
0.1554 2225 0.0892
0.1571 2250 0.0881
0.1589 2275 0.0900
0.1606 2300 0.0816
0.1624 2325 0.0724
0.1641 2350 0.0854
0.1659 2375 0.0693
0.1676 2400 0.0783
0.1694 2425 0.0666
0.1711 2450 0.0612
0.1729 2475 0.0756
0.1746 2500 0.0706
0.1763 2525 0.0776
0.1781 2550 0.0801
0.1798 2575 0.0665
0.1816 2600 0.0569
0.1833 2625 0.0705
0.1851 2650 0.0761
0.1868 2675 0.0634
0.1886 2700 0.0723
0.1903 2725 0.0794
0.1921 2750 0.0787
0.1938 2775 0.0728
0.1956 2800 0.0620
0.1973 2825 0.0557
0.1990 2850 0.0479
0.2008 2875 0.0666
0.2025 2900 0.0564
0.2043 2925 0.0746
0.2060 2950 0.0900
0.2078 2975 0.0696
0.2095 3000 0.0766
0.2113 3025 0.0624
0.2130 3050 0.0757
0.2148 3075 0.0619
0.2165 3100 0.0555
0.2183 3125 0.0590
0.2200 3150 0.0592
0.2217 3175 0.0759
0.2235 3200 0.0630
0.2252 3225 0.0684
0.2270 3250 0.0521
0.2287 3275 0.0651
0.2305 3300 0.0477
0.2322 3325 0.0546
0.2340 3350 0.0653
0.2357 3375 0.0487
0.2375 3400 0.0539
0.2392 3425 0.0613
0.2410 3450 0.0584
0.2427 3475 0.0545
0.2444 3500 0.0375
0.2462 3525 0.0633
0.2479 3550 0.0645
0.2497 3575 0.0508
0.2514 3600 0.0540
0.2532 3625 0.0756
0.2549 3650 0.0540
0.2567 3675 0.0661
0.2584 3700 0.0563
0.2602 3725 0.0500
0.2619 3750 0.0564
0.2636 3775 0.0667
0.2654 3800 0.0544
0.2671 3825 0.0591
0.2689 3850 0.0607
0.2706 3875 0.0547
0.2724 3900 0.0425
0.2741 3925 0.0484
0.2759 3950 0.0490
0.2776 3975 0.0351
0.2794 4000 0.0577
0.2811 4025 0.0484
0.2829 4050 0.0494
0.2846 4075 0.0455
0.2863 4100 0.0558
0.2881 4125 0.0477
0.2898 4150 0.0471
0.2916 4175 0.0541
0.2933 4200 0.0503
0.2951 4225 0.0522
0.2968 4250 0.0557
0.2986 4275 0.0501
0.3003 4300 0.0433
0.3021 4325 0.0543
0.3038 4350 0.0523
0.3056 4375 0.0515
0.3073 4400 0.0441
0.3090 4425 0.0559
0.3108 4450 0.0399
0.3125 4475 0.0547
0.3143 4500 0.0507
0.3160 4525 0.0484
0.3178 4550 0.0492
0.3195 4575 0.0500
0.3213 4600 0.0541
0.3230 4625 0.0487
0.3248 4650 0.0552
0.3265 4675 0.0421
0.3283 4700 0.0397
0.3300 4725 0.0479
0.3317 4750 0.0668
0.3335 4775 0.0509
0.3352 4800 0.0549
0.3370 4825 0.0602
0.3387 4850 0.0530
0.3405 4875 0.0540
0.3422 4900 0.0661
0.3440 4925 0.0551
0.3457 4950 0.0501
0.3475 4975 0.0553
0.3492 5000 0.0481
0.3510 5025 0.0477
0.3527 5050 0.0451
0.3544 5075 0.0583
0.3562 5100 0.0317
0.3579 5125 0.0487
0.3597 5150 0.0533
0.3614 5175 0.0506
0.3632 5200 0.0575
0.3649 5225 0.0462
0.3667 5250 0.0309
0.3684 5275 0.0514
0.3702 5300 0.0512
0.3719 5325 0.0538
0.3736 5350 0.0515
0.3754 5375 0.0447
0.3771 5400 0.0573
0.3789 5425 0.0442
0.3806 5450 0.0675
0.3824 5475 0.0648
0.3841 5500 0.0402
0.3859 5525 0.0341
0.3876 5550 0.0469
0.3894 5575 0.0307
0.3911 5600 0.0374
0.3929 5625 0.0363
0.3946 5650 0.0493
0.3963 5675 0.0348
0.3981 5700 0.0439
0.3998 5725 0.0489
0.4016 5750 0.0495
0.4033 5775 0.0570
0.4051 5800 0.0410
0.4068 5825 0.0470
0.4086 5850 0.0453
0.4103 5875 0.0511
0.4121 5900 0.0419
0.4138 5925 0.0465
0.4156 5950 0.0445
0.4173 5975 0.0495
0.4190 6000 0.0463
0.4208 6025 0.0409
0.4225 6050 0.0477
0.4243 6075 0.0500
0.4260 6100 0.0440
0.4278 6125 0.0460
0.4295 6150 0.0462
0.4313 6175 0.0453
0.4330 6200 0.0472
0.4348 6225 0.0381
0.4365 6250 0.0539
0.4383 6275 0.0441
0.4400 6300 0.0517
0.4417 6325 0.0482
0.4435 6350 0.0553
0.4452 6375 0.0479
0.4470 6400 0.0409
0.4487 6425 0.0530
0.4505 6450 0.0569
0.4522 6475 0.0515
0.4540 6500 0.0460
0.4557 6525 0.0528
0.4575 6550 0.0482
0.4592 6575 0.0379
0.4610 6600 0.0307
0.4627 6625 0.0449
0.4644 6650 0.0535
0.4662 6675 0.0470
0.4679 6700 0.0549
0.4697 6725 0.0440
0.4714 6750 0.0453
0.4732 6775 0.0482
0.4749 6800 0.0415
0.4767 6825 0.0385
0.4784 6850 0.0550
0.4802 6875 0.0484
0.4819 6900 0.0550
0.4836 6925 0.0386
0.4854 6950 0.0563
0.4871 6975 0.0488
0.4889 7000 0.0647
0.4906 7025 0.0546
0.4924 7050 0.0555
0.4941 7075 0.0562
0.4959 7100 0.0534
0.4976 7125 0.0473
0.4994 7150 0.0495
0.5011 7175 0.0420
0.5029 7200 0.0539
0.5046 7225 0.0501
0.5063 7250 0.0489
0.5081 7275 0.0467
0.5098 7300 0.0469
0.5116 7325 0.0472
0.5133 7350 0.0615
0.5151 7375 0.0478
0.5168 7400 0.0544
0.5186 7425 0.0491
0.5203 7450 0.0449
0.5221 7475 0.0524
0.5238 7500 0.0504
0.5256 7525 0.0598
0.5273 7550 0.0464
0.5290 7575 0.0488
0.5308 7600 0.0563
0.5325 7625 0.0486
0.5343 7650 0.0558
0.5360 7675 0.0432
0.5378 7700 0.0569
0.5395 7725 0.0523
0.5413 7750 0.0563
0.5430 7775 0.0491
0.5448 7800 0.0437
0.5465 7825 0.0532
0.5483 7850 0.0464
0.5500 7875 0.0341
0.5517 7900 0.0507
0.5535 7925 0.0473
0.5552 7950 0.0460
0.5570 7975 0.0586
0.5587 8000 0.0573
0.5605 8025 0.0431
0.5622 8050 0.0547
0.5640 8075 0.0525
0.5657 8100 0.0472
0.5675 8125 0.0538
0.5692 8150 0.0699
0.5709 8175 0.0510
0.5727 8200 0.0548
0.5744 8225 0.0608
0.5762 8250 0.0485
0.5779 8275 0.0598
0.5797 8300 0.0404
0.5814 8325 0.0504
0.5832 8350 0.0488
0.5849 8375 0.0529
0.5867 8400 0.0543
0.5884 8425 0.0529
0.5902 8450 0.0574
0.5919 8475 0.0496
0.5936 8500 0.0589
0.5954 8525 0.0540
0.5971 8550 0.0653
0.5989 8575 0.0497
0.6006 8600 0.0476
0.6024 8625 0.0427
0.6041 8650 0.0538
0.6059 8675 0.0486
0.6076 8700 0.0635
0.6094 8725 0.0610
0.6111 8750 0.0384
0.6129 8775 0.0530
0.6146 8800 0.0554
0.6163 8825 0.0487
0.6181 8850 0.0470
0.6198 8875 0.0679
0.6216 8900 0.0626
0.6233 8925 0.0557
0.6251 8950 0.0498
0.6268 8975 0.0668
0.6286 9000 0.0669
0.6303 9025 0.0492
0.6321 9050 0.0658
0.6338 9075 0.0539
0.6356 9100 0.0484
0.6373 9125 0.0573
0.6390 9150 0.0555
0.6408 9175 0.0588
0.6425 9200 0.0533
0.6443 9225 0.0467
0.6460 9250 0.0484
0.6478 9275 0.0630
0.6495 9300 0.0610
0.6513 9325 0.0618
0.6530 9350 0.0595
0.6548 9375 0.0550
0.6565 9400 0.0596
0.6583 9425 0.0530
0.6600 9450 0.0737
0.6617 9475 0.0715
0.6635 9500 0.0506
0.6652 9525 0.0730
0.6670 9550 0.0655
0.6687 9575 0.0697
0.6705 9600 0.0650
0.6722 9625 0.0744
0.6740 9650 0.0563
0.6757 9675 0.0729
0.6775 9700 0.0655
0.6792 9725 0.0503
0.6809 9750 0.0695
0.6827 9775 0.0606
0.6844 9800 0.0586
0.6862 9825 0.0753
0.6879 9850 0.0714
0.6897 9875 0.0784
0.6914 9900 0.0517
0.6932 9925 0.0707
0.6949 9950 0.0679
0.6967 9975 0.0849
0.6984 10000 0.0615
0.7002 10025 0.0822
0.7019 10050 0.0675
0.7036 10075 0.0731
0.7054 10100 0.0633
0.7071 10125 0.1000
0.7089 10150 0.0791
0.7106 10175 0.0877
0.7124 10200 0.0674
0.7141 10225 0.0761
0.7159 10250 0.0822
0.7176 10275 0.0780
0.7194 10300 0.0791
0.7211 10325 0.0811
0.7229 10350 0.0603
0.7246 10375 0.0594
0.7263 10400 0.0734
0.7281 10425 0.0788
0.7298 10450 0.0788
0.7316 10475 0.0825
0.7333 10500 0.0721
0.7351 10525 0.0865
0.7368 10550 0.0685
0.7386 10575 0.0789
0.7403 10600 0.0640
0.7421 10625 0.0731
0.7438 10650 0.0676
0.7456 10675 0.0593
0.7473 10700 0.0577
0.7490 10725 0.0859
0.7508 10750 0.0744
0.7525 10775 0.0818
0.7543 10800 0.0725
0.7560 10825 0.0679
0.7578 10850 0.0769
0.7595 10875 0.0770
0.7613 10900 0.0872
0.7630 10925 0.0819
0.7648 10950 0.1081
0.7665 10975 0.0771
0.7683 11000 0.0929
0.7700 11025 0.0849
0.7717 11050 0.0801
0.7735 11075 0.0795
0.7752 11100 0.0786
0.7770 11125 0.0921
0.7787 11150 0.0824
0.7805 11175 0.0733
0.7822 11200 0.0757
0.7840 11225 0.0859
0.7857 11250 0.0664
0.7875 11275 0.0847
0.7892 11300 0.0819
0.7909 11325 0.0740
0.7927 11350 0.0966
0.7944 11375 0.0882
0.7962 11400 0.0838
0.7979 11425 0.0904
0.7997 11450 0.0780
0.8014 11475 0.0933
0.8032 11500 0.0802
0.8049 11525 0.0679
0.8067 11550 0.0679
0.8084 11575 0.0966
0.8102 11600 0.0961
0.8119 11625 0.0710
0.8136 11650 0.0901
0.8154 11675 0.0898
0.8171 11700 0.0918
0.8189 11725 0.0944
0.8206 11750 0.0906
0.8224 11775 0.0847
0.8241 11800 0.0933
0.8259 11825 0.0898
0.8276 11850 0.0749
0.8294 11875 0.1054
0.8311 11900 0.0884
0.8329 11925 0.0861
0.8346 11950 0.0788
0.8363 11975 0.1077
0.8381 12000 0.1010
0.8398 12025 0.0954
0.8416 12050 0.0938
0.8433 12075 0.1070
0.8451 12100 0.0976
0.8468 12125 0.0796
0.8486 12150 0.0894
0.8503 12175 0.1010
0.8521 12200 0.0992
0.8538 12225 0.1057
0.8556 12250 0.1057
0.8573 12275 0.1009
0.8590 12300 0.1009
0.8608 12325 0.0866
0.8625 12350 0.0991
0.8643 12375 0.0834
0.8660 12400 0.0891
0.8678 12425 0.0970
0.8695 12450 0.0953
0.8713 12475 0.1049
0.8730 12500 0.1052
0.8748 12525 0.0893
0.8765 12550 0.1111
0.8782 12575 0.1087
0.8800 12600 0.0853
0.8817 12625 0.0948
0.8835 12650 0.1117
0.8852 12675 0.1127
0.8870 12700 0.0937
0.8887 12725 0.1007
0.8905 12750 0.1070
0.8922 12775 0.0907
0.8940 12800 0.1338
0.8957 12825 0.1046
0.8975 12850 0.1045
0.8992 12875 0.1031
0.9009 12900 0.0939
0.9027 12925 0.1144
0.9044 12950 0.1014
0.9062 12975 0.0962
0.9079 13000 0.0931
0.9097 13025 0.0961
0.9114 13050 0.1018
0.9132 13075 0.0934
0.9149 13100 0.1132
0.9167 13125 0.1175
0.9184 13150 0.1084
0.9202 13175 0.1014
0.9219 13200 0.1112
0.9236 13225 0.1013
0.9254 13250 0.1083
0.9271 13275 0.1110
0.9289 13300 0.1024
0.9306 13325 0.1048
0.9324 13350 0.1084
0.9341 13375 0.1194
0.9359 13400 0.0901
0.9376 13425 0.0987
0.9394 13450 0.1051
0.9411 13475 0.1244
0.9429 13500 0.1081
0.9446 13525 0.1086
0.9463 13550 0.1092
0.9481 13575 0.1169
0.9498 13600 0.1068
0.9516 13625 0.1262
0.9533 13650 0.1097
0.9551 13675 0.1226
0.9568 13700 0.1156
0.9586 13725 0.1024
0.9603 13750 0.1100
0.9621 13775 0.1154
0.9638 13800 0.1103
0.9656 13825 0.0924
0.9673 13850 0.1068
0.9690 13875 0.0860
0.9708 13900 0.1045
0.9725 13925 0.1110
0.9743 13950 0.1154
0.9760 13975 0.0888
0.9778 14000 0.1157
0.9795 14025 0.1068
0.9813 14050 0.1211
0.9830 14075 0.1220
0.9848 14100 0.1066
0.9865 14125 0.1098
0.9882 14150 0.1089
0.9900 14175 0.1037
0.9917 14200 0.1155
0.9935 14225 0.1042
0.9952 14250 0.1238
0.9970 14275 0.1122
0.9987 14300 0.1082

Training Time

  • Training: 4.0 hours

Framework Versions

  • Python: 3.12.16
  • Sentence Transformers: 6.2.0
  • Transformers: 5.21.1
  • PyTorch: 2.15.0+cu132
  • Accelerate: 1.15.0
  • Datasets: 5.1.0
  • Tokenizers: 0.23.3

Additional Resources

Citation

BibTeX

Sentence Transformers

@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}

MatryoshkaLoss

@misc{kusupati2024matryoshka,
    title={Matryoshka Representation Learning},
    author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
    year={2024},
    eprint={2205.13147},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

MultipleNegativesRankingLoss

@misc{oord2019representationlearningcontrastivepredictive,
      title={Representation Learning with Contrastive Predictive Coding},
      author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
      year={2019},
      eprint={1807.03748},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1807.03748},
}
Downloads last month
-
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for divakantpandey/code-embed-v2-zeroshot

Finetuned
(21)
this model

Datasets used to train divakantpandey/code-embed-v2-zeroshot

Papers for divakantpandey/code-embed-v2-zeroshot