Amdestya commited on
Commit
de19dde
·
verified ·
1 Parent(s): a3b43f2

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: distilbert-base-uncased
4
+ pipeline_tag: text-ranking
5
+ library_name: sentence-transformers
6
+ tags: [cross-encoder, reranker, msmarco]
7
+ language: [en]
8
+ ---
9
+
10
+ # ce-cat-distilbert
11
+
12
+ MiniLM-L12 cross-encoder reranker trained under the configuration stated in §4 of
13
+ [Askari et al., *"Injecting the BM25 Score as Text Improves BERT-Based Re-rankers"*, ECIR 2023](https://arxiv.org/abs/2301.09728):
14
+ **cross-entropy loss** with **early stopping on validation nDCG@10**.
15
+
16
+ Paired with [`Amdestya/ce-bm25cat-distilbert`](https://huggingface.co/Amdestya/ce-bm25cat-distilbert) — identical data,
17
+ schedule and seed; the arms differ only in the input construction.
18
+
19
+ ## Input format
20
+
21
+ ```python
22
+ text_a = f"{query}"
23
+ text_b = passage
24
+ # tokenises to: [CLS] query [SEP] passage [SEP]
25
+ ```
26
+
27
+ Matched no-injection baseline. Do NOT inject anything into text_a -- this model has never seen a numeric token there.
28
+
29
+
30
+ ## Usage
31
+
32
+ ```python
33
+ from sentence_transformers import CrossEncoder
34
+ model = CrossEncoder("Amdestya/ce-cat-distilbert", max_length=256)
35
+ ```
36
+
37
+ Outputs are raw logits (identity activation), unbounded, higher = more relevant.
38
+
39
+ ## Training
40
+
41
+ | | |
42
+ |---|---|
43
+ | objective | cross-entropy on binary relevance |
44
+ | optimizer | Adam, lr 7e-06 |
45
+ | batch size | 32 |
46
+ | length caps | query 30, passage 200 tokens |
47
+ | stopping | early stopping on msmarco-passage/trec-dl-2020/judged nDCG@10, patience 3 |
48
+ | steps | 20000 |
49
+ | best validation nDCG@10 | 0.6872 |
50
+ | seed | 42 |
51
+
52
+ Built as a reference artifact for a dissertation study on reproducing IR papers with LLMs.
USAGE.json ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "base_model": "distilbert-base-uncased",
3
+ "trained_as": "cross-encoder CAT (cross-entropy, paper section 4)",
4
+ "input_format": {
5
+ "text_a": "{query}",
6
+ "text_b": "{passage}",
7
+ "tokenises_to": "[CLS] query [SEP] passage [SEP]",
8
+ "note": "Matched no-injection baseline. Do NOT inject anything into text_a -- this model has never seen a numeric token there."
9
+ },
10
+ "bm25_normalisation": null,
11
+ "loss": "cross-entropy on binary relevance (BCEWithLogits, num_labels=1)",
12
+ "stopping": "early stopping on msmarco-passage/trec-dl-2020/judged nDCG@10, patience 3",
13
+ "max_length": 256,
14
+ "train_batch_size": 32,
15
+ "lr": 7e-06,
16
+ "query_max_tokens": 30,
17
+ "passage_max_tokens": 200,
18
+ "steps": 20000,
19
+ "best_val_ndcg@10": 0.6872370440113406,
20
+ "paired_with": "Amdestya/ce-bm25cat-distilbert"
21
+ }
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation": "gelu",
3
+ "architectures": [
4
+ "DistilBertForSequenceClassification"
5
+ ],
6
+ "attention_dropout": 0.1,
7
+ "dim": 768,
8
+ "dropout": 0.1,
9
+ "dtype": "float32",
10
+ "hidden_dim": 3072,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "label2id": {
16
+ "LABEL_0": 0
17
+ },
18
+ "max_position_embeddings": 512,
19
+ "model_type": "distilbert",
20
+ "n_heads": 12,
21
+ "n_layers": 6,
22
+ "pad_token_id": 0,
23
+ "qa_dropout": 0.1,
24
+ "seq_classif_dropout": 0.2,
25
+ "sinusoidal_pos_embds": false,
26
+ "tie_weights_": true,
27
+ "transformers_version": "4.57.0",
28
+ "vocab_size": 30522
29
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebb7ddba3560fe28b5f58208aa5da7329613b2926f9580284b677ef6f8548dd4
3
+ size 267829484
special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": false,
45
+ "cls_token": "[CLS]",
46
+ "do_lower_case": true,
47
+ "extra_special_tokens": {},
48
+ "mask_token": "[MASK]",
49
+ "model_max_length": 512,
50
+ "pad_token": "[PAD]",
51
+ "sep_token": "[SEP]",
52
+ "strip_accents": null,
53
+ "tokenize_chinese_chars": true,
54
+ "tokenizer_class": "DistilBertTokenizer",
55
+ "unk_token": "[UNK]"
56
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff