/ Модель

Характеристики

Контекст
8 192 токена
Параметры
149 млн
Архитектура
modernbert · dense
Базовая модель
ModernBERT-base
Библиотека
sentence-transformers
Опубликована
21 янв 2025

modernbert-python-code-retrieval

ЭмбеддингиТекст → embedding8 профессий

Дообученная на CodeSearchNet модель ModernBERT строит эмбеддинги для семантического поиска и сопоставления текстовых запросов с кодом.

125скачиваний за 30 дней0лайковвеса обновлены21 янв 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Эмбеддинги» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Это модель Sentence Transformers, дообученная на answerdotai/ModernBERT-base на наборе code_search_net. Она кодирует текстовые запросы и фрагменты кода в плотные векторы размерности 768 и предназначена прежде всего для семантического поиска по коду и сопоставления запросов с подходящими фрагментами. Также её можно применять для оценки сходства предложений, поиска перефразировок, кластеризации и классификации текста.

Модель использует encoder-архитектуру ModernBERT с CLS-пулингом и косинусной мерой сходства. README указывает максимальную длину последовательности 4096 токенов, а метаданные — нативный контекст 8192 токена; фактическую длину при использовании следует соотносить с конфигурацией Sentence Transformers. Размер модели — 149 млн параметров. Карточка описывает пары запросов и кода из CodeSearchNet; отдельные языки программирования или естественные языки в метаданных не перечислены.

Модель выдаёт эмбеддинги, а не готовые текстовые ответы, поэтому для поиска обычно требуется сравнение векторов и, при необходимости, отдельный индекс. Лицензия в предоставленных данных не указана.

Сценарии применения

  • поиск фрагментов кода по текстовому описанию
  • ранжирование кода по релевантности запросу
  • поиск похожих фрагментов кода
  • кластеризация запросов и фрагментов кода по смыслу
  • сопоставление перефразированных текстовых запросов

Ограничения

Модель возвращает векторы, а не готовые ответы, и рассчитана на семантическое сопоставление текстовых запросов с кодом; её полезность для иных языков и доменов отдельно не подтверждена. README указывает максимум 4096 токенов, тогда как метаданные сообщают нативный контекст 8192 токена.

Для каких профессий подходит8

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

SentenceTransformer based on answerdotai/ModernBERT-base

