liudev/novel-reranker-gpl-mmbert-v2
cross-encoder for text reranking
2 min read
This model is a cross-encoder (a model for scoring text pair relevance) fine-tuned from mmBERT-base using the sentence-transformers library. It calculates numerical scores for query-document pairs, making it effective for semantic search and reranking results. With around 0.31 billion parameters, the model supports sequences up to 512 tokens and outputs a single relevance score. It is a great fit for developers building search engines, recommendation systems, and text processing applications.
Key features
- Base model: Fine-tuned from jhu-clsp/mmBERT-base with support for sequences up to 512 tokens.
- Purpose: Calculating scores for text pairs in semantic search and reranking tasks.
- Dataset size: Trained on a dataset of nearly 440 thousand examples using the PreTokenizedMarginMSELoss loss function.
- Integration: Full compatibility with the sentence-transformers library for easy loading and inference.
What you can do
- Semantic search: Integrate the model into a search engine to accurately rank documents by their similarity to a query.
- Result reranking: Rerank initial results from a vector database to improve answer accuracy in RAG systems.
- Text pair analysis: Apply the model to evaluate semantic pair alignment in natural language processing tasks.
Example
from sentence_transformers import CrossEncoder
# Загрузка модели с 🤗 Hub
model = CrossEncoder("liudev/novel-reranker-gpl-mmbert-v2")
# Оценка релевантности пар текстов
pairs = [
['主角开课公开指导别人修炼', '陆青山在杀戮空间高强度磨砺自我后...'],
['精准打击对手的关节并反败为胜', '龙一在战斗中摆脱轻敌心态...'],
]
scores = model.predict(pairs)
print(scores.shape)
Read more
DetailsArchitecture: ModernBertForSequenceClassification (0.31 billion parameters)
Maximum sequence length: 512 tokens
Training hyperparameters: batch size 128, 200 epochs, learning rate 4e-05, adamw_torch_fused optimizer with bf16 and tf32 support










Comments