Pristinenlp/alime-reranker-large-zh
alime-reranker-large-zh The alime reranker model. Usage python from transformers import AutoTokenizer, AutoModelForSequenceClassification import torch pairs = "西湖在哪?", "西湖风景名胜区位于浙江省杭州市","今天天气不错","你吓死我了" if torch.cuda.isavailable(): device = torch.de...
alime-reranker-large-zh
The alime reranker model.
Usage
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
pairs = [["西湖在哪?", "西湖风景名胜区位于浙江省杭州市"],["今天天气不错","你吓死我了"]]
if torch.cuda.is_available():
device = torch.device("cuda")
else:
device = torch.device("cpu")
tokenizer = AutoTokenizer.from_pretrained("Pristinenlp/alime-reranker-large-zh")
model = AutoModelForSequenceClassification.from_pretrained("Pristinenlp/alime-reranker-large-zh").to(device)
inputs = tokenizer(pairs, padding=True, truncation=True, return_tensors='pt', max_length=512).to(device)
scores = model(**inputs, return_dict=True).logits.view(-1, ).float()
print(scores.tolist())
Similar Projects
Discover other similar projects and AI models.
Laya Laya is an open-source, non-autoregressive System 1 decision model: give it a state (text, email, ticket, or JSON document) and typed questions, and it returns typed answers with mathematically calibrated probabilities and confidence scores. It...
We have updated the new reranker(https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/llmreranker), supporting larger lengths, more languages, and achieving better performance. FlagEmbedding Model List | FAQ | Usage | Evaluation | Trai...
Cross-Encoder for MS Marco This model was trained on the MS Marco Passage Ranking(https://github.com/microsoft/MSMARCO-Passage-Ranking) task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages...
FlagEmbedding Model List | FAQ | Usage | Evaluation | Train | Contact | Citation | License More details please refer to our Github: FlagEmbedding(https://github.com/FlagOpen/FlagEmbedding). If you are looking for a model that supports more languages,...
all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...
Reranker More details please refer to our Github: FlagEmbedding(https://github.com/FlagOpen/FlagEmbedding/tree/master). - Model List(model-list) - Usage(usage) - Fine-tuning(fine-tune) - Evaluation(evaluation) - Citation(citation) Different from emb...
DistilBERT base uncased finetuned SST-2 Table of Contents - Model Details(model-details) - How to Get Started With the Model(how-to-get-started-with-the-model) - Uses(uses) - Risks, Limitations and Biases(risks-limitations-and-biases) - Training(tra...
autotrust/JEV-35B !AutoTrust/GuruSearch recommendation & search live demo: news.guru.so(https://huggingface.co/autotrust/JEV-27B/resolve/main/assets/autotrustgurusearchdemo.png)(https://news.guru.so/ui) 🔴 Live: AutoTrust/GuruSearch recommendation &...
We have updated the new reranker(https://github.com/FlagOpen/FlagEmbedding/tree/master/FlagEmbedding/llmreranker), supporting larger lengths, more languages, and achieving better performance. FlagEmbedding Model List | FAQ | Usage | Evaluation | Trai...