Downloads · 30 days
7
2% of all-time downloads
swtx/Erlangshen-Roberta-110M-POI
Erlangshen-Roberta-110M-POI is a feature extraction model from swtx. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
7
2% of all-time downloads
All-time downloads
466
Public
Repo size
818 MB
Likes
0
Public
Click a slice to open those files.
.bin409 MB · 100%
From the Hugging Face model README
tags:
inference: true
widget:
We add POI datasets, with a total of 5000000 samples. Our model is mainly based on roberta
from transformers import BertForSequenceClassification
from transformers import BertTokenizer
import torch
tokenizer=BertTokenizer.from_pretrained('swtx/Erlangshen-Roberta-110M-POI')
model=BertForSequenceClassification.from_pretrained('swtx/Erlangshen-Roberta-110M-POI')
texta='湖北省黄冈市麻城市中国中部(麻城)石材循环经济产业园厦门路麻城盈泰环保科技有限公司'
textb='黄冈市麻城市中国中部石材循环经济产业园厦门路麻城盈泰环保科技有限公司'
output=model(torch.tensor([tokenizer.encode(texta,textb)]))
print(torch.nn.functional.softmax(output.logits,dim=-1))