🚀 CrossEncoder based on cross-encoder/ms-marco-MiniLM-L12-v2
This is a Cross Encoder model. It's finetuned from cross-encoder/ms-marco-MiniLM-L12-v2 on the climate-cross-encoder-mixed-neg-v3 dataset using the sentence-transformers library. It can compute scores for text pairs, which are useful for text reranking and semantic search.
✨ Features
- Text Scoring: Computes scores for pairs of texts.
- Reranking and Search: Can be used for text reranking and semantic search.
📦 Installation
First, you need to install the Sentence Transformers library:
pip install -U sentence-transformers
💻 Usage Examples
Basic Usage
from sentence_transformers import CrossEncoder
model = CrossEncoder("CharlesPing/finetuned-ce-climate-multineg-v1")
pairs = [
['Scientific analysis of past climates\xa0shows that greenhouse gasses, principally CO2,\xa0have controlled most ancient\xa0climate changes.', 'Greenhouse gases, in particular carbon dioxide and methane, played a significant role during the Eocene in controlling the surface temperature.'],
['Scientific analysis of past climates\xa0shows that greenhouse gasses, principally CO2,\xa0have controlled most ancient\xa0climate changes.', 'Climatic geomorphology is of limited use to study recent (Quaternary, Holocene) large climate changes since there are seldom discernible in the geomorphological record.'],
['Scientific analysis of past climates\xa0shows that greenhouse gasses, principally CO2,\xa0have controlled most ancient\xa0climate changes.', 'There is also a close correlation between CO2 and temperature, where CO2 has a strong control over global temperatures in Earth history.'],
['Scientific analysis of past climates\xa0shows that greenhouse gasses, principally CO2,\xa0have controlled most ancient\xa0climate changes.', 'While scientists knew of past climate change such as the ice ages, the concept of climate as unchanging was useful in the development of a general theory of what determines climate.'],
['Scientific analysis of past climates\xa0shows that greenhouse gasses, principally CO2,\xa0have controlled most ancient\xa0climate changes.', 'Some long term modifications along the history of the planet have been significant, such as the incorporation of oxygen to the atmosphere.'],
]
scores = model.predict(pairs)
print(scores.shape)
ranks = model.rank(
'Scientific analysis of past climates\xa0shows that greenhouse gasses, principally CO2,\xa0have controlled most ancient\xa0climate changes.',
[
'Greenhouse gases, in particular carbon dioxide and methane, played a significant role during the Eocene in controlling the surface temperature.',
'Climatic geomorphology is of limited use to study recent (Quaternary, Holocene) large climate changes since there are seldom discernible in the geomorphological record.',
'There is also a close correlation between CO2 and temperature, where CO2 has a strong control over global temperatures in Earth history.',
'While scientists knew of past climate change such as the ice ages, the concept of climate as unchanging was useful in the development of a general theory of what determines climate.',
'Some long term modifications along the history of the planet have been significant, such as the incorporation of oxygen to the atmosphere.',
]
)
📚 Documentation
Model Details
Model Sources
🔧 Technical Details
Evaluation
Cross Encoder Reranking
Metric |
Value |
map |
0.6809 (-0.3191) |
mrr@1 |
0.6748 (-0.3252) |
ndcg@1 |
0.6748 (-0.3252) |
Training Details
Training Dataset - climate-cross-encoder-mixed-neg-v3
Evaluation Dataset - climate-cross-encoder-mixed-neg-v3
- Dataset: climate-cross-encoder-mixed-neg-v3 at cd49b57
- Size: 4,290 evaluation samples
- Columns:
query
, doc
, and label
- Approximate statistics based on the first 1000 samples:
|
query |
doc |
label |
type |
string |
string |
float |
details |
- min: 39 characters
- mean: 116.67 characters
- max: 240 characters
|
- min: 18 characters
- mean: ... characters
- max: ... characters
|
... |