Text Ranking
Transformers
PyTorch
Safetensors
sentence-transformers
English
bert
text-classification
text-embeddings-inference
Instructions to use compnet-renard/bert-base-cased-NER-reranker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use compnet-renard/bert-base-cased-NER-reranker with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("compnet-renard/bert-base-cased-NER-reranker") model = AutoModelForSequenceClassification.from_pretrained("compnet-renard/bert-base-cased-NER-reranker", device_map="auto") - sentence-transformers
How to use compnet-renard/bert-base-cased-NER-reranker with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("compnet-renard/bert-base-cased-NER-reranker") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,8 +12,8 @@ widget:
|
|
| 12 |
|
| 13 |
A BERT model trained on the synthetic literary NER context retrieval dataset [Amalvy et. al, 2023](https://aclanthology.org/2023.emnlp-main.642/).
|
| 14 |
|
| 15 |
-
To use this model, construct a text of the form
|
| 16 |
-
The model should predict the positive class if
|
| 17 |
|
| 18 |
|
| 19 |
# Performance Metrics
|
|
|
|
| 12 |
|
| 13 |
A BERT model trained on the synthetic literary NER context retrieval dataset [Amalvy et. al, 2023](https://aclanthology.org/2023.emnlp-main.642/).
|
| 14 |
|
| 15 |
+
To use this model, construct a text of the form **NER-sentence [SEP] context-sentence**.
|
| 16 |
+
The model should predict the positive class if **context-sentence** is useful to predict **NER-sentence**, and the negative class otherwise.
|
| 17 |
|
| 18 |
|
| 19 |
# Performance Metrics
|