This is a sentence-transformers model finetuned from answerdotai/ModernBERT-base on the code_search_net dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: answerdotai/ModernBERT-base
  • Maximum Sequence Length: 4096 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity
  • Training Dataset:
    • code_search_net

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 4096, 'do_lower_case': False}) with Transformer model: ModernBertModel 
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)

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("juanwisz/modernbert-python-code-retrieval")
# Run inference
sentences = [
    'Validates control dictionary for the experiment context',
    'def __validateExperimentControl(self, control):\n    """ Validates control dictionary for the experiment context"""\n    # Validate task list\n    taskList = control.get(\'tasks\', None)\n    if taskList is not None:\n      taskLabelsList = []\n\n      for task in taskList:\n        validateOpfJsonValue(task, "opfTaskSchema.json")\n        validateOpfJsonValue(task[\'taskControl\'], "opfTaskControlSchema.json")\n\n        taskLabel = task[\'taskLabel\']\n\n        assert isinstance(taskLabel, types.StringTypes), \\\n               "taskLabel type: %r" % type(taskLabel)\n        assert len(taskLabel) > 0, "empty string taskLabel not is allowed"\n\n        taskLabelsList.append(taskLabel.lower())\n\n      taskLabelDuplicates = filter(lambda x: taskLabelsList.count(x) > 1,\n                                   taskLabelsList)\n      assert len(taskLabelDuplicates) == 0, \\\n             "Duplcate task labels are not allowed: %s" % taskLabelDuplicates\n\n    return',
    'def load_file_list(path=None, regx=\'\\.jpg\', printable=True, keep_prefix=False):\n    r"""Return a file list in a folder by given a path and regular expression.\n\n    Parameters\n    ----------\n    path : str or None\n        A folder path, if `None`, use the current directory.\n    regx : str\n        The regx of file name.\n    printable : boolean\n        Whether to print the files infomation.\n    keep_prefix : boolean\n        Whether to keep path in the file name.\n\n    Examples\n    ----------\n    >>> file_list = tl.files.load_file_list(path=None, regx=\'w1pre_[0-9]+\\.(npz)\')\n\n    """\n    if path is None:\n        path = os.getcwd()\n    file_list = os.listdir(path)\n    return_list = []\n    for _, f in enumerate(file_list):\n        if re.search(regx, f):\n            return_list.append(f)\n    # return_list.sort()\n    if keep_prefix:\n        for i, f in enumerate(return_list):\n            return_list[i] = os.path.join(path, f)\n\n    if printable:\n        logging.info(\'Match file list = %s\' % return_list)\n        logging.info(\'Number of files = %d\' % len(return_list))\n    return return_list',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Training Details

Training Dataset

code_search_net

  • Dataset: code_search_net
  • Size: 412,178 training samples
  • Columns: query and positive
  • Approximate statistics based on the first 1000 samples:
    querypositive
    typestringstring
    detailsmin: 4 tokensmean: 73.72 tokensmax: 2258 tokensmin: 46 tokensmean: 300.87 tokensmax: 3119 tokens
  • Samples:
    querypositive
    Extracts the list of arguments that start with any of the specified prefix valuesdef findArgs(args, prefixes): """ Extracts the list of arguments that start with any of the specified prefix values """ return list([ arg for arg in args if len([p for p in prefixes if arg.lower().startswith(p.lower())]) > 0 ])
    Removes any arguments in the supplied list that are contained in the specified blacklistdef stripArgs(args, blacklist): """ Removes any arguments in the supplied list that are contained in the specified blacklist """ blacklist = [b.lower() for b in blacklist] return list([arg for arg in args if arg.lower() not in blacklist])
    Executes a child process and captures its outputdef capture(command, input=None, cwd=None, shell=False, raiseOnError=False): """ Executes a child process and captures its output """ # Attempt to execute the child process proc = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd, shell=shell, universal_newlines=True) (stdout, stderr) = proc.communicate(input) # If the child process failed and we were asked to raise an exception, do so if raiseOnError == True and proc.returncode != 0: raise Exception( 'child process ' + str(command) + ' failed with exit code ' + str(proc.returncode) + '\nstdout: "' + stdout + '"' + '\nstderr: "' + stderr + '"' ) return CommandOutput(proc.returncode, stdout, stderr)
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Evaluation Dataset

code_search_net

  • Dataset: code_search_net
  • Size: 23,107 evaluation samples
  • Columns: query and positive
  • Approximate statistics based on the first 1000 samples:
    querypositive
    typestringstring
    detailsmin: 5 tokensmean: 168.27 tokensmax: 2118 tokensmin: 48 tokensmean: 467.9 tokensmax: 4096 tokens
  • Samples:
    querypositive
    Train a deepq model. Parameters ------- env: gym.Env environment to train on network: string or a function neural network to use as a q function approximator. If string, has to be one of the names of registered models in baselines.common.models (mlp, cnn, conv_only). If a function, should take an observation tensor and return a latent variable tensor, which will be mapped to the Q function heads (see build_q_func in baselines.deepq.models for details on that) seed: int or None prng seed. The runs with the same seed "should" give the same results. If None, no seeding is used. lr: float learning rate for adam optimizer total_timesteps: int number of env steps to optimizer for buffer_size: int size of the replay buffer exploration_fraction: float fraction of entire training period over which the exploration rate is annealed exploration_final_eps: float final value of ra...def learn(env, network, seed=None, lr=5e-4, total_timesteps=100000, buffer_size=50000, exploration_fraction=0.1, exploration_final_eps=0.02, train_freq=1, batch_size=32, print_freq=100, checkpoint_freq=10000, checkpoint_path=None, learning_starts=1000, gamma=1.0, target_network_update_freq=500, prioritized_replay=False, prioritized_replay_alpha=0.6, prioritized_replay_beta0=0.4, prioritized_replay_beta_iters=None, prioritized_replay_eps=1e-6, param_noise=False, callback=None, load_path=None, **network_kwargs ): """Train a deepq model. Parameters ------- env: gym.Env environment to train on network: string or a function neural network to use as a q function approximator. If string, has to be one of the ...
    Save model to a pickle located at pathdef save_act(self, path=None): """Save model to a pickle located at path""" if path is None: path = os.path.join(logger.get_dir(), "model.pkl") with tempfile.TemporaryDirectory() as td: save_variables(os.path.join(td, "model")) arc_name = os.path.join(td, "packed.zip") with zipfile.ZipFile(arc_name, 'w') as zipf: for root, dirs, files in os.walk(td): for fname in files: file_path = os.path.join(root, fname) if file_path != arc_name: zipf.write(file_path, os.path.relpath(file_path, td)) with open(arc_name, "rb") as f: model_data = f.read() with open(path, "wb") as f: cloudpickle.dump((model_data, self._act_params), f)
    CNN from Nature paper.def nature_cnn(unscaled_images, **conv_kwargs): """ CNN from Nature paper. """ scaled_images = tf.cast(unscaled_images, tf.float32) / 255. activ = tf.nn.relu h = activ(conv(scaled_images, 'c1', nf=32, rf=8, stride=4, init_scale=np.sqrt(2), **conv_kwargs)) h2 = activ(conv(h, 'c2', nf=64, rf=4, stride=2, init_scale=np.sqrt(2), **conv_kwargs)) h3 = activ(conv(h2, 'c3', nf=64, rf=3, stride=1, init_scale=np.sqrt(2), **conv_kwargs)) h3 = conv_to_fc(h3) return activ(fc(h3, 'fc1', nh=512, init_scale=np.sqrt(2)))
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: epoch
  • per_device_train_batch_size: 4
  • gradient_accumulation_steps: 4
  • learning_rate: 2e-05
  • num_train_epochs: 10
  • warmup_steps: 1000
  • fp16: True

All Hyperparameters

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: epoch
  • prediction_loss_only: True
  • per_device_train_batch_size: 4
  • per_device_eval_batch_size: 8
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 4
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 2e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 10
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • warmup_steps: 1000
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • save_safetensors: True
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • no_cuda: False
  • use_cpu: False
  • use_mps_device: False
  • seed: 42
  • data_seed: None
  • jit_mode_eval: False
  • use_ipex: False
  • bf16: False
  • fp16: True
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • local_rank: 0
  • ddp_backend: None
  • tpu_num_cores: None
  • tpu_metrics_debug: False
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • skip_memory_metrics: True
  • use_legacy_prediction_loop: False
  • push_to_hub: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • include_for_metrics: []
  • eval_do_concat_batches: True
  • fp16_backend: auto
  • push_to_hub_model_id: None
  • push_to_hub_organization: None
  • mp_parameters:
  • auto_find_batch_size: False
  • full_determinism: False
  • torchdynamo: None
  • ray_scope: last
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • dispatch_batches: None
  • split_batches: None
  • include_tokens_per_second: False
  • include_num_input_tokens_seen: False
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional

Training Logs

EpochStepTraining LossValidation Loss
0.00782000.634-
0.01554000.0046-
0.02336000.0009-
0.03118000.0004-
0.038810000.0001-
0.046612000.0002-
0.054314000.0001-
0.062116000.0001-
0.069918000.0001-
0.077620000.0-
0.085422000.0-
0.093224000.0-
0.100926000.0-
0.108728000.0005-
0.116530000.0005-
0.124232000.0002-
0.132034000.0-
0.139736000.0-
0.147538000.0-
0.155340000.0001-
0.163042000.0-
0.170844000.0001-
0.178646000.0001-
0.186348000.0-
0.194150000.0-
0.201952000.0-
0.209654000.0-
0.217456000.0-
0.225158000.0-
0.232960000.0004-
0.240762000.0-
0.248464000.0001-
0.256266000.0-
0.264068000.0-
0.271770000.0-
0.279572000.0-
0.287374000.0-
0.295076000.0-
0.302878000.0-
0.310580000.0-
0.318382000.0-
0.326184000.0004-
0.333886000.0-
0.341688000.0-
0.349490000.0-
0.357192000.0-
0.364994000.0-
0.372796000.0-
0.380498000.0-
0.3882100000.0-
0.3959102000.0-
0.4037104000.0-
0.4115106000.0-
0.4192108000.0-
0.4270110000.0-
0.4348112000.0-
0.4425114000.0-
0.4503116000.0-
0.4581118000.0-
0.4658120000.0-
0.4736122000.0-
0.4813124000.0-
0.4891126000.0005-
0.4969128000.0-
0.5046130000.0-
0.5124132000.0001-
0.5202134000.0-
0.5279136000.0-
0.5357138000.0-
0.5435140000.0-
0.5512142000.0-
0.5590144000.0004-
0.5667146000.0-
0.5745148000.0-
0.5823150000.0-
0.5900152000.0-
0.5978154000.0-
0.6056156000.0-
0.6133158000.0-
0.6211160000.0-
0.6289162000.0-
0.6366164000.0006-
0.6444166000.0-
0.6521168000.0005-
0.6599170000.0-
0.6677172000.0-
0.6754174000.0-
0.6832176000.0-
0.6910178000.0-
0.6987180000.0005-
0.7065182000.0001-
0.7143184000.0-
0.7220186000.0-
0.7298188000.0-
0.7375190000.0-
0.7453192000.0-
0.7531194000.0-
0.7608196000.0-
0.7686198000.0001-
0.7764200000.0-
0.7841202000.0-
0.7919204000.0-
0.7997206000.0004-
0.8074208000.0-
0.8152210000.0-
0.8229212000.0-
0.8307214000.0009-
0.8385216000.0-
0.8462218000.0-
0.8540220000.0-
0.8618222000.0-
0.8695224000.0002-
0.8773226000.0-
0.8851228000.0-
0.8928230000.0001-
0.9006232000.0-
0.9083234000.0-
0.9161236000.0-
0.9239238000.0-
0.9316240000.0-
0.9394242000.0-
0.9472244000.0-
0.9549246000.0-
0.9627248000.0-
0.9704250000.0-
0.9782252000.0-
0.9860254000.0-
0.9937256000.0-
1.025762-0.0001
1.0015258000.0005-
1.0092260000.0-
1.0170262000.0-
1.0248264000.0-
1.0325266000.0-
1.0403268000.0-
1.0481270000.0-
1.0558272000.0-
1.0636274000.0-
1.0713276000.0-
1.0791278000.0-
1.0869280000.0-
1.0946282000.0-
1.1024284000.0-
1.1102286000.0-
1.1179288000.0-
1.1257290000.0-
1.1335292000.0-
1.1412294000.0-
1.1490296000.0-
1.1567298000.0-
1.1645300000.0-
1.1723302000.0-
1.1800304000.0-
1.1878306000.0-
1.1956308000.0-
1.2033310000.0-
1.2111312000.0-
1.2189314000.0-
1.2266316000.0004-
1.2344318000.0004-
1.2421320000.0-
1.2499322000.0-
1.2577324000.0-
1.2654326000.0-
1.2732328000.0-
1.2810330000.0-
1.2887332000.0-
1.2965334000.0-
1.3043336000.0-
1.3120338000.0-
1.3198340000.0-
1.3275342000.0-
1.3353344000.0-
1.3431346000.0-
1.3508348000.0004-
1.3586350000.0005-
1.3664352000.0004-
1.3741354000.0011-
1.3819356000.0-
1.3897358000.0-
1.3974360000.0-
1.4052362000.0-
1.4129364000.0-
1.4207366000.0-
1.4285368000.0-
1.4362370000.0-
1.4440372000.0001-
1.4518374000.0-
1.4595376000.0-
1.4673378000.0-
1.4751380000.0-
1.4828382000.0004-
1.4906384000.0003-
1.4983386000.0-
1.5061388000.0-
1.5139390000.0-
1.5216392000.0-
1.5294394000.0004-
1.5372396000.0004-
1.5449398000.0-
1.5527400000.0-
1.5605402000.0-
1.5682404000.0-
1.5760406000.0009-
1.5837408000.0-
1.5915410000.0009-
1.5993412000.0-
1.6070414000.0-
1.6148416000.0-
1.6226418000.0-
1.6303420000.0-
1.6381422000.0-
1.6459424000.0-
1.6536426000.0-
1.6614428000.0-
1.6691430000.0-
1.6769432000.0-
1.6847434000.0-
1.6924436000.0-
1.7002438000.0-
1.7080440000.0-
1.7157442000.0-
1.7235444000.0-
1.7313446000.0-
1.7390448000.0-
1.7468450000.0-
1.7545452000.0-
1.7623454000.0-
1.7701456000.0-
1.7778458000.0-
1.7856460000.0-
1.7934462000.0-
1.8011464000.0-
1.8089466000.0-
1.8167468000.0-
1.8244470000.0-
1.8322472000.0-
1.8399474000.0-
1.8477476000.0-
1.8555478000.0004-
1.8632480000.0-
1.8710482000.0-
1.8788484000.0-
1.8865486000.0-
1.8943488000.0-
1.9021490000.0004-
1.9098492000.0-
1.9176494000.0-
1.9253496000.0004-
1.9331498000.0-
1.9409500000.0-
1.9486502000.0-
1.9564504000.0-
1.9642506000.0004-
1.9719508000.0-
1.9797510000.0-
1.9875512000.0-
1.9952514000.0004-
2.051524-0.0001
2.0030516000.0-
2.0107518000.0-
2.0185520000.0-
2.0262522000.0-
2.0340524000.0004-
2.0418526000.0004-
2.0495528000.0-
2.0573530000.0008-
2.0651532000.0-
2.0728534000.0-
2.0806536000.0-
2.0883538000.0-
2.0961540000.0-
2.1039542000.0-
2.1116544000.0-
2.1194546000.0-
2.1272548000.0-
2.1349550000.0-
2.1427552000.0-
2.1505554000.0-
2.1582556000.0-
2.1660558000.0-
2.1737560000.0-
2.1815562000.0-
2.1893564000.0-
2.1970566000.0-
2.2048568000.0-
2.2126570000.0-
2.2203572000.0-
2.2281574000.0-
2.2359576000.0-
2.2436578000.0-
2.2514580000.0004-
2.2591582000.0-
2.2669584000.0004-
2.2747586000.0-
2.2824588000.0-
2.2902590000.0-
2.2980592000.0-
2.3057594000.0-
2.3135596000.0-
2.3213598000.0004-
2.3290600000.0-
2.3368602000.0004-
2.3445604000.0-
2.3523606000.0-
2.3601608000.0-
2.3678610000.0-
2.3756612000.0-
2.3834614000.0-
2.3911616000.0-
2.3989618000.0-
2.4067620000.0005-
2.4144622000.0-
2.4222624000.0-
2.4299626000.0-
2.4377628000.0-
2.4455630000.0-
2.4532632000.0-
2.4610634000.0-
2.4688636000.0-
2.4765638000.0-
2.4843640000.0-
2.4921642000.0-
2.4998644000.0-
2.5076646000.0-
2.5153648000.0-
2.5231650000.0-
2.5309652000.0-
2.5386654000.0-
2.5464656000.0004-
2.5542658000.0-
2.5619660000.0-
2.5697662000.0-
2.5775664000.0-
2.5852666000.0-
2.5930668000.0-
2.6007670000.0-
2.6085672000.0-
2.6163674000.0-
2.6240676000.0-
2.6318678000.0-
2.6396680000.0-
2.6473682000.0-
2.6551684000.0-
2.6629686000.0-
2.6706688000.0004-
2.6784690000.0-
2.6861692000.0-
2.6939694000.0-
2.7017696000.0004-
2.7094698000.0004-
2.7172700000.0-
2.7250702000.0-
2.7327704000.0-
2.7405706000.0-
2.7483708000.0-
2.7560710000.0004-
2.7638712000.0-
2.7715714000.0-
2.7793716000.0-
2.7871718000.0-
2.7948720000.0-
2.8026722000.0-
2.8104724000.0-
2.8181726000.0-
2.8259728000.0-
2.8337730000.0004-
2.8414732000.0-
2.8492734000.0-
2.8569736000.0-
2.8647738000.0004-
2.8725740000.0-
2.8802742000.0-
2.8880744000.0-
2.8958746000.0-
2.9035748000.0-
2.9113750000.0-
2.9191752000.0-
2.9268754000.0004-
2.9346756000.0-
2.9423758000.0-
2.9501760000.0-
2.9579762000.0-
2.9656764000.0-
2.9734766000.0004-
2.9812768000.0-
2.9889770000.0-
2.9967772000.0-
3.077286-0.0000

Framework Versions

  • Python: 3.11.11
  • Sentence Transformers: 3.3.1
  • Transformers: 4.48.0
  • PyTorch: 2.5.1+cu121
  • Accelerate: 1.2.1
  • Datasets: 3.2.0
  • Tokenizers: 0.21.0

Citation

BibTeX

ModernBERT

@misc{warner2024smarterbetterfasterlonger,
      title={Smarter, Better, Faster, Longer: A Modern Bidirectional Encoder for Fast, Memory Efficient, and Long Context Finetuning and Inference}, 
      author={Benjamin Warner and Antoine Chaffin and Benjamin Clavié and Orion Weller and Oskar Hallström and Said Taghadouini and Alexis Gallagher and Raja Biswas and Faisal Ladhak and Tom Aarsen and Nathan Cooper and Griffin Adams and Jeremy Howard and Iacopo Poli},
      year={2024},
      eprint={2412.13663},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2412.13663}, 
}

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",
}

MultipleNegativesRankingLoss

@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply},
    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · sentence-transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
ModernBertModel
Ревизия весов
293923a

0 моделей