/ Модель

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

Контекст
514 токенов
Параметры
124 млн
Лицензия
MIT
Архитектура
xlm-roberta · dense
Базовая модель
mMiniLMv2-L12-H384
Опубликована
3 авг 2026

code-daemon-reranker-v1

Классификация текстаТекст → label3 профессии

Мультиязычная модель-переранжировщик, которая оценивает релевантность найденных фрагментов кода запросу на естественном языке.

174скачиваний за 30 дней0лайковвеса обновлены12 окт 2026

Бенчмарки

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

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

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

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

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

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

Code-Daemon Reranker v1 — мультиязычная cross-encoder-модель для переранжирования результатов поиска кода по запросу на естественном языке. Разработчик — автор репозитория faxenoff; модель основана на hotchpotch/mMiniLMv2-L12-H384 и дообучена для работы с кандидатами, которые возвращает собственный гибридный поисковый механизм Code-Daemon. Она принимает пару «запрос — кандидат» и выдаёт логит релевантности, по которому можно пересортировать результаты.

Модель использует архитектуру XLM-RoBERTa с 12 слоями и размерностью скрытого состояния 384; метаданные указывают 124,3 млн параметров. Она рассчитана на мультиязычный поиск и принимает до 514 токенов по нативному контексту, хотя README описывает рабочий режим до 256 токенов на пару: запрос сохраняется целиком, а конец документа может обрезаться. Доступны веса Safetensors и сборки ONNX и Core ML.

По приведённой офлайн-оценке на десяти не встречавшихся при обучении репозиториях модель улучшает MRR@10 и nDCG@10 относительно исходного ретривера, главным образом переставляя результаты в середине списка; первый результат меняется мало. Лучше всего она подходит для кандидатов с формой документов, похожей на данные Code-Daemon; обычные пары «запрос — фрагмент кода» также допустимы, но не были целевым форматом обучения. Результат — относительный логит для сравнения кандидатов внутри одного запроса, а не универсальный порог релевантности. Лицензия — MIT.

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

  • переранжирование результатов поиска кода по описанию задачи
  • сортировка файлов репозитория по релевантности поисковому запросу
  • уточнение выдачи гибридного поиска кода после эмбеддингов и BM25

Ограничения

Модель настроена под форму документов и кандидатные пулы Code-Daemon, поэтому её качество может быть ниже на данных другой структуры; полезные кандидаты должны быть найдены первым этапом поиска. Логиты следует сравнивать внутри одного запроса, а рабочий режим README ограничен 256 токенами на пару с возможным обрезанием конца документа.

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

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

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

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

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

Открыть на Hugging Face

code-daemon-reranker-v1

A cross-encoder reranker for natural-language → code search. It reads a (query, candidate) pair and returns one relevance logit, and re-orders the top candidates of the Code-Daemon hybrid retriever (embeddings + BM25 + code graph).

What makes it different: it was fine-tuned on exactly what it sees when it serves — the candidate pools Code-Daemon's own retriever produces, with the retriever's own near-misses as negatives, and the document text in the form the search actually feeds it. A generic reranker learns from a proxy retriever's mistakes; this one learned from the ones it has to fix.

  • ~117M parameters — XLM-RoBERTa, 12 layers × 384 hidden, multilingual 250k vocabulary.
  • 2-input ONNX (input_ids, attention_mask, no token_type_ids) → one logit per pair.
  • 256 tokens per pair: the query is kept whole, the document's tail is cut.

The weights under this id were replaced on 2026-10-12. Same architecture, same inputs and outputs, same tokenizer; the backbone is now the MIT-licensed hotchpotch/mMiniLMv2-L12-H384 with no ranking stage in front of it. The previous revision (2026-09-13) was warm-started from an MS MARCO-derived ranker and scored 0.006 nDCG@10 higher on the same evaluation; the revision before that, a fine-tune on public pairs, scored below its own untuned base. Engines built for earlier weights are gone from this repository.

Numbers

Ten repositories never seen in training, 6 141 natural-language queries, Code-Daemon's own candidate pools (20 per query) re-scored and replayed offline with the daemon's ranking blend:

rerankerhit@1hit@5MRR@10nDCG@10
no reranker (the retriever alone)0.1590.4050.2540.299
mmarco-mMiniLMv2-L12-H384-v1 (public, untuned)0.1660.4470.2830.329
this model0.1660.4650.2930.339
  • +0.040 nDCG@10 over the retriever alone and +0.010 over the public ranker of the same width, at the same cost — the architecture is the base's, so query latency is unchanged (about 55 ms end to end for retrieval plus 20 pairs on a laptop RTX 5060, TensorRT FP16).
  • The gain sits in the middle of the list — hit@3 to hit@5 and MRR. It does not move the first result much.
  • The trade is fit, not cost: the model is tuned to Code-Daemon's document shapes. Plain (query, code snippet) pairs work, but that is not what it was tuned on.
  • Absolute numbers are low because the queries are single-positive at file level: a relevant neighbouring file scores zero. Read the difference between the rows, not the level.

How to use it

Re-rank the top ~20 candidates of a first-stage retriever. Feed (query, candidate) pairs, sort by logit. The score is a raw logit — compare it within one query, not against a fixed threshold; Code-Daemon takes sigmoid(logit) and blends it with the retriever's score.

import onnxruntime as ort, numpy as np
from transformers import AutoTokenizer

tok  = AutoTokenizer.from_pretrained(".")
sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])

def rerank(query, docs, max_len=256):
    enc = tok([query] * len(docs), docs, padding=True, truncation="only_second",
              max_length=max_len, return_tensors="np", return_token_type_ids=False)
    logits = sess.run(None, {"input_ids":      enc["input_ids"].astype(np.int64),
                             "attention_mask": enc["attention_mask"].astype(np.int64)})[0]
    return sorted(zip(logits.reshape(-1).tolist(), docs), reverse=True)   # higher = more relevant

Documents. About 900 characters of code per candidate is what was measured above. Code-Daemon often sends a candidate as a file header plus the matched entity's siblings, with a >>> marker on the candidate itself; the model has seen that form.

Shapes. OpenVINO and Core ML ship batch 16 × seq 256 (Core ML also seq 64 and 128 — route short pairs there). Everything is FP16: under OpenVINO INT8 this graph hits a known access violation on the Intel iGPU.

How it was made

Starts from hotchpotch/mMiniLMv2-L12-H384 — Microsoft's multilingual MiniLM v2 (12 layers × 384, distilled from XLM-RoBERTa Large), a plain masked-language-model encoder — with a freshly initialised [CLS] ranking head, and is fine-tuned with a listwise objective (one positive against up to 16 negatives) on:

  • behavioural queries written per code entity by an LLM that was not allowed to use the entity's identifiers — "compare two hash hierarchies and return list of changed paths", not diffMerkleTrees;
  • the candidate pools Code-Daemon's retriever returned for those queries, with negatives taken from the pool's uncertain band, over open-source repositories disjoint from the evaluation set.

The checkpoint was selected on the evaluation repositories' pools replayed offline.

Files

filewhat it is
model.onnx + model.onnx.dataFP32 ONNX — the build source and the standalone path
model.safetensors, config.jsonthe same weights as XLMRobertaForSequenceClassification; AutoModelForSequenceClassification loads them as-is; the Apple (MLX) build is prepared from this pair
tokenizer.json, tokenizer_config.json, sentencepiece.bpe.modelthe tokenizer — stock XLM-R
code-daemon-reranker-v1_{win_x64,linux_x64}_trt11.3_sm_{75,80,86,89,90,120}.engineTensorRT FP16 per OS × GPU; sm_90 (H100/H200) Linux only. The set is filled per architecture as each is built — the file list is the truth
code-daemon-reranker-v1_ov2026.4_{cpu,igpu}_fp16_b16_s256.{xml,bin}OpenVINO 2026.4 FP16, Intel CPU / iGPU
code-daemon-reranker-v1_b128_s128_{win_x64,linux_x64}_tvm0.25_vulkan.{dll,so}TVM Vulkan modules for GPUs without TensorRT or OpenVINO
coreml_ane/embed.mlpackage/Core ML for the Apple Neural Engine, functions b16 s64 / s128 / s256; load with cpuAndNeuralEngine, fall back to MLX for other shapes

License & attribution

Released under the MIT license.

Backbone: hotchpotch/mMiniLMv2-L12-H384 (MIT), Microsoft's Multilingual-MiniLM-L12-H384 distilled from XLM-RoBERTa Large.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
XLMRobertaForSequenceClassification
Ревизия весов
738445e

0 моделей