Downloads · 30 days
5
7% of all-time downloads
NayonAhmed09/internal-linklm
internal-linklm is a text classification model from NayonAhmed09. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
A fine-tuned Cross-Encoder Reranker based on BAAI/bge-reranker-large for semantic document ranking and internal link recommendation.
Downloads · 30 days
5
7% of all-time downloads
All-time downloads
71
Public
Parameters
560M
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 99%
From the Hugging Face model README
A fine-tuned Cross-Encoder Reranker based on BAAI/bge-reranker-large for semantic document ranking and internal link recommendation.
This model was fine-tuned to score the relevance between a query and a candidate document. It is designed for retrieval and reranking tasks such as:
The model was fine-tuned using the Hugging Face Transformers Trainer.
Training configuration:
| Metric | Score |
|---|---|
| Accuracy | 0.8476 |
| Precision | 0.6279 |
| Recall | 0.5841 |
| F1 Score | 0.6052 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained(
"NayonAhmed09/internal-linklm"
)
model = AutoModelForSequenceClassification.from_pretrained(
"NayonAhmed09/internal-linklm"
)
Example:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained(
"NayonAhmed09/internal-linklm"
)
model = AutoModelForSequenceClassification.from_pretrained(
"NayonAhmed09/internal-linklm"
)
query = "Best moisturizer for oily skin"
document = "A complete guide to choosing skincare products for oily skin."
inputs = tokenizer(
query,
document,
return_tensors="pt",
truncation=True,
max_length=512
)
with torch.no_grad():
score = model(**inputs).logits.squeeze().item()
print(score)
Higher scores indicate higher semantic relevance.
MIT License
Nayon Ahmed
GitHub: https://github.com/nayonahmedjoy
Hugging Face: https://huggingface.co/NayonAhmed09