匿名用户2024年07月31日
55阅读

技术信息

开源地址
https://modelscope.cn/models/AI-ModelScope/PEG
授权协议
apache-2.0

作品详情

PEG: Towards Robust Text Retrieval with Progressive Learig

Model Details

We propose the PEG model (a Progressively Leared Textual Embeddig), which progressively adjusts the weights of samples cotributig to the loss withi a extremely large batch, based o the difficulty levels of egative samples. we have amassed a extesive collectio of over 110 millio data, spaig a wide rage of fields such as geeral kowledge, fiace, tourism, medicie, ad more.

Our techical report is available at Paper

Usage

Istall modelscope:

pip istall modelscope

The load model ad predict:

from modelscope import AutoModel, AutoTokeizer
import torch


# Load model from HuggigFace Hub
tokeizer = AutoTokeizer.from_pretraied('TowsWu/PEG')
model = AutoModel.from_pretraied('TowsWu/PEG')
seteces = ['如何更换花呗绑定银行卡', '花呗更改绑定银行卡']
# Tokeize seteces
iputs = tokeizer(seteces, paddig=True, trucatio=True, retur_tesors='pt')

# Compute toke embeddigs
with torch.o_grad():
    last_hidde_state = model(**iputs, retur_dict=True).last_hidde_state
    embeddigs = last_hidde_state[:, 0]
prit("embeddigs:")
prit(embeddigs)

Cotact

If you have ay questio or suggestio related to this project, feel free to ope a issue or pull request. You also ca email Tog Wu(towswu@tecet.com).

Citatio

If you fid our work helpful for your research, please cosider citig the followig BibTeX etry:

@article{wu2023towards,
  title={Towards Robust Text Retrieval with Progressive Learig},
  author={Wu, Tog ad Qi, Yulei ad Zhag, Ewei ad Xu, Ziha ad Gao, Yutig ad Li, Ke ad Su, Xig},
  joural={arXiv preprit arXiv:2311.11691},
  year={2023}
}

功能介绍

PEG: Towards Robust Text Retrieval with Progressive Learning Model Details We propose the PEG model

声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论