kiel2 commited on
Commit
288f0c0
·
verified ·
1 Parent(s): b5a65cb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -15
README.md CHANGED
@@ -3,18 +3,18 @@ tags:
3
  - sentence-transformers
4
  - cross-encoder
5
  - reranker
6
- - generated_from_trainer
7
- - dataset_size:5000
8
- - loss:BinaryCrossEntropyLoss
9
  base_model: BAAI/bge-reranker-base
10
  pipeline_tag: text-ranking
11
  library_name: sentence-transformers
12
  ---
13
 
14
- # KielEmbed-Rerank
15
- A high-performance Cross-Encoder reranker fine-tuned from `BAAI/bge-reranker-base`.
16
 
17
- This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model fine-tuned from [BAAI/bge-reranker-base](https://huggingface.co/BAAI/bge-reranker-base) using the [sentence-transformers](https://www.SBERT.net) library. It evaluates query-document text pairs jointly to compute precise relevance scores for semantic search and multi-stage retrieval pipelines.
 
 
 
 
18
 
19
  ## Model Details
20
 
@@ -29,17 +29,25 @@ This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.h
29
  - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
30
  - **Cross Encoder Guide:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
31
  - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
 
32
 
33
  ### Full Model Architecture
34
  ```text
35
  CrossEncoder(
36
  (0): Transformer({'transformer_task': 'sequence-classification', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}}, 'module_output_name': 'scores', 'architecture': 'BertForSequenceClassification'})
37
  )
38
- UsageDirect Usage (Sentence Transformers)First, install the Sentence Transformers library:Bashpip install -U sentence-transformers
39
- Then load your deployed model and run inference:Pythonfrom sentence_transformers import CrossEncoder
 
 
 
 
 
 
 
40
 
41
  # Load your custom reranker from the Hugging Face Hub
42
- model = CrossEncoder("kiel/KielEmbed-Rerank")
43
 
44
  # Get relevance scores for pairs of inputs (query, document)
45
  pairs = [
@@ -65,11 +73,9 @@ ranks = model.rank(
65
  ]
66
  )
67
  print(ranks)
68
- Training DetailsTraining DatasetKiel Reranker CorpusSize: 5,000 training samplesColumns: text1, text2, and labelDataset Statistics:Text 1: Min: 15 tokens | Mean: 33.25 tokens | Max: 58 tokensText 2: Min: 16 tokens | Mean: 33.05 tokens | Max: 52 tokensLabel Distribution: Class 0 (~34.62%), Class 1 (~65.38%)Loss Function: BinaryCrossEntropyLoss with parameters:JSON{
69
- "activation_fn": "torch.nn.modules.linear.Identity",
70
- "pos_weight": null
71
- }
72
- Training HyperparametersPer Device Train Batch Size: 4Gradient Accumulation Steps: 8 (Effective batch size = 32)Learning Rate: 2e-05Number of Epochs: 1Warmup Steps: 0.1Mixed Precision: FP16 EnabledOptimizer: adamw_torch_fusedTraining LogsEpochStepTraining Loss0.16251.75220.32500.41950.48750.35220.641000.36460.81250.36390.961500.3551Total Training Time: 5.2 minutesFramework VersionsPython: 3.13.15Sentence Transformers: 5.7.0Transformers: 5.16.1PyTorch: 2.11.0+cu128Accelerate: 1.14.0Datasets: 4.8.5Tokenizers: 0.23.1Additional ResourcesTraining and Finetuning Reranker Models with Sentence Transformers: Comprehensive guide for training custom Cross-Encoders.CitationBibTeXCode snippet@inproceedings{reimers-2019-sentence-bert,
73
  title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
74
  author = "Reimers, Nils and Gurevych, Iryna",
75
  booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
@@ -77,4 +83,4 @@ Training HyperparametersPer Device Train Batch Size: 4Gradient Accumulation Step
77
  year = "2019",
78
  publisher = "Association for Computational Linguistics",
79
  url = "[https://arxiv.org/abs/1908.10084](https://arxiv.org/abs/1908.10084)",
80
- }
 
3
  - sentence-transformers
4
  - cross-encoder
5
  - reranker
 
 
 
6
  base_model: BAAI/bge-reranker-base
7
  pipeline_tag: text-ranking
8
  library_name: sentence-transformers
9
  ---
10
 
11
+ # Kiel-2-Rerank
 
12
 
13
+ **Kiel-2-Rerank** is a high-performance Cross-Encoder reranker based on `BAAI/bge-reranker-base`.
14
+
15
+ This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model that evaluates query-document text pairs jointly to compute precise relevance scores for semantic search and multi-stage retrieval pipelines.
16
+
17
+ ---
18
 
19
  ## Model Details
20
 
 
29
  - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
30
  - **Cross Encoder Guide:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
31
  - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
32
+ - **Hugging Face Hub:** [kiel2/Kiel-2-Rerank](https://huggingface.co/kiel2/Kiel-2-Rerank)
33
 
34
  ### Full Model Architecture
35
  ```text
36
  CrossEncoder(
37
  (0): Transformer({'transformer_task': 'sequence-classification', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}}, 'module_output_name': 'scores', 'architecture': 'BertForSequenceClassification'})
38
  )
39
+ Direct Usage (Sentence Transformers)
40
+ First, install the Sentence Transformers library:
41
+
42
+ Bash
43
+ pip install -U sentence-transformers
44
+ Then load your model and run inference:
45
+
46
+ Python
47
+ from sentence_transformers import CrossEncoder
48
 
49
  # Load your custom reranker from the Hugging Face Hub
50
+ model = CrossEncoder("kiel2/Kiel-2-Rerank")
51
 
52
  # Get relevance scores for pairs of inputs (query, document)
53
  pairs = [
 
73
  ]
74
  )
75
  print(ranks)
76
+ Citation
77
+ Code snippet
78
+ @inproceedings{reimers-2019-sentence-bert,
 
 
79
  title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
80
  author = "Reimers, Nils and Gurevych, Iryna",
81
  booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
 
83
  year = "2019",
84
  publisher = "Association for Computational Linguistics",
85
  url = "[https://arxiv.org/abs/1908.10084](https://arxiv.org/abs/1908.10084)",
86
+ }