标签:
- 句子转换器
- 交叉编码器
- 训练生成
- 损失函数:ListNetLoss
基础模型: Alibaba-NLP/gte-reranker-modernbert-base
任务标签: 文本排序
库名称: sentence-transformers
许可证: apache-2.0
语言:
- 英文
📊 预排序器 - 前置重排工具
新闻
关于预排序器
有太多工具和功能需要选择?试试 预排序器!
预排序器 旨在通过根据给定查询缩小可用工具的语料库,优化现代大语言模型的函数调用流程。
详情请查看 🐱GITHUB!
使用示例
from sentence_transformers.cross_encoder import CrossEncoder
model = CrossEncoder('yjoonjang/preranker-v1')
model.eval()
pairs = [
["'https://www.apple.com' 在2015年9月9日的Wayback Machine中是否可用?", "{'name': 'availability', 'description': '检查给定URL是否在Wayback Machine中存档并可访问。', 'parameters': {'url': {'description': '要在Wayback Machine中检查可用性的URL。', 'type': 'str', 'default': 'http://mashape.com'}, 'timestamp': {'description': \"在Wayback中查找的时间戳。如果未指定,则返回最近可用的捕获。时间戳格式为1-14位数字(YYYYMMDDhhmmss)。默认为'20090101'。\", 'type': 'str, optional', 'default': '20090101'}, 'callback': {'description': '可选的回调以生成JSONP响应。默认为None。', 'type': 'str, optional', 'default': ''}}}"],
["'https://www.apple.com' 在2015年9月9日的Wayback Machine中是否可用?", "{'name': 'top_grossing_mac_apps', 'description': '从App Store获取收入最高的Mac应用列表。', 'parameters': {'category': {'description': \"要获取的应用类别ID。默认为'6016'(通用类别)。\", 'type': 'str', 'default': '6016'}, 'country': {'description': \"App Store的国家代码。默认为'us'。\", 'type': 'str', 'default': 'us'}, 'lang': {'description': \"结果的语言代码。默认为'en'。\", 'type': 'str', 'default': 'en'}, 'num': {'description': '要返回的结果数量。默认为100。最大允许值为200。', 'type': 'int', 'default': '100'}}}"],
["'https://www.apple.com' 在2015年9月9日的Wayback Machine中是否可用?", "{'name': 'top_paid_mac_apps', 'description': '从App Store检索付费最高的Mac应用列表。', 'parameters': {'category': {'description': \"要检索的应用类别。默认为'6016'。\", 'type': 'str', 'default': '6016'}, 'country': {'description': \"筛选应用结果的国家代码。默认为'us'。\", 'type': 'str', 'default': 'us'}, 'lang': {'description': \"结果的语言代码。默认为'en'。\", 'type': 'str', 'default': 'en'}, 'num': {'description': '要返回的结果数量。默认为100。最大为200。', 'type': 'int', 'default': '100'}}}",]
]
scores = model.predict(pairs)
print(scores)
MTEB-ToolRet
将 ToolRet 基准测试 转换为BEIR格式以兼容MTEB。详情请查看 make_toolret_to_beir_format.ipynb
。
评估代码
git clone https://github.com/yjoonjang/PreRanker.git
cd PreRanker/toolret_eval
python run_mteb.py
评估结果
训练详情
训练过程
许可证
引用
@misc{预排序器,
发布者 = {Youngjoon Jang, Seongtae Hong},
年份 = {2025},
网址 = {https://github.com/yjoonjang/preranker}
},
句子转换器
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: 使用孪生BERT网络的句子嵌入",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "2019年自然语言处理实证方法会议论文集",
month = "11",
year = "2019",
publisher = "计算语言学协会",
url = "https://arxiv.org/abs/1908.10084",
}
ListNetLoss
@inproceedings{cao2007learning,
title={学习排序:从成对方法到列表方法},
author={Cao, Zhe and Qin, Tao and Liu, Tie-Yan and Tsai, Ming-Feng and Li, Hang},
booktitle={第24届国际机器学习会议论文集},
pages={129--136},
year={2007}
